repo
stringclasses
21 values
path
stringlengths
10
105
func_name
stringlengths
6
64
original_string
stringlengths
105
15.6k
language
stringclasses
1 value
code
stringlengths
105
15.6k
code_tokens
listlengths
29
2.15k
docstring
stringlengths
11
2.85k
docstring_tokens
listlengths
1
290
sha
stringclasses
21 values
url
stringlengths
100
194
partition
stringclasses
1 value
summary
stringlengths
8
319
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
laravel/framework
src/Illuminate/Validation/Concerns/FormatsMessages.php
FormatsMessages.getAttributeList
protected function getAttributeList(array $values) { $attributes = []; // For each attribute in the list we will simply get its displayable form as // this is convenient when replacing lists of parameters like some of the // replacement functions do when formatting out the validatio...
php
protected function getAttributeList(array $values) { $attributes = []; // For each attribute in the list we will simply get its displayable form as // this is convenient when replacing lists of parameters like some of the // replacement functions do when formatting out the validatio...
[ "protected", "function", "getAttributeList", "(", "array", "$", "values", ")", "{", "$", "attributes", "=", "[", "]", ";", "// For each attribute in the list we will simply get its displayable form as", "// this is convenient when replacing lists of parameters like some of the", "/...
Transform an array of attributes to their displayable form. @param array $values @return array
[ "Transform", "an", "array", "of", "attributes", "to", "their", "displayable", "form", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/FormatsMessages.php#L332-L344
train
Returns the list of attributes that can be displayed in the validation message
[ 30522, 5123, 3853, 2131, 19321, 3089, 8569, 9834, 2923, 1006, 9140, 1002, 5300, 1007, 1063, 1002, 12332, 1027, 1031, 1033, 1025, 1013, 1013, 2005, 2169, 17961, 1999, 1996, 2862, 2057, 2097, 3432, 2131, 2049, 4653, 3085, 2433, 2004, 1013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Validate/StringLength.php
Zend_Validate_StringLength.setEncoding
public function setEncoding($encoding = null) { if ($encoding !== null) { $orig = PHP_VERSION_ID < 50600 ? iconv_get_encoding('internal_encoding') : ini_get('default_charset'); if (PHP_VERSION_ID < 50600) { $result = ico...
php
public function setEncoding($encoding = null) { if ($encoding !== null) { $orig = PHP_VERSION_ID < 50600 ? iconv_get_encoding('internal_encoding') : ini_get('default_charset'); if (PHP_VERSION_ID < 50600) { $result = ico...
[ "public", "function", "setEncoding", "(", "$", "encoding", "=", "null", ")", "{", "if", "(", "$", "encoding", "!==", "null", ")", "{", "$", "orig", "=", "PHP_VERSION_ID", "<", "50600", "?", "iconv_get_encoding", "(", "'internal_encoding'", ")", ":", "ini_g...
Sets a new encoding to use @param string $encoding @return Zend_Validate_StringLength
[ "Sets", "a", "new", "encoding", "to", "use" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Validate/StringLength.php#L199-L224
train
Set encoding of the current language
[ 30522, 2270, 3853, 2275, 2368, 3597, 4667, 1006, 1002, 17181, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 17181, 999, 1027, 1027, 19701, 1007, 1063, 1002, 2030, 8004, 1027, 25718, 1035, 2544, 1035, 8909, 1026, 2753, 16086, 2692, 1029, 12696,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Schema/Grammars/Grammar.php
Grammar.compileRenameColumn
public function compileRenameColumn(Blueprint $blueprint, Fluent $command, Connection $connection) { return RenameColumn::compile($this, $blueprint, $command, $connection); }
php
public function compileRenameColumn(Blueprint $blueprint, Fluent $command, Connection $connection) { return RenameColumn::compile($this, $blueprint, $command, $connection); }
[ "public", "function", "compileRenameColumn", "(", "Blueprint", "$", "blueprint", ",", "Fluent", "$", "command", ",", "Connection", "$", "connection", ")", "{", "return", "RenameColumn", "::", "compile", "(", "$", "this", ",", "$", "blueprint", ",", "$", "com...
Compile a rename column command. @param \Illuminate\Database\Schema\Blueprint $blueprint @param \Illuminate\Support\Fluent $command @param \Illuminate\Database\Connection $connection @return array
[ "Compile", "a", "rename", "column", "command", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/Grammar.php#L38-L41
train
Compiles a RenameColumn command.
[ 30522, 2270, 3853, 21624, 8189, 4168, 25778, 2819, 2078, 1006, 2630, 16550, 1002, 2630, 16550, 1010, 19376, 1002, 3094, 1010, 4434, 1002, 4434, 1007, 1063, 2709, 14916, 14074, 25778, 2819, 2078, 1024, 1024, 4012, 22090, 1006, 1002, 2023, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
slimphp/Slim
Slim/Http/Message.php
Message.withoutHeader
public function withoutHeader($name) { $clone = clone $this; $clone->headers->remove($name); if ($this instanceof Response && $this->body instanceof NonBufferedBody) { header_remove($name); } return $clone; }
php
public function withoutHeader($name) { $clone = clone $this; $clone->headers->remove($name); if ($this instanceof Response && $this->body instanceof NonBufferedBody) { header_remove($name); } return $clone; }
[ "public", "function", "withoutHeader", "(", "$", "name", ")", "{", "$", "clone", "=", "clone", "$", "this", ";", "$", "clone", "->", "headers", "->", "remove", "(", "$", "name", ")", ";", "if", "(", "$", "this", "instanceof", "Response", "&&", "$", ...
Return an instance without the specified header. Header resolution MUST be done without case-sensitivity. This method MUST be implemented in such a way as to retain the immutability of the message, and MUST return an instance that removes the named header. @param string $name Case-insensitive header field name to re...
[ "Return", "an", "instance", "without", "the", "specified", "header", "." ]
ccef5f7d8bcd469d59cbe64f6210d83764f91543
https://github.com/slimphp/Slim/blob/ccef5f7d8bcd469d59cbe64f6210d83764f91543/Slim/Http/Message.php#L253-L263
train
Remove a header from the response without the specified name
[ 30522, 2270, 3853, 2302, 4974, 2121, 1006, 1002, 2171, 1007, 1063, 1002, 17598, 1027, 17598, 1002, 2023, 1025, 1002, 17598, 1011, 1028, 20346, 2015, 1011, 1028, 6366, 1006, 1002, 2171, 1007, 1025, 2065, 1006, 1002, 2023, 6013, 11253, 3433, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Tracker/GoalManager.php
GoalManager.formatRegex
public static function formatRegex($pattern) { if (strpos($pattern, '/') !== false && strpos($pattern, '\\/') === false ) { $pattern = str_replace('/', '\\/', $pattern); } return '/' . $pattern . '/'; }
php
public static function formatRegex($pattern) { if (strpos($pattern, '/') !== false && strpos($pattern, '\\/') === false ) { $pattern = str_replace('/', '\\/', $pattern); } return '/' . $pattern . '/'; }
[ "public", "static", "function", "formatRegex", "(", "$", "pattern", ")", "{", "if", "(", "strpos", "(", "$", "pattern", ",", "'/'", ")", "!==", "false", "&&", "strpos", "(", "$", "pattern", ",", "'\\\\/'", ")", "===", "false", ")", "{", "$", "pattern...
Formats a goal regex pattern to a usable regex @param string $pattern @return string
[ "Formats", "a", "goal", "regex", "pattern", "to", "a", "usable", "regex" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Tracker/GoalManager.php#L900-L908
train
Format regex pattern
[ 30522, 2270, 10763, 3853, 4289, 2890, 3351, 2595, 1006, 1002, 5418, 1007, 1063, 2065, 1006, 2358, 14536, 2891, 1006, 1002, 5418, 1010, 1005, 1013, 1005, 1007, 999, 1027, 1027, 6270, 1004, 1004, 2358, 14536, 2891, 1006, 1002, 5418, 1010, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php
ExceptionListener.onKernelException
public function onKernelException(GetResponseForExceptionEvent $event) { $exception = $event->getException(); do { if ($exception instanceof AuthenticationException) { return $this->handleAuthenticationException($event, $exception); } elseif ($exception instan...
php
public function onKernelException(GetResponseForExceptionEvent $event) { $exception = $event->getException(); do { if ($exception instanceof AuthenticationException) { return $this->handleAuthenticationException($event, $exception); } elseif ($exception instan...
[ "public", "function", "onKernelException", "(", "GetResponseForExceptionEvent", "$", "event", ")", "{", "$", "exception", "=", "$", "event", "->", "getException", "(", ")", ";", "do", "{", "if", "(", "$", "exception", "instanceof", "AuthenticationException", ")"...
Handles security related exceptions.
[ "Handles", "security", "related", "exceptions", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php#L90-L102
train
This method is called when an exception occurs in the kernel.
[ 30522, 2270, 3853, 2006, 5484, 11877, 10288, 24422, 1006, 2131, 6072, 26029, 20106, 5686, 2595, 24422, 18697, 3372, 1002, 2724, 1007, 1063, 1002, 6453, 1027, 1002, 2724, 1011, 1028, 2131, 10288, 24422, 1006, 1007, 1025, 2079, 1063, 2065, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php
PostgresGrammar.generatableColumn
protected function generatableColumn($type, Fluent $column) { if (! $column->autoIncrement && is_null($column->generatedAs)) { return $type; } if ($column->autoIncrement && is_null($column->generatedAs)) { return with([ 'integer' => 'serial', ...
php
protected function generatableColumn($type, Fluent $column) { if (! $column->autoIncrement && is_null($column->generatedAs)) { return $type; } if ($column->autoIncrement && is_null($column->generatedAs)) { return with([ 'integer' => 'serial', ...
[ "protected", "function", "generatableColumn", "(", "$", "type", ",", "Fluent", "$", "column", ")", "{", "if", "(", "!", "$", "column", "->", "autoIncrement", "&&", "is_null", "(", "$", "column", "->", "generatedAs", ")", ")", "{", "return", "$", "type", ...
Create the column definition for a generatable column. @param string $type @param \Illuminate\Support\Fluent $column @return string
[ "Create", "the", "column", "definition", "for", "a", "generatable", "column", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php#L506-L532
train
Generate column name
[ 30522, 5123, 3853, 11416, 10880, 25778, 2819, 2078, 1006, 1002, 2828, 1010, 19376, 1002, 5930, 1007, 1063, 2065, 1006, 999, 1002, 5930, 1011, 1028, 8285, 2378, 16748, 3672, 1004, 1004, 2003, 1035, 19701, 1006, 1002, 5930, 1011, 1028, 7013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Plugin/Controller.php
Controller.getLastUnitGraph
protected function getLastUnitGraph($currentModuleName, $currentControllerAction, $apiMethod) { $view = ViewDataTableFactory::build( Evolution::ID, $apiMethod, $currentModuleName . '.' . $currentControllerAction, $forceDefault = true); $view->config->show_goals = false; return $v...
php
protected function getLastUnitGraph($currentModuleName, $currentControllerAction, $apiMethod) { $view = ViewDataTableFactory::build( Evolution::ID, $apiMethod, $currentModuleName . '.' . $currentControllerAction, $forceDefault = true); $view->config->show_goals = false; return $v...
[ "protected", "function", "getLastUnitGraph", "(", "$", "currentModuleName", ",", "$", "currentControllerAction", ",", "$", "apiMethod", ")", "{", "$", "view", "=", "ViewDataTableFactory", "::", "build", "(", "Evolution", "::", "ID", ",", "$", "apiMethod", ",", ...
Returns a ViewDataTable object that will render a jqPlot evolution graph for the last30 days/weeks/etc. of the current period, relative to the current date. @param string $currentModuleName The name of the current plugin. @param string $currentControllerAction The name of the action that renders the desired report. @p...
[ "Returns", "a", "ViewDataTable", "object", "that", "will", "render", "a", "jqPlot", "evolution", "graph", "for", "the", "last30", "days", "/", "weeks", "/", "etc", ".", "of", "the", "current", "period", "relative", "to", "the", "current", "date", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Plugin/Controller.php#L365-L371
train
Get last unit graph
[ 30522, 5123, 3853, 2131, 8523, 8525, 3490, 2102, 14413, 1006, 1002, 2783, 5302, 8566, 20844, 4168, 1010, 1002, 2783, 8663, 13181, 10820, 18908, 3258, 1010, 1002, 17928, 11368, 6806, 2094, 1007, 1063, 1002, 3193, 1027, 3193, 2850, 29336, 308...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Query/Grammars/PostgresGrammar.php
PostgresGrammar.compileSelect
public function compileSelect(Builder $query) { if ($query->unions && $query->aggregate) { return $this->compileUnionAggregate($query); } $sql = parent::compileSelect($query); if ($query->unions) { $sql = '('.$sql.') '.$this->compileUnions($query); }...
php
public function compileSelect(Builder $query) { if ($query->unions && $query->aggregate) { return $this->compileUnionAggregate($query); } $sql = parent::compileSelect($query); if ($query->unions) { $sql = '('.$sql.') '.$this->compileUnions($query); }...
[ "public", "function", "compileSelect", "(", "Builder", "$", "query", ")", "{", "if", "(", "$", "query", "->", "unions", "&&", "$", "query", "->", "aggregate", ")", "{", "return", "$", "this", "->", "compileUnionAggregate", "(", "$", "query", ")", ";", ...
Compile a select query into SQL. @param \Illuminate\Database\Query\Builder $query @return string
[ "Compile", "a", "select", "query", "into", "SQL", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Grammars/PostgresGrammar.php#L113-L126
train
Compiles a select statement into a SQL string
[ 30522, 2270, 3853, 4012, 22090, 11246, 22471, 1006, 12508, 1002, 23032, 30524, 1011, 1028, 9572, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 4012, 22090, 19496, 7856, 13871, 2890, 5867, 1006, 1002, 23032, 1007, 1025, 1065, 1002, 29296, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
overtrue/wechat
src/Work/User/TagClient.php
TagClient.tagOrUntagUsers
protected function tagOrUntagUsers(string $endpoint, int $tagId, array $userList = [], array $partyList = []) { $data = [ 'tagid' => $tagId, 'userlist' => $userList, 'partylist' => $partyList, ]; return $this->httpPostJson($endpoint, $data); }
php
protected function tagOrUntagUsers(string $endpoint, int $tagId, array $userList = [], array $partyList = []) { $data = [ 'tagid' => $tagId, 'userlist' => $userList, 'partylist' => $partyList, ]; return $this->httpPostJson($endpoint, $data); }
[ "protected", "function", "tagOrUntagUsers", "(", "string", "$", "endpoint", ",", "int", "$", "tagId", ",", "array", "$", "userList", "=", "[", "]", ",", "array", "$", "partyList", "=", "[", "]", ")", "{", "$", "data", "=", "[", "'tagid'", "=>", "$", ...
@param $endpoint @param $tagId @param array $userList @param array $partyList @return mixed
[ "@param", "$endpoint", "@param", "$tagId", "@param", "array", "$userList", "@param", "array", "$partyList" ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Work/User/TagClient.php#L133-L142
train
Tag or untag users
[ 30522, 5123, 3853, 6415, 2953, 16671, 8490, 20330, 2015, 1006, 5164, 1002, 2203, 8400, 1010, 20014, 1002, 6415, 3593, 1010, 9140, 1002, 5310, 9863, 1027, 1031, 1033, 1010, 9140, 1002, 2283, 9863, 1027, 1031, 1033, 1007, 1063, 1002, 2951, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
overtrue/wechat
src/OfficialAccount/ShakeAround/MaterialClient.php
MaterialClient.uploadImage
public function uploadImage(string $path, string $type = 'icon') { if (!file_exists($path) || !is_readable($path)) { throw new InvalidArgumentException(sprintf('File does not exist, or the file is unreadable: "%s"', $path)); } return $this->httpUpload('shakearound/material/add',...
php
public function uploadImage(string $path, string $type = 'icon') { if (!file_exists($path) || !is_readable($path)) { throw new InvalidArgumentException(sprintf('File does not exist, or the file is unreadable: "%s"', $path)); } return $this->httpUpload('shakearound/material/add',...
[ "public", "function", "uploadImage", "(", "string", "$", "path", ",", "string", "$", "type", "=", "'icon'", ")", "{", "if", "(", "!", "file_exists", "(", "$", "path", ")", "||", "!", "is_readable", "(", "$", "path", ")", ")", "{", "throw", "new", "...
Upload image material. @param string $path @param string $type @return string @throws InvalidArgumentException
[ "Upload", "image", "material", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/ShakeAround/MaterialClient.php#L34-L41
train
Upload image to shakearound
[ 30522, 2270, 3853, 2039, 11066, 9581, 3351, 1006, 5164, 1002, 4130, 1010, 5164, 1002, 2828, 1027, 1005, 12696, 1005, 1007, 1063, 2065, 1006, 999, 5371, 1035, 6526, 1006, 1002, 4130, 1007, 1064, 1064, 999, 2003, 1035, 3191, 3085, 1006, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Db/Adapter/Pdo/Mysql.php
Zend_Db_Adapter_Pdo_Mysql._dsn
protected function _dsn() { $dsn = parent::_dsn(); if (isset($this->_config['charset'])) { $dsn .= ';charset=' . $this->_config['charset']; } return $dsn; }
php
protected function _dsn() { $dsn = parent::_dsn(); if (isset($this->_config['charset'])) { $dsn .= ';charset=' . $this->_config['charset']; } return $dsn; }
[ "protected", "function", "_dsn", "(", ")", "{", "$", "dsn", "=", "parent", "::", "_dsn", "(", ")", ";", "if", "(", "isset", "(", "$", "this", "->", "_config", "[", "'charset'", "]", ")", ")", "{", "$", "dsn", ".=", "';charset='", ".", "$", "this"...
Override _dsn() and ensure that charset is incorporated in mysql @see Zend_Db_Adapter_Pdo_Abstract::_dsn()
[ "Override", "_dsn", "()", "and", "ensure", "that", "charset", "is", "incorporated", "in", "mysql" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Adapter/Pdo/Mysql.php#L83-L90
train
Return the DSN with charset if set
[ 30522, 5123, 3853, 1035, 16233, 2078, 1006, 1007, 1063, 1002, 16233, 2078, 1027, 6687, 1024, 1024, 1035, 16233, 2078, 1006, 1007, 1025, 2065, 1006, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 1035, 9530, 8873, 2290, 1031, 1005, 25869, 13462,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Bundle/WebProfilerBundle/Csp/ContentSecurityPolicyHandler.php
ContentSecurityPolicyHandler.updateCspHeaders
private function updateCspHeaders(Response $response, array $nonces = []) { $nonces = array_replace([ 'csp_script_nonce' => $this->generateNonce(), 'csp_style_nonce' => $this->generateNonce(), ], $nonces); $ruleIsSet = false; $headers = $this->getCspHeaders(...
php
private function updateCspHeaders(Response $response, array $nonces = []) { $nonces = array_replace([ 'csp_script_nonce' => $this->generateNonce(), 'csp_style_nonce' => $this->generateNonce(), ], $nonces); $ruleIsSet = false; $headers = $this->getCspHeaders(...
[ "private", "function", "updateCspHeaders", "(", "Response", "$", "response", ",", "array", "$", "nonces", "=", "[", "]", ")", "{", "$", "nonces", "=", "array_replace", "(", "[", "'csp_script_nonce'", "=>", "$", "this", "->", "generateNonce", "(", ")", ",",...
Updates Content-Security-Policy headers in a response. @return array
[ "Updates", "Content", "-", "Security", "-", "Policy", "headers", "in", "a", "response", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/WebProfilerBundle/Csp/ContentSecurityPolicyHandler.php#L119-L160
train
Update the CSP headers
[ 30522, 2797, 3853, 10651, 6169, 8458, 13775, 2545, 1006, 3433, 1002, 3433, 1010, 9140, 1002, 2512, 9623, 1027, 1031, 1033, 1007, 1063, 1002, 2512, 9623, 1027, 9140, 1035, 5672, 1006, 1031, 1005, 20116, 2361, 1035, 5896, 1035, 2512, 3401, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Queue/Worker.php
Worker.raiseAfterJobEvent
protected function raiseAfterJobEvent($connectionName, $job) { $this->events->dispatch(new Events\JobProcessed( $connectionName, $job )); }
php
protected function raiseAfterJobEvent($connectionName, $job) { $this->events->dispatch(new Events\JobProcessed( $connectionName, $job )); }
[ "protected", "function", "raiseAfterJobEvent", "(", "$", "connectionName", ",", "$", "job", ")", "{", "$", "this", "->", "events", "->", "dispatch", "(", "new", "Events", "\\", "JobProcessed", "(", "$", "connectionName", ",", "$", "job", ")", ")", ";", "...
Raise the after queue job event. @param string $connectionName @param \Illuminate\Contracts\Queue\Job $job @return void
[ "Raise", "the", "after", "queue", "job", "event", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Queue/Worker.php#L467-L472
train
Raise after job event
[ 30522, 5123, 3853, 5333, 10354, 3334, 5558, 4783, 15338, 1006, 1002, 4434, 18442, 1010, 1002, 3105, 1007, 1063, 1002, 2023, 1011, 1028, 2824, 1011, 1028, 18365, 1006, 2047, 2824, 1032, 3105, 21572, 9623, 6924, 1006, 1002, 4434, 18442, 1010,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/DataTable.php
DataTable.getRows
public function getRows() { if (is_null($this->summaryRow)) { return $this->rows; } else { return $this->rows + array(self::ID_SUMMARY_ROW => $this->summaryRow); } }
php
public function getRows() { if (is_null($this->summaryRow)) { return $this->rows; } else { return $this->rows + array(self::ID_SUMMARY_ROW => $this->summaryRow); } }
[ "public", "function", "getRows", "(", ")", "{", "if", "(", "is_null", "(", "$", "this", "->", "summaryRow", ")", ")", "{", "return", "$", "this", "->", "rows", ";", "}", "else", "{", "return", "$", "this", "->", "rows", "+", "array", "(", "self", ...
Returns the array of Rows. Internal logic in Matomo core should avoid using this method as it is time and memory consuming when being executed thousands of times. The alternative is to use {@link getRowsWithoutSummaryRow()} + get the summary row manually. @return Row[]
[ "Returns", "the", "array", "of", "Rows", ".", "Internal", "logic", "in", "Matomo", "core", "should", "avoid", "using", "this", "method", "as", "it", "is", "time", "and", "memory", "consuming", "when", "being", "executed", "thousands", "of", "times", ".", "...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataTable.php#L889-L896
train
Get rows of summary
[ 30522, 2270, 3853, 2131, 10524, 2015, 1006, 1007, 1063, 2065, 1006, 2003, 1035, 19701, 1006, 1002, 2023, 1011, 1028, 12654, 10524, 1007, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 10281, 1025, 1065, 2842, 1063, 2709, 1002, 2023, 1011, 1028, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/DependencyInjection/Definition.php
Definition.setAutowired
public function setAutowired($autowired) { $this->changes['autowired'] = true; $this->autowired = (bool) $autowired; return $this; }
php
public function setAutowired($autowired) { $this->changes['autowired'] = true; $this->autowired = (bool) $autowired; return $this; }
[ "public", "function", "setAutowired", "(", "$", "autowired", ")", "{", "$", "this", "->", "changes", "[", "'autowired'", "]", "=", "true", ";", "$", "this", "->", "autowired", "=", "(", "bool", ")", "$", "autowired", ";", "return", "$", "this", ";", ...
Enables/disables autowiring. @param bool $autowired @return $this
[ "Enables", "/", "disables", "autowiring", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/Definition.php#L834-L841
train
Set Autowired Field
[ 30522, 2270, 3853, 2275, 4887, 18790, 27559, 1006, 1002, 8285, 20357, 2094, 1007, 1063, 1002, 2023, 1011, 1028, 3431, 1031, 1005, 8285, 20357, 2094, 1005, 1033, 1027, 2995, 1025, 1002, 2023, 1011, 1028, 8285, 20357, 2094, 1027, 1006, 22017,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
walkor/Workerman
Worker.php
Worker.displayUI
protected static function displayUI() { global $argv; if (in_array('-q', $argv)) { return; } if (static::$_OS !== OS_TYPE_LINUX) { static::safeEcho("----------------------- WORKERMAN -----------------------------\r\n"); static::safeEcho('Workerman ...
php
protected static function displayUI() { global $argv; if (in_array('-q', $argv)) { return; } if (static::$_OS !== OS_TYPE_LINUX) { static::safeEcho("----------------------- WORKERMAN -----------------------------\r\n"); static::safeEcho('Workerman ...
[ "protected", "static", "function", "displayUI", "(", ")", "{", "global", "$", "argv", ";", "if", "(", "in_array", "(", "'-q'", ",", "$", "argv", ")", ")", "{", "return", ";", "}", "if", "(", "static", "::", "$", "_OS", "!==", "OS_TYPE_LINUX", ")", ...
Display staring UI. @return void
[ "Display", "staring", "UI", "." ]
13649907f05014fcfffcfccaef01e63ad3339351
https://github.com/walkor/Workerman/blob/13649907f05014fcfffcfccaef01e63ad3339351/Worker.php#L711-L764
train
Display UI of the worker
[ 30522, 5123, 10763, 3853, 4653, 10179, 1006, 1007, 1063, 3795, 1002, 12098, 2290, 2615, 1025, 2065, 1006, 1999, 1035, 9140, 1006, 1005, 1011, 1053, 1005, 1010, 1002, 12098, 2290, 2615, 1007, 1007, 1063, 2709, 1025, 1065, 2065, 1006, 10763, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpFoundation/Request.php
Request.getAcceptableContentTypes
public function getAcceptableContentTypes() { if (null !== $this->acceptableContentTypes) { return $this->acceptableContentTypes; } return $this->acceptableContentTypes = array_keys(AcceptHeader::fromString($this->headers->get('Accept'))->all()); }
php
public function getAcceptableContentTypes() { if (null !== $this->acceptableContentTypes) { return $this->acceptableContentTypes; } return $this->acceptableContentTypes = array_keys(AcceptHeader::fromString($this->headers->get('Accept'))->all()); }
[ "public", "function", "getAcceptableContentTypes", "(", ")", "{", "if", "(", "null", "!==", "$", "this", "->", "acceptableContentTypes", ")", "{", "return", "$", "this", "->", "acceptableContentTypes", ";", "}", "return", "$", "this", "->", "acceptableContentTyp...
Gets a list of content types acceptable by the client browser. @return array List of content types in preferable order
[ "Gets", "a", "list", "of", "content", "types", "acceptable", "by", "the", "client", "browser", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Request.php#L1673-L1680
train
Get Acceptable Content Types
[ 30522, 2270, 3853, 2131, 6305, 3401, 22799, 3468, 8663, 6528, 15353, 10374, 1006, 1007, 1063, 2065, 1006, 19701, 999, 1027, 1027, 1002, 2023, 1011, 1028, 11701, 8663, 6528, 15353, 10374, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 11701, 8663...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/LanguagesManager/LanguagesManager.php
LanguagesManager.getLanguagesSelector
public function getLanguagesSelector() { $view = new View("@LanguagesManager/getLanguagesSelector"); $view->languages = API::getInstance()->getAvailableLanguageNames(); $view->currentLanguageCode = self::getLanguageCodeForCurrentUser(); $view->currentLanguageName = self::getLanguageN...
php
public function getLanguagesSelector() { $view = new View("@LanguagesManager/getLanguagesSelector"); $view->languages = API::getInstance()->getAvailableLanguageNames(); $view->currentLanguageCode = self::getLanguageCodeForCurrentUser(); $view->currentLanguageName = self::getLanguageN...
[ "public", "function", "getLanguagesSelector", "(", ")", "{", "$", "view", "=", "new", "View", "(", "\"@LanguagesManager/getLanguagesSelector\"", ")", ";", "$", "view", "->", "languages", "=", "API", "::", "getInstance", "(", ")", "->", "getAvailableLanguageNames",...
Renders and returns the language selector HTML. @return string
[ "Renders", "and", "returns", "the", "language", "selector", "HTML", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/LanguagesManager/LanguagesManager.php#L85-L92
train
Returns the languages selector
[ 30522, 2270, 3853, 2131, 25023, 6692, 8449, 11246, 22471, 2953, 1006, 1007, 1063, 1002, 3193, 1027, 2047, 3193, 1006, 1000, 1030, 4155, 24805, 4590, 1013, 2131, 25023, 6692, 8449, 11246, 22471, 2953, 1000, 1007, 1025, 1002, 3193, 1011, 1028...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Db/Statement/Oracle.php
Zend_Db_Statement_Oracle.errorInfo
public function errorInfo() { if (!$this->_stmt) { return false; } $error = oci_error($this->_stmt); if (!$error) { return false; } if (isset($error['sqltext'])) { return array( $error['code'], $err...
php
public function errorInfo() { if (!$this->_stmt) { return false; } $error = oci_error($this->_stmt); if (!$error) { return false; } if (isset($error['sqltext'])) { return array( $error['code'], $err...
[ "public", "function", "errorInfo", "(", ")", "{", "if", "(", "!", "$", "this", "->", "_stmt", ")", "{", "return", "false", ";", "}", "$", "error", "=", "oci_error", "(", "$", "this", "->", "_stmt", ")", ";", "if", "(", "!", "$", "error", ")", "...
Retrieves an array of error information, if any, associated with the last operation on the statement handle. @return array
[ "Retrieves", "an", "array", "of", "error", "information", "if", "any", "associated", "with", "the", "last", "operation", "on", "the", "statement", "handle", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Statement/Oracle.php#L195-L219
train
Returns an array of error codes and SQL text
[ 30522, 2270, 3853, 7561, 2378, 14876, 1006, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 1035, 2358, 20492, 1007, 1063, 2709, 6270, 1025, 1065, 1002, 7561, 1027, 1051, 6895, 1035, 7561, 1006, 1002, 2023, 1011, 1028, 1035, 2358, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/Actions/Archiver.php
Archiver.aggregateDayReport
public function aggregateDayReport() { $rankingQueryLimit = ArchivingHelper::getRankingQueryLimit(); ArchivingHelper::reloadConfig(); $this->initActionsTables(); $this->archiveDayPageActions($rankingQueryLimit); $this->archiveDaySiteSearchActions($rankingQueryLimit); ...
php
public function aggregateDayReport() { $rankingQueryLimit = ArchivingHelper::getRankingQueryLimit(); ArchivingHelper::reloadConfig(); $this->initActionsTables(); $this->archiveDayPageActions($rankingQueryLimit); $this->archiveDaySiteSearchActions($rankingQueryLimit); ...
[ "public", "function", "aggregateDayReport", "(", ")", "{", "$", "rankingQueryLimit", "=", "ArchivingHelper", "::", "getRankingQueryLimit", "(", ")", ";", "ArchivingHelper", "::", "reloadConfig", "(", ")", ";", "$", "this", "->", "initActionsTables", "(", ")", ";...
Archives Actions reports for a Day @return bool
[ "Archives", "Actions", "reports", "for", "a", "Day" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Actions/Archiver.php#L55-L71
train
Aggregate Day Report
[ 30522, 2270, 3853, 9572, 10259, 2890, 6442, 1006, 1007, 1063, 1002, 5464, 4226, 23320, 27605, 2102, 1027, 7905, 14966, 16001, 4842, 1024, 1024, 2131, 26763, 2075, 4226, 23320, 27605, 2102, 1006, 1007, 1025, 7905, 14966, 16001, 4842, 1024, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
PhpDumper.dumpLiteralClass
private function dumpLiteralClass(string $class): string { if (false !== strpos($class, '$')) { return sprintf('${($_ = %s) && false ?: "_"}', $class); } if (0 !== strpos($class, "'") || !preg_match('/^\'(?:\\\{2})?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?:\\\{2}[a-zA-Z_\x7f-\xf...
php
private function dumpLiteralClass(string $class): string { if (false !== strpos($class, '$')) { return sprintf('${($_ = %s) && false ?: "_"}', $class); } if (0 !== strpos($class, "'") || !preg_match('/^\'(?:\\\{2})?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?:\\\{2}[a-zA-Z_\x7f-\xf...
[ "private", "function", "dumpLiteralClass", "(", "string", "$", "class", ")", ":", "string", "{", "if", "(", "false", "!==", "strpos", "(", "$", "class", ",", "'$'", ")", ")", "{", "return", "sprintf", "(", "'${($_ = %s) && false ?: \"_\"}'", ",", "$", "cla...
Dumps a string to a literal (aka PHP Code) class value. @throws RuntimeException
[ "Dumps", "a", "string", "to", "a", "literal", "(", "aka", "PHP", "Code", ")", "class", "value", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php#L1658-L1670
train
Dump literal class name
[ 30522, 2797, 3853, 15653, 22779, 7941, 26266, 1006, 5164, 1002, 2465, 1007, 1024, 5164, 1063, 2065, 1006, 6270, 999, 1027, 1027, 2358, 14536, 2891, 1006, 1002, 2465, 1010, 1005, 1002, 1005, 1007, 1007, 1063, 2709, 9043, 2546, 1006, 1005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php
ConfigDumpReferenceCommand.execute
protected function execute(InputInterface $input, OutputInterface $output) { $io = new SymfonyStyle($input, $output); $errorIo = $io->getErrorStyle(); if (null === $name = $input->getArgument('name')) { $this->listBundles($errorIo); $errorIo->comment([ ...
php
protected function execute(InputInterface $input, OutputInterface $output) { $io = new SymfonyStyle($input, $output); $errorIo = $io->getErrorStyle(); if (null === $name = $input->getArgument('name')) { $this->listBundles($errorIo); $errorIo->comment([ ...
[ "protected", "function", "execute", "(", "InputInterface", "$", "input", ",", "OutputInterface", "$", "output", ")", "{", "$", "io", "=", "new", "SymfonyStyle", "(", "$", "input", ",", "$", "output", ")", ";", "$", "errorIo", "=", "$", "io", "->", "get...
{@inheritdoc} @throws \LogicException
[ "{", "@inheritdoc", "}" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php#L77-L132
train
Dump the default configuration
[ 30522, 5123, 3853, 15389, 1006, 7953, 18447, 2121, 12172, 1002, 7953, 1010, 6434, 18447, 2121, 12172, 1002, 6434, 1007, 1063, 1002, 22834, 1027, 2047, 25353, 2213, 14876, 4890, 21756, 2571, 1006, 1002, 7953, 1010, 1002, 6434, 1007, 1025, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php
GetSetMethodNormalizer.supportsNormalization
public function supportsNormalization($data, $format = null) { return parent::supportsNormalization($data, $format) && $this->supports(\get_class($data)); }
php
public function supportsNormalization($data, $format = null) { return parent::supportsNormalization($data, $format) && $this->supports(\get_class($data)); }
[ "public", "function", "supportsNormalization", "(", "$", "data", ",", "$", "format", "=", "null", ")", "{", "return", "parent", "::", "supportsNormalization", "(", "$", "data", ",", "$", "format", ")", "&&", "$", "this", "->", "supports", "(", "\\", "get...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php#L42-L45
train
Returns true if the normalizer supports the given data
[ 30522, 2270, 3853, 6753, 12131, 9067, 3989, 1006, 1002, 2951, 1010, 1002, 4289, 1027, 19701, 1007, 1063, 2709, 6687, 1024, 1024, 6753, 12131, 9067, 3989, 1006, 1002, 2951, 1010, 1002, 4289, 1007, 1004, 1004, 1002, 2023, 1011, 1028, 6753, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/DependencyInjection/Loader/Configurator/AbstractConfigurator.php
AbstractConfigurator.processValue
public static function processValue($value, $allowServices = false) { if (\is_array($value)) { foreach ($value as $k => $v) { $value[$k] = static::processValue($v, $allowServices); } return $value; } if ($value instanceof ReferenceConfigu...
php
public static function processValue($value, $allowServices = false) { if (\is_array($value)) { foreach ($value as $k => $v) { $value[$k] = static::processValue($v, $allowServices); } return $value; } if ($value instanceof ReferenceConfigu...
[ "public", "static", "function", "processValue", "(", "$", "value", ",", "$", "allowServices", "=", "false", ")", "{", "if", "(", "\\", "is_array", "(", "$", "value", ")", ")", "{", "foreach", "(", "$", "value", "as", "$", "k", "=>", "$", "v", ")", ...
Checks that a value is valid, optionally replacing Definition and Reference configurators by their configure value. @param mixed $value @param bool $allowServices whether Definition and Reference are allowed; by default, only scalars and arrays are @return mixed the value, optionally cast to a Definition/Reference
[ "Checks", "that", "a", "value", "is", "valid", "optionally", "replacing", "Definition", "and", "Reference", "configurators", "by", "their", "configure", "value", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/Loader/Configurator/AbstractConfigurator.php#L45-L86
train
Process value of type
[ 30522, 2270, 10763, 3853, 2832, 10175, 5657, 1006, 1002, 3643, 1010, 1002, 4473, 2121, 7903, 2229, 1027, 6270, 1007, 1063, 2065, 1006, 1032, 2003, 1035, 9140, 1006, 1002, 3643, 1007, 1007, 1063, 18921, 6776, 1006, 1002, 3643, 2004, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/HTML/QuickForm2/DataSource/SuperGlobal.php
HTML_QuickForm2_DataSource_SuperGlobal.arrayMapRecursive
protected function arrayMapRecursive($callback, $arr) { if (!is_array($arr)) { return call_user_func($callback, $arr); } $mapped = array(); foreach ($arr as $k => $v) { $mapped[$k] = is_array($v)? $this->arrayMapRecursive($callback, $...
php
protected function arrayMapRecursive($callback, $arr) { if (!is_array($arr)) { return call_user_func($callback, $arr); } $mapped = array(); foreach ($arr as $k => $v) { $mapped[$k] = is_array($v)? $this->arrayMapRecursive($callback, $...
[ "protected", "function", "arrayMapRecursive", "(", "$", "callback", ",", "$", "arr", ")", "{", "if", "(", "!", "is_array", "(", "$", "arr", ")", ")", "{", "return", "call_user_func", "(", "$", "callback", ",", "$", "arr", ")", ";", "}", "$", "mapped"...
A recursive version of array_map() function @param callback Callback function to apply @param mixed Input array @return array with callback applied
[ "A", "recursive", "version", "of", "array_map", "()", "function" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/DataSource/SuperGlobal.php#L123-L135
train
Array Map Recursive
[ 30522, 5123, 3853, 9140, 2863, 28139, 10841, 2869, 3512, 1006, 1002, 2655, 5963, 1010, 1002, 12098, 2099, 1007, 1063, 2065, 1006, 999, 2003, 1035, 9140, 1006, 1002, 12098, 2099, 1007, 1007, 1063, 2709, 2655, 1035, 5310, 1035, 4569, 2278, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Validate/LessThan.php
Zend_Validate_LessThan.isValid
public function isValid($value) { $this->_setValue($value); if ($this->_max <= $value) { $this->_error(self::NOT_LESS); return false; } return true; }
php
public function isValid($value) { $this->_setValue($value); if ($this->_max <= $value) { $this->_error(self::NOT_LESS); return false; } return true; }
[ "public", "function", "isValid", "(", "$", "value", ")", "{", "$", "this", "->", "_setValue", "(", "$", "value", ")", ";", "if", "(", "$", "this", "->", "_max", "<=", "$", "value", ")", "{", "$", "this", "->", "_error", "(", "self", "::", "NOT_LE...
Defined by Zend_Validate_Interface Returns true if and only if $value is less than max option @param mixed $value @return boolean
[ "Defined", "by", "Zend_Validate_Interface" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Validate/LessThan.php#L112-L120
train
Valida el valor de la lista
[ 30522, 2270, 3853, 2003, 10175, 3593, 1006, 1002, 3643, 1007, 1063, 1002, 2023, 1011, 1028, 1035, 30524, 7561, 1006, 2969, 1024, 1024, 2025, 1035, 2625, 1007, 1025, 2709, 6270, 1025, 1065, 2709, 2995, 1025, 1065, 102, 0, 0, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/cms/classes/CmsObjectCollection.php
CmsObjectCollection.withComponent
public function withComponent($components, $callback = null) { return $this->filter(function ($object) use ($components, $callback) { $hasComponent = false; foreach ((array) $components as $componentName) { if (!$callback && $object->hasComponent($componentName)) {...
php
public function withComponent($components, $callback = null) { return $this->filter(function ($object) use ($components, $callback) { $hasComponent = false; foreach ((array) $components as $componentName) { if (!$callback && $object->hasComponent($componentName)) {...
[ "public", "function", "withComponent", "(", "$", "components", ",", "$", "callback", "=", "null", ")", "{", "return", "$", "this", "->", "filter", "(", "function", "(", "$", "object", ")", "use", "(", "$", "components", ",", "$", "callback", ")", "{", ...
Returns objects that use the supplied component. @param string|array $components @param null|callback $callback @return static
[ "Returns", "objects", "that", "use", "the", "supplied", "component", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/classes/CmsObjectCollection.php#L19-L38
train
Return a filtered list of components that have been added to the page
[ 30522, 2270, 3853, 2007, 9006, 29513, 3372, 1006, 1002, 6177, 1010, 1002, 2655, 5963, 1027, 19701, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 11307, 1006, 3853, 1006, 1002, 4874, 1007, 2224, 1006, 1002, 6177, 1010, 1002, 2655, 5963, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Themes.php
Themes.load
public function load() { // NOTE: ALL THE LOCAL VARIABLES ARE USED INSIDE INCLUDED FILE, DO NOT REMOVE THEM! $grav = $this->grav; $config = $this->config; $name = $this->current(); /** @var UniformResourceLocator $locator */ $locator = $grav['locator']; $file...
php
public function load() { // NOTE: ALL THE LOCAL VARIABLES ARE USED INSIDE INCLUDED FILE, DO NOT REMOVE THEM! $grav = $this->grav; $config = $this->config; $name = $this->current(); /** @var UniformResourceLocator $locator */ $locator = $grav['locator']; $file...
[ "public", "function", "load", "(", ")", "{", "// NOTE: ALL THE LOCAL VARIABLES ARE USED INSIDE INCLUDED FILE, DO NOT REMOVE THEM!", "$", "grav", "=", "$", "this", "->", "grav", ";", "$", "config", "=", "$", "this", "->", "config", ";", "$", "name", "=", "$", "th...
Load current theme. @return Theme
[ "Load", "current", "theme", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Themes.php#L174-L216
train
Load theme class
[ 30522, 2270, 3853, 7170, 1006, 1007, 1063, 1013, 1013, 3602, 1024, 2035, 1996, 2334, 10857, 2024, 2109, 2503, 2443, 5371, 1010, 2079, 2025, 6366, 2068, 999, 1002, 24665, 11431, 1027, 1002, 2023, 1011, 1028, 24665, 11431, 1025, 1002, 9530, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/formwidgets/RichEditor.php
RichEditor.getValidEditorLang
protected function getValidEditorLang() { $locale = App::getLocale(); // English is baked in if ($locale == 'en') { return null; } $locale = str_replace('-', '_', strtolower($locale)); $path = base_path('modules/backend/formwidgets/richeditor/assets/vend...
php
protected function getValidEditorLang() { $locale = App::getLocale(); // English is baked in if ($locale == 'en') { return null; } $locale = str_replace('-', '_', strtolower($locale)); $path = base_path('modules/backend/formwidgets/richeditor/assets/vend...
[ "protected", "function", "getValidEditorLang", "(", ")", "{", "$", "locale", "=", "App", "::", "getLocale", "(", ")", ";", "// English is baked in", "if", "(", "$", "locale", "==", "'en'", ")", "{", "return", "null", ";", "}", "$", "locale", "=", "str_re...
Returns a valid language code for Redactor. @return string|mixed
[ "Returns", "a", "valid", "language", "code", "for", "Redactor", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/formwidgets/RichEditor.php#L143-L156
train
Returns the language code of the valid editor
[ 30522, 5123, 3853, 2131, 10175, 14097, 15660, 25023, 1006, 1007, 1063, 1002, 2334, 2063, 1027, 10439, 1024, 1024, 2131, 4135, 9289, 2063, 1006, 1007, 1025, 1013, 1013, 2394, 2003, 17776, 1999, 2065, 1006, 1002, 2334, 2063, 1027, 1027, 1005,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/DependencyInjection/Container.php
Container.set
public function set($id, $service) { // Runs the internal initializer; used by the dumped container to include always-needed files if (isset($this->privates['service_container']) && $this->privates['service_container'] instanceof \Closure) { $initialize = $this->privates['service_contain...
php
public function set($id, $service) { // Runs the internal initializer; used by the dumped container to include always-needed files if (isset($this->privates['service_container']) && $this->privates['service_container'] instanceof \Closure) { $initialize = $this->privates['service_contain...
[ "public", "function", "set", "(", "$", "id", ",", "$", "service", ")", "{", "// Runs the internal initializer; used by the dumped container to include always-needed files", "if", "(", "isset", "(", "$", "this", "->", "privates", "[", "'service_container'", "]", ")", "...
Sets a service. Setting a synthetic service to null resets it: has() returns false and get() behaves in the same way as if the service was never created. @param string $id The service identifier @param object $service The service instance
[ "Sets", "a", "service", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/Container.php#L147-L183
train
Set the service
[ 30522, 2270, 3853, 2275, 1006, 1002, 8909, 1010, 1002, 2326, 1007, 1063, 1013, 1013, 3216, 1996, 4722, 3988, 17629, 1025, 2109, 2011, 1996, 14019, 11661, 2000, 2421, 2467, 1011, 2734, 6764, 2065, 1006, 26354, 3388, 1006, 1002, 2023, 1011, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/DomCrawler/Form.php
Form.initialize
private function initialize() { $this->fields = new FormFieldRegistry(); $xpath = new \DOMXPath($this->node->ownerDocument); // add submitted button if it has a valid name if ('form' !== $this->button->nodeName && $this->button->hasAttribute('name') && $this->button->getAttribute('...
php
private function initialize() { $this->fields = new FormFieldRegistry(); $xpath = new \DOMXPath($this->node->ownerDocument); // add submitted button if it has a valid name if ('form' !== $this->button->nodeName && $this->button->hasAttribute('name') && $this->button->getAttribute('...
[ "private", "function", "initialize", "(", ")", "{", "$", "this", "->", "fields", "=", "new", "FormFieldRegistry", "(", ")", ";", "$", "xpath", "=", "new", "\\", "DOMXPath", "(", "$", "this", "->", "node", "->", "ownerDocument", ")", ";", "// add submitte...
Adds form elements related to this form. Creates an internal copy of the submitted 'button' element and the form node or the entire document depending on whether we need to find non-descendant elements through HTML5 'form' attribute.
[ "Adds", "form", "elements", "related", "to", "this", "form", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DomCrawler/Form.php#L414-L462
train
Initializes the form field registry
[ 30522, 2797, 3853, 3988, 4697, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 4249, 1027, 2047, 2433, 3790, 2890, 24063, 2854, 1006, 1007, 1025, 1002, 26726, 8988, 1027, 2047, 1032, 14383, 2595, 15069, 1006, 1002, 2023, 1011, 1028, 13045, 1011, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Process/Pipes/WindowsPipes.php
WindowsPipes.close
public function close() { parent::close(); foreach ($this->fileHandles as $type => $handle) { ftruncate($handle, 0); fclose($handle); flock($this->lockHandles[$type], LOCK_UN); fclose($this->lockHandles[$type]); } $this->fileHandles = $...
php
public function close() { parent::close(); foreach ($this->fileHandles as $type => $handle) { ftruncate($handle, 0); fclose($handle); flock($this->lockHandles[$type], LOCK_UN); fclose($this->lockHandles[$type]); } $this->fileHandles = $...
[ "public", "function", "close", "(", ")", "{", "parent", "::", "close", "(", ")", ";", "foreach", "(", "$", "this", "->", "fileHandles", "as", "$", "type", "=>", "$", "handle", ")", "{", "ftruncate", "(", "$", "handle", ",", "0", ")", ";", "fclose",...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Process/Pipes/WindowsPipes.php#L180-L190
train
Close all resources
[ 30522, 2270, 3853, 2485, 1006, 1007, 1063, 6687, 1024, 1024, 2485, 1006, 1007, 1025, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 5371, 11774, 4244, 2004, 1002, 2828, 1027, 1028, 1002, 5047, 1007, 1063, 3027, 15532, 16280, 1006, 1002, 5047, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/cms/classes/CodeParser.php
CodeParser.writeContentSafe
protected function writeContentSafe($path, $content) { $count = 0; $tmpFile = tempnam(dirname($path), basename($path)); if (@file_put_contents($tmpFile, $content) === false) { throw new SystemException(Lang::get('system::lang.file.create_fail', ['name'=>$tmpFile])); } ...
php
protected function writeContentSafe($path, $content) { $count = 0; $tmpFile = tempnam(dirname($path), basename($path)); if (@file_put_contents($tmpFile, $content) === false) { throw new SystemException(Lang::get('system::lang.file.create_fail', ['name'=>$tmpFile])); } ...
[ "protected", "function", "writeContentSafe", "(", "$", "path", ",", "$", "content", ")", "{", "$", "count", "=", "0", ";", "$", "tmpFile", "=", "tempnam", "(", "dirname", "(", "$", "path", ")", ",", "basename", "(", "$", "path", ")", ")", ";", "if"...
Writes content with concurrency support and cache busting This work is based on the Twig_Cache_Filesystem class
[ "Writes", "content", "with", "concurrency", "support", "and", "cache", "busting", "This", "work", "is", "based", "on", "the", "Twig_Cache_Filesystem", "class" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/classes/CodeParser.php#L314-L344
train
Write content safe to cache
[ 30522, 5123, 3853, 4339, 8663, 6528, 27110, 7959, 1006, 1002, 4130, 1010, 1002, 4180, 1007, 1063, 1002, 4175, 1027, 1014, 1025, 1002, 1056, 8737, 8873, 2571, 1027, 8915, 8737, 13129, 1006, 16101, 18442, 1006, 1002, 4130, 1007, 1010, 2918, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/Referrers/Social.php
Social.getSocialNetworkFromDomain
public function getSocialNetworkFromDomain($url) { foreach ($this->getDefinitions() as $domain => $name) { if (preg_match('/(^|[\.\/])'.$domain.'([\.\/]|$)/', $url)) { return $name; } } return Piwik::translate('General_Unknown'); }
php
public function getSocialNetworkFromDomain($url) { foreach ($this->getDefinitions() as $domain => $name) { if (preg_match('/(^|[\.\/])'.$domain.'([\.\/]|$)/', $url)) { return $name; } } return Piwik::translate('General_Unknown'); }
[ "public", "function", "getSocialNetworkFromDomain", "(", "$", "url", ")", "{", "foreach", "(", "$", "this", "->", "getDefinitions", "(", ")", "as", "$", "domain", "=>", "$", "name", ")", "{", "if", "(", "preg_match", "(", "'/(^|[\\.\\/])'", ".", "$", "do...
Get's social network name from URL. @param string $url @return string
[ "Get", "s", "social", "network", "name", "from", "URL", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Referrers/Social.php#L127-L138
train
Returns the SocialNetwork name from a URL
[ 30522, 2270, 3853, 4152, 10085, 4818, 7159, 6198, 19699, 5358, 9527, 8113, 1006, 1002, 24471, 2140, 1007, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 2131, 3207, 16294, 22753, 2015, 1006, 1007, 2004, 1002, 5884, 1027, 1028, 1002, 2171,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dompdf/dompdf
src/Cellmap.php
Cellmap.&
public function &get_column($i) { if (!isset($this->_columns[$i])) { $this->_columns[$i] = array( "x" => 0, "min-width" => 0, "max-width" => 0, "used-width" => null, "absolute" => 0, "per...
php
public function &get_column($i) { if (!isset($this->_columns[$i])) { $this->_columns[$i] = array( "x" => 0, "min-width" => 0, "max-width" => 0, "used-width" => null, "absolute" => 0, "per...
[ "public", "function", "&", "get_column", "(", "$", "i", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "_columns", "[", "$", "i", "]", ")", ")", "{", "$", "this", "->", "_columns", "[", "$", "i", "]", "=", "array", "(", "\"x\"", "...
@param int $i @return mixed
[ "@param", "int", "$i" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/Cellmap.php#L225-L240
train
Return the column
[ 30522, 2270, 3853, 1004, 2131, 1035, 5930, 1006, 1002, 1045, 1007, 1063, 2065, 1006, 999, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 1035, 7753, 1031, 1002, 1045, 1033, 1007, 1007, 1063, 1002, 2023, 1011, 1028, 1035, 7753, 1031, 1002, 104...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
overtrue/wechat
src/Payment/Redpack/Client.php
Client.sendNormal
public function sendNormal(array $params) { $base = [ 'total_num' => 1, 'client_ip' => $params['client_ip'] ?? Support\get_server_ip(), 'wxappid' => $this->app['config']->app_id, ]; return $this->safeRequest('mmpaymkttransfers/sendredpack', array_merge($b...
php
public function sendNormal(array $params) { $base = [ 'total_num' => 1, 'client_ip' => $params['client_ip'] ?? Support\get_server_ip(), 'wxappid' => $this->app['config']->app_id, ]; return $this->safeRequest('mmpaymkttransfers/sendredpack', array_merge($b...
[ "public", "function", "sendNormal", "(", "array", "$", "params", ")", "{", "$", "base", "=", "[", "'total_num'", "=>", "1", ",", "'client_ip'", "=>", "$", "params", "[", "'client_ip'", "]", "??", "Support", "\\", "get_server_ip", "(", ")", ",", "'wxappid...
Send normal redpack. @param array $params @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
[ "Send", "normal", "redpack", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Payment/Redpack/Client.php#L53-L62
train
Send Normal Redpack
[ 30522, 2270, 3853, 4604, 12131, 9067, 1006, 9140, 1002, 11498, 5244, 1007, 1063, 1002, 2918, 1027, 1031, 1005, 2561, 1035, 16371, 2213, 1005, 1027, 1028, 1015, 1010, 1005, 7396, 1035, 12997, 1005, 1027, 1028, 1002, 11498, 5244, 1031, 1005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpFoundation/Request.php
Request.duplicate
public function duplicate(array $query = null, array $request = null, array $attributes = null, array $cookies = null, array $files = null, array $server = null) { $dup = clone $this; if (null !== $query) { $dup->query = new ParameterBag($query); } if (null !== $request) ...
php
public function duplicate(array $query = null, array $request = null, array $attributes = null, array $cookies = null, array $files = null, array $server = null) { $dup = clone $this; if (null !== $query) { $dup->query = new ParameterBag($query); } if (null !== $request) ...
[ "public", "function", "duplicate", "(", "array", "$", "query", "=", "null", ",", "array", "$", "request", "=", "null", ",", "array", "$", "attributes", "=", "null", ",", "array", "$", "cookies", "=", "null", ",", "array", "$", "files", "=", "null", "...
Clones a request and overrides some of its parameters. @param array $query The GET parameters @param array $request The POST parameters @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) @param array $cookies The COOKIE parameters @param array $files The FILES p...
[ "Clones", "a", "request", "and", "overrides", "some", "of", "its", "parameters", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Request.php#L427-L469
train
Duplicate the current instance
[ 30522, 2270, 3853, 24473, 1006, 30524, 1027, 19701, 1010, 9140, 1002, 6764, 1027, 19701, 1010, 9140, 1002, 8241, 1027, 19701, 1007, 1063, 1002, 4241, 2361, 1027, 17598, 1002, 2023, 1025, 2065, 1006, 19701, 999, 1027, 1027, 1002, 23032, 1007...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Config/Definition/BaseNode.php
BaseNode.setPlaceholder
public static function setPlaceholder(string $placeholder, array $values): void { if (!$values) { throw new \InvalidArgumentException('At least one value must be provided.'); } self::$placeholders[$placeholder] = $values; }
php
public static function setPlaceholder(string $placeholder, array $values): void { if (!$values) { throw new \InvalidArgumentException('At least one value must be provided.'); } self::$placeholders[$placeholder] = $values; }
[ "public", "static", "function", "setPlaceholder", "(", "string", "$", "placeholder", ",", "array", "$", "values", ")", ":", "void", "{", "if", "(", "!", "$", "values", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'At least one value must b...
Register possible (dummy) values for a dynamic placeholder value. Matching configuration values will be processed with a provided value, one by one. After a provided value is successfully processed the configuration value is returned as is, thus preserving the placeholder. @internal
[ "Register", "possible", "(", "dummy", ")", "values", "for", "a", "dynamic", "placeholder", "value", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Config/Definition/BaseNode.php#L67-L74
train
Sets a new placeholder for the current language
[ 30522, 2270, 10763, 3853, 2275, 24759, 10732, 14528, 1006, 5164, 1002, 2173, 14528, 1010, 9140, 1002, 5300, 1007, 1024, 11675, 1063, 2065, 1006, 999, 1002, 5300, 1007, 1063, 5466, 2047, 1032, 19528, 2906, 22850, 15781, 2595, 24422, 1006, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Db/Statement/Mysqli.php
Zend_Db_Statement_Mysqli._execute
public function _execute(array $params = null) { if (!$this->_stmt) { return false; } // if no params were given as an argument to execute(), // then default to the _bindParam array if ($params === null) { $params = $this->_bindParam; } ...
php
public function _execute(array $params = null) { if (!$this->_stmt) { return false; } // if no params were given as an argument to execute(), // then default to the _bindParam array if ($params === null) { $params = $this->_bindParam; } ...
[ "public", "function", "_execute", "(", "array", "$", "params", "=", "null", ")", "{", "if", "(", "!", "$", "this", "->", "_stmt", ")", "{", "return", "false", ";", "}", "// if no params were given as an argument to execute(),", "// then default to the _bindParam arr...
Executes a prepared statement. @param array $params OPTIONAL Values to bind to parameter placeholders. @return bool @throws Zend_Db_Statement_Mysqli_Exception
[ "Executes", "a", "prepared", "statement", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Statement/Mysqli.php#L183-L258
train
Execute the statement and return the result set
[ 30522, 2270, 3853, 1035, 15389, 1006, 9140, 1002, 11498, 5244, 1027, 19701, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 1035, 2358, 20492, 1007, 1063, 2709, 6270, 1025, 1065, 1013, 1013, 2065, 2053, 11498, 5244, 2020, 2445, 2004, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Serializer/NameConverter/MetadataAwareNameConverter.php
MetadataAwareNameConverter.normalize
public function normalize($propertyName, string $class = null, string $format = null, array $context = []) { if (null === $class) { return $this->normalizeFallback($propertyName, $class, $format, $context); } if (!isset(self::$normalizeCache[$class][$propertyName])) { ...
php
public function normalize($propertyName, string $class = null, string $format = null, array $context = []) { if (null === $class) { return $this->normalizeFallback($propertyName, $class, $format, $context); } if (!isset(self::$normalizeCache[$class][$propertyName])) { ...
[ "public", "function", "normalize", "(", "$", "propertyName", ",", "string", "$", "class", "=", "null", ",", "string", "$", "format", "=", "null", ",", "array", "$", "context", "=", "[", "]", ")", "{", "if", "(", "null", "===", "$", "class", ")", "{...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Serializer/NameConverter/MetadataAwareNameConverter.php#L43-L54
train
Normalize a property name
[ 30522, 2270, 3853, 3671, 4697, 1006, 1002, 3200, 18442, 1010, 5164, 1002, 2465, 1027, 19701, 1010, 5164, 1002, 4289, 1027, 19701, 1010, 9140, 1002, 6123, 1027, 1031, 1033, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 1027, 1002, 2465, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/DomCrawler/FormFieldRegistry.php
FormFieldRegistry.walk
private function walk(array $array, $base = '', array &$output = []) { foreach ($array as $k => $v) { $path = empty($base) ? $k : sprintf('%s[%s]', $base, $k); if (\is_array($v)) { $this->walk($v, $path, $output); } else { $output[$path] = ...
php
private function walk(array $array, $base = '', array &$output = []) { foreach ($array as $k => $v) { $path = empty($base) ? $k : sprintf('%s[%s]', $base, $k); if (\is_array($v)) { $this->walk($v, $path, $output); } else { $output[$path] = ...
[ "private", "function", "walk", "(", "array", "$", "array", ",", "$", "base", "=", "''", ",", "array", "&", "$", "output", "=", "[", "]", ")", "{", "foreach", "(", "$", "array", "as", "$", "k", "=>", "$", "v", ")", "{", "$", "path", "=", "empt...
Transforms a PHP array in a list of fully qualified name / value. @param array $array The PHP array @param string $base The name of the base field @param array $output The initial values @return array The list of fields as [string] Fully qualified name => (mixed) value)
[ "Transforms", "a", "PHP", "array", "in", "a", "list", "of", "fully", "qualified", "name", "/", "value", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DomCrawler/FormFieldRegistry.php#L172-L184
train
Walks through the array and returns the array of all the resultant array
[ 30522, 2797, 3853, 3328, 1006, 9140, 1002, 9140, 1010, 1002, 2918, 1027, 1005, 1005, 1010, 9140, 1004, 1002, 6434, 1027, 1031, 1033, 1007, 1063, 18921, 6776, 1006, 1002, 9140, 2004, 1002, 1047, 1027, 1028, 1002, 1058, 1007, 1063, 1002, 41...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/widgets/Lists.php
Lists.prepareVars
public function prepareVars() { $this->vars['cssClasses'] = implode(' ', $this->cssClasses); $this->vars['columns'] = $this->getVisibleColumns(); $this->vars['columnTotal'] = $this->getTotalColumns(); $this->vars['records'] = $this->getRecords(); $this->vars['noRecordsMessage...
php
public function prepareVars() { $this->vars['cssClasses'] = implode(' ', $this->cssClasses); $this->vars['columns'] = $this->getVisibleColumns(); $this->vars['columnTotal'] = $this->getTotalColumns(); $this->vars['records'] = $this->getRecords(); $this->vars['noRecordsMessage...
[ "public", "function", "prepareVars", "(", ")", "{", "$", "this", "->", "vars", "[", "'cssClasses'", "]", "=", "implode", "(", "' '", ",", "$", "this", "->", "cssClasses", ")", ";", "$", "this", "->", "vars", "[", "'columns'", "]", "=", "$", "this", ...
Prepares the list data
[ "Prepares", "the", "list", "data" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/widgets/Lists.php#L244-L280
train
Prepare the variables for the page
[ 30522, 2270, 3853, 7374, 10755, 2015, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 13075, 2015, 1031, 1005, 20116, 11020, 27102, 2229, 1005, 1033, 1027, 17727, 4135, 3207, 1006, 1005, 1005, 1010, 1002, 2023, 1011, 1028, 20116, 11020, 27102, 22...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php
HasRelationships.morphEagerTo
protected function morphEagerTo($name, $type, $id, $ownerKey) { return $this->newMorphTo( $this->newQuery()->setEagerLoads([]), $this, $id, $ownerKey, $type, $name ); }
php
protected function morphEagerTo($name, $type, $id, $ownerKey) { return $this->newMorphTo( $this->newQuery()->setEagerLoads([]), $this, $id, $ownerKey, $type, $name ); }
[ "protected", "function", "morphEagerTo", "(", "$", "name", ",", "$", "type", ",", "$", "id", ",", "$", "ownerKey", ")", "{", "return", "$", "this", "->", "newMorphTo", "(", "$", "this", "->", "newQuery", "(", ")", "->", "setEagerLoads", "(", "[", "]"...
Define a polymorphic, inverse one-to-one or many relationship. @param string $name @param string $type @param string $id @param string $ownerKey @return \Illuminate\Database\Eloquent\Relations\MorphTo
[ "Define", "a", "polymorphic", "inverse", "one", "-", "to", "-", "one", "or", "many", "relationship", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php#L250-L255
train
Eager load morph to
[ 30522, 5123, 3853, 22822, 8458, 5243, 4590, 3406, 1006, 1002, 2171, 1010, 1002, 2828, 1010, 1002, 8909, 1010, 1002, 3954, 14839, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 2047, 5302, 14536, 11039, 2080, 1006, 1002, 2023, 1011, 1028, 2047, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/classes/NavigationManager.php
NavigationManager.setContext
public function setContext($owner, $mainMenuItemCode, $sideMenuItemCode = null) { $this->setContextOwner($owner); $this->setContextMainMenu($mainMenuItemCode); $this->setContextSideMenu($sideMenuItemCode); }
php
public function setContext($owner, $mainMenuItemCode, $sideMenuItemCode = null) { $this->setContextOwner($owner); $this->setContextMainMenu($mainMenuItemCode); $this->setContextSideMenu($sideMenuItemCode); }
[ "public", "function", "setContext", "(", "$", "owner", ",", "$", "mainMenuItemCode", ",", "$", "sideMenuItemCode", "=", "null", ")", "{", "$", "this", "->", "setContextOwner", "(", "$", "owner", ")", ";", "$", "this", "->", "setContextMainMenu", "(", "$", ...
Sets the navigation context. The function sets the navigation owner, main menu item code and the side menu item code. @param string $owner Specifies the navigation owner in the format Vendor/Module @param string $mainMenuItemCode Specifies the main menu item code @param string $sideMenuItemCode Specifies the side menu ...
[ "Sets", "the", "navigation", "context", ".", "The", "function", "sets", "the", "navigation", "owner", "main", "menu", "item", "code", "and", "the", "side", "menu", "item", "code", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/classes/NavigationManager.php#L353-L358
train
Set the context of the page
[ 30522, 2270, 3853, 2275, 8663, 18209, 1006, 1002, 3954, 1010, 1002, 2364, 3549, 14663, 6633, 16044, 1010, 1002, 2217, 3549, 14663, 6633, 16044, 1027, 19701, 1007, 1063, 1002, 2023, 1011, 1028, 2275, 8663, 18209, 12384, 2121, 1006, 1002, 395...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
PHPMailer/PHPMailer
src/PHPMailer.php
PHPMailer.parseAddresses
public static function parseAddresses($addrstr, $useimap = true) { $addresses = []; if ($useimap and function_exists('imap_rfc822_parse_adrlist')) { //Use this built-in parser if it's available $list = imap_rfc822_parse_adrlist($addrstr, ''); foreach ($list as $ad...
php
public static function parseAddresses($addrstr, $useimap = true) { $addresses = []; if ($useimap and function_exists('imap_rfc822_parse_adrlist')) { //Use this built-in parser if it's available $list = imap_rfc822_parse_adrlist($addrstr, ''); foreach ($list as $ad...
[ "public", "static", "function", "parseAddresses", "(", "$", "addrstr", ",", "$", "useimap", "=", "true", ")", "{", "$", "addresses", "=", "[", "]", ";", "if", "(", "$", "useimap", "and", "function_exists", "(", "'imap_rfc822_parse_adrlist'", ")", ")", "{",...
Parse and validate a string containing one or more RFC822-style comma-separated email addresses of the form "display name <address>" into an array of name/address pairs. Uses the imap_rfc822_parse_adrlist function if the IMAP extension is available. Note that quotes in the name part are removed. @see http://www.and...
[ "Parse", "and", "validate", "a", "string", "containing", "one", "or", "more", "RFC822", "-", "style", "comma", "-", "separated", "email", "addresses", "of", "the", "form", "display", "name", "<address", ">", "into", "an", "array", "of", "name", "/", "addre...
3d7132341659a8a201adbc3ba11b1e202ee2857c
https://github.com/PHPMailer/PHPMailer/blob/3d7132341659a8a201adbc3ba11b1e202ee2857c/src/PHPMailer.php#L1126-L1170
train
Parse addresses from string
[ 30522, 2270, 10763, 3853, 11968, 17310, 14141, 25932, 1006, 1002, 5587, 12096, 2099, 1010, 1002, 2224, 9581, 2361, 1027, 2995, 1007, 1063, 1002, 11596, 1027, 1031, 1033, 1025, 2065, 1006, 1002, 2224, 9581, 2361, 1998, 3853, 1035, 6526, 1006...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpClient/ScopingHttpClient.php
ScopingHttpClient.request
public function request(string $method, string $url, array $options = []): ResponseInterface { $url = self::parseUrl($url, $options['query'] ?? []); if (\is_string($options['base_uri'] ?? null)) { $options['base_uri'] = self::parseUrl($options['base_uri']); } try { ...
php
public function request(string $method, string $url, array $options = []): ResponseInterface { $url = self::parseUrl($url, $options['query'] ?? []); if (\is_string($options['base_uri'] ?? null)) { $options['base_uri'] = self::parseUrl($options['base_uri']); } try { ...
[ "public", "function", "request", "(", "string", "$", "method", ",", "string", "$", "url", ",", "array", "$", "options", "=", "[", "]", ")", ":", "ResponseInterface", "{", "$", "url", "=", "self", "::", "parseUrl", "(", "$", "url", ",", "$", "options"...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpClient/ScopingHttpClient.php#L55-L82
train
Makes a request to the TAO API.
[ 30522, 2270, 3853, 5227, 1006, 5164, 1002, 4118, 1010, 5164, 1002, 24471, 2140, 1010, 9140, 1002, 7047, 1027, 1031, 1033, 1007, 1024, 3433, 18447, 2121, 12172, 1063, 1002, 24471, 2140, 1027, 2969, 1024, 1024, 11968, 3366, 3126, 2140, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Security/Core/Role/RoleHierarchy.php
RoleHierarchy.getReachableRoles
public function getReachableRoles(array $roles) { if (0 === \func_num_args() || func_get_arg(0)) { @trigger_error(sprintf('The %s() method is deprecated since Symfony 4.3 and will be removed in 5.0. Use roles as strings and the getReachableRoleNames() method instead.', __METHOD__), E_USER_DEPREC...
php
public function getReachableRoles(array $roles) { if (0 === \func_num_args() || func_get_arg(0)) { @trigger_error(sprintf('The %s() method is deprecated since Symfony 4.3 and will be removed in 5.0. Use roles as strings and the getReachableRoleNames() method instead.', __METHOD__), E_USER_DEPREC...
[ "public", "function", "getReachableRoles", "(", "array", "$", "roles", ")", "{", "if", "(", "0", "===", "\\", "func_num_args", "(", ")", "||", "func_get_arg", "(", "0", ")", ")", "{", "@", "trigger_error", "(", "sprintf", "(", "'The %s() method is deprecated...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Security/Core/Role/RoleHierarchy.php#L37-L55
train
Returns the reachable roles
[ 30522, 2270, 3853, 2131, 16416, 7507, 16213, 29111, 1006, 9140, 1002, 4395, 1007, 1063, 2065, 1006, 1014, 1027, 1027, 1027, 1032, 4569, 2278, 1035, 16371, 2213, 1035, 12098, 5620, 1006, 1007, 1064, 1064, 4569, 2278, 1035, 2131, 1035, 12098,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Framework/Flex/Storage/SimpleStorage.php
SimpleStorage.readRows
public function readRows(array $rows, array &$fetched = null): array { if (null === $this->data) { $this->buildIndex(); } $list = []; foreach ($rows as $key => $row) { if (null === $row || (!\is_object($row) && !\is_array($row))) { // Only loa...
php
public function readRows(array $rows, array &$fetched = null): array { if (null === $this->data) { $this->buildIndex(); } $list = []; foreach ($rows as $key => $row) { if (null === $row || (!\is_object($row) && !\is_array($row))) { // Only loa...
[ "public", "function", "readRows", "(", "array", "$", "rows", ",", "array", "&", "$", "fetched", "=", "null", ")", ":", "array", "{", "if", "(", "null", "===", "$", "this", "->", "data", ")", "{", "$", "this", "->", "buildIndex", "(", ")", ";", "}...
{@inheritdoc} @see FlexStorageInterface::readRows()
[ "{" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Framework/Flex/Storage/SimpleStorage.php#L108-L130
train
Load rows from the table
[ 30522, 2270, 3853, 3191, 10524, 2015, 1006, 9140, 1002, 10281, 1010, 9140, 1004, 1002, 18584, 2098, 1027, 19701, 1007, 1024, 9140, 1063, 2065, 1006, 19701, 1027, 1027, 1027, 1002, 2023, 1011, 1028, 2951, 1007, 1063, 1002, 2023, 1011, 1028, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/cms/classes/ComponentHelpers.php
ComponentHelpers.getComponentPropertyValues
public static function getComponentPropertyValues($component) { $result = []; $result['oc.alias'] = $component->alias; $properties = $component->defineProperties(); foreach ($properties as $name => $params) { $result[$name] = $component->property($name); } ...
php
public static function getComponentPropertyValues($component) { $result = []; $result['oc.alias'] = $component->alias; $properties = $component->defineProperties(); foreach ($properties as $name => $params) { $result[$name] = $component->property($name); } ...
[ "public", "static", "function", "getComponentPropertyValues", "(", "$", "component", ")", "{", "$", "result", "=", "[", "]", ";", "$", "result", "[", "'oc.alias'", "]", "=", "$", "component", "->", "alias", ";", "$", "properties", "=", "$", "component", ...
Returns a component property values. @param mixed $component The component object @return mixed
[ "Returns", "a", "component", "property", "values", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/classes/ComponentHelpers.php#L89-L101
train
Get all property values of a component
[ 30522, 2270, 10763, 3853, 2131, 9006, 29513, 3372, 21572, 4842, 3723, 10175, 15808, 1006, 1002, 6922, 1007, 1063, 1002, 2765, 1027, 1031, 1033, 1025, 1002, 2765, 1031, 1005, 1051, 2278, 1012, 14593, 1005, 1033, 1027, 1002, 6922, 1011, 1028,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Routing/Loader/ObjectRouteLoader.php
ObjectRouteLoader.load
public function load($resource, $type = null) { if (!preg_match('/^[^\:]+(?:::?(?:[^\:]+))?$/', $resource)) { throw new \InvalidArgumentException(sprintf('Invalid resource "%s" passed to the "service" route loader: use the format "service::method" or "service" if your service has an "__invoke" m...
php
public function load($resource, $type = null) { if (!preg_match('/^[^\:]+(?:::?(?:[^\:]+))?$/', $resource)) { throw new \InvalidArgumentException(sprintf('Invalid resource "%s" passed to the "service" route loader: use the format "service::method" or "service" if your service has an "__invoke" m...
[ "public", "function", "load", "(", "$", "resource", ",", "$", "type", "=", "null", ")", "{", "if", "(", "!", "preg_match", "(", "'/^[^\\:]+(?:::?(?:[^\\:]+))?$/'", ",", "$", "resource", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", ...
Calls the service that will load the routes. @param string $resource Some value that will resolve to a callable @param string|null $type The resource type @return RouteCollection
[ "Calls", "the", "service", "that", "will", "load", "the", "routes", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Routing/Loader/ObjectRouteLoader.php#L45-L82
train
Load routing resource
[ 30522, 2270, 3853, 7170, 1006, 1002, 7692, 1010, 1002, 2828, 1027, 19701, 1007, 1063, 2065, 1006, 999, 3653, 2290, 1035, 2674, 1006, 1005, 1013, 1034, 1031, 1034, 1032, 1024, 1033, 1009, 1006, 1029, 1024, 1024, 1024, 1029, 1006, 1029, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Translation/FileLoader.php
FileLoader.loadNamespaced
protected function loadNamespaced($locale, $group, $namespace) { if (isset($this->hints[$namespace])) { $lines = $this->loadPath($this->hints[$namespace], $locale, $group); return $this->loadNamespaceOverrides($lines, $locale, $group, $namespace); } return []; }
php
protected function loadNamespaced($locale, $group, $namespace) { if (isset($this->hints[$namespace])) { $lines = $this->loadPath($this->hints[$namespace], $locale, $group); return $this->loadNamespaceOverrides($lines, $locale, $group, $namespace); } return []; }
[ "protected", "function", "loadNamespaced", "(", "$", "locale", ",", "$", "group", ",", "$", "namespace", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "hints", "[", "$", "namespace", "]", ")", ")", "{", "$", "lines", "=", "$", "this", "->",...
Load a namespaced translation group. @param string $locale @param string $group @param string $namespace @return array
[ "Load", "a", "namespaced", "translation", "group", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Translation/FileLoader.php#L81-L90
train
Load namespaced lines
[ 30522, 5123, 3853, 7170, 18442, 23058, 2094, 1006, 1002, 2334, 2063, 1010, 1002, 2177, 1010, 1002, 3415, 15327, 1007, 1063, 2065, 1006, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 20385, 1031, 1002, 3415, 15327, 1033, 1007, 1007, 1063, 1002,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php
DoctrineChoiceLoader.loadValuesForChoices
public function loadValuesForChoices(array $choices, $value = null) { // Performance optimization if (empty($choices)) { return []; } // Optimize performance for single-field identifiers. We already // know that the IDs are used as values $optimize = $thi...
php
public function loadValuesForChoices(array $choices, $value = null) { // Performance optimization if (empty($choices)) { return []; } // Optimize performance for single-field identifiers. We already // know that the IDs are used as values $optimize = $thi...
[ "public", "function", "loadValuesForChoices", "(", "array", "$", "choices", ",", "$", "value", "=", "null", ")", "{", "// Performance optimization", "if", "(", "empty", "(", "$", "choices", ")", ")", "{", "return", "[", "]", ";", "}", "// Optimize performanc...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php#L94-L121
train
Load values for choices
[ 30522, 2270, 3853, 7170, 10175, 15808, 29278, 9905, 23522, 1006, 9140, 1002, 9804, 1010, 1002, 3643, 1027, 19701, 1007, 1063, 30524, 1065, 1013, 1013, 23569, 27605, 4371, 2836, 2005, 2309, 1011, 2492, 8909, 4765, 28295, 1012, 2057, 2525, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Routing/Console/ControllerMakeCommand.php
ControllerMakeCommand.buildModelReplacements
protected function buildModelReplacements(array $replace) { $modelClass = $this->parseModel($this->option('model')); if (! class_exists($modelClass)) { if ($this->confirm("A {$modelClass} model does not exist. Do you want to generate it?", true)) { $this->call('make:mode...
php
protected function buildModelReplacements(array $replace) { $modelClass = $this->parseModel($this->option('model')); if (! class_exists($modelClass)) { if ($this->confirm("A {$modelClass} model does not exist. Do you want to generate it?", true)) { $this->call('make:mode...
[ "protected", "function", "buildModelReplacements", "(", "array", "$", "replace", ")", "{", "$", "modelClass", "=", "$", "this", "->", "parseModel", "(", "$", "this", "->", "option", "(", "'model'", ")", ")", ";", "if", "(", "!", "class_exists", "(", "$",...
Build the model replacement values. @param array $replace @return array
[ "Build", "the", "model", "replacement", "values", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/Console/ControllerMakeCommand.php#L131-L146
train
Build model replacements
[ 30522, 5123, 3853, 3857, 5302, 9247, 2890, 24759, 10732, 8163, 1006, 9140, 1002, 5672, 1007, 1063, 1002, 2944, 26266, 1027, 1002, 2023, 1011, 1028, 11968, 3366, 5302, 9247, 1006, 1002, 2023, 1011, 1028, 5724, 1006, 1005, 2944, 1005, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Cache/Backend/Apc.php
Zend_Cache_Backend_Apc.clean
public function clean($mode = Zend_Cache::CLEANING_MODE_ALL, $tags = array()) { switch ($mode) { case Zend_Cache::CLEANING_MODE_ALL: return apc_clear_cache('user'); break; case Zend_Cache::CLEANING_MODE_OLD: $this->_log("Zend_Cache_Back...
php
public function clean($mode = Zend_Cache::CLEANING_MODE_ALL, $tags = array()) { switch ($mode) { case Zend_Cache::CLEANING_MODE_ALL: return apc_clear_cache('user'); break; case Zend_Cache::CLEANING_MODE_OLD: $this->_log("Zend_Cache_Back...
[ "public", "function", "clean", "(", "$", "mode", "=", "Zend_Cache", "::", "CLEANING_MODE_ALL", ",", "$", "tags", "=", "array", "(", ")", ")", "{", "switch", "(", "$", "mode", ")", "{", "case", "Zend_Cache", "::", "CLEANING_MODE_ALL", ":", "return", "apc_...
Clean some cache records Available modes are : 'all' (default) => remove all cache entries ($tags is not used) 'old' => unsupported 'matchingTag' => unsupported 'notMatchingTag' => unsupported 'matchingAnyTag' => unsupported @param string $mode clean mode @param array $tags array of tags @throws Zen...
[ "Clean", "some", "cache", "records" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Cache/Backend/Apc.php#L145-L163
train
Clean cache of the user
[ 30522, 2270, 3853, 4550, 1006, 1002, 5549, 1027, 16729, 2094, 1035, 17053, 1024, 1024, 9344, 1035, 5549, 1035, 2035, 1010, 1002, 22073, 1027, 9140, 1006, 1007, 1007, 1063, 6942, 1006, 1002, 5549, 1007, 1063, 2553, 16729, 2094, 1035, 17053, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Mail.php
Zend_Mail.setSubject
public function setSubject($subject) { if ($this->_subject === null) { $subject = $this->_filterOther($subject); $this->_subject = $this->_encodeHeader($subject); $this->_storeHeader('Subject', $this->_subject); } else { /** * @see Zend_Ma...
php
public function setSubject($subject) { if ($this->_subject === null) { $subject = $this->_filterOther($subject); $this->_subject = $this->_encodeHeader($subject); $this->_storeHeader('Subject', $this->_subject); } else { /** * @see Zend_Ma...
[ "public", "function", "setSubject", "(", "$", "subject", ")", "{", "if", "(", "$", "this", "->", "_subject", "===", "null", ")", "{", "$", "subject", "=", "$", "this", "->", "_filterOther", "(", "$", "subject", ")", ";", "$", "this", "->", "_subject"...
Sets the subject of the message @param string $subject @return Zend_Mail Provides fluent interface @throws Zend_Mail_Exception
[ "Sets", "the", "subject", "of", "the", "message" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail.php#L922-L936
train
Set the subject of the message
[ 30522, 2270, 3853, 4520, 12083, 20614, 1006, 1002, 3395, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 1035, 3395, 1027, 1027, 1027, 19701, 1007, 1063, 1002, 3395, 1027, 1002, 2023, 1011, 1028, 1035, 11307, 14573, 2121, 1006, 1002, 3395, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Extension.php
Extension.boot
public static function boot() { $extension = static::getInstance(); Admin::extend($extension->name, get_called_class()); if ($extension->disabled()) { return false; } if (!empty($css = $extension->css())) { Admin::css($css); } if (!...
php
public static function boot() { $extension = static::getInstance(); Admin::extend($extension->name, get_called_class()); if ($extension->disabled()) { return false; } if (!empty($css = $extension->css())) { Admin::css($css); } if (!...
[ "public", "static", "function", "boot", "(", ")", "{", "$", "extension", "=", "static", "::", "getInstance", "(", ")", ";", "Admin", "::", "extend", "(", "$", "extension", "->", "name", ",", "get_called_class", "(", ")", ")", ";", "if", "(", "$", "ex...
Bootstrap this extension.
[ "Bootstrap", "this", "extension", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Extension.php#L99-L118
train
Boots the extension
[ 30522, 2270, 10763, 3853, 9573, 1006, 1007, 1063, 1002, 5331, 1027, 10763, 1024, 1024, 2131, 7076, 26897, 1006, 1007, 1025, 4748, 10020, 1024, 1024, 7949, 1006, 1002, 5331, 1011, 1028, 2171, 1010, 2131, 1035, 2170, 1035, 2465, 1006, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Validator/Constraints/TimeValidator.php
TimeValidator.checkTime
public static function checkTime($hour, $minute, $second) { return $hour >= 0 && $hour < 24 && $minute >= 0 && $minute < 60 && $second >= 0 && $second < 60; }
php
public static function checkTime($hour, $minute, $second) { return $hour >= 0 && $hour < 24 && $minute >= 0 && $minute < 60 && $second >= 0 && $second < 60; }
[ "public", "static", "function", "checkTime", "(", "$", "hour", ",", "$", "minute", ",", "$", "second", ")", "{", "return", "$", "hour", ">=", "0", "&&", "$", "hour", "<", "24", "&&", "$", "minute", ">=", "0", "&&", "$", "minute", "<", "60", "&&",...
Checks whether a time is valid. @param int $hour The hour @param int $minute The minute @param int $second The second @return bool Whether the time is valid @internal
[ "Checks", "whether", "a", "time", "is", "valid", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Validator/Constraints/TimeValidator.php#L37-L40
train
Check if time is in range
[ 30522, 2270, 10763, 3853, 4638, 7292, 1006, 1002, 3178, 1010, 1002, 3371, 1010, 1002, 2117, 1007, 1063, 2709, 1002, 3178, 1028, 1027, 1014, 1004, 1004, 1002, 3178, 1026, 2484, 1004, 1004, 1002, 3371, 1028, 1027, 1014, 1004, 1004, 1002, 33...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Tracker/GoalManager.php
GoalManager.detectGoalsMatchingUrl
public function detectGoalsMatchingUrl($idSite, $action) { if (!Common::isGoalPluginEnabled()) { return array(); } $goals = $this->getGoalDefinitions($idSite); $convertedGoals = array(); foreach ($goals as $goal) { $convertedUrl = $this->detectGoalMa...
php
public function detectGoalsMatchingUrl($idSite, $action) { if (!Common::isGoalPluginEnabled()) { return array(); } $goals = $this->getGoalDefinitions($idSite); $convertedGoals = array(); foreach ($goals as $goal) { $convertedUrl = $this->detectGoalMa...
[ "public", "function", "detectGoalsMatchingUrl", "(", "$", "idSite", ",", "$", "action", ")", "{", "if", "(", "!", "Common", "::", "isGoalPluginEnabled", "(", ")", ")", "{", "return", "array", "(", ")", ";", "}", "$", "goals", "=", "$", "this", "->", ...
Look at the URL or Page Title and sees if it matches any existing Goal definition @param int $idSite @param Action $action @throws Exception @return array[] Goals matched
[ "Look", "at", "the", "URL", "or", "Page", "Title", "and", "sees", "if", "it", "matches", "any", "existing", "Goal", "definition" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Tracker/GoalManager.php#L125-L141
train
Detect Goals matching URL
[ 30522, 2270, 3853, 11487, 3995, 9777, 18900, 8450, 3126, 2140, 1006, 1002, 8909, 28032, 2063, 1010, 1002, 2895, 1007, 1063, 2065, 1006, 999, 2691, 1024, 1024, 2003, 3995, 2389, 24759, 15916, 21820, 3085, 2094, 1006, 1007, 1007, 1063, 2709, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Tracker/Visit.php
Visit.handleNewVisit
protected function handleNewVisit($visitIsConverted) { Common::printDebug("New Visit (IP = " . IPUtils::binaryToStringIP($this->getVisitorIp()) . ")"); $this->setNewVisitorInformation(); $dimensions = $this->getAllVisitDimensions(); $this->triggerHookOnDimensions($dimensions, 'onN...
php
protected function handleNewVisit($visitIsConverted) { Common::printDebug("New Visit (IP = " . IPUtils::binaryToStringIP($this->getVisitorIp()) . ")"); $this->setNewVisitorInformation(); $dimensions = $this->getAllVisitDimensions(); $this->triggerHookOnDimensions($dimensions, 'onN...
[ "protected", "function", "handleNewVisit", "(", "$", "visitIsConverted", ")", "{", "Common", "::", "printDebug", "(", "\"New Visit (IP = \"", ".", "IPUtils", "::", "binaryToStringIP", "(", "$", "this", "->", "getVisitorIp", "(", ")", ")", ".", "\")\"", ")", ";...
In the case of a new visit, we have to do the following actions: 1) Insert the new action 2) Insert the visit information @param Visitor $visitor @param Action $action @param bool $visitIsConverted
[ "In", "the", "case", "of", "a", "new", "visit", "we", "have", "to", "do", "the", "following", "actions", ":" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Tracker/Visit.php#L258-L283
train
Handle a new visit
[ 30522, 5123, 3853, 5047, 2638, 2860, 11365, 4183, 1006, 1002, 3942, 2483, 8663, 26686, 1007, 1063, 2691, 1024, 1024, 6140, 3207, 30524, 2023, 1011, 1028, 2275, 2638, 2860, 11365, 15660, 2378, 14192, 3370, 1006, 1007, 1025, 1002, 9646, 1027,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Form.php
Form.disableCreatingCheck
public function disableCreatingCheck(bool $disable = true) { $this->builder()->getFooter()->disableCreatingCheck($disable); return $this; }
php
public function disableCreatingCheck(bool $disable = true) { $this->builder()->getFooter()->disableCreatingCheck($disable); return $this; }
[ "public", "function", "disableCreatingCheck", "(", "bool", "$", "disable", "=", "true", ")", "{", "$", "this", "->", "builder", "(", ")", "->", "getFooter", "(", ")", "->", "disableCreatingCheck", "(", "$", "disable", ")", ";", "return", "$", "this", ";"...
Disable Creating Checkbox on footer. @param bool $disable @return $this
[ "Disable", "Creating", "Checkbox", "on", "footer", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Form.php#L1321-L1326
train
Disable creating check for the page
[ 30522, 2270, 3853, 4487, 19150, 16748, 5844, 5403, 3600, 1006, 22017, 2140, 1002, 4487, 19150, 1027, 2995, 1007, 1063, 1002, 2023, 1011, 1028, 12508, 1006, 1007, 1011, 1028, 2131, 13064, 2121, 1006, 1007, 1011, 1028, 4487, 19150, 16748, 584...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Mail/Protocol/Imap.php
Zend_Mail_Protocol_Imap._nextTaggedLine
protected function _nextTaggedLine(&$tag) { $line = $this->_nextLine(); // seperate tag from line list($tag, $line) = explode(' ', $line, 2); return $line; }
php
protected function _nextTaggedLine(&$tag) { $line = $this->_nextLine(); // seperate tag from line list($tag, $line) = explode(' ', $line, 2); return $line; }
[ "protected", "function", "_nextTaggedLine", "(", "&", "$", "tag", ")", "{", "$", "line", "=", "$", "this", "->", "_nextLine", "(", ")", ";", "// seperate tag from line", "list", "(", "$", "tag", ",", "$", "line", ")", "=", "explode", "(", "' '", ",", ...
get next line and split the tag. that's the normal case for a response line @param string $tag tag of line is returned by reference @return string next line @throws Zend_Mail_Protocol_Exception
[ "get", "next", "line", "and", "split", "the", "tag", ".", "that", "s", "the", "normal", "case", "for", "a", "response", "line" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail/Protocol/Imap.php#L166-L174
train
Get next line and split tag
[ 30522, 5123, 3853, 1035, 2279, 15900, 5999, 4179, 1006, 1004, 1002, 6415, 1007, 1063, 1002, 2240, 1027, 1002, 2023, 1011, 1028, 1035, 2279, 4179, 1006, 1007, 1025, 1013, 1013, 19802, 22139, 6415, 2013, 2240, 2862, 1006, 1002, 6415, 1010, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Process/Process.php
Process.waitUntil
public function waitUntil(callable $callback): bool { $this->requireProcessIsStarted(__FUNCTION__); $this->updateStatus(false); if (!$this->processPipes->haveReadSupport()) { $this->stop(0); throw new \LogicException('Pass the callback to the "Process::start" method ...
php
public function waitUntil(callable $callback): bool { $this->requireProcessIsStarted(__FUNCTION__); $this->updateStatus(false); if (!$this->processPipes->haveReadSupport()) { $this->stop(0); throw new \LogicException('Pass the callback to the "Process::start" method ...
[ "public", "function", "waitUntil", "(", "callable", "$", "callback", ")", ":", "bool", "{", "$", "this", "->", "requireProcessIsStarted", "(", "__FUNCTION__", ")", ";", "$", "this", "->", "updateStatus", "(", "false", ")", ";", "if", "(", "!", "$", "this...
Waits until the callback returns true. The callback receives the type of output (out or err) and some bytes from the output in real-time while writing the standard input to the process. It allows to have feedback from the independent process during execution. @throws RuntimeException When process timed out @throws Lo...
[ "Waits", "until", "the", "callback", "returns", "true", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Process/Process.php#L442-L475
train
Wait until the callback returns true or false.
[ 30522, 2270, 3853, 3524, 16671, 4014, 1006, 2655, 3085, 1002, 2655, 5963, 1007, 1024, 22017, 2140, 1063, 1002, 2023, 1011, 1028, 5478, 21572, 9623, 6190, 14117, 3064, 1006, 1035, 1035, 3853, 30524, 1028, 2031, 16416, 5104, 6279, 6442, 1006,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Validation/Concerns/FormatsMessages.php
FormatsMessages.makeReplacements
public function makeReplacements($message, $attribute, $rule, $parameters) { $message = $this->replaceAttributePlaceholder( $message, $this->getDisplayableAttribute($attribute) ); $message = $this->replaceInputPlaceholder($message, $attribute); if (isset($this->replacer...
php
public function makeReplacements($message, $attribute, $rule, $parameters) { $message = $this->replaceAttributePlaceholder( $message, $this->getDisplayableAttribute($attribute) ); $message = $this->replaceInputPlaceholder($message, $attribute); if (isset($this->replacer...
[ "public", "function", "makeReplacements", "(", "$", "message", ",", "$", "attribute", ",", "$", "rule", ",", "$", "parameters", ")", "{", "$", "message", "=", "$", "this", "->", "replaceAttributePlaceholder", "(", "$", "message", ",", "$", "this", "->", ...
Replace all error message place-holders with actual values. @param string $message @param string $attribute @param string $rule @param array $parameters @return string
[ "Replace", "all", "error", "message", "place", "-", "holders", "with", "actual", "values", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/FormatsMessages.php#L203-L218
train
Performs replacement for the attribute and rule.
[ 30522, 2270, 3853, 9338, 13699, 19217, 8163, 1006, 1002, 4471, 1010, 1002, 17961, 1010, 1002, 3627, 1010, 1002, 11709, 1007, 1063, 1002, 4471, 1027, 1002, 2023, 1011, 1028, 5672, 19321, 3089, 8569, 2618, 24759, 10732, 14528, 1006, 1002, 447...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractor.php
FormDataExtractor.extractViewVariables
public function extractViewVariables(FormView $view) { $data = [ 'id' => isset($view->vars['id']) ? $view->vars['id'] : null, 'name' => isset($view->vars['name']) ? $view->vars['name'] : null, 'view_vars' => [], ]; foreach ($view->vars as $varName => $val...
php
public function extractViewVariables(FormView $view) { $data = [ 'id' => isset($view->vars['id']) ? $view->vars['id'] : null, 'name' => isset($view->vars['name']) ? $view->vars['name'] : null, 'view_vars' => [], ]; foreach ($view->vars as $varName => $val...
[ "public", "function", "extractViewVariables", "(", "FormView", "$", "view", ")", "{", "$", "data", "=", "[", "'id'", "=>", "isset", "(", "$", "view", "->", "vars", "[", "'id'", "]", ")", "?", "$", "view", "->", "vars", "[", "'id'", "]", ":", "null"...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractor.php#L138-L153
train
Extract view variables from form view
[ 30522, 2270, 3853, 14817, 8584, 10755, 19210, 2015, 1006, 2433, 8584, 1002, 3193, 1007, 1063, 1002, 2951, 1027, 1031, 1005, 8909, 1005, 1027, 1028, 26354, 3388, 1006, 1002, 3193, 1011, 1028, 13075, 2015, 1031, 1005, 8909, 1005, 1033, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Plugin/Controller.php
Controller.redirectToIndex
public function redirectToIndex($moduleToRedirect, $actionToRedirect, $websiteId = null, $defaultPeriod = null, $defaultDate = null, $parameters = array()) { try { $this->doRedirectToUrl($moduleToRedirect, $actionToRedirect, $websiteId, $defaultPeriod, $defaul...
php
public function redirectToIndex($moduleToRedirect, $actionToRedirect, $websiteId = null, $defaultPeriod = null, $defaultDate = null, $parameters = array()) { try { $this->doRedirectToUrl($moduleToRedirect, $actionToRedirect, $websiteId, $defaultPeriod, $defaul...
[ "public", "function", "redirectToIndex", "(", "$", "moduleToRedirect", ",", "$", "actionToRedirect", ",", "$", "websiteId", "=", "null", ",", "$", "defaultPeriod", "=", "null", ",", "$", "defaultDate", "=", "null", ",", "$", "parameters", "=", "array", "(", ...
Helper method used to redirect the current HTTP request to another module/action. This function will exit immediately after executing. @param string $moduleToRedirect The plugin to redirect to, eg. `"MultiSites"`. @param string $actionToRedirect Action, eg. `"index"`. @param int|null $websiteId The new idSite query p...
[ "Helper", "method", "used", "to", "redirect", "the", "current", "HTTP", "request", "to", "another", "module", "/", "action", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Plugin/Controller.php#L889-L923
train
Redirect to index. php
[ 30522, 2270, 3853, 2417, 7442, 6593, 3406, 22254, 10288, 1006, 1002, 11336, 19277, 4305, 2890, 6593, 1010, 1002, 2895, 19277, 4305, 2890, 6593, 1010, 1002, 4037, 3593, 1027, 19701, 1010, 1002, 12398, 4842, 3695, 2094, 1027, 19701, 1010, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Query/Grammars/PostgresGrammar.php
PostgresGrammar.compileDeleteWithJoins
protected function compileDeleteWithJoins($query, $table) { $using = ' USING '.collect($query->joins)->map(function ($join) { return $this->wrapTable($join->table); })->implode(', '); $where = count($query->wheres) > 0 ? ' '.$this->compileUpdateWheres($query) : ''; retu...
php
protected function compileDeleteWithJoins($query, $table) { $using = ' USING '.collect($query->joins)->map(function ($join) { return $this->wrapTable($join->table); })->implode(', '); $where = count($query->wheres) > 0 ? ' '.$this->compileUpdateWheres($query) : ''; retu...
[ "protected", "function", "compileDeleteWithJoins", "(", "$", "query", ",", "$", "table", ")", "{", "$", "using", "=", "' USING '", ".", "collect", "(", "$", "query", "->", "joins", ")", "->", "map", "(", "function", "(", "$", "join", ")", "{", "return"...
Compile a delete query that uses joins. @param \Illuminate\Database\Query\Builder $query @param string $table @return string
[ "Compile", "a", "delete", "query", "that", "uses", "joins", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Grammars/PostgresGrammar.php#L400-L409
train
Compiles a delete query with joins and returns the generated SQL.
[ 30522, 5123, 3853, 9227, 12260, 2618, 24415, 5558, 7076, 1006, 1002, 23032, 1010, 1002, 2795, 1007, 1063, 1002, 2478, 1027, 1005, 2478, 1005, 1012, 8145, 1006, 1002, 23032, 1011, 1028, 9794, 1007, 1011, 1028, 4949, 1006, 3853, 1006, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Cache/Backend/File.php
Zend_Cache_Backend_File._delMetadatas
protected function _delMetadatas($id) { if (isset($this->_metadatasArray[$id])) { unset($this->_metadatasArray[$id]); } $file = $this->_metadatasFile($id); return $this->_remove($file); }
php
protected function _delMetadatas($id) { if (isset($this->_metadatasArray[$id])) { unset($this->_metadatasArray[$id]); } $file = $this->_metadatasFile($id); return $this->_remove($file); }
[ "protected", "function", "_delMetadatas", "(", "$", "id", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "_metadatasArray", "[", "$", "id", "]", ")", ")", "{", "unset", "(", "$", "this", "->", "_metadatasArray", "[", "$", "id", "]", ")", ";"...
Drop a metadata record @param string $id Cache id @return boolean True if no problem
[ "Drop", "a", "metadata", "record" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Cache/Backend/File.php#L519-L526
train
Delete all metadatas from the file
[ 30522, 5123, 3853, 1035, 3972, 11368, 8447, 10230, 1006, 1002, 8909, 1007, 1063, 2065, 1006, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 1035, 27425, 10286, 9447, 1031, 1002, 8909, 1033, 1007, 1007, 1063, 4895, 13462, 1006, 1002, 2023, 1011,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/HTML/QuickForm2/Node.php
HTML_QuickForm2_Node.setContainer
protected function setContainer(HTML_QuickForm2_Container $container = null) { if (null !== $container) { $check = $container; do { if ($this === $check) { throw new HTML_QuickForm2_InvalidArgumentException( 'Cannot set an e...
php
protected function setContainer(HTML_QuickForm2_Container $container = null) { if (null !== $container) { $check = $container; do { if ($this === $check) { throw new HTML_QuickForm2_InvalidArgumentException( 'Cannot set an e...
[ "protected", "function", "setContainer", "(", "HTML_QuickForm2_Container", "$", "container", "=", "null", ")", "{", "if", "(", "null", "!==", "$", "container", ")", "{", "$", "check", "=", "$", "container", ";", "do", "{", "if", "(", "$", "this", "===", ...
Adds the link to the element containing current @param HTML_QuickForm2_Container Element containing the current one, null if the link should really be removed (if removing from container) @throws HTML_QuickForm2_InvalidArgumentException If trying to set a child of an element as its container
[ "Adds", "the", "link", "to", "the", "element", "containing", "current" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Node.php#L432-L451
train
Sets the container
[ 30522, 5123, 3853, 2275, 8663, 18249, 2121, 1006, 16129, 1035, 4248, 14192, 2475, 1035, 11661, 1002, 11661, 1027, 19701, 1007, 1063, 2065, 1006, 19701, 999, 1027, 1027, 30524, 19528, 2906, 22850, 15781, 2595, 24422, 1006, 1005, 3685, 2275, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/PrivacyManager/Tracker/RequestProcessor.php
RequestProcessor.anonymizeUserId
public static function anonymizeUserId($userId) { $trackerCache = Tracker\Cache::getCacheGeneral(); $salt = ''; if (!empty($trackerCache[PrivacyManager::OPTION_USERID_SALT])) { $salt = $trackerCache[PrivacyManager::OPTION_USERID_SALT]; } if(empty($salt)) { ...
php
public static function anonymizeUserId($userId) { $trackerCache = Tracker\Cache::getCacheGeneral(); $salt = ''; if (!empty($trackerCache[PrivacyManager::OPTION_USERID_SALT])) { $salt = $trackerCache[PrivacyManager::OPTION_USERID_SALT]; } if(empty($salt)) { ...
[ "public", "static", "function", "anonymizeUserId", "(", "$", "userId", ")", "{", "$", "trackerCache", "=", "Tracker", "\\", "Cache", "::", "getCacheGeneral", "(", ")", ";", "$", "salt", "=", "''", ";", "if", "(", "!", "empty", "(", "$", "trackerCache", ...
pseudo anonymization as we need to make sure to always generate the same UserId for the same original UserID @param $userId @return string
[ "pseudo", "anonymization", "as", "we", "need", "to", "make", "sure", "to", "always", "generate", "the", "same", "UserId", "for", "the", "same", "original", "UserID" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/PrivacyManager/Tracker/RequestProcessor.php#L47-L58
train
Anonymize userId.
[ 30522, 2270, 10763, 3853, 2019, 16585, 4328, 4371, 20330, 3593, 1006, 1002, 5310, 3593, 1007, 1063, 1002, 27080, 3540, 5403, 1027, 27080, 1032, 17053, 1024, 1024, 2131, 3540, 5403, 6914, 21673, 1006, 1007, 1025, 1002, 5474, 1027, 1005, 1005...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Archive/ArchivePurger.php
ArchivePurger.getOldestTemporaryArchiveToKeepThreshold
protected function getOldestTemporaryArchiveToKeepThreshold() { $temporaryArchivingTimeout = Rules::getTodayArchiveTimeToLive(); if (Rules::isBrowserTriggerEnabled()) { // If Browser Archiving is enabled, it is likely there are many more temporary archives // We delete more o...
php
protected function getOldestTemporaryArchiveToKeepThreshold() { $temporaryArchivingTimeout = Rules::getTodayArchiveTimeToLive(); if (Rules::isBrowserTriggerEnabled()) { // If Browser Archiving is enabled, it is likely there are many more temporary archives // We delete more o...
[ "protected", "function", "getOldestTemporaryArchiveToKeepThreshold", "(", ")", "{", "$", "temporaryArchivingTimeout", "=", "Rules", "::", "getTodayArchiveTimeToLive", "(", ")", ";", "if", "(", "Rules", "::", "isBrowserTriggerEnabled", "(", ")", ")", "{", "// If Browse...
Returns a timestamp indicating outdated archives older than this timestamp (processed before) can be purged. @return int|bool Outdated archives older than this timestamp should be purged
[ "Returns", "a", "timestamp", "indicating", "outdated", "archives", "older", "than", "this", "timestamp", "(", "processed", "before", ")", "can", "be", "purged", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Archive/ArchivePurger.php#L297-L308
train
Returns the date that the oldest temporary archive should be kept
[ 30522, 5123, 3853, 2131, 11614, 4355, 18532, 17822, 5649, 2906, 5428, 19510, 11045, 23606, 28362, 22231, 6392, 1006, 1007, 1063, 1002, 5741, 2906, 5428, 6455, 7292, 5833, 1027, 3513, 1024, 1024, 2131, 3406, 10259, 2906, 5428, 19510, 14428, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Cache/Adapter/AbstractTagAwareAdapter.php
AbstractTagAwareAdapter.extractTagData
private function extractTagData(array $values, ?array &$addTagData, ?array &$removeTagData): array { $addTagData = $removeTagData = []; foreach ($values as $id => $value) { foreach ($value['tag-operations']['add'] as $tag => $tagId) { $addTagData[$tagId][] = $id; ...
php
private function extractTagData(array $values, ?array &$addTagData, ?array &$removeTagData): array { $addTagData = $removeTagData = []; foreach ($values as $id => $value) { foreach ($value['tag-operations']['add'] as $tag => $tagId) { $addTagData[$tagId][] = $id; ...
[ "private", "function", "extractTagData", "(", "array", "$", "values", ",", "?", "array", "&", "$", "addTagData", ",", "?", "array", "&", "$", "removeTagData", ")", ":", "array", "{", "$", "addTagData", "=", "$", "removeTagData", "=", "[", "]", ";", "fo...
Extracts tags operation data from $values set in mergeByLifetime, and returns values without it.
[ "Extracts", "tags", "operation", "data", "from", "$values", "set", "in", "mergeByLifetime", "and", "returns", "values", "without", "it", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Cache/Adapter/AbstractTagAwareAdapter.php#L285-L301
train
Extract tag data from the array
[ 30522, 2797, 3853, 14817, 15900, 2850, 2696, 1006, 9140, 1002, 5300, 1010, 1029, 9140, 1004, 1002, 5587, 15900, 2850, 2696, 1010, 1029, 9140, 1004, 1002, 6366, 15900, 2850, 2696, 1007, 1024, 9140, 1063, 1002, 5587, 15900, 2850, 2696, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Schema/Builder.php
Builder.createBlueprint
protected function createBlueprint($table, Closure $callback = null) { $prefix = $this->connection->getConfig('prefix_indexes') ? $this->connection->getConfig('prefix') : ''; if (isset($this->resolver)) { return call_user_func($this->resolver, $ta...
php
protected function createBlueprint($table, Closure $callback = null) { $prefix = $this->connection->getConfig('prefix_indexes') ? $this->connection->getConfig('prefix') : ''; if (isset($this->resolver)) { return call_user_func($this->resolver, $ta...
[ "protected", "function", "createBlueprint", "(", "$", "table", ",", "Closure", "$", "callback", "=", "null", ")", "{", "$", "prefix", "=", "$", "this", "->", "connection", "->", "getConfig", "(", "'prefix_indexes'", ")", "?", "$", "this", "->", "connection...
Create a new command set with a Closure. @param string $table @param \Closure|null $callback @return \Illuminate\Database\Schema\Blueprint
[ "Create", "a", "new", "command", "set", "with", "a", "Closure", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Builder.php#L276-L287
train
Create a Blueprint
[ 30522, 5123, 3853, 3443, 16558, 5657, 16550, 1006, 1002, 2795, 1010, 8503, 1002, 2655, 5963, 1027, 19701, 1007, 1063, 1002, 17576, 1027, 1002, 2023, 1011, 1028, 4434, 1011, 1028, 2131, 8663, 8873, 2290, 1006, 1005, 17576, 1035, 5950, 2229, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Cache/ApcStore.php
ApcStore.decrement
public function decrement($key, $value = 1) { return $this->apc->decrement($this->prefix.$key, $value); }
php
public function decrement($key, $value = 1) { return $this->apc->decrement($this->prefix.$key, $value); }
[ "public", "function", "decrement", "(", "$", "key", ",", "$", "value", "=", "1", ")", "{", "return", "$", "this", "->", "apc", "->", "decrement", "(", "$", "this", "->", "prefix", ".", "$", "key", ",", "$", "value", ")", ";", "}" ]
Decrement the value of an item in the cache. @param string $key @param mixed $value @return int|bool
[ "Decrement", "the", "value", "of", "an", "item", "in", "the", "cache", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Cache/ApcStore.php#L83-L86
train
Decrement value of key in cache
[ 30522, 2270, 3853, 11703, 28578, 4765, 1006, 1002, 3145, 1010, 1002, 3643, 1027, 1015, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 9706, 2278, 1011, 1028, 11703, 28578, 4765, 1006, 1002, 2023, 1011, 1028, 17576, 1012, 1002, 3145, 1010, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php
TagAwareAdapter.invalidateTags
public function invalidateTags(array $tags) { $ok = true; $tagsByKey = []; $invalidatedTags = []; foreach ($tags as $tag) { CacheItem::validateKey($tag); $invalidatedTags[$tag] = 0; } if ($this->deferred) { $items = $this->deferred...
php
public function invalidateTags(array $tags) { $ok = true; $tagsByKey = []; $invalidatedTags = []; foreach ($tags as $tag) { CacheItem::validateKey($tag); $invalidatedTags[$tag] = 0; } if ($this->deferred) { $items = $this->deferred...
[ "public", "function", "invalidateTags", "(", "array", "$", "tags", ")", "{", "$", "ok", "=", "true", ";", "$", "tagsByKey", "=", "[", "]", ";", "$", "invalidatedTags", "=", "[", "]", ";", "foreach", "(", "$", "tags", "as", "$", "tag", ")", "{", "...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php#L112-L150
train
Invalidates cache items by tag
[ 30522, 2270, 3853, 19528, 3686, 15900, 2015, 1006, 9140, 1002, 22073, 1007, 1063, 1002, 7929, 1027, 2995, 1025, 1002, 22073, 3762, 14839, 1027, 1031, 1033, 1025, 1002, 19528, 4383, 15900, 2015, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Db/Statement/Pdo.php
Zend_Db_Statement_Pdo.bindValue
public function bindValue($parameter, $value, $type = null) { if (is_string($parameter) && $parameter[0] != ':') { $parameter = ":$parameter"; } $this->_bindParam[$parameter] = $value; try { if ($type === null) { return $this->_stmt->bindValu...
php
public function bindValue($parameter, $value, $type = null) { if (is_string($parameter) && $parameter[0] != ':') { $parameter = ":$parameter"; } $this->_bindParam[$parameter] = $value; try { if ($type === null) { return $this->_stmt->bindValu...
[ "public", "function", "bindValue", "(", "$", "parameter", ",", "$", "value", ",", "$", "type", "=", "null", ")", "{", "if", "(", "is_string", "(", "$", "parameter", ")", "&&", "$", "parameter", "[", "0", "]", "!=", "':'", ")", "{", "$", "parameter"...
Binds a value to a parameter. @param mixed $parameter Name the parameter, either integer or string. @param mixed $value Scalar value to bind to the parameter. @param mixed $type OPTIONAL Datatype of the parameter. @return bool @throws Zend_Db_Statement_Exception
[ "Binds", "a", "value", "to", "a", "parameter", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Statement/Pdo.php#L130-L148
train
Binds a parameter value to the statement
[ 30522, 2270, 3853, 14187, 10175, 5657, 1006, 1002, 16381, 1010, 1002, 3643, 1010, 1002, 2828, 1027, 19701, 1007, 1063, 2065, 1006, 2003, 1035, 5164, 1006, 1002, 16381, 1007, 1004, 1004, 1002, 16381, 1031, 1014, 1033, 999, 1027, 1005, 1024, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
php-ai/php-ml
src/Metric/Accuracy.php
Accuracy.score
public static function score(array $actualLabels, array $predictedLabels, bool $normalize = true) { if (count($actualLabels) != count($predictedLabels)) { throw new InvalidArgumentException('Size of given arrays does not match'); } $score = 0; foreach ($actualLabels as $...
php
public static function score(array $actualLabels, array $predictedLabels, bool $normalize = true) { if (count($actualLabels) != count($predictedLabels)) { throw new InvalidArgumentException('Size of given arrays does not match'); } $score = 0; foreach ($actualLabels as $...
[ "public", "static", "function", "score", "(", "array", "$", "actualLabels", ",", "array", "$", "predictedLabels", ",", "bool", "$", "normalize", "=", "true", ")", "{", "if", "(", "count", "(", "$", "actualLabels", ")", "!=", "count", "(", "$", "predicted...
@return float|int @throws InvalidArgumentException
[ "@return", "float|int" ]
f6aa1a59b0525b8fca3d2786d661ab3e70904016
https://github.com/php-ai/php-ml/blob/f6aa1a59b0525b8fca3d2786d661ab3e70904016/src/Metric/Accuracy.php#L16-L34
train
Score of two arrays
[ 30522, 2270, 10763, 3853, 3556, 1006, 9140, 1002, 5025, 20470, 9050, 1010, 9140, 1002, 10173, 20470, 9050, 1010, 22017, 2140, 1002, 3671, 4697, 1027, 2995, 1007, 1063, 2065, 1006, 4175, 1006, 1002, 5025, 20470, 9050, 1007, 999, 1027, 4175, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/widgets/Lists.php
Lists.evalPartialTypeValue
protected function evalPartialTypeValue($record, $column, $value) { return $this->controller->makePartial($column->path ?: $column->columnName, [ 'listColumn' => $column, 'listRecord' => $record, 'listValue' => $value, 'column' => $column, 're...
php
protected function evalPartialTypeValue($record, $column, $value) { return $this->controller->makePartial($column->path ?: $column->columnName, [ 'listColumn' => $column, 'listRecord' => $record, 'listValue' => $value, 'column' => $column, 're...
[ "protected", "function", "evalPartialTypeValue", "(", "$", "record", ",", "$", "column", ",", "$", "value", ")", "{", "return", "$", "this", "->", "controller", "->", "makePartial", "(", "$", "column", "->", "path", "?", ":", "$", "column", "->", "column...
Process as partial reference
[ "Process", "as", "partial", "reference" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/widgets/Lists.php#L1181-L1191
train
Evaluate partial type value
[ 30522, 5123, 3853, 9345, 14277, 8445, 4818, 13874, 10175, 5657, 1006, 1002, 2501, 1010, 1002, 5930, 1010, 1002, 3643, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 11486, 1011, 1028, 2191, 19362, 20925, 1006, 1002, 5930, 1011, 1028, 4130, 1029,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Container/Container.php
Container.notInstantiable
protected function notInstantiable($concrete) { if (! empty($this->buildStack)) { $previous = implode(', ', $this->buildStack); $message = "Target [$concrete] is not instantiable while building [$previous]."; } else { $message = "Target [$concrete] is not instant...
php
protected function notInstantiable($concrete) { if (! empty($this->buildStack)) { $previous = implode(', ', $this->buildStack); $message = "Target [$concrete] is not instantiable while building [$previous]."; } else { $message = "Target [$concrete] is not instant...
[ "protected", "function", "notInstantiable", "(", "$", "concrete", ")", "{", "if", "(", "!", "empty", "(", "$", "this", "->", "buildStack", ")", ")", "{", "$", "previous", "=", "implode", "(", "', '", ",", "$", "this", "->", "buildStack", ")", ";", "$...
Throw an exception that the concrete is not instantiable. @param string $concrete @return void @throws \Illuminate\Contracts\Container\BindingResolutionException
[ "Throw", "an", "exception", "that", "the", "concrete", "is", "not", "instantiable", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Container/Container.php#L948-L959
train
Throws an exception if the concrete is not instantiable
[ 30522, 5123, 3853, 2025, 7076, 5794, 10711, 3468, 1006, 1002, 5509, 1007, 1063, 2065, 1006, 999, 4064, 1006, 1002, 2023, 1011, 1028, 16473, 2696, 3600, 1007, 1007, 1063, 1002, 3025, 1027, 17727, 4135, 3207, 1006, 1005, 1010, 1005, 1010, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/WebsiteMeasurable/Settings/Urls.php
Urls.cleanParameterUrls
public function cleanParameterUrls($urls) { if (!is_array($urls)) { $urls = array($urls); } $urls = array_filter($urls); $urls = array_map('urldecode', $urls); foreach ($urls as &$url) { $url = $this->removeTrailingSlash($url); $scheme = ...
php
public function cleanParameterUrls($urls) { if (!is_array($urls)) { $urls = array($urls); } $urls = array_filter($urls); $urls = array_map('urldecode', $urls); foreach ($urls as &$url) { $url = $this->removeTrailingSlash($url); $scheme = ...
[ "public", "function", "cleanParameterUrls", "(", "$", "urls", ")", "{", "if", "(", "!", "is_array", "(", "$", "urls", ")", ")", "{", "$", "urls", "=", "array", "(", "$", "urls", ")", ";", "}", "$", "urls", "=", "array_filter", "(", "$", "urls", "...
Clean the parameter URLs: - if the parameter is a string make it an array - remove the trailing slashes if found @param string|array urls @return array the array of cleaned URLs
[ "Clean", "the", "parameter", "URLs", ":", "-", "if", "the", "parameter", "is", "a", "string", "make", "it", "an", "array", "-", "remove", "the", "trailing", "slashes", "if", "found" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/WebsiteMeasurable/Settings/Urls.php#L103-L126
train
Clean parameter URLs
[ 30522, 2270, 3853, 4550, 28689, 22828, 3126, 4877, 1006, 1002, 24471, 4877, 1007, 1063, 2065, 1006, 999, 2003, 1035, 9140, 1006, 1002, 24471, 4877, 1007, 1007, 1063, 1002, 24471, 4877, 1027, 9140, 1006, 1002, 24471, 4877, 1007, 1025, 1065, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Form/Extension/DataCollector/FormDataCollector.php
FormDataCollector.buildFinalFormTree
public function buildFinalFormTree(FormInterface $form, FormView $view) { $this->data['forms'][$form->getName()] = &$this->recursiveBuildFinalFormTree($form, $view, $this->data['forms_by_hash']); }
php
public function buildFinalFormTree(FormInterface $form, FormView $view) { $this->data['forms'][$form->getName()] = &$this->recursiveBuildFinalFormTree($form, $view, $this->data['forms_by_hash']); }
[ "public", "function", "buildFinalFormTree", "(", "FormInterface", "$", "form", ",", "FormView", "$", "view", ")", "{", "$", "this", "->", "data", "[", "'forms'", "]", "[", "$", "form", "->", "getName", "(", ")", "]", "=", "&", "$", "this", "->", "rec...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollector.php#L213-L216
train
Recursive build final form tree
[ 30522, 2270, 3853, 3857, 16294, 2389, 14192, 13334, 1006, 2433, 18447, 2121, 12172, 1002, 2433, 1010, 2433, 8584, 1002, 3193, 1007, 1063, 1002, 2023, 1011, 1028, 2951, 1031, 1005, 3596, 1005, 1033, 1031, 1002, 2433, 1011, 1028, 2131, 18442,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Page/Collection.php
Collection.ofOneOfTheseTypes
public function ofOneOfTheseTypes($types) { $items = []; foreach ($this->items as $path => $slug) { $page = $this->pages->get($path); if ($page !== null && \in_array($page->template(), $types, true)) { $items[$path] = $slug; } } $...
php
public function ofOneOfTheseTypes($types) { $items = []; foreach ($this->items as $path => $slug) { $page = $this->pages->get($path); if ($page !== null && \in_array($page->template(), $types, true)) { $items[$path] = $slug; } } $...
[ "public", "function", "ofOneOfTheseTypes", "(", "$", "types", ")", "{", "$", "items", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "items", "as", "$", "path", "=>", "$", "slug", ")", "{", "$", "page", "=", "$", "this", "->", "pages", "-...
Creates new collection with only pages of one of the specified types @param string[] $types @return Collection The collection
[ "Creates", "new", "collection", "with", "only", "pages", "of", "one", "of", "the", "specified", "types" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Page/Collection.php#L546-L560
train
Return pages of one of the given types
[ 30522, 2270, 3853, 1997, 5643, 15794, 15689, 27405, 10374, 1006, 1002, 4127, 1007, 1063, 1002, 5167, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 5167, 2004, 1002, 4130, 1027, 1028, 1002, 23667, 1007, 1063, 1002, 3931,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/PropertyAccess/PropertyPath.php
PropertyPath.getParent
public function getParent() { if ($this->length <= 1) { return; } $parent = clone $this; --$parent->length; $parent->pathAsString = substr($parent->pathAsString, 0, max(strrpos($parent->pathAsString, '.'), strrpos($parent->pathAsString, '['))); array_pop...
php
public function getParent() { if ($this->length <= 1) { return; } $parent = clone $this; --$parent->length; $parent->pathAsString = substr($parent->pathAsString, 0, max(strrpos($parent->pathAsString, '.'), strrpos($parent->pathAsString, '['))); array_pop...
[ "public", "function", "getParent", "(", ")", "{", "if", "(", "$", "this", "->", "length", "<=", "1", ")", "{", "return", ";", "}", "$", "parent", "=", "clone", "$", "this", ";", "--", "$", "parent", "->", "length", ";", "$", "parent", "->", "path...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/PropertyAccess/PropertyPath.php#L136-L150
train
Get parent of this node
[ 30522, 2270, 3853, 2131, 19362, 4765, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 3091, 1026, 1027, 1015, 1007, 1063, 2709, 1025, 1065, 1002, 6687, 1027, 17598, 1002, 2023, 1025, 1011, 1011, 1002, 6687, 1011, 1028, 3091, 1025, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Mail/Transport/Sendmail.php
Zend_Mail_Transport_Sendmail._prepareHeaders
protected function _prepareHeaders($headers) { if (!$this->_mail) { /** * @see Zend_Mail_Transport_Exception */ // require_once 'Zend/Mail/Transport/Exception.php'; throw new Zend_Mail_Transport_Exception('_prepareHeaders requires a registered Ze...
php
protected function _prepareHeaders($headers) { if (!$this->_mail) { /** * @see Zend_Mail_Transport_Exception */ // require_once 'Zend/Mail/Transport/Exception.php'; throw new Zend_Mail_Transport_Exception('_prepareHeaders requires a registered Ze...
[ "protected", "function", "_prepareHeaders", "(", "$", "headers", ")", "{", "if", "(", "!", "$", "this", "->", "_mail", ")", "{", "/**\n * @see Zend_Mail_Transport_Exception\n */", "// require_once 'Zend/Mail/Transport/Exception.php';", "throw", "new", ...
Format and fix headers mail() uses its $to and $subject arguments to set the To: and Subject: headers, respectively. This method strips those out as a sanity check to prevent duplicate header entries. @access protected @param array $headers @return void @throws Zend_Mail_Transport_Exception
[ "Format", "and", "fix", "headers" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail/Transport/Sendmail.php#L154-L202
train
Prepare the headers
[ 30522, 5123, 3853, 1035, 7374, 4974, 2545, 1006, 1002, 20346, 2015, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 1035, 5653, 1007, 1063, 1013, 1008, 1008, 1008, 1030, 2156, 16729, 2094, 1035, 5653, 1035, 3665, 1035, 6453, 1008, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Eloquent/Concerns/HidesAttributes.php
HidesAttributes.makeVisible
public function makeVisible($attributes) { $this->hidden = array_diff($this->hidden, (array) $attributes); if (! empty($this->visible)) { $this->addVisible($attributes); } return $this; }
php
public function makeVisible($attributes) { $this->hidden = array_diff($this->hidden, (array) $attributes); if (! empty($this->visible)) { $this->addVisible($attributes); } return $this; }
[ "public", "function", "makeVisible", "(", "$", "attributes", ")", "{", "$", "this", "->", "hidden", "=", "array_diff", "(", "$", "this", "->", "hidden", ",", "(", "array", ")", "$", "attributes", ")", ";", "if", "(", "!", "empty", "(", "$", "this", ...
Make the given, typically hidden, attributes visible. @param array|string $attributes @return $this
[ "Make", "the", "given", "typically", "hidden", "attributes", "visible", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Concerns/HidesAttributes.php#L99-L108
train
make visible attributes
[ 30522, 2270, 3853, 2191, 11365, 7028, 1006, 1002, 12332, 1007, 1063, 1002, 2023, 1011, 1028, 5023, 1027, 9140, 1035, 4487, 4246, 1006, 1002, 2023, 1011, 1028, 5023, 1010, 1006, 9140, 1007, 1002, 12332, 1007, 1025, 2065, 1006, 999, 4064, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Query/Grammars/Grammar.php
Grammar.compileComponents
protected function compileComponents(Builder $query) { $sql = []; foreach ($this->selectComponents as $component) { // To compile the query, we'll spin through each component of the query and // see if that component exists. If it does we'll just call the compiler ...
php
protected function compileComponents(Builder $query) { $sql = []; foreach ($this->selectComponents as $component) { // To compile the query, we'll spin through each component of the query and // see if that component exists. If it does we'll just call the compiler ...
[ "protected", "function", "compileComponents", "(", "Builder", "$", "query", ")", "{", "$", "sql", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "selectComponents", "as", "$", "component", ")", "{", "// To compile the query, we'll spin through each compone...
Compile the components necessary for a select clause. @param \Illuminate\Database\Query\Builder $query @return array
[ "Compile", "the", "components", "necessary", "for", "a", "select", "clause", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Grammars/Grammar.php#L80-L96
train
Compiles the select components into an array of SQL statements.
[ 30522, 5123, 3853, 4012, 22090, 9006, 29513, 7666, 1006, 12508, 1002, 23032, 1007, 1063, 1002, 29296, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 7276, 9006, 29513, 7666, 2004, 1002, 6922, 1007, 1063, 1013, 1013, 2000...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php
MongoDbSessionHandler.updateTimestamp
public function updateTimestamp($sessionId, $data) { $expiry = new \MongoDB\BSON\UTCDateTime((time() + (int) ini_get('session.gc_maxlifetime')) * 1000); $this->getCollection()->updateOne( [$this->options['id_field'] => $sessionId], ['$set' => [ $this->options...
php
public function updateTimestamp($sessionId, $data) { $expiry = new \MongoDB\BSON\UTCDateTime((time() + (int) ini_get('session.gc_maxlifetime')) * 1000); $this->getCollection()->updateOne( [$this->options['id_field'] => $sessionId], ['$set' => [ $this->options...
[ "public", "function", "updateTimestamp", "(", "$", "sessionId", ",", "$", "data", ")", "{", "$", "expiry", "=", "new", "\\", "MongoDB", "\\", "BSON", "\\", "UTCDateTime", "(", "(", "time", "(", ")", "+", "(", "int", ")", "ini_get", "(", "'session.gc_ma...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php#L142-L155
train
Update the timestamp of the session
[ 30522, 2270, 3853, 10651, 7292, 9153, 8737, 1006, 1002, 5219, 3593, 1010, 1002, 2951, 1007, 1063, 1002, 4654, 8197, 2854, 1027, 2047, 1032, 12256, 3995, 18939, 1032, 18667, 2239, 1032, 11396, 13701, 7292, 1006, 1006, 2051, 1006, 1007, 1009,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeZoneToStringTransformer.php
DateTimeZoneToStringTransformer.reverseTransform
public function reverseTransform($value) { if (null === $value) { return; } if ($this->multiple) { if (!\is_array($value)) { throw new TransformationFailedException('Expected an array of timezone identifier strings.'); } retur...
php
public function reverseTransform($value) { if (null === $value) { return; } if ($this->multiple) { if (!\is_array($value)) { throw new TransformationFailedException('Expected an array of timezone identifier strings.'); } retur...
[ "public", "function", "reverseTransform", "(", "$", "value", ")", "{", "if", "(", "null", "===", "$", "value", ")", "{", "return", ";", "}", "if", "(", "$", "this", "->", "multiple", ")", "{", "if", "(", "!", "\\", "is_array", "(", "$", "value", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeZoneToStringTransformer.php#L58-L81
train
Transforms a timezone identifier string into a \ DateTimeZone object
[ 30522, 2270, 3853, 7901, 6494, 3619, 14192, 1006, 1002, 3643, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 1027, 1002, 3643, 1007, 1063, 2709, 1025, 1065, 2065, 1006, 1002, 2023, 1011, 1028, 3674, 1007, 1063, 2065, 1006, 999, 1032, 2003, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/DataTable/Filter/ColumnCallbackAddColumn.php
ColumnCallbackAddColumn.filter
public function filter($table) { $columns = $this->columns; $functionParams = $this->functionParameters; $functionToApply = $this->functionToApply; $extraProcessedMetrics = $table->getMetadata(DataTable::EXTRA_PROCESSED_METRICS_METADATA_NAME); if (empty($extraProcessedMetr...
php
public function filter($table) { $columns = $this->columns; $functionParams = $this->functionParameters; $functionToApply = $this->functionToApply; $extraProcessedMetrics = $table->getMetadata(DataTable::EXTRA_PROCESSED_METRICS_METADATA_NAME); if (empty($extraProcessedMetr...
[ "public", "function", "filter", "(", "$", "table", ")", "{", "$", "columns", "=", "$", "this", "->", "columns", ";", "$", "functionParams", "=", "$", "this", "->", "functionParameters", ";", "$", "functionToApply", "=", "$", "this", "->", "functionToApply"...
See {@link ColumnCallbackAddColumn}. @param DataTable $table The table to filter.
[ "See", "{", "@link", "ColumnCallbackAddColumn", "}", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataTable/Filter/ColumnCallbackAddColumn.php#L81-L112
train
Filters the given table and adds the processed metric to each row of the table.
[ 30522, 2270, 3853, 11307, 1006, 1002, 2795, 1007, 1063, 1002, 7753, 1027, 1002, 2023, 1011, 1028, 7753, 1025, 1002, 3853, 28689, 5244, 1027, 1002, 2023, 1011, 1028, 3853, 28689, 22828, 2015, 1025, 1002, 3853, 3406, 29098, 2135, 1027, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/CssSelector/XPath/Translator.php
Translator.selectorToXPath
public function selectorToXPath(SelectorNode $selector, string $prefix = 'descendant-or-self::'): string { return ($prefix ?: '').$this->nodeToXPath($selector); }
php
public function selectorToXPath(SelectorNode $selector, string $prefix = 'descendant-or-self::'): string { return ($prefix ?: '').$this->nodeToXPath($selector); }
[ "public", "function", "selectorToXPath", "(", "SelectorNode", "$", "selector", ",", "string", "$", "prefix", "=", "'descendant-or-self::'", ")", ":", "string", "{", "return", "(", "$", "prefix", "?", ":", "''", ")", ".", "$", "this", "->", "nodeToXPath", "...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/CssSelector/XPath/Translator.php#L112-L115
train
Returns the XPath of the selector node
[ 30522, 2270, 3853, 27000, 3406, 2595, 15069, 1006, 27000, 3630, 3207, 1002, 27000, 1010, 5164, 1002, 17576, 1027, 1005, 12608, 1011, 2030, 1011, 2969, 1024, 1024, 1005, 1007, 1024, 5164, 1063, 2709, 1006, 1002, 17576, 1029, 1024, 1005, 1005...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Intl/Data/Util/LocaleScanner.php
LocaleScanner.scanParents
public function scanParents(string $sourceDir): array { $locales = $this->scanLocales($sourceDir); $fallbacks = []; foreach ($locales as $locale) { $content = \file_get_contents($sourceDir.'/'.$locale.'.txt'); // Aliases contain the text "%%PARENT" followed by the a...
php
public function scanParents(string $sourceDir): array { $locales = $this->scanLocales($sourceDir); $fallbacks = []; foreach ($locales as $locale) { $content = \file_get_contents($sourceDir.'/'.$locale.'.txt'); // Aliases contain the text "%%PARENT" followed by the a...
[ "public", "function", "scanParents", "(", "string", "$", "sourceDir", ")", ":", "array", "{", "$", "locales", "=", "$", "this", "->", "scanLocales", "(", "$", "sourceDir", ")", ";", "$", "fallbacks", "=", "[", "]", ";", "foreach", "(", "$", "locales", ...
Returns all locale parents found in the given directory.
[ "Returns", "all", "locale", "parents", "found", "in", "the", "given", "directory", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Intl/Data/Util/LocaleScanner.php#L89-L104
train
Scan parent locales
[ 30522, 2270, 3853, 13594, 19362, 11187, 1006, 5164, 1002, 23184, 4313, 1007, 1024, 9140, 1063, 1002, 2334, 2229, 1027, 1002, 2023, 1011, 1028, 13594, 4135, 9289, 2229, 1006, 1002, 23184, 4313, 1007, 30524, 1005, 1012, 1002, 2334, 2063, 1012...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php
DoctrineOrmTypeGuesser.guessMaxLength
public function guessMaxLength($class, $property) { $ret = $this->getMetadata($class); if ($ret && isset($ret[0]->fieldMappings[$property]) && !$ret[0]->hasAssociation($property)) { $mapping = $ret[0]->getFieldMapping($property); if (isset($mapping['length'])) { ...
php
public function guessMaxLength($class, $property) { $ret = $this->getMetadata($class); if ($ret && isset($ret[0]->fieldMappings[$property]) && !$ret[0]->hasAssociation($property)) { $mapping = $ret[0]->getFieldMapping($property); if (isset($mapping['length'])) { ...
[ "public", "function", "guessMaxLength", "(", "$", "class", ",", "$", "property", ")", "{", "$", "ret", "=", "$", "this", "->", "getMetadata", "(", "$", "class", ")", ";", "if", "(", "$", "ret", "&&", "isset", "(", "$", "ret", "[", "0", "]", "->",...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php#L135-L149
train
Guesses the maximum length of a property of a class.
[ 30522, 2270, 3853, 3984, 17848, 7770, 13512, 2232, 1006, 1002, 2465, 1010, 1002, 30524, 1014, 1033, 1011, 1028, 2492, 2863, 14853, 2015, 1031, 1002, 3200, 1033, 1007, 1004, 1004, 999, 1002, 2128, 2102, 1031, 1014, 1033, 1011, 1028, 2038, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Period/Week.php
Week.getLocalizedLongString
public function getLocalizedLongString() { $string = $this->getTranslatedRange($this->getRangeFormat()); return $this->translator->translate('Intl_PeriodWeek') . " " . $string; }
php
public function getLocalizedLongString() { $string = $this->getTranslatedRange($this->getRangeFormat()); return $this->translator->translate('Intl_PeriodWeek') . " " . $string; }
[ "public", "function", "getLocalizedLongString", "(", ")", "{", "$", "string", "=", "$", "this", "->", "getTranslatedRange", "(", "$", "this", "->", "getRangeFormat", "(", ")", ")", ";", "return", "$", "this", "->", "translator", "->", "translate", "(", "'I...
Returns the current period as a localized long string @return string
[ "Returns", "the", "current", "period", "as", "a", "localized", "long", "string" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Period/Week.php#L36-L40
train
Get localized long string
[ 30522, 2270, 3853, 2131, 4135, 9289, 3550, 10052, 3367, 4892, 1006, 1007, 1063, 1002, 5164, 1027, 1002, 2023, 1011, 1028, 2131, 6494, 3619, 13776, 24388, 2063, 1006, 1002, 2023, 1011, 1028, 2131, 24388, 12879, 2953, 18900, 1006, 1007, 1007,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.whereDay
public function whereDay($column, $operator, $value = null, $boolean = 'and') { [$value, $operator] = $this->prepareValueAndOperator( $value, $operator, func_num_args() === 2 ); if ($value instanceof DateTimeInterface) { $value = $value->format('d'); } ...
php
public function whereDay($column, $operator, $value = null, $boolean = 'and') { [$value, $operator] = $this->prepareValueAndOperator( $value, $operator, func_num_args() === 2 ); if ($value instanceof DateTimeInterface) { $value = $value->format('d'); } ...
[ "public", "function", "whereDay", "(", "$", "column", ",", "$", "operator", ",", "$", "value", "=", "null", ",", "$", "boolean", "=", "'and'", ")", "{", "[", "$", "value", ",", "$", "operator", "]", "=", "$", "this", "->", "prepareValueAndOperator", ...
Add a "where day" statement to the query. @param string $column @param string $operator @param \DateTimeInterface|string $value @param string $boolean @return \Illuminate\Database\Query\Builder|static
[ "Add", "a", "where", "day", "statement", "to", "the", "query", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L1191-L1204
train
Adds a where day statement to the query.
[ 30522, 2270, 3853, 2073, 10259, 1006, 1002, 5930, 1010, 1002, 6872, 1010, 1002, 3643, 1027, 19701, 1010, 1002, 22017, 20898, 1027, 1005, 1998, 1005, 1007, 1063, 1031, 1002, 3643, 1010, 1002, 6872, 1033, 1027, 1002, 2023, 1011, 1028, 7374, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Page/Collection.php
Collection.modular
public function modular() { $modular = []; foreach ($this->items as $path => $slug) { $page = $this->pages->get($path); if ($page !== null && $page->modular()) { $modular[$path] = $slug; } } $this->items = $modular; return...
php
public function modular() { $modular = []; foreach ($this->items as $path => $slug) { $page = $this->pages->get($path); if ($page !== null && $page->modular()) { $modular[$path] = $slug; } } $this->items = $modular; return...
[ "public", "function", "modular", "(", ")", "{", "$", "modular", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "items", "as", "$", "path", "=>", "$", "slug", ")", "{", "$", "page", "=", "$", "this", "->", "pages", "->", "get", "(", "$",...
Creates new collection with only modular pages @return Collection The collection with only modular pages
[ "Creates", "new", "collection", "with", "only", "modular", "pages" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Page/Collection.php#L399-L412
train
Get modular pages
[ 30522, 2270, 3853, 19160, 1006, 1007, 1063, 1002, 19160, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 5167, 2004, 1002, 4130, 1027, 1028, 1002, 23667, 1007, 1063, 1002, 3931, 1027, 1002, 2023, 1011, 1028, 5530, 1011, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpFoundation/Request.php
Request.isSecure
public function isSecure() { if ($this->isFromTrustedProxy() && $proto = $this->getTrustedValues(self::HEADER_X_FORWARDED_PROTO)) { return \in_array(strtolower($proto[0]), ['https', 'on', 'ssl', '1'], true); } $https = $this->server->get('HTTPS'); return !empty($https) ...
php
public function isSecure() { if ($this->isFromTrustedProxy() && $proto = $this->getTrustedValues(self::HEADER_X_FORWARDED_PROTO)) { return \in_array(strtolower($proto[0]), ['https', 'on', 'ssl', '1'], true); } $https = $this->server->get('HTTPS'); return !empty($https) ...
[ "public", "function", "isSecure", "(", ")", "{", "if", "(", "$", "this", "->", "isFromTrustedProxy", "(", ")", "&&", "$", "proto", "=", "$", "this", "->", "getTrustedValues", "(", "self", "::", "HEADER_X_FORWARDED_PROTO", ")", ")", "{", "return", "\\", "...
Checks whether the request is secure or not. This method can read the client protocol from the "X-Forwarded-Proto" header when trusted proxies were set via "setTrustedProxies()". The "X-Forwarded-Proto" header must contain the protocol: "https" or "http". @return bool
[ "Checks", "whether", "the", "request", "is", "secure", "or", "not", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Request.php#L1114-L1123
train
Is Secure - Check if request is from trusted proxy
[ 30522, 2270, 3853, 26354, 29150, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 2003, 19699, 5358, 24669, 2098, 21572, 18037, 1006, 1007, 1004, 1004, 1002, 15053, 1027, 1002, 2023, 1011, 1028, 2131, 24669, 2098, 10175, 15808, 1006, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Mail/Protocol/Imap.php
Zend_Mail_Protocol_Imap.login
public function login($user, $password) { return $this->requestAndResponse('LOGIN', $this->escapeString($user, $password), true); }
php
public function login($user, $password) { return $this->requestAndResponse('LOGIN', $this->escapeString($user, $password), true); }
[ "public", "function", "login", "(", "$", "user", ",", "$", "password", ")", "{", "return", "$", "this", "->", "requestAndResponse", "(", "'LOGIN'", ",", "$", "this", "->", "escapeString", "(", "$", "user", ",", "$", "password", ")", ",", "true", ")", ...
Login to IMAP server. @param string $user username @param string $password password @return bool success @throws Zend_Mail_Protocol_Exception
[ "Login", "to", "IMAP", "server", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail/Protocol/Imap.php#L444-L447
train
LOGIN - Login - Login
[ 30522, 2270, 3853, 8833, 2378, 1006, 1002, 5310, 1010, 1002, 20786, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 5227, 5685, 6072, 26029, 3366, 1006, 1005, 8833, 2378, 1005, 1010, 1002, 2023, 1011, 1028, 12976, 18886, 3070, 1006, 1002, 5310, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Routing/Route.php
Route.named
public function named(...$patterns) { if (is_null($routeName = $this->getName())) { return false; } foreach ($patterns as $pattern) { if (Str::is($pattern, $routeName)) { return true; } } return false; }
php
public function named(...$patterns) { if (is_null($routeName = $this->getName())) { return false; } foreach ($patterns as $pattern) { if (Str::is($pattern, $routeName)) { return true; } } return false; }
[ "public", "function", "named", "(", "...", "$", "patterns", ")", "{", "if", "(", "is_null", "(", "$", "routeName", "=", "$", "this", "->", "getName", "(", ")", ")", ")", "{", "return", "false", ";", "}", "foreach", "(", "$", "patterns", "as", "$", ...
Determine whether the route's name matches the given patterns. @param mixed ...$patterns @return bool
[ "Determine", "whether", "the", "route", "s", "name", "matches", "the", "given", "patterns", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/Route.php#L688-L701
train
Check if route name matches patterns
[ 30522, 2270, 3853, 2315, 1006, 1012, 1012, 1012, 1002, 7060, 1007, 1063, 2065, 1006, 2003, 1035, 19701, 1006, 1002, 2799, 18442, 1027, 1002, 2023, 1011, 1028, 2131, 18442, 1006, 1007, 1007, 1007, 1063, 2709, 6270, 1025, 1065, 18921, 6776, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Eloquent/Relations/Concerns/AsPivot.php
AsPivot.setKeysForSaveQuery
protected function setKeysForSaveQuery(Builder $query) { if (isset($this->attributes[$this->getKeyName()])) { return parent::setKeysForSaveQuery($query); } $query->where($this->foreignKey, $this->getOriginal( $this->foreignKey, $this->getAttribute($this->foreignKey) ...
php
protected function setKeysForSaveQuery(Builder $query) { if (isset($this->attributes[$this->getKeyName()])) { return parent::setKeysForSaveQuery($query); } $query->where($this->foreignKey, $this->getOriginal( $this->foreignKey, $this->getAttribute($this->foreignKey) ...
[ "protected", "function", "setKeysForSaveQuery", "(", "Builder", "$", "query", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "attributes", "[", "$", "this", "->", "getKeyName", "(", ")", "]", ")", ")", "{", "return", "parent", "::", "setKeysForSav...
Set the keys for a save update query. @param \Illuminate\Database\Eloquent\Builder $query @return \Illuminate\Database\Eloquent\Builder
[ "Set", "the", "keys", "for", "a", "save", "update", "query", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Relations/Concerns/AsPivot.php#L91-L104
train
Set keys for save query
[ 30522, 5123, 3853, 2275, 14839, 22747, 5668, 10696, 4226, 2854, 1006, 12508, 1002, 23032, 1007, 1063, 2065, 1006, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 12332, 1031, 1002, 2023, 1011, 1028, 2131, 14839, 18442, 1006, 1007, 1033, 1007, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php
AbstractRecursivePass.process
public function process(ContainerBuilder $container) { $this->container = $container; try { $this->processValue($container->getDefinitions(), true); } finally { $this->container = null; } }
php
public function process(ContainerBuilder $container) { $this->container = $container; try { $this->processValue($container->getDefinitions(), true); } finally { $this->container = null; } }
[ "public", "function", "process", "(", "ContainerBuilder", "$", "container", ")", "{", "$", "this", "->", "container", "=", "$", "container", ";", "try", "{", "$", "this", "->", "processValue", "(", "$", "container", "->", "getDefinitions", "(", ")", ",", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php#L41-L50
train
Process the container builder
[ 30522, 2270, 3853, 2832, 1006, 11661, 8569, 23891, 2099, 1002, 11661, 1007, 1063, 1002, 2023, 1011, 1028, 11661, 1027, 1002, 11661, 1025, 3046, 1063, 1002, 2023, 1011, 1028, 2832, 10175, 5657, 1006, 1002, 11661, 1011, 1028, 2131, 3207, 1629...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...