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
matomo-org/matomo
core/Scheduler/Scheduler.php
Scheduler.getScheduledTimeForMethod
public function getScheduledTimeForMethod($className, $methodName, $methodParameter = null) { return $this->timetable->getScheduledTimeForMethod($className, $methodName, $methodParameter); }
php
public function getScheduledTimeForMethod($className, $methodName, $methodParameter = null) { return $this->timetable->getScheduledTimeForMethod($className, $methodName, $methodParameter); }
[ "public", "function", "getScheduledTimeForMethod", "(", "$", "className", ",", "$", "methodName", ",", "$", "methodParameter", "=", "null", ")", "{", "return", "$", "this", "->", "timetable", "->", "getScheduledTimeForMethod", "(", "$", "className", ",", "$", ...
Return the next scheduled time given the class and method names of a scheduled task. @param string $className The name of the class that contains the scheduled task method. @param string $methodName The name of the scheduled task method. @param string|null $methodParameter Optional method parameter. @return mixed int|...
[ "Return", "the", "next", "scheduled", "time", "given", "the", "class", "and", "method", "names", "of", "a", "scheduled", "task", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Scheduler/Scheduler.php#L220-L223
train
Returns the scheduled time for a method
[ 30522, 2270, 3853, 4152, 7690, 18696, 7292, 14192, 11031, 7716, 1006, 1002, 2465, 18442, 1010, 1002, 4118, 18442, 1010, 1002, 4118, 28689, 22828, 1027, 19701, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 23839, 1011, 1028, 4152, 7690, 18696, 7...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Isbn.php
Zend_Validate_Isbn.isValid
public function isValid($value) { if (!is_string($value) && !is_int($value)) { $this->_error(self::INVALID); return false; } $value = (string) $value; $this->_setValue($value); switch ($this->_detectFormat()) { case self::ISBN10: ...
php
public function isValid($value) { if (!is_string($value) && !is_int($value)) { $this->_error(self::INVALID); return false; } $value = (string) $value; $this->_setValue($value); switch ($this->_detectFormat()) { case self::ISBN10: ...
[ "public", "function", "isValid", "(", "$", "value", ")", "{", "if", "(", "!", "is_string", "(", "$", "value", ")", "&&", "!", "is_int", "(", "$", "value", ")", ")", "{", "$", "this", "->", "_error", "(", "self", "::", "INVALID", ")", ";", "return...
Defined by Zend_Validate_Interface. Returns true if and only if $value is a valid ISBN. @param string $value @return boolean
[ "Defined", "by", "Zend_Validate_Interface", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Validate/Isbn.php#L155-L212
train
Checks if the field is valid.
[ 30522, 2270, 3853, 2003, 10175, 3593, 1006, 1002, 3643, 1007, 1063, 2065, 1006, 999, 2003, 1035, 5164, 1006, 1002, 3643, 1007, 1004, 1004, 999, 2003, 1035, 20014, 1006, 1002, 3643, 1007, 1007, 1063, 1002, 2023, 1011, 1028, 1035, 7561, 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...
symfony/symfony
src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php
PhpArrayAdapter.throwOnRequiredClass
public static function throwOnRequiredClass($class) { $e = new \ReflectionException("Class $class does not exist"); $trace = $e->getTrace(); $autoloadFrame = [ 'function' => 'spl_autoload_call', 'args' => [$class], ]; $i = 1 + array_search($autoloadFra...
php
public static function throwOnRequiredClass($class) { $e = new \ReflectionException("Class $class does not exist"); $trace = $e->getTrace(); $autoloadFrame = [ 'function' => 'spl_autoload_call', 'args' => [$class], ]; $i = 1 + array_search($autoloadFra...
[ "public", "static", "function", "throwOnRequiredClass", "(", "$", "class", ")", "{", "$", "e", "=", "new", "\\", "ReflectionException", "(", "\"Class $class does not exist\"", ")", ";", "$", "trace", "=", "$", "e", "->", "getTrace", "(", ")", ";", "$", "au...
@throws \ReflectionException When $class is not found and is required @internal
[ "@throws", "\\", "ReflectionException", "When", "$class", "is", "not", "found", "and", "is", "required" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php#L293-L324
train
Throws an exception if the class does not exist
[ 30522, 2270, 10763, 3853, 5466, 2239, 2890, 15549, 5596, 26266, 1006, 1002, 2465, 1007, 1063, 1002, 1041, 1027, 2047, 1032, 9185, 10288, 24422, 1006, 1000, 2465, 1002, 2465, 2515, 2025, 4839, 1000, 1007, 1025, 1002, 7637, 1027, 1002, 1041, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Mail/TransportManager.php
TransportManager.createSparkPostDriver
protected function createSparkPostDriver() { $config = $this->app['config']->get('services.sparkpost', []); return new SparkPostTransport( $this->guzzle($config), $config['secret'], $config['options'] ?? [] ); }
php
protected function createSparkPostDriver() { $config = $this->app['config']->get('services.sparkpost', []); return new SparkPostTransport( $this->guzzle($config), $config['secret'], $config['options'] ?? [] ); }
[ "protected", "function", "createSparkPostDriver", "(", ")", "{", "$", "config", "=", "$", "this", "->", "app", "[", "'config'", "]", "->", "get", "(", "'services.sparkpost'", ",", "[", "]", ")", ";", "return", "new", "SparkPostTransport", "(", "$", "this",...
Create an instance of the SparkPost Swift Transport driver. @return \Illuminate\Mail\Transport\SparkPostTransport
[ "Create", "an", "instance", "of", "the", "SparkPost", "Swift", "Transport", "driver", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Mail/TransportManager.php#L148-L155
train
Create a SparkPostTransport instance
[ 30522, 5123, 3853, 9005, 30524, 1010, 1031, 1033, 1007, 1025, 2709, 2047, 12125, 19894, 6494, 3619, 6442, 1006, 1002, 2023, 1011, 1028, 19739, 17644, 1006, 1002, 9530, 8873, 2290, 1007, 1010, 1002, 9530, 8873, 2290, 1031, 1005, 3595, 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/Settings/Storage/Storage.php
Storage.getValue
public function getValue($key, $defaultValue, $type) { $this->loadSettingsIfNotDoneYet(); if (array_key_exists($key, $this->settingsValues)) { settype($this->settingsValues[$key], $type); return $this->settingsValues[$key]; } return $defaultValue; }
php
public function getValue($key, $defaultValue, $type) { $this->loadSettingsIfNotDoneYet(); if (array_key_exists($key, $this->settingsValues)) { settype($this->settingsValues[$key], $type); return $this->settingsValues[$key]; } return $defaultValue; }
[ "public", "function", "getValue", "(", "$", "key", ",", "$", "defaultValue", ",", "$", "type", ")", "{", "$", "this", "->", "loadSettingsIfNotDoneYet", "(", ")", ";", "if", "(", "array_key_exists", "(", "$", "key", ",", "$", "this", "->", "settingsValues...
Returns the current value for a setting. If no value is stored, the default value is be returned. @param string $key The name / key of a setting @param mixed $defaultValue Default value that will be used in case no value for this setting exists yet @param string $type The PHP internal type the value of the setting sh...
[ "Returns", "the", "current", "value", "for", "a", "setting", ".", "If", "no", "value", "is", "stored", "the", "default", "value", "is", "be", "returned", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Settings/Storage/Storage.php#L81-L91
train
Get the value of a setting
[ 30522, 2270, 3853, 2131, 10175, 5657, 1006, 1002, 3145, 1010, 1002, 12398, 10175, 5657, 1010, 1002, 2828, 1007, 1063, 1002, 2023, 1011, 1028, 15665, 18319, 3070, 5332, 2546, 17048, 5280, 17683, 2102, 1006, 1007, 1025, 2065, 1006, 9140, 1035...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/CacheItem.php
CacheItem.log
public static function log(LoggerInterface $logger = null, $message, $context = []) { if ($logger) { $logger->warning($message, $context); } else { $replace = []; foreach ($context as $k => $v) { if (is_scalar($v)) { $replace['{...
php
public static function log(LoggerInterface $logger = null, $message, $context = []) { if ($logger) { $logger->warning($message, $context); } else { $replace = []; foreach ($context as $k => $v) { if (is_scalar($v)) { $replace['{...
[ "public", "static", "function", "log", "(", "LoggerInterface", "$", "logger", "=", "null", ",", "$", "message", ",", "$", "context", "=", "[", "]", ")", "{", "if", "(", "$", "logger", ")", "{", "$", "logger", "->", "warning", "(", "$", "message", "...
Internal logging helper. @internal
[ "Internal", "logging", "helper", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Cache/CacheItem.php#L186-L199
train
Log a warning to the system
[ 30522, 2270, 10763, 3853, 8833, 1006, 8833, 4590, 18447, 2121, 12172, 1002, 8833, 4590, 1027, 19701, 1010, 1002, 4471, 1010, 1002, 6123, 1027, 1031, 1033, 1007, 1063, 2065, 1006, 1002, 8833, 4590, 1007, 1063, 1002, 8833, 4590, 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...
z-song/laravel-admin
src/Form/Field/UploadField.php
UploadField.destroy
public function destroy() { if ($this->storage->exists($this->original)) { $this->storage->delete($this->original); } }
php
public function destroy() { if ($this->storage->exists($this->original)) { $this->storage->delete($this->original); } }
[ "public", "function", "destroy", "(", ")", "{", "if", "(", "$", "this", "->", "storage", "->", "exists", "(", "$", "this", "->", "original", ")", ")", "{", "$", "this", "->", "storage", "->", "delete", "(", "$", "this", "->", "original", ")", ";", ...
Destroy original files. @return void.
[ "Destroy", "original", "files", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Form/Field/UploadField.php#L379-L384
train
Destroy the original content
[ 30522, 2270, 3853, 6033, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 5527, 1011, 1028, 6526, 1006, 1002, 2023, 1011, 1028, 2434, 1007, 1007, 1063, 1002, 2023, 1011, 1028, 5527, 1011, 1028, 3972, 12870, 1006, 1002, 2023, 1011, 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/API/Request.php
Request.processRequest
public static function processRequest($method, $paramOverride = array(), $defaultRequest = null) { $params = array(); $params['format'] = 'original'; $params['serialize'] = '0'; $params['module'] = 'API'; $params['method'] = $method; $params = $paramOverride + $params...
php
public static function processRequest($method, $paramOverride = array(), $defaultRequest = null) { $params = array(); $params['format'] = 'original'; $params['serialize'] = '0'; $params['module'] = 'API'; $params['method'] = $method; $params = $paramOverride + $params...
[ "public", "static", "function", "processRequest", "(", "$", "method", ",", "$", "paramOverride", "=", "array", "(", ")", ",", "$", "defaultRequest", "=", "null", ")", "{", "$", "params", "=", "array", "(", ")", ";", "$", "params", "[", "'format'", "]",...
Helper method that processes an API request in one line using the variables in `$_GET` and `$_POST`. @param string $method The API method to call, ie, `'Actions.getPageTitles'`. @param array $paramOverride The parameter name-value pairs to use instead of what's in `$_GET` & `$_POST`. @param array $defaultRequest Defau...
[ "Helper", "method", "that", "processes", "an", "API", "request", "in", "one", "line", "using", "the", "variables", "in", "$_GET", "and", "$_POST", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/API/Request.php#L496-L508
train
Process request by method
[ 30522, 2270, 10763, 3853, 2832, 2890, 15500, 1006, 1002, 4118, 1010, 1002, 11498, 5302, 6299, 15637, 1027, 9140, 1006, 1007, 1010, 1002, 12398, 2890, 15500, 1027, 19701, 1007, 1063, 1002, 11498, 5244, 1027, 9140, 1006, 1007, 1025, 1002, 114...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Ibm.php
Zend_Db_Adapter_Pdo_Ibm.limit
public function limit($sql, $count, $offset = 0) { $this->_connect(); return $this->_serverType->limit($sql, $count, $offset); }
php
public function limit($sql, $count, $offset = 0) { $this->_connect(); return $this->_serverType->limit($sql, $count, $offset); }
[ "public", "function", "limit", "(", "$", "sql", ",", "$", "count", ",", "$", "offset", "=", "0", ")", "{", "$", "this", "->", "_connect", "(", ")", ";", "return", "$", "this", "->", "_serverType", "->", "limit", "(", "$", "sql", ",", "$", "count"...
Adds an adapter-specific LIMIT clause to the SELECT statement. @param string $sql @param integer $count @param integer $offset OPTIONAL @return string
[ "Adds", "an", "adapter", "-", "specific", "LIMIT", "clause", "to", "the", "SELECT", "statement", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Adapter/Pdo/Ibm.php#L280-L284
train
Limit the number of records in the server
[ 30522, 2270, 3853, 5787, 1006, 1002, 29296, 1010, 1002, 4175, 1010, 1002, 16396, 1027, 1014, 1007, 1063, 1002, 2023, 1011, 1028, 1035, 7532, 1006, 1007, 1025, 2709, 1002, 2023, 1011, 1028, 1035, 8241, 13874, 1011, 1028, 5787, 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...
symfony/symfony
src/Symfony/Component/Process/Process.php
Process.getIncrementalOutput
public function getIncrementalOutput() { $this->readPipesForOutput(__FUNCTION__); $latest = stream_get_contents($this->stdout, -1, $this->incrementalOutputOffset); $this->incrementalOutputOffset = ftell($this->stdout); if (false === $latest) { return ''; } ...
php
public function getIncrementalOutput() { $this->readPipesForOutput(__FUNCTION__); $latest = stream_get_contents($this->stdout, -1, $this->incrementalOutputOffset); $this->incrementalOutputOffset = ftell($this->stdout); if (false === $latest) { return ''; } ...
[ "public", "function", "getIncrementalOutput", "(", ")", "{", "$", "this", "->", "readPipesForOutput", "(", "__FUNCTION__", ")", ";", "$", "latest", "=", "stream_get_contents", "(", "$", "this", "->", "stdout", ",", "-", "1", ",", "$", "this", "->", "increm...
Returns the output incrementally. In comparison with the getOutput method which always return the whole output, this one returns the new output since the last call. @return string The process output since the last call @throws LogicException in case the output has been disabled @throws LogicException In case the pro...
[ "Returns", "the", "output", "incrementally", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Process/Process.php#L585-L597
train
Get the incremental output of the command.
[ 30522, 2270, 3853, 2131, 2378, 16748, 26901, 5833, 30524, 1011, 1015, 1010, 1002, 2023, 1011, 1028, 4297, 28578, 21050, 5833, 18780, 27475, 3388, 1007, 1025, 1002, 2023, 1011, 1028, 4297, 28578, 21050, 5833, 18780, 27475, 3388, 1027, 3027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/User/Traits/UserTrait.php
UserTrait.authorize
public function authorize(string $action, string $scope = null): bool { if (!$this->get('authenticated')) { return false; } if ($this->get('state', 'enabled') !== 'enabled') { return false; } if (null !== $scope) { $action = $scope . '.' ...
php
public function authorize(string $action, string $scope = null): bool { if (!$this->get('authenticated')) { return false; } if ($this->get('state', 'enabled') !== 'enabled') { return false; } if (null !== $scope) { $action = $scope . '.' ...
[ "public", "function", "authorize", "(", "string", "$", "action", ",", "string", "$", "scope", "=", "null", ")", ":", "bool", "{", "if", "(", "!", "$", "this", "->", "get", "(", "'authenticated'", ")", ")", "{", "return", "false", ";", "}", "if", "(...
Checks user authorization to the action. @param string $action @param string|null $scope @return bool
[ "Checks", "user", "authorization", "to", "the", "action", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/User/Traits/UserTrait.php#L68-L103
train
Authorize the current user with the given action
[ 30522, 2270, 3853, 3166, 4697, 1006, 5164, 1002, 2895, 1010, 5164, 1002, 9531, 30524, 1002, 2023, 1011, 1028, 2131, 1006, 1005, 14469, 4383, 1005, 1007, 1007, 1063, 2709, 6270, 1025, 1065, 2065, 1006, 1002, 2023, 1011, 1028, 2131, 1006, 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/Console/Command.php
Command.configureUsingFluentDefinition
protected function configureUsingFluentDefinition() { [$name, $arguments, $options] = Parser::parse($this->signature); parent::__construct($this->name = $name); // After parsing the signature we will spin through the arguments and options // and set them on this command. These will...
php
protected function configureUsingFluentDefinition() { [$name, $arguments, $options] = Parser::parse($this->signature); parent::__construct($this->name = $name); // After parsing the signature we will spin through the arguments and options // and set them on this command. These will...
[ "protected", "function", "configureUsingFluentDefinition", "(", ")", "{", "[", "$", "name", ",", "$", "arguments", ",", "$", "options", "]", "=", "Parser", "::", "parse", "(", "$", "this", "->", "signature", ")", ";", "parent", "::", "__construct", "(", ...
Configure the console command using a fluent definition. @return void
[ "Configure", "the", "console", "command", "using", "a", "fluent", "definition", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Console/Command.php#L124-L135
train
Configure the command using the Fluent definition
[ 30522, 5123, 3853, 9530, 8873, 27390, 10600, 2075, 10258, 24997, 2102, 3207, 16294, 22753, 1006, 1007, 1063, 1031, 1002, 2171, 1010, 1002, 9918, 1010, 1002, 7047, 1033, 1027, 11968, 8043, 1024, 1024, 11968, 3366, 1006, 1002, 2023, 1011, 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...
matomo-org/matomo
core/DataTable.php
DataTable.mergeSubtables
public function mergeSubtables($labelColumn = false, $useMetadataColumn = false) { $result = new DataTable(); $result->setAllTableMetadata($this->getAllTableMetadata()); foreach ($this->getRowsWithoutSummaryRow() as $row) { $subtable = $row->getSubtable(); if ($subtab...
php
public function mergeSubtables($labelColumn = false, $useMetadataColumn = false) { $result = new DataTable(); $result->setAllTableMetadata($this->getAllTableMetadata()); foreach ($this->getRowsWithoutSummaryRow() as $row) { $subtable = $row->getSubtable(); if ($subtab...
[ "public", "function", "mergeSubtables", "(", "$", "labelColumn", "=", "false", ",", "$", "useMetadataColumn", "=", "false", ")", "{", "$", "result", "=", "new", "DataTable", "(", ")", ";", "$", "result", "->", "setAllTableMetadata", "(", "$", "this", "->",...
Returns a new DataTable in which the rows of this table are replaced with the aggregatated rows of all its subtables. @param string|bool $labelColumn If supplied the label of the parent row will be added to a new column in each subtable row. If set to, `'label'` each subtable row's label will be prepended w/ the pare...
[ "Returns", "a", "new", "DataTable", "in", "which", "the", "rows", "of", "this", "table", "are", "replaced", "with", "the", "aggregatated", "rows", "of", "all", "its", "subtables", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataTable.php#L1761-L1806
train
Merges all subtables of the current datatable with the subtables of this datatable
[ 30522, 2270, 3853, 13590, 6342, 19279, 3085, 2015, 1006, 1002, 3830, 25778, 2819, 2078, 1027, 6270, 1010, 1002, 2224, 11368, 8447, 2696, 25778, 2819, 2078, 1027, 6270, 1007, 1063, 1002, 2765, 1027, 2047, 2951, 10880, 1006, 1007, 1025, 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/HttpKernel/Controller/ArgumentResolver/TraceableValueResolver.php
TraceableValueResolver.resolve
public function resolve(Request $request, ArgumentMetadata $argument): iterable { $method = \get_class($this->inner).'::'.__FUNCTION__; $this->stopwatch->start($method, 'controller.argument_value_resolver'); yield from $this->inner->resolve($request, $argument); $this->stopwatch->s...
php
public function resolve(Request $request, ArgumentMetadata $argument): iterable { $method = \get_class($this->inner).'::'.__FUNCTION__; $this->stopwatch->start($method, 'controller.argument_value_resolver'); yield from $this->inner->resolve($request, $argument); $this->stopwatch->s...
[ "public", "function", "resolve", "(", "Request", "$", "request", ",", "ArgumentMetadata", "$", "argument", ")", ":", "iterable", "{", "$", "method", "=", "\\", "get_class", "(", "$", "this", "->", "inner", ")", ".", "'::'", ".", "__FUNCTION__", ";", "$",...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/TraceableValueResolver.php#L53-L61
train
Resolves the request and argument metadata to a value.
[ 30522, 2270, 3853, 10663, 1006, 5227, 1002, 5227, 1010, 6685, 11368, 8447, 2696, 1002, 6685, 1007, 1024, 2009, 6906, 3468, 1063, 1002, 4118, 1027, 1032, 2131, 1035, 2465, 1006, 1002, 2023, 1011, 1028, 5110, 1007, 1012, 1005, 1024, 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...
getgrav/grav
system/src/Grav/Framework/Flex/FlexObject.php
FlexObject.getDefaultValue
public function getDefaultValue(string $name, string $separator = null) { $separator = $separator ?: '.'; $path = explode($separator, $name) ?: []; $offset = array_shift($path) ?? ''; $current = $this->getDefaultValues(); if (!isset($current[$offset])) { return ...
php
public function getDefaultValue(string $name, string $separator = null) { $separator = $separator ?: '.'; $path = explode($separator, $name) ?: []; $offset = array_shift($path) ?? ''; $current = $this->getDefaultValues(); if (!isset($current[$offset])) { return ...
[ "public", "function", "getDefaultValue", "(", "string", "$", "name", ",", "string", "$", "separator", "=", "null", ")", "{", "$", "separator", "=", "$", "separator", "?", ":", "'.'", ";", "$", "path", "=", "explode", "(", "$", "separator", ",", "$", ...
{@inheritdoc} @see FlexObjectInterface::getDefaultValue()
[ "{" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Framework/Flex/FlexObject.php#L628-L655
train
Get default value
[ 30522, 2270, 3853, 2131, 3207, 7011, 11314, 10175, 5657, 1006, 5164, 1002, 2171, 1010, 5164, 1002, 19802, 25879, 2953, 1027, 19701, 1007, 1063, 1002, 19802, 25879, 2953, 1027, 1002, 19802, 25879, 2953, 1029, 1024, 1005, 1012, 1005, 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...
matomo-org/matomo
core/Db/Adapter/Mysqli.php
Mysqli.checkServerVersion
public function checkServerVersion() { $serverVersion = $this->getServerVersion(); $requiredVersion = Config::getInstance()->General['minimum_mysql_version']; if (version_compare($serverVersion, $requiredVersion) === -1) { throw new Exception(Piwik::translate('General_Exceptio...
php
public function checkServerVersion() { $serverVersion = $this->getServerVersion(); $requiredVersion = Config::getInstance()->General['minimum_mysql_version']; if (version_compare($serverVersion, $requiredVersion) === -1) { throw new Exception(Piwik::translate('General_Exceptio...
[ "public", "function", "checkServerVersion", "(", ")", "{", "$", "serverVersion", "=", "$", "this", "->", "getServerVersion", "(", ")", ";", "$", "requiredVersion", "=", "Config", "::", "getInstance", "(", ")", "->", "General", "[", "'minimum_mysql_version'", "...
Check MySQL version @throws Exception
[ "Check", "MySQL", "version" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Db/Adapter/Mysqli.php#L91-L99
train
Check MySQL server version
[ 30522, 2270, 3853, 14148, 2121, 6299, 27774, 1006, 1007, 1063, 1002, 8241, 27774, 1027, 1002, 2023, 1011, 1028, 4152, 2121, 6299, 27774, 1006, 1007, 1025, 1002, 3223, 27774, 1027, 9530, 8873, 2290, 1024, 1024, 2131, 7076, 26897, 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...
laravel/framework
src/Illuminate/Routing/Console/ControllerMakeCommand.php
ControllerMakeCommand.buildParentReplacements
protected function buildParentReplacements() { $parentModelClass = $this->parseModel($this->option('parent')); if (! class_exists($parentModelClass)) { if ($this->confirm("A {$parentModelClass} model does not exist. Do you want to generate it?", true)) { $this->call('mak...
php
protected function buildParentReplacements() { $parentModelClass = $this->parseModel($this->option('parent')); if (! class_exists($parentModelClass)) { if ($this->confirm("A {$parentModelClass} model does not exist. Do you want to generate it?", true)) { $this->call('mak...
[ "protected", "function", "buildParentReplacements", "(", ")", "{", "$", "parentModelClass", "=", "$", "this", "->", "parseModel", "(", "$", "this", "->", "option", "(", "'parent'", ")", ")", ";", "if", "(", "!", "class_exists", "(", "$", "parentModelClass", ...
Build the replacements for a parent controller. @return array
[ "Build", "the", "replacements", "for", "a", "parent", "controller", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/Console/ControllerMakeCommand.php#L108-L123
train
Build parent replacement array
[ 30522, 5123, 3853, 3857, 19362, 4765, 2890, 24759, 10732, 8163, 1006, 1007, 1063, 1002, 6687, 5302, 9247, 26266, 1027, 1002, 2023, 1011, 1028, 11968, 3366, 5302, 9247, 1006, 1002, 2023, 1011, 1028, 5724, 1006, 1005, 6687, 1005, 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...
symfony/symfony
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddAnnotationsCachedReaderPass.php
AddAnnotationsCachedReaderPass.process
public function process(ContainerBuilder $container) { // "annotations.cached_reader" is wired late so that any passes using // "annotation_reader" at build time don't get any cache foreach ($container->findTaggedServiceIds('annotations.cached_reader') as $id => $tags) { $reader ...
php
public function process(ContainerBuilder $container) { // "annotations.cached_reader" is wired late so that any passes using // "annotation_reader" at build time don't get any cache foreach ($container->findTaggedServiceIds('annotations.cached_reader') as $id => $tags) { $reader ...
[ "public", "function", "process", "(", "ContainerBuilder", "$", "container", ")", "{", "// \"annotations.cached_reader\" is wired late so that any passes using", "// \"annotation_reader\" at build time don't get any cache", "foreach", "(", "$", "container", "->", "findTaggedServiceIds...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddAnnotationsCachedReaderPass.php#L25-L41
train
Replace cache provider backup with cached provider
[ 30522, 2270, 3853, 2832, 1006, 11661, 8569, 23891, 2099, 1002, 11661, 1007, 1063, 1013, 1013, 1000, 5754, 17287, 9285, 1012, 17053, 2094, 1035, 8068, 1000, 2003, 17502, 2397, 2061, 2008, 2151, 5235, 2478, 1013, 1013, 1000, 5754, 17287, 3508...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/twig/Loader.php
Loader.findFallbackObject
protected function findFallbackObject($name) { if (strpos($name, '::') !== false) { return false; } if (array_key_exists($name, $this->fallbackCache)) { return $this->fallbackCache[$name]; } return $this->fallbackCache[$name] = CmsPartial::find($name...
php
protected function findFallbackObject($name) { if (strpos($name, '::') !== false) { return false; } if (array_key_exists($name, $this->fallbackCache)) { return $this->fallbackCache[$name]; } return $this->fallbackCache[$name] = CmsPartial::find($name...
[ "protected", "function", "findFallbackObject", "(", "$", "name", ")", "{", "if", "(", "strpos", "(", "$", "name", ",", "'::'", ")", "!==", "false", ")", "{", "return", "false", ";", "}", "if", "(", "array_key_exists", "(", "$", "name", ",", "$", "thi...
Looks up a fallback CMS partial object. @return Cms\Classes\Partial
[ "Looks", "up", "a", "fallback", "CMS", "partial", "object", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/twig/Loader.php#L138-L149
train
Find the fallback object by name
[ 30522, 5123, 3853, 2424, 13976, 5963, 16429, 20614, 1006, 1002, 2171, 1007, 1063, 2065, 1006, 2358, 14536, 2891, 1006, 1002, 2171, 1010, 1005, 1024, 1024, 1005, 1007, 999, 1027, 1027, 6270, 1007, 1063, 2709, 6270, 1025, 1065, 2065, 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/Workflow/DefinitionBuilder.php
DefinitionBuilder.addPlace
public function addPlace($place) { if (!$this->places) { $this->initialPlace = $place; } $this->places[$place] = $place; return $this; }
php
public function addPlace($place) { if (!$this->places) { $this->initialPlace = $place; } $this->places[$place] = $place; return $this; }
[ "public", "function", "addPlace", "(", "$", "place", ")", "{", "if", "(", "!", "$", "this", "->", "places", ")", "{", "$", "this", "->", "initialPlace", "=", "$", "place", ";", "}", "$", "this", "->", "places", "[", "$", "place", "]", "=", "$", ...
@param string $place @return $this
[ "@param", "string", "$place" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Workflow/DefinitionBuilder.php#L80-L89
train
Add a place to the list of places
[ 30522, 2270, 3853, 5587, 24759, 10732, 1006, 1002, 2173, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 3182, 1007, 1063, 1002, 2023, 1011, 1028, 3988, 24759, 10732, 1027, 1002, 2173, 1025, 1065, 1002, 2023, 1011, 1028, 3182, 1031, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/TagSet.php
TagSet.tagId
public function tagId($name) { return $this->store->get($this->tagKey($name)) ?: $this->resetTag($name); }
php
public function tagId($name) { return $this->store->get($this->tagKey($name)) ?: $this->resetTag($name); }
[ "public", "function", "tagId", "(", "$", "name", ")", "{", "return", "$", "this", "->", "store", "->", "get", "(", "$", "this", "->", "tagKey", "(", "$", "name", ")", ")", "?", ":", "$", "this", "->", "resetTag", "(", "$", "name", ")", ";", "}"...
Get the unique tag identifier for a given tag. @param string $name @return string
[ "Get", "the", "unique", "tag", "identifier", "for", "a", "given", "tag", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Cache/TagSet.php#L85-L88
train
Get Tag Id
[ 30522, 2270, 3853, 6415, 3593, 1006, 1002, 2171, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 3573, 1011, 1028, 2131, 1006, 1002, 2023, 1011, 1028, 6415, 14839, 1006, 1002, 2171, 1007, 1007, 1029, 1024, 1002, 2023, 1011, 1028, 25141, 15900, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/ExampleTracker/Columns/ExampleActionDimension.php
ExampleActionDimension.onNewAction
public function onNewAction(Request $request, Visitor $visitor, Action $action) { if (!($action instanceof ActionPageview)) { // save value only in case it is a page view. return false; } $value = Common::getRequestVar('my_page_keywords', false, 'string', $request->g...
php
public function onNewAction(Request $request, Visitor $visitor, Action $action) { if (!($action instanceof ActionPageview)) { // save value only in case it is a page view. return false; } $value = Common::getRequestVar('my_page_keywords', false, 'string', $request->g...
[ "public", "function", "onNewAction", "(", "Request", "$", "request", ",", "Visitor", "$", "visitor", ",", "Action", "$", "action", ")", "{", "if", "(", "!", "(", "$", "action", "instanceof", "ActionPageview", ")", ")", "{", "// save value only in case it is a ...
This event is triggered before a new action is logged to the log_link_visit_action table. It overwrites any looked up action so it makes usually no sense to implement both methods but it sometimes does. You can assign any value to the column or return boolan false in case you do not want to save any value. @param Requ...
[ "This", "event", "is", "triggered", "before", "a", "new", "action", "is", "logged", "to", "the", "log_link_visit_action", "table", ".", "It", "overwrites", "any", "looked", "up", "action", "so", "it", "makes", "usually", "no", "sense", "to", "implement", "bo...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/ExampleTracker/Columns/ExampleActionDimension.php#L77-L93
train
This method is called when a new action is triggered.
[ 30522, 2270, 3853, 2006, 2638, 4213, 7542, 1006, 5227, 1002, 5227, 1010, 10367, 1002, 10367, 1010, 2895, 1002, 2895, 1007, 1063, 2065, 1006, 999, 1006, 1002, 2895, 6013, 11253, 2895, 13704, 8584, 1007, 1007, 1063, 1013, 1013, 3828, 3643, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Controller.php
Controller.actionExists
public function actionExists($name, $internal = false) { if (!strlen($name) || substr($name, 0, 1) == '_' || !$this->methodExists($name)) { return false; } foreach ($this->hiddenActions as $method) { if (strtolower($name) == strtolower($method)) { ret...
php
public function actionExists($name, $internal = false) { if (!strlen($name) || substr($name, 0, 1) == '_' || !$this->methodExists($name)) { return false; } foreach ($this->hiddenActions as $method) { if (strtolower($name) == strtolower($method)) { ret...
[ "public", "function", "actionExists", "(", "$", "name", ",", "$", "internal", "=", "false", ")", "{", "if", "(", "!", "strlen", "(", "$", "name", ")", "||", "substr", "(", "$", "name", ",", "0", ",", "1", ")", "==", "'_'", "||", "!", "$", "this...
This method is used internally. Determines whether an action with the specified name exists. Action must be a class public method. Action name can not be prefixed with the underscore character. @param string $name Specifies the action name. @param bool $internal Allow protected actions. @return boolean
[ "This", "method", "is", "used", "internally", ".", "Determines", "whether", "an", "action", "with", "the", "specified", "name", "exists", ".", "Action", "must", "be", "a", "class", "public", "method", ".", "Action", "name", "can", "not", "be", "prefixed", ...
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/classes/Controller.php#L263-L294
train
Check if action exists
[ 30522, 2270, 3853, 2895, 10288, 5130, 1006, 1002, 2171, 1010, 1002, 4722, 1027, 6270, 1007, 1063, 2065, 1006, 999, 2358, 20927, 2078, 1006, 1002, 2171, 1007, 1064, 1064, 4942, 3367, 2099, 1006, 1002, 2171, 1010, 1014, 1010, 1015, 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...
getgrav/grav
system/src/Grav/Common/Twig/TwigExtension.php
TwigExtension.niceNumberFunc
public function niceNumberFunc($n) { if (!\is_float($n) && !\is_int($n)) { if (!\is_string($n) || $n === '') { return false; } // Strip any thousand formatting and find the first number. $list = array_filter(preg_split("/\D+/", str_replace(','...
php
public function niceNumberFunc($n) { if (!\is_float($n) && !\is_int($n)) { if (!\is_string($n) || $n === '') { return false; } // Strip any thousand formatting and find the first number. $list = array_filter(preg_split("/\D+/", str_replace(','...
[ "public", "function", "niceNumberFunc", "(", "$", "n", ")", "{", "if", "(", "!", "\\", "is_float", "(", "$", "n", ")", "&&", "!", "\\", "is_int", "(", "$", "n", ")", ")", "{", "if", "(", "!", "\\", "is_string", "(", "$", "n", ")", "||", "$", ...
Returns a nicer more readable number @param int|float|string $n @return string|bool
[ "Returns", "a", "nicer", "more", "readable", "number" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Twig/TwigExtension.php#L1245-L1278
train
Nice number function
[ 30522, 2270, 3853, 3835, 19172, 5677, 11263, 12273, 1006, 1002, 1050, 1007, 1063, 2065, 1006, 999, 1032, 2003, 1035, 14257, 1006, 1002, 1050, 1007, 1004, 1004, 999, 1032, 2003, 1035, 20014, 1006, 1002, 1050, 1007, 1007, 1063, 2065, 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/Auth/Notifications/ResetPassword.php
ResetPassword.toMail
public function toMail($notifiable) { if (static::$toMailCallback) { return call_user_func(static::$toMailCallback, $notifiable, $this->token); } return (new MailMessage) ->subject(Lang::getFromJson('Reset Password Notification')) ->line(Lang::getFromJson...
php
public function toMail($notifiable) { if (static::$toMailCallback) { return call_user_func(static::$toMailCallback, $notifiable, $this->token); } return (new MailMessage) ->subject(Lang::getFromJson('Reset Password Notification')) ->line(Lang::getFromJson...
[ "public", "function", "toMail", "(", "$", "notifiable", ")", "{", "if", "(", "static", "::", "$", "toMailCallback", ")", "{", "return", "call_user_func", "(", "static", "::", "$", "toMailCallback", ",", "$", "notifiable", ",", "$", "this", "->", "token", ...
Build the mail representation of the notification. @param mixed $notifiable @return \Illuminate\Notifications\Messages\MailMessage
[ "Build", "the", "mail", "representation", "of", "the", "notification", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/Notifications/ResetPassword.php#L53-L65
train
Return the mail message for the reset password
[ 30522, 2270, 3853, 3419, 12502, 1006, 1002, 2025, 10128, 19210, 1007, 1063, 2065, 1006, 10763, 1024, 1024, 1002, 3419, 12502, 9289, 20850, 8684, 1007, 1063, 2709, 2655, 1035, 5310, 1035, 4569, 2278, 1006, 10763, 1024, 1024, 1002, 3419, 1250...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/FormField.php
FormField.resolveModelAttribute
public function resolveModelAttribute($model, $attribute = null) { if ($attribute === null) { $attribute = $this->valueFrom ?: $this->fieldName; } $parts = is_array($attribute) ? $attribute : HtmlHelper::nameToArray($attribute); $last = array_pop($parts); foreac...
php
public function resolveModelAttribute($model, $attribute = null) { if ($attribute === null) { $attribute = $this->valueFrom ?: $this->fieldName; } $parts = is_array($attribute) ? $attribute : HtmlHelper::nameToArray($attribute); $last = array_pop($parts); foreac...
[ "public", "function", "resolveModelAttribute", "(", "$", "model", ",", "$", "attribute", "=", "null", ")", "{", "if", "(", "$", "attribute", "===", "null", ")", "{", "$", "attribute", "=", "$", "this", "->", "valueFrom", "?", ":", "$", "this", "->", ...
Returns the final model and attribute name of a nested attribute. Eg: list($model, $attribute) = $this->resolveAttribute('person[phone]'); @param string $attribute. @return array
[ "Returns", "the", "final", "model", "and", "attribute", "name", "of", "a", "nested", "attribute", ".", "Eg", ":" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/classes/FormField.php#L653-L667
train
Resolves the value of the attribute of the model
[ 30522, 2270, 3853, 10663, 5302, 9247, 19321, 3089, 8569, 2618, 1006, 1002, 2944, 1010, 1002, 17961, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 17961, 1027, 1027, 1027, 19701, 1007, 1063, 1002, 17961, 1027, 1002, 2023, 1011, 1028, 3643, 1969...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.getSizeMessage
protected function getSizeMessage($attribute, $rule) { $lowerRule = Str::snake($rule); // There are three different types of size validations. The attribute may be // either a number, file, or string so we will check a few things to know // which type of value it is and return the c...
php
protected function getSizeMessage($attribute, $rule) { $lowerRule = Str::snake($rule); // There are three different types of size validations. The attribute may be // either a number, file, or string so we will check a few things to know // which type of value it is and return the c...
[ "protected", "function", "getSizeMessage", "(", "$", "attribute", ",", "$", "rule", ")", "{", "$", "lowerRule", "=", "Str", "::", "snake", "(", "$", "rule", ")", ";", "// There are three different types of size validations. The attribute may be", "// either a number, fi...
Get the proper error message for an attribute and size rule. @param string $attribute @param string $rule @return string
[ "Get", "the", "proper", "error", "message", "for", "an", "attribute", "and", "size", "rule", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/FormatsMessages.php#L158-L170
train
Get size message
[ 30522, 5123, 3853, 4152, 4697, 7834, 3736, 3351, 1006, 1002, 17961, 1010, 1002, 3627, 1007, 1063, 1002, 2896, 6820, 2571, 1027, 2358, 2099, 1024, 1024, 7488, 1006, 1002, 3627, 1007, 1025, 1013, 1013, 2045, 2024, 2093, 2367, 4127, 1997, 29...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Broadcasting/Broadcasters/Broadcaster.php
Broadcaster.binder
protected function binder() { if (! $this->bindingRegistrar) { $this->bindingRegistrar = Container::getInstance()->bound(BindingRegistrar::class) ? Container::getInstance()->make(BindingRegistrar::class) : null; } return $this->bindingRegistrar; }
php
protected function binder() { if (! $this->bindingRegistrar) { $this->bindingRegistrar = Container::getInstance()->bound(BindingRegistrar::class) ? Container::getInstance()->make(BindingRegistrar::class) : null; } return $this->bindingRegistrar; }
[ "protected", "function", "binder", "(", ")", "{", "if", "(", "!", "$", "this", "->", "bindingRegistrar", ")", "{", "$", "this", "->", "bindingRegistrar", "=", "Container", "::", "getInstance", "(", ")", "->", "bound", "(", "BindingRegistrar", "::", "class"...
Get the model binding registrar instance. @return \Illuminate\Contracts\Routing\BindingRegistrar
[ "Get", "the", "model", "binding", "registrar", "instance", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php#L250-L258
train
Get the binding registrar
[ 30522, 5123, 3853, 14187, 2121, 1006, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 8031, 2890, 24063, 19848, 1007, 1063, 1002, 2023, 1011, 1028, 8031, 2890, 24063, 19848, 1027, 11661, 1024, 1024, 2131, 7076, 26897, 1006, 1007, 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/Cache/Adapter/TagAwareAdapter.php
TagAwareAdapter.deleteItems
public function deleteItems(array $keys) { foreach ($keys as $key) { if ('' !== $key && \is_string($key)) { $keys[] = static::TAGS_PREFIX.$key; } } return $this->pool->deleteItems($keys); }
php
public function deleteItems(array $keys) { foreach ($keys as $key) { if ('' !== $key && \is_string($key)) { $keys[] = static::TAGS_PREFIX.$key; } } return $this->pool->deleteItems($keys); }
[ "public", "function", "deleteItems", "(", "array", "$", "keys", ")", "{", "foreach", "(", "$", "keys", "as", "$", "key", ")", "{", "if", "(", "''", "!==", "$", "key", "&&", "\\", "is_string", "(", "$", "key", ")", ")", "{", "$", "keys", "[", "]...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php#L235-L244
train
Delete items from the cache
[ 30522, 2270, 3853, 3972, 12870, 4221, 5244, 1006, 9140, 1002, 6309, 1007, 1063, 18921, 6776, 1006, 1002, 6309, 2004, 1002, 3145, 1007, 1063, 2065, 1006, 1005, 1005, 999, 1027, 1027, 1002, 3145, 1004, 1004, 1032, 2003, 1035, 5164, 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...
symfony/symfony
src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/AutoconfigureTrait.php
AutoconfigureTrait.autoconfigure
final public function autoconfigure(bool $autoconfigured = true) { if ($autoconfigured && $this->definition instanceof ChildDefinition) { throw new InvalidArgumentException(sprintf('The service "%s" cannot have a "parent" and also have "autoconfigure". Try disabling autoconfiguration for the ser...
php
final public function autoconfigure(bool $autoconfigured = true) { if ($autoconfigured && $this->definition instanceof ChildDefinition) { throw new InvalidArgumentException(sprintf('The service "%s" cannot have a "parent" and also have "autoconfigure". Try disabling autoconfiguration for the ser...
[ "final", "public", "function", "autoconfigure", "(", "bool", "$", "autoconfigured", "=", "true", ")", "{", "if", "(", "$", "autoconfigured", "&&", "$", "this", "->", "definition", "instanceof", "ChildDefinition", ")", "{", "throw", "new", "InvalidArgumentExcepti...
Sets whether or not instanceof conditionals should be prepended with a global set. @return $this @throws InvalidArgumentException when a parent is already set
[ "Sets", "whether", "or", "not", "instanceof", "conditionals", "should", "be", "prepended", "with", "a", "global", "set", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/AutoconfigureTrait.php#L26-L34
train
Sets whether or not the service should be automatically configured.
[ 30522, 2345, 2270, 3853, 8285, 8663, 8873, 27390, 2063, 1006, 22017, 2140, 1002, 8285, 8663, 8873, 27390, 2098, 1027, 2995, 1007, 1063, 2065, 1006, 1002, 8285, 8663, 8873, 27390, 2098, 1004, 1004, 1002, 2023, 1011, 1028, 6210, 6013, 11253, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/FormConfigBuilder.php
FormConfigBuilder.setByReference
public function setByReference($byReference) { if ($this->locked) { throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); } $this->byReference = (bool) $byReference; retu...
php
public function setByReference($byReference) { if ($this->locked) { throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); } $this->byReference = (bool) $byReference; retu...
[ "public", "function", "setByReference", "(", "$", "byReference", ")", "{", "if", "(", "$", "this", "->", "locked", ")", "{", "throw", "new", "BadMethodCallException", "(", "'FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInter...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/FormConfigBuilder.php#L600-L609
train
Set whether or not to use the by reference
[ 30522, 2270, 3853, 2275, 3762, 2890, 25523, 1006, 1002, 2011, 2890, 25523, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 5299, 1007, 1063, 5466, 2047, 2919, 11368, 6806, 16409, 24164, 2595, 24422, 1006, 1005, 2433, 8663, 8873, 18259, 1923...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Kernel/BaseClient.php
BaseClient.accessTokenMiddleware
protected function accessTokenMiddleware() { return function (callable $handler) { return function (RequestInterface $request, array $options) use ($handler) { if ($this->accessToken) { $request = $this->accessToken->applyToRequest($request, $options); ...
php
protected function accessTokenMiddleware() { return function (callable $handler) { return function (RequestInterface $request, array $options) use ($handler) { if ($this->accessToken) { $request = $this->accessToken->applyToRequest($request, $options); ...
[ "protected", "function", "accessTokenMiddleware", "(", ")", "{", "return", "function", "(", "callable", "$", "handler", ")", "{", "return", "function", "(", "RequestInterface", "$", "request", ",", "array", "$", "options", ")", "use", "(", "$", "handler", ")...
Attache access token to request query. @return \Closure
[ "Attache", "access", "token", "to", "request", "query", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Kernel/BaseClient.php#L207-L218
train
Middleware that applies access token to the request
[ 30522, 5123, 3853, 3229, 18715, 2368, 4328, 20338, 8059, 1006, 1007, 1063, 2709, 3853, 1006, 2655, 3085, 1002, 28213, 1007, 1063, 2709, 3853, 1006, 5227, 18447, 2121, 12172, 1002, 5227, 1010, 9140, 1002, 7047, 1007, 2224, 1006, 1002, 28213,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/DimensionReduction/PCA.php
PCA.transform
public function transform(array $sample): array { if (!$this->fit) { throw new InvalidOperationException('PCA has not been fitted with respect to original dataset, please run PCA::fit() first'); } if (!is_array($sample[0])) { $sample = [$sample]; } $...
php
public function transform(array $sample): array { if (!$this->fit) { throw new InvalidOperationException('PCA has not been fitted with respect to original dataset, please run PCA::fit() first'); } if (!is_array($sample[0])) { $sample = [$sample]; } $...
[ "public", "function", "transform", "(", "array", "$", "sample", ")", ":", "array", "{", "if", "(", "!", "$", "this", "->", "fit", ")", "{", "throw", "new", "InvalidOperationException", "(", "'PCA has not been fitted with respect to original dataset, please run PCA::fi...
Transforms the given sample to a lower dimensional vector by using the eigenVectors obtained in the last run of <code>fit</code>. @throws InvalidOperationException
[ "Transforms", "the", "given", "sample", "to", "a", "lower", "dimensional", "vector", "by", "using", "the", "eigenVectors", "obtained", "in", "the", "last", "run", "of", "<code", ">", "fit<", "/", "code", ">", "." ]
f6aa1a59b0525b8fca3d2786d661ab3e70904016
https://github.com/php-ai/php-ml/blob/f6aa1a59b0525b8fca3d2786d661ab3e70904016/src/DimensionReduction/PCA.php#L87-L100
train
Transform a single sample into a single level
[ 30522, 2270, 3853, 10938, 1006, 9140, 1002, 7099, 1007, 1024, 9140, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 4906, 1007, 1063, 5466, 2047, 19528, 25918, 3370, 10288, 24422, 1006, 1005, 7473, 2050, 2038, 2025, 2042, 7130, 2007, 4847, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Config/CompiledBlueprints.php
CompiledBlueprints.loadFile
protected function loadFile($name, $files) { // Load blueprint file. $blueprint = new Blueprint($files); $this->object->embed($name, $blueprint->load()->toArray(), '/', true); }
php
protected function loadFile($name, $files) { // Load blueprint file. $blueprint = new Blueprint($files); $this->object->embed($name, $blueprint->load()->toArray(), '/', true); }
[ "protected", "function", "loadFile", "(", "$", "name", ",", "$", "files", ")", "{", "// Load blueprint file.", "$", "blueprint", "=", "new", "Blueprint", "(", "$", "files", ")", ";", "$", "this", "->", "object", "->", "embed", "(", "$", "name", ",", "$...
Load single configuration file and append it to the correct position. @param string $name Name of the position. @param array $files Files to be loaded.
[ "Load", "single", "configuration", "file", "and", "append", "it", "to", "the", "correct", "position", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Config/CompiledBlueprints.php#L78-L84
train
Load blueprint file
[ 30522, 5123, 3853, 7170, 8873, 2571, 1006, 1002, 2171, 1010, 1002, 6764, 1007, 1063, 1013, 1013, 7170, 2630, 16550, 5371, 1012, 1002, 2630, 16550, 1027, 2047, 2630, 16550, 1006, 1002, 6764, 1007, 1025, 1002, 2023, 1011, 1028, 4874, 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/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php
Deprecation.pathOriginatesFromVendor
private function pathOriginatesFromVendor($path) { $realPath = realpath($path); if (false === $realPath && '-' !== $path && 'Standard input code' !== $path) { return true; } foreach (self::getVendors() as $vendor) { if (0 === strpos($realPath, $vendor) && fals...
php
private function pathOriginatesFromVendor($path) { $realPath = realpath($path); if (false === $realPath && '-' !== $path && 'Standard input code' !== $path) { return true; } foreach (self::getVendors() as $vendor) { if (0 === strpos($realPath, $vendor) && fals...
[ "private", "function", "pathOriginatesFromVendor", "(", "$", "path", ")", "{", "$", "realPath", "=", "realpath", "(", "$", "path", ")", ";", "if", "(", "false", "===", "$", "realPath", "&&", "'-'", "!==", "$", "path", "&&", "'Standard input code'", "!==", ...
@param string $path @return bool
[ "@param", "string", "$path" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php#L250-L263
train
Checks if the given path originates from vendor
[ 30522, 2797, 3853, 4130, 10050, 20876, 4570, 19699, 5358, 8159, 7983, 1006, 1002, 4130, 1007, 1063, 1002, 2613, 15069, 1027, 2613, 15069, 1006, 1002, 4130, 1007, 1025, 2065, 1006, 6270, 1027, 1027, 1027, 1002, 2613, 15069, 1004, 1004, 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/Console/Style/SymfonyStyle.php
SymfonyStyle.askHidden
public function askHidden($question, $validator = null) { $question = new Question($question); $question->setHidden(true); $question->setValidator($validator); return $this->askQuestion($question); }
php
public function askHidden($question, $validator = null) { $question = new Question($question); $question->setHidden(true); $question->setValidator($validator); return $this->askQuestion($question); }
[ "public", "function", "askHidden", "(", "$", "question", ",", "$", "validator", "=", "null", ")", "{", "$", "question", "=", "new", "Question", "(", "$", "question", ")", ";", "$", "question", "->", "setHidden", "(", "true", ")", ";", "$", "question", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Style/SymfonyStyle.php#L207-L215
train
Asks a question to be hidden.
[ 30522, 2270, 3853, 3198, 27511, 4181, 1006, 1002, 3160, 1010, 1002, 9398, 8844, 1027, 19701, 1007, 1063, 1002, 3160, 1027, 2047, 3160, 1006, 1002, 3160, 1007, 1025, 1002, 3160, 1011, 1028, 6662, 3593, 4181, 1006, 2995, 1007, 1025, 1002, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Ldap/Adapter/ExtLdap/EntryManager.php
EntryManager.applyOperations
public function applyOperations(string $dn, iterable $operations): void { $operationsMapped = []; foreach ($operations as $modification) { $operationsMapped[] = $modification->toArray(); } if (!@ldap_modify_batch($this->getConnectionResource(), $dn, $operationsMapped)) {...
php
public function applyOperations(string $dn, iterable $operations): void { $operationsMapped = []; foreach ($operations as $modification) { $operationsMapped[] = $modification->toArray(); } if (!@ldap_modify_batch($this->getConnectionResource(), $dn, $operationsMapped)) {...
[ "public", "function", "applyOperations", "(", "string", "$", "dn", ",", "iterable", "$", "operations", ")", ":", "void", "{", "$", "operationsMapped", "=", "[", "]", ";", "foreach", "(", "$", "operations", "as", "$", "modification", ")", "{", "$", "opera...
@param iterable|UpdateOperation[] $operations An array or iterable of UpdateOperation instances @throws UpdateOperationException in case of an error
[ "@param", "iterable|UpdateOperation", "[]", "$operations", "An", "array", "or", "iterable", "of", "UpdateOperation", "instances" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Ldap/Adapter/ExtLdap/EntryManager.php#L147-L157
train
Applies an array of operations to the specified LDAP directory.
[ 30522, 2270, 3853, 6611, 25918, 10708, 1006, 5164, 1002, 1040, 2078, 1010, 2009, 6906, 3468, 1002, 3136, 1007, 1024, 11675, 1063, 1002, 3136, 2863, 11469, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1002, 3136, 2004, 1002, 14080, 1007, 1063,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/PageUrl.php
PageUrl.reconstructNormalizedUrl
public static function reconstructNormalizedUrl($url, $prefixId) { $map = array_flip(self::$urlPrefixMap); if ($prefixId !== null && isset($map[$prefixId])) { $fullUrl = $map[$prefixId] . $url; } else { $fullUrl = $url; } // Clean up host & hash tags...
php
public static function reconstructNormalizedUrl($url, $prefixId) { $map = array_flip(self::$urlPrefixMap); if ($prefixId !== null && isset($map[$prefixId])) { $fullUrl = $map[$prefixId] . $url; } else { $fullUrl = $url; } // Clean up host & hash tags...
[ "public", "static", "function", "reconstructNormalizedUrl", "(", "$", "url", ",", "$", "prefixId", ")", "{", "$", "map", "=", "array_flip", "(", "self", "::", "$", "urlPrefixMap", ")", ";", "if", "(", "$", "prefixId", "!==", "null", "&&", "isset", "(", ...
Build the full URL from the prefix ID and the rest. @param string $url @param integer $prefixId @return string
[ "Build", "the", "full", "URL", "from", "the", "prefix", "ID", "and", "the", "rest", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Tracker/PageUrl.php#L310-L330
train
Reconstruct normalized URL
[ 30522, 2270, 10763, 3853, 28667, 5644, 18300, 12131, 9067, 3550, 3126, 2140, 1006, 1002, 24471, 2140, 1010, 1002, 17576, 3593, 1007, 1063, 1002, 4949, 1027, 9140, 1035, 11238, 1006, 2969, 1024, 1024, 1002, 24471, 14277, 2890, 8873, 2595, 28...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/SqlServerGrammar.php
SqlServerGrammar.wrapTable
public function wrapTable($table) { if (! $this->isExpression($table)) { return $this->wrapTableValuedFunction(parent::wrapTable($table)); } return $this->getValue($table); }
php
public function wrapTable($table) { if (! $this->isExpression($table)) { return $this->wrapTableValuedFunction(parent::wrapTable($table)); } return $this->getValue($table); }
[ "public", "function", "wrapTable", "(", "$", "table", ")", "{", "if", "(", "!", "$", "this", "->", "isExpression", "(", "$", "table", ")", ")", "{", "return", "$", "this", "->", "wrapTableValuedFunction", "(", "parent", "::", "wrapTable", "(", "$", "ta...
Wrap a table in keyword identifiers. @param \Illuminate\Database\Query\Expression|string $table @return string
[ "Wrap", "a", "table", "in", "keyword", "identifiers", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php#L491-L498
train
Wrap table value in a string
[ 30522, 2270, 3853, 10236, 10880, 1006, 1002, 2795, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 2003, 10288, 20110, 3258, 1006, 1002, 2795, 1007, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 10236, 10880, 10175, 5657, 20952, 4609, 7542...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Db.php
Db.lockTables
public static function lockTables($tablesToRead, $tablesToWrite = array()) { if (!is_array($tablesToRead)) { $tablesToRead = array($tablesToRead); } if (!is_array($tablesToWrite)) { $tablesToWrite = array($tablesToWrite); } $lockExprs = array(); ...
php
public static function lockTables($tablesToRead, $tablesToWrite = array()) { if (!is_array($tablesToRead)) { $tablesToRead = array($tablesToRead); } if (!is_array($tablesToWrite)) { $tablesToWrite = array($tablesToWrite); } $lockExprs = array(); ...
[ "public", "static", "function", "lockTables", "(", "$", "tablesToRead", ",", "$", "tablesToWrite", "=", "array", "(", ")", ")", "{", "if", "(", "!", "is_array", "(", "$", "tablesToRead", ")", ")", "{", "$", "tablesToRead", "=", "array", "(", "$", "tabl...
Locks the supplied table or tables. **NOTE:** Piwik does not require the `LOCK TABLES` privilege to be available. Piwik should still work if it has not been granted. @param string|array $tablesToRead The table or tables to obtain 'read' locks on. Table names must be prefixed (see {@link Piwik\Common::prefixTable()})....
[ "Locks", "the", "supplied", "table", "or", "tables", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Db.php#L440-L460
train
Locks tables in a tree
[ 30522, 2270, 10763, 3853, 5843, 10880, 2015, 1006, 1002, 7251, 19277, 4215, 1010, 1002, 7251, 18790, 17625, 1027, 9140, 1006, 1007, 1007, 1063, 2065, 1006, 999, 2003, 1035, 9140, 1006, 1002, 7251, 19277, 4215, 1007, 1007, 1063, 1002, 7251, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/MemcachedStore.php
MemcachedStore.lock
public function lock($name, $seconds = 0, $owner = null) { return new MemcachedLock($this->memcached, $this->prefix.$name, $seconds, $owner); }
php
public function lock($name, $seconds = 0, $owner = null) { return new MemcachedLock($this->memcached, $this->prefix.$name, $seconds, $owner); }
[ "public", "function", "lock", "(", "$", "name", ",", "$", "seconds", "=", "0", ",", "$", "owner", "=", "null", ")", "{", "return", "new", "MemcachedLock", "(", "$", "this", "->", "memcached", ",", "$", "this", "->", "prefix", ".", "$", "name", ",",...
Get a lock instance. @param string $name @param int $seconds @param string|null $owner @return \Illuminate\Contracts\Cache\Lock
[ "Get", "a", "lock", "instance", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Cache/MemcachedStore.php#L189-L192
train
Lock the cache
[ 30522, 2270, 3853, 5843, 1006, 1002, 2171, 1010, 1002, 3823, 1027, 1014, 1010, 1002, 3954, 1027, 19701, 1007, 1063, 2709, 2047, 2033, 12458, 15395, 19422, 7432, 1006, 1002, 2023, 1011, 1028, 2033, 12458, 15395, 2094, 1010, 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...
getgrav/grav
system/src/Grav/Framework/Route/Route.php
Route.getParam
public function getParam($param) { $value = $this->getGravParam($param); if ($value === null) { $value = $this->getQueryParam($param); } return $value; }
php
public function getParam($param) { $value = $this->getGravParam($param); if ($value === null) { $value = $this->getQueryParam($param); } return $value; }
[ "public", "function", "getParam", "(", "$", "param", ")", "{", "$", "value", "=", "$", "this", "->", "getGravParam", "(", "$", "param", ")", ";", "if", "(", "$", "value", "===", "null", ")", "{", "$", "value", "=", "$", "this", "->", "getQueryParam...
Return value of the parameter, looking into both Grav parameters and query parameters. If the parameter exists in both, return Grav parameter. @param string $param @return string|null
[ "Return", "value", "of", "the", "parameter", "looking", "into", "both", "Grav", "parameters", "and", "query", "parameters", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Framework/Route/Route.php#L159-L167
train
Get the value of a parameter
[ 30522, 2270, 3853, 2131, 28689, 2213, 1006, 1002, 11498, 2213, 1007, 1063, 1002, 3643, 1027, 1002, 2023, 1011, 1028, 2131, 17643, 2615, 28689, 2213, 1006, 1002, 11498, 2213, 1007, 1025, 2065, 1006, 1002, 3643, 1027, 30524, 0, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/DimensionReduction/KernelPCA.php
KernelPCA.getKernel
protected function getKernel(): Closure { switch ($this->kernel) { case self::KERNEL_LINEAR: // k(x,y) = xT.y return function ($x, $y) { return Matrix::dot($x, $y)[0]; }; case self::KERNEL_RBF: // k(x...
php
protected function getKernel(): Closure { switch ($this->kernel) { case self::KERNEL_LINEAR: // k(x,y) = xT.y return function ($x, $y) { return Matrix::dot($x, $y)[0]; }; case self::KERNEL_RBF: // k(x...
[ "protected", "function", "getKernel", "(", ")", ":", "Closure", "{", "switch", "(", "$", "this", "->", "kernel", ")", "{", "case", "self", "::", "KERNEL_LINEAR", ":", "// k(x,y) = xT.y", "return", "function", "(", "$", "x", ",", "$", "y", ")", "{", "re...
Returns the callable kernel function @throws \Exception
[ "Returns", "the", "callable", "kernel", "function" ]
f6aa1a59b0525b8fca3d2786d661ab3e70904016
https://github.com/php-ai/php-ml/blob/f6aa1a59b0525b8fca3d2786d661ab3e70904016/src/DimensionReduction/KernelPCA.php#L170-L206
train
Returns the closure of the kernel
[ 30522, 5123, 3853, 2131, 5484, 11877, 1006, 1007, 1024, 8503, 1063, 6942, 1006, 1002, 2023, 1011, 1028, 16293, 1007, 1063, 2553, 2969, 1024, 1024, 16293, 1035, 7399, 1024, 1013, 1013, 1047, 1006, 1060, 1010, 1061, 1007, 1027, 1060, 2102, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/OAuth/ServiceProvider.php
ServiceProvider.register
public function register(Container $app) { $app['oauth'] = function ($app) { $socialite = (new Socialite([ 'wechat' => [ 'client_id' => $app['config']['app_id'], 'client_secret' => $app['config']['secret'], 'redirect' =>...
php
public function register(Container $app) { $app['oauth'] = function ($app) { $socialite = (new Socialite([ 'wechat' => [ 'client_id' => $app['config']['app_id'], 'client_secret' => $app['config']['secret'], 'redirect' =>...
[ "public", "function", "register", "(", "Container", "$", "app", ")", "{", "$", "app", "[", "'oauth'", "]", "=", "function", "(", "$", "app", ")", "{", "$", "socialite", "=", "(", "new", "Socialite", "(", "[", "'wechat'", "=>", "[", "'client_id'", "=>...
{@inheritdoc}.
[ "{" ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/OAuth/ServiceProvider.php#L28-L47
train
Register the Socialite Oauth
[ 30522, 2270, 3853, 4236, 1006, 11661, 1002, 10439, 1007, 1063, 1002, 10439, 1031, 1005, 1051, 4887, 2705, 1005, 1033, 1027, 3853, 1006, 1002, 10439, 1007, 1063, 1002, 2591, 4221, 1027, 1006, 2047, 2591, 4221, 1006, 1031, 1005, 2057, 7507, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Console/Input/ArgvInput.php
ArgvInput.parseArgument
private function parseArgument($token) { $c = \count($this->arguments); // if input is expecting another argument, add it if ($this->definition->hasArgument($c)) { $arg = $this->definition->getArgument($c); $this->arguments[$arg->getName()] = $arg->isArray() ? [$toke...
php
private function parseArgument($token) { $c = \count($this->arguments); // if input is expecting another argument, add it if ($this->definition->hasArgument($c)) { $arg = $this->definition->getArgument($c); $this->arguments[$arg->getName()] = $arg->isArray() ? [$toke...
[ "private", "function", "parseArgument", "(", "$", "token", ")", "{", "$", "c", "=", "\\", "count", "(", "$", "this", "->", "arguments", ")", ";", "// if input is expecting another argument, add it", "if", "(", "$", "this", "->", "definition", "->", "hasArgumen...
Parses an argument. @param string $token The current token @throws RuntimeException When too many arguments are given
[ "Parses", "an", "argument", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Input/ArgvInput.php#L165-L188
train
Parse argument and add it to arguments array
[ 30522, 2797, 3853, 11968, 17310, 10623, 27417, 2102, 1006, 1002, 19204, 1007, 1063, 1002, 1039, 1027, 1032, 4175, 1006, 1002, 2023, 1011, 1028, 9918, 1007, 1025, 1013, 1013, 2065, 7953, 2003, 8074, 2178, 6685, 1010, 5587, 2009, 2065, 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...
matomo-org/matomo
plugins/Live/VisitorDetails.php
VisitorDetails.getVisitorProfileVisitSummary
private function getVisitorProfileVisitSummary($visit) { $today = Date::today(); $serverDate = $visit->getColumn('firstActionTimestamp'); return array( 'date' => $serverDate, 'prettyDate' => Date::factory($serverDate)->getLocalized(Date::DATE_FORMAT_L...
php
private function getVisitorProfileVisitSummary($visit) { $today = Date::today(); $serverDate = $visit->getColumn('firstActionTimestamp'); return array( 'date' => $serverDate, 'prettyDate' => Date::factory($serverDate)->getLocalized(Date::DATE_FORMAT_L...
[ "private", "function", "getVisitorProfileVisitSummary", "(", "$", "visit", ")", "{", "$", "today", "=", "Date", "::", "today", "(", ")", ";", "$", "serverDate", "=", "$", "visit", "->", "getColumn", "(", "'firstActionTimestamp'", ")", ";", "return", "array",...
Returns a summary for an important visit. Used to describe the first & last visits of a visitor. @param DataTable\Row $visit @return array
[ "Returns", "a", "summary", "for", "an", "important", "visit", ".", "Used", "to", "describe", "the", "first", "&", "last", "visits", "of", "a", "visitor", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Live/VisitorDetails.php#L233-L246
train
Returns array with summary information for visit
[ 30522, 2797, 3853, 2131, 11365, 15660, 21572, 8873, 20414, 17417, 10422, 14760, 2854, 1006, 1002, 3942, 1007, 1063, 1002, 2651, 1027, 3058, 1024, 1024, 2651, 1006, 1007, 1025, 1002, 8241, 13701, 1027, 1002, 3942, 1011, 1028, 2131, 25778, 28...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Serializer.php
Serializer.decode
final public function decode($data, $format, array $context = []) { return $this->decoder->decode($data, $format, $context); }
php
final public function decode($data, $format, array $context = []) { return $this->decoder->decode($data, $format, $context); }
[ "final", "public", "function", "decode", "(", "$", "data", ",", "$", "format", ",", "array", "$", "context", "=", "[", "]", ")", "{", "return", "$", "this", "->", "decoder", "->", "decode", "(", "$", "data", ",", "$", "format", ",", "$", "context",...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Serializer/Serializer.php#L307-L310
train
Decodes the data into a list of objects
[ 30522, 2345, 2270, 3853, 21933, 3207, 1006, 1002, 2951, 1010, 1002, 4289, 1010, 9140, 1002, 6123, 1027, 1031, 1033, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 21933, 4063, 1011, 1028, 21933, 3207, 1006, 1002, 2951, 1010, 1002, 4289, 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...
octobercms/october
modules/cms/classes/CmsObject.php
CmsObject.getThemeAttribute
public function getThemeAttribute() { if ($this->themeCache !== null) { return $this->themeCache; } $themeName = $this->getDatasourceName() ?: static::getDatasourceResolver()->getDefaultDatasource(); return $this->themeCache = Theme::load($themeName); }
php
public function getThemeAttribute() { if ($this->themeCache !== null) { return $this->themeCache; } $themeName = $this->getDatasourceName() ?: static::getDatasourceResolver()->getDefaultDatasource(); return $this->themeCache = Theme::load($themeName); }
[ "public", "function", "getThemeAttribute", "(", ")", "{", "if", "(", "$", "this", "->", "themeCache", "!==", "null", ")", "{", "return", "$", "this", "->", "themeCache", ";", "}", "$", "themeName", "=", "$", "this", "->", "getDatasourceName", "(", ")", ...
Returns the CMS theme this object belongs to. @return \Cms\Classes\Theme
[ "Returns", "the", "CMS", "theme", "this", "object", "belongs", "to", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/classes/CmsObject.php#L207-L217
train
Get the theme attribute
[ 30522, 2270, 3853, 2131, 10760, 4168, 19321, 3089, 8569, 2618, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 4323, 30524, 1027, 19701, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 4323, 3540, 5403, 1025, 1065, 1002, 4323, 18442, 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...
matomo-org/matomo
plugins/LanguagesManager/TranslationWriter/Filter/EmptyTranslations.php
EmptyTranslations.filter
public function filter($translations) { $translationsBefore = $translations; foreach ($translations as $plugin => &$pluginTranslations) { $pluginTranslations = array_filter($pluginTranslations, function ($value) { return !empty($value) && '' != trim($value); ...
php
public function filter($translations) { $translationsBefore = $translations; foreach ($translations as $plugin => &$pluginTranslations) { $pluginTranslations = array_filter($pluginTranslations, function ($value) { return !empty($value) && '' != trim($value); ...
[ "public", "function", "filter", "(", "$", "translations", ")", "{", "$", "translationsBefore", "=", "$", "translations", ";", "foreach", "(", "$", "translations", "as", "$", "plugin", "=>", "&", "$", "pluginTranslations", ")", "{", "$", "pluginTranslations", ...
Removes all empty translations @param array $translations @return array filtered translations
[ "Removes", "all", "empty", "translations" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/LanguagesManager/TranslationWriter/Filter/EmptyTranslations.php#L21-L43
train
Filter translations by plugins
[ 30522, 2270, 3853, 11307, 1006, 1002, 11913, 1007, 1063, 1002, 11913, 4783, 29278, 2063, 1027, 1002, 11913, 1025, 18921, 6776, 1006, 1002, 11913, 2004, 1002, 13354, 2378, 1027, 1028, 1004, 1002, 13354, 18447, 5521, 14540, 10708, 1007, 1063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Relation.php
Relation.makeRenderFormField
protected function makeRenderFormField() { return $this->renderFormField = RelationBase::noConstraints(function () { $field = clone $this->formField; $relationObject = $this->getRelationObject(); $query = $relationObject->newQuery(); list($model, $attribute)...
php
protected function makeRenderFormField() { return $this->renderFormField = RelationBase::noConstraints(function () { $field = clone $this->formField; $relationObject = $this->getRelationObject(); $query = $relationObject->newQuery(); list($model, $attribute)...
[ "protected", "function", "makeRenderFormField", "(", ")", "{", "return", "$", "this", "->", "renderFormField", "=", "RelationBase", "::", "noConstraints", "(", "function", "(", ")", "{", "$", "field", "=", "clone", "$", "this", "->", "formField", ";", "$", ...
Makes the form object used for rendering a simple field type
[ "Makes", "the", "form", "object", "used", "for", "rendering", "a", "simple", "field", "type" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/formwidgets/Relation.php#L93-L155
train
Makes the form field that will be rendered
[ 30522, 5123, 3853, 9338, 10497, 2121, 14192, 3790, 1006, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 17552, 14192, 3790, 1027, 7189, 15058, 1024, 1024, 2053, 8663, 20528, 18447, 2015, 1006, 3853, 1006, 1007, 1063, 1002, 2492, 1027, 17598, 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/Validate/File/MimeType.php
Zend_Validate_File_MimeType.getMimeType
public function getMimeType($asArray = false) { $asArray = (bool) $asArray; $mimetype = (string) $this->_mimetype; if ($asArray) { $mimetype = explode(',', $mimetype); } return $mimetype; }
php
public function getMimeType($asArray = false) { $asArray = (bool) $asArray; $mimetype = (string) $this->_mimetype; if ($asArray) { $mimetype = explode(',', $mimetype); } return $mimetype; }
[ "public", "function", "getMimeType", "(", "$", "asArray", "=", "false", ")", "{", "$", "asArray", "=", "(", "bool", ")", "$", "asArray", ";", "$", "mimetype", "=", "(", "string", ")", "$", "this", "->", "_mimetype", ";", "if", "(", "$", "asArray", ...
Returns the set mimetypes @param boolean $asArray Returns the values as array, when false an concated string is returned @return string|array
[ "Returns", "the", "set", "mimetypes" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Validate/File/MimeType.php#L241-L250
train
Get the mimetype of the request
[ 30522, 2270, 3853, 2131, 4328, 11368, 18863, 1006, 1002, 17306, 11335, 2100, 1027, 6270, 1007, 1063, 1002, 17306, 11335, 2100, 1027, 1006, 22017, 2140, 1007, 1002, 17306, 11335, 2100, 1025, 1002, 2771, 11368, 18863, 1027, 1006, 5164, 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/QuickForm2.php
QuickForm2.getFormData
public function getFormData($groupErrors = true) { if (!self::$registered) { HTML_QuickForm2_Renderer::register('smarty', 'HTML_QuickForm2_Renderer_Smarty'); self::$registered = true; } // Create the renderer object $renderer = HTML_QuickForm2_Renderer::facto...
php
public function getFormData($groupErrors = true) { if (!self::$registered) { HTML_QuickForm2_Renderer::register('smarty', 'HTML_QuickForm2_Renderer_Smarty'); self::$registered = true; } // Create the renderer object $renderer = HTML_QuickForm2_Renderer::facto...
[ "public", "function", "getFormData", "(", "$", "groupErrors", "=", "true", ")", "{", "if", "(", "!", "self", "::", "$", "registered", ")", "{", "HTML_QuickForm2_Renderer", "::", "register", "(", "'smarty'", ",", "'HTML_QuickForm2_Renderer_Smarty'", ")", ";", "...
Returns the rendered form as an array. @param bool $groupErrors Whether to group errors together or not. @return array
[ "Returns", "the", "rendered", "form", "as", "an", "array", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/QuickForm2.php#L129-L144
train
Returns the form data
[ 30522, 2270, 3853, 2131, 14192, 2850, 2696, 1006, 1002, 2177, 2121, 29165, 2015, 1027, 2995, 1007, 1063, 2065, 1006, 999, 2969, 1024, 1024, 1002, 5068, 1007, 1063, 16129, 1035, 4248, 14192, 2475, 1035, 17552, 2121, 1024, 1024, 4236, 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/Database/Schema/Grammars/MySqlGrammar.php
MySqlGrammar.modifyComment
protected function modifyComment(Blueprint $blueprint, Fluent $column) { if (! is_null($column->comment)) { return " comment '".addslashes($column->comment)."'"; } }
php
protected function modifyComment(Blueprint $blueprint, Fluent $column) { if (! is_null($column->comment)) { return " comment '".addslashes($column->comment)."'"; } }
[ "protected", "function", "modifyComment", "(", "Blueprint", "$", "blueprint", ",", "Fluent", "$", "column", ")", "{", "if", "(", "!", "is_null", "(", "$", "column", "->", "comment", ")", ")", "{", "return", "\" comment '\"", ".", "addslashes", "(", "$", ...
Get the SQL for a "comment" column modifier. @param \Illuminate\Database\Schema\Blueprint $blueprint @param \Illuminate\Support\Fluent $column @return string|null
[ "Get", "the", "SQL", "for", "a", "comment", "column", "modifier", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php#L1010-L1015
train
Protected modify comment
[ 30522, 5123, 3853, 19933, 9006, 3672, 1006, 2630, 16550, 1002, 2630, 16550, 1010, 19376, 1002, 5930, 1007, 1063, 2065, 1006, 999, 2003, 1035, 19701, 1006, 1002, 5930, 1011, 1028, 7615, 1007, 1007, 1063, 2709, 1000, 7615, 1005, 1000, 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...
laravel/framework
src/Illuminate/Foundation/Exceptions/Handler.php
Handler.invalid
protected function invalid($request, ValidationException $exception) { return redirect($exception->redirectTo ?? url()->previous()) ->withInput(Arr::except($request->input(), $this->dontFlash)) ->withErrors($exception->errors(), $exception->errorBag); }
php
protected function invalid($request, ValidationException $exception) { return redirect($exception->redirectTo ?? url()->previous()) ->withInput(Arr::except($request->input(), $this->dontFlash)) ->withErrors($exception->errors(), $exception->errorBag); }
[ "protected", "function", "invalid", "(", "$", "request", ",", "ValidationException", "$", "exception", ")", "{", "return", "redirect", "(", "$", "exception", "->", "redirectTo", "??", "url", "(", ")", "->", "previous", "(", ")", ")", "->", "withInput", "("...
Convert a validation exception into a response. @param \Illuminate\Http\Request $request @param \Illuminate\Validation\ValidationException $exception @return \Illuminate\Http\Response
[ "Convert", "a", "validation", "exception", "into", "a", "response", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Exceptions/Handler.php#L249-L254
train
Invalid action.
[ 30522, 5123, 3853, 19528, 1006, 1002, 5227, 1010, 27354, 10288, 24422, 1002, 6453, 1007, 1063, 2709, 2417, 7442, 6593, 1006, 1002, 6453, 1011, 1028, 2417, 7442, 6593, 3406, 1029, 1029, 24471, 2140, 1006, 1007, 1011, 1028, 3025, 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...
z-song/laravel-admin
src/Grid/Filter/Group.php
Group.endWith
public function endWith($label = '') { $label = $label ?: 'End with'; $condition = [$this->column, 'like', "%{$this->value}"]; return $this->joinGroup($label, $condition); }
php
public function endWith($label = '') { $label = $label ?: 'End with'; $condition = [$this->column, 'like', "%{$this->value}"]; return $this->joinGroup($label, $condition); }
[ "public", "function", "endWith", "(", "$", "label", "=", "''", ")", "{", "$", "label", "=", "$", "label", "?", ":", "'End with'", ";", "$", "condition", "=", "[", "$", "this", "->", "column", ",", "'like'", ",", "\"%{$this->value}\"", "]", ";", "retu...
Filter out records which ends with input query. @param string $label @return Group
[ "Filter", "out", "records", "which", "ends", "with", "input", "query", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Grid/Filter/Group.php#L251-L258
train
Filter nodes that end with a given value
[ 30522, 2270, 3853, 2203, 24415, 1006, 1002, 3830, 1027, 1005, 1005, 1007, 1063, 1002, 3830, 1027, 1002, 3830, 1029, 1024, 1005, 2203, 2007, 1005, 1025, 1002, 4650, 1027, 1031, 1002, 2023, 1011, 1028, 5930, 1010, 1005, 2066, 1005, 1010, 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/Filesystem.php
Filesystem.deleteAllCacheOnUpdate
public static function deleteAllCacheOnUpdate($pluginName = false) { AssetManager::getInstance()->removeMergedAssets($pluginName); View::clearCompiledTemplates(); TrackerCache::deleteTrackerCache(); PiwikCache::flushAll(); self::clearPhpCaches(); $pluginManag...
php
public static function deleteAllCacheOnUpdate($pluginName = false) { AssetManager::getInstance()->removeMergedAssets($pluginName); View::clearCompiledTemplates(); TrackerCache::deleteTrackerCache(); PiwikCache::flushAll(); self::clearPhpCaches(); $pluginManag...
[ "public", "static", "function", "deleteAllCacheOnUpdate", "(", "$", "pluginName", "=", "false", ")", "{", "AssetManager", "::", "getInstance", "(", ")", "->", "removeMergedAssets", "(", "$", "pluginName", ")", ";", "View", "::", "clearCompiledTemplates", "(", ")...
Called on Core install, update, plugin enable/disable Will clear all cache that could be affected by the change in configuration being made
[ "Called", "on", "Core", "install", "update", "plugin", "enable", "/", "disable", "Will", "clear", "all", "cache", "that", "could", "be", "affected", "by", "the", "change", "in", "configuration", "being", "made" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Filesystem.php#L29-L48
train
Clears all caches on update
[ 30522, 2270, 10763, 3853, 3972, 12870, 8095, 3540, 28099, 6279, 13701, 1006, 1002, 13354, 23111, 14074, 1027, 6270, 1007, 1063, 11412, 24805, 4590, 1024, 1024, 2131, 7076, 26897, 1006, 1007, 1011, 1028, 6366, 5017, 5999, 27241, 3215, 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...
octobercms/october
modules/cms/controllers/Index.php
Index.resolveTypeClassName
protected function resolveTypeClassName($type) { $types = [ 'page' => Page::class, 'partial' => Partial::class, 'layout' => Layout::class, 'content' => Content::class, 'asset' => Asset::class ]; if (!array_key_exists($type, $...
php
protected function resolveTypeClassName($type) { $types = [ 'page' => Page::class, 'partial' => Partial::class, 'layout' => Layout::class, 'content' => Content::class, 'asset' => Asset::class ]; if (!array_key_exists($type, $...
[ "protected", "function", "resolveTypeClassName", "(", "$", "type", ")", "{", "$", "types", "=", "[", "'page'", "=>", "Page", "::", "class", ",", "'partial'", "=>", "Partial", "::", "class", ",", "'layout'", "=>", "Layout", "::", "class", ",", "'content'", ...
Reolves a template type to its class name @param string $type @return string
[ "Reolves", "a", "template", "type", "to", "its", "class", "name" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/controllers/Index.php#L420-L435
train
Resolves the class name of a template type
[ 30522, 5123, 3853, 10663, 13874, 26266, 18442, 1006, 1002, 2828, 1007, 1063, 1002, 4127, 1027, 1031, 1005, 3931, 1005, 1027, 1028, 3931, 1024, 1024, 2465, 1010, 1005, 7704, 1005, 1027, 1028, 7704, 1024, 1024, 2465, 1010, 1005, 9621, 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...
getgrav/grav
system/src/Grav/Common/Page/Pages.php
Pages.getList
public function getList(PageInterface $current = null, $level = 0, $rawRoutes = false, $showAll = true, $showFullpath = false, $showSlug = false, $showModular = false, $limitLevels = false) { if (!$current) { if ($level) { throw new \RuntimeException('Internal error'); ...
php
public function getList(PageInterface $current = null, $level = 0, $rawRoutes = false, $showAll = true, $showFullpath = false, $showSlug = false, $showModular = false, $limitLevels = false) { if (!$current) { if ($level) { throw new \RuntimeException('Internal error'); ...
[ "public", "function", "getList", "(", "PageInterface", "$", "current", "=", "null", ",", "$", "level", "=", "0", ",", "$", "rawRoutes", "=", "false", ",", "$", "showAll", "=", "true", ",", "$", "showFullpath", "=", "false", ",", "$", "showSlug", "=", ...
Get list of route/title of all pages. @param PageInterface $current @param int $level @param bool $rawRoutes @param bool $showAll @param bool $showFullpath @param bool $showSlug @param bool $showModular @param bool $limitLevels @return array
[ "Get", "list", "of", "route", "/", "title", "of", "all", "pages", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Page/Pages.php#L686-L728
train
Get List of all routes
[ 30522, 2270, 3853, 2131, 9863, 1006, 3931, 18447, 2121, 12172, 1002, 2783, 1027, 19701, 1010, 1002, 2504, 1027, 1014, 1010, 1002, 6315, 22494, 4570, 1027, 6270, 1010, 1002, 2265, 8095, 1027, 2995, 1010, 1002, 2265, 3993, 14277, 8988, 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...
matomo-org/matomo
core/DataTable.php
DataTable.addSummaryRow
public function addSummaryRow(Row $row) { $this->summaryRow = $row; // add summary row to index if (!$this->indexNotUpToDate && $this->rebuildIndexContinuously ) { $label = $row->getColumn('label'); if ($label !== false) { $this->r...
php
public function addSummaryRow(Row $row) { $this->summaryRow = $row; // add summary row to index if (!$this->indexNotUpToDate && $this->rebuildIndexContinuously ) { $label = $row->getColumn('label'); if ($label !== false) { $this->r...
[ "public", "function", "addSummaryRow", "(", "Row", "$", "row", ")", "{", "$", "this", "->", "summaryRow", "=", "$", "row", ";", "// add summary row to index", "if", "(", "!", "$", "this", "->", "indexNotUpToDate", "&&", "$", "this", "->", "rebuildIndexContin...
Sets the summary row. _Note: A DataTable can have only one summary row._ @param Row $row @return Row Returns `$row`.
[ "Sets", "the", "summary", "row", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataTable.php#L829-L844
train
Add summary row
[ 30522, 2270, 3853, 9909, 2819, 7849, 12541, 5004, 1006, 5216, 1002, 5216, 1007, 1063, 1002, 2023, 1011, 1028, 12654, 10524, 1027, 1002, 5216, 1025, 1013, 1013, 5587, 12654, 5216, 2000, 5950, 2065, 1006, 999, 1002, 2023, 1011, 1028, 5950, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Abstract.php
Zend_Mail_Transport_Abstract._getHeaders
protected function _getHeaders($boundary) { if (null !== $boundary) { // Build multipart mail $type = $this->_mail->getType(); if (!$type) { if ($this->_mail->hasAttachments) { $type = Zend_Mime::MULTIPART_MIXED; } elsei...
php
protected function _getHeaders($boundary) { if (null !== $boundary) { // Build multipart mail $type = $this->_mail->getType(); if (!$type) { if ($this->_mail->hasAttachments) { $type = Zend_Mime::MULTIPART_MIXED; } elsei...
[ "protected", "function", "_getHeaders", "(", "$", "boundary", ")", "{", "if", "(", "null", "!==", "$", "boundary", ")", "{", "// Build multipart mail", "$", "type", "=", "$", "this", "->", "_mail", "->", "getType", "(", ")", ";", "if", "(", "!", "$", ...
Return all mail headers as an array If a boundary is given, a multipart header is generated with a Content-Type of either multipart/alternative or multipart/mixed depending on the mail parts present in the {@link $_mail Zend_Mail object} present. @param string $boundary @return array
[ "Return", "all", "mail", "headers", "as", "an", "array" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail/Transport/Abstract.php#L127-L153
train
Build the headers array
[ 30522, 5123, 3853, 1035, 2131, 4974, 2545, 1006, 1002, 6192, 1007, 1063, 2065, 1006, 19701, 999, 1027, 1027, 1002, 6192, 1007, 1063, 1013, 1013, 3857, 4800, 19362, 2102, 5653, 1002, 2828, 1027, 1002, 2023, 1011, 1028, 1035, 5653, 1011, 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
plugins/LanguagesManager/TranslationWriter/Writer.php
Writer.getTranslationPathBaseDirectory
protected function getTranslationPathBaseDirectory($base, $lang = null) { if (empty($lang)) { $lang = $this->getLanguage(); } if (!empty($this->pluginName)) { if ($base == 'tmp') { return sprintf('%s/plugins/%s/lang/%s.json', StaticContainer::get('pa...
php
protected function getTranslationPathBaseDirectory($base, $lang = null) { if (empty($lang)) { $lang = $this->getLanguage(); } if (!empty($this->pluginName)) { if ($base == 'tmp') { return sprintf('%s/plugins/%s/lang/%s.json', StaticContainer::get('pa...
[ "protected", "function", "getTranslationPathBaseDirectory", "(", "$", "base", ",", "$", "lang", "=", "null", ")", "{", "if", "(", "empty", "(", "$", "lang", ")", ")", "{", "$", "lang", "=", "$", "this", "->", "getLanguage", "(", ")", ";", "}", "if", ...
Get translation file path based on given params @param string $base Optional base directory (either 'lang' or 'tmp') @param string|null $lang forced language @throws \Exception @return string path
[ "Get", "translation", "file", "path", "based", "on", "given", "params" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/LanguagesManager/TranslationWriter/Writer.php#L194-L214
train
Get the path to the translation file
[ 30522, 5123, 3853, 2131, 6494, 3619, 13490, 15069, 15058, 4305, 2890, 16761, 2100, 1006, 1002, 2918, 30524, 1002, 11374, 1007, 1007, 1063, 1002, 11374, 1027, 1002, 2023, 1011, 1028, 2131, 25023, 6692, 3351, 1006, 1007, 1025, 1065, 2065, 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...
symfony/symfony
src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php
HtmlDumper.enterHash
public function enterHash(Cursor $cursor, $type, $class, $hasChild) { parent::enterHash($cursor, $type, $class, false); if ($cursor->skipChildren) { $cursor->skipChildren = false; $eol = ' class=sf-dump-compact>'; } elseif ($this->expandNextHash) { $this-...
php
public function enterHash(Cursor $cursor, $type, $class, $hasChild) { parent::enterHash($cursor, $type, $class, false); if ($cursor->skipChildren) { $cursor->skipChildren = false; $eol = ' class=sf-dump-compact>'; } elseif ($this->expandNextHash) { $this-...
[ "public", "function", "enterHash", "(", "Cursor", "$", "cursor", ",", "$", "type", ",", "$", "class", ",", "$", "hasChild", ")", "{", "parent", "::", "enterHash", "(", "$", "cursor", ",", "$", "type", ",", "$", "class", ",", "false", ")", ";", "if"...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php#L789-L814
train
Enter the hash section
[ 30522, 2270, 3853, 4607, 14949, 2232, 1006, 12731, 25301, 2099, 1002, 12731, 25301, 2099, 1010, 1002, 2828, 1010, 1002, 2465, 1010, 1002, 2038, 19339, 1007, 1063, 6687, 1024, 1024, 4607, 14949, 2232, 1006, 1002, 12731, 25301, 2099, 1010, 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/Form/Extension/Validator/ViolationMapper/ViolationPath.php
ViolationPath.getParent
public function getParent() { if ($this->length <= 1) { return; } $parent = clone $this; --$parent->length; array_pop($parent->elements); array_pop($parent->isIndex); array_pop($parent->mapsForm); $parent->buildString(); return ...
php
public function getParent() { if ($this->length <= 1) { return; } $parent = clone $this; --$parent->length; array_pop($parent->elements); array_pop($parent->isIndex); array_pop($parent->mapsForm); $parent->buildString(); return ...
[ "public", "function", "getParent", "(", ")", "{", "if", "(", "$", "this", "->", "length", "<=", "1", ")", "{", "return", ";", "}", "$", "parent", "=", "clone", "$", "this", ";", "--", "$", "parent", "->", "length", ";", "array_pop", "(", "$", "pa...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationPath.php#L134-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, 9...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Config.php
Zend_Config._arrayMergeRecursive
protected function _arrayMergeRecursive($firstArray, $secondArray) { if (is_array($firstArray) && is_array($secondArray)) { foreach ($secondArray as $key => $value) { if (isset($firstArray[$key])) { $firstArray[$key] = $this->_arrayMergeRecursive($firstArray[$...
php
protected function _arrayMergeRecursive($firstArray, $secondArray) { if (is_array($firstArray) && is_array($secondArray)) { foreach ($secondArray as $key => $value) { if (isset($firstArray[$key])) { $firstArray[$key] = $this->_arrayMergeRecursive($firstArray[$...
[ "protected", "function", "_arrayMergeRecursive", "(", "$", "firstArray", ",", "$", "secondArray", ")", "{", "if", "(", "is_array", "(", "$", "firstArray", ")", "&&", "is_array", "(", "$", "secondArray", ")", ")", "{", "foreach", "(", "$", "secondArray", "a...
Merge two arrays recursively, overwriting keys of the same name in $firstArray with the value in $secondArray. @param mixed $firstArray First array @param mixed $secondArray Second array to merge into first array @return array
[ "Merge", "two", "arrays", "recursively", "overwriting", "keys", "of", "the", "same", "name", "in", "$firstArray", "with", "the", "value", "in", "$secondArray", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Config.php#L464-L483
train
Recursive array merge
[ 30522, 5123, 3853, 1035, 9140, 5017, 4590, 8586, 9236, 3512, 1006, 1002, 2034, 2906, 9447, 1010, 1002, 2117, 2906, 9447, 1007, 1063, 2065, 1006, 2003, 1035, 9140, 1006, 1002, 2034, 2906, 9447, 1007, 1004, 1004, 2003, 1035, 9140, 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...
dompdf/dompdf
src/Css/Style.php
Style.get_font_family
function get_font_family() { if (isset($this->_font_family)) { return $this->_font_family; } $DEBUGCSS = $this->_stylesheet->get_dompdf()->getOptions()->getDebugCss(); // Select the appropriate font. First determine the subtype, then check // the specified font...
php
function get_font_family() { if (isset($this->_font_family)) { return $this->_font_family; } $DEBUGCSS = $this->_stylesheet->get_dompdf()->getOptions()->getDebugCss(); // Select the appropriate font. First determine the subtype, then check // the specified font...
[ "function", "get_font_family", "(", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "_font_family", ")", ")", "{", "return", "$", "this", "->", "_font_family", ";", "}", "$", "DEBUGCSS", "=", "$", "this", "->", "_stylesheet", "->", "get_dompdf", ...
Getter for the 'font-family' CSS property. Uses the {@link FontMetrics} class to resolve the font family into an actual font file. @link http://www.w3.org/TR/CSS21/fonts.html#propdef-font-family @throws Exception @return string
[ "Getter", "for", "the", "font", "-", "family", "CSS", "property", ".", "Uses", "the", "{", "@link", "FontMetrics", "}", "class", "to", "resolve", "the", "font", "family", "into", "an", "actual", "font", "file", "." ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/Css/Style.php#L919-L999
train
Return the font - family
[ 30522, 3853, 2131, 1035, 15489, 1035, 2155, 1006, 1007, 1063, 2065, 1006, 26354, 3388, 30524, 7361, 9285, 1006, 1007, 1011, 1028, 2131, 3207, 8569, 18195, 4757, 1006, 1007, 1025, 1013, 1013, 7276, 1996, 6413, 15489, 1012, 2034, 5646, 1996, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/FrameReflower/Inline.php
Inline.calculate_auto_width
public function calculate_auto_width() { $width = 0; foreach ($this->_frame->get_children() as $child) { if ($child->get_original_style()->width == 'auto') { $width += $child->calculate_auto_width(); } else { $width += $child->get_margin_width...
php
public function calculate_auto_width() { $width = 0; foreach ($this->_frame->get_children() as $child) { if ($child->get_original_style()->width == 'auto') { $width += $child->calculate_auto_width(); } else { $width += $child->get_margin_width...
[ "public", "function", "calculate_auto_width", "(", ")", "{", "$", "width", "=", "0", ";", "foreach", "(", "$", "this", "->", "_frame", "->", "get_children", "(", ")", "as", "$", "child", ")", "{", "if", "(", "$", "child", "->", "get_original_style", "(...
Determine current frame width based on contents @return float
[ "Determine", "current", "frame", "width", "based", "on", "contents" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/FrameReflower/Inline.php#L87-L102
train
Calculates the auto width of the frame
[ 30522, 2270, 3853, 18422, 1035, 8285, 1035, 9381, 1006, 1007, 1063, 1002, 9381, 1027, 1014, 1025, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 1035, 4853, 1011, 1028, 2131, 1035, 2336, 1006, 1007, 2004, 1002, 2775, 1007, 1063, 2065, 1006, 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
core/DataTable/Filter/SafeDecodeLabel.php
SafeDecodeLabel.filter
public function filter($table) { foreach ($table->getRows() as $row) { $value = $row->getColumn($this->columnToDecode); if ($value !== false) { $value = self::decodeLabelSafe($value); $row->setColumn($this->columnToDecode, $value); $th...
php
public function filter($table) { foreach ($table->getRows() as $row) { $value = $row->getColumn($this->columnToDecode); if ($value !== false) { $value = self::decodeLabelSafe($value); $row->setColumn($this->columnToDecode, $value); $th...
[ "public", "function", "filter", "(", "$", "table", ")", "{", "foreach", "(", "$", "table", "->", "getRows", "(", ")", "as", "$", "row", ")", "{", "$", "value", "=", "$", "row", "->", "getColumn", "(", "$", "this", "->", "columnToDecode", ")", ";", ...
Decodes all columns of the given data table @param DataTable $table
[ "Decodes", "all", "columns", "of", "the", "given", "data", "table" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataTable/Filter/SafeDecodeLabel.php#L60-L71
train
Filter the subtable and add the value to the column to decode the value
[ 30522, 2270, 3853, 11307, 1006, 1002, 2795, 1007, 1063, 18921, 6776, 1006, 1002, 2795, 1011, 1028, 2131, 10524, 2015, 1006, 1007, 2004, 1002, 5216, 1007, 1063, 1002, 3643, 1027, 1002, 5216, 1011, 1028, 2131, 25778, 2819, 2078, 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
core/API/DataTablePostProcessor.php
DataTablePostProcessor.getLabelFromRequest
public static function getLabelFromRequest($request) { $label = Common::getRequestVar('label', array(), 'array', $request); if (empty($label)) { $label = Common::getRequestVar('label', '', 'string', $request); if (!empty($label)) { $label = array($label); ...
php
public static function getLabelFromRequest($request) { $label = Common::getRequestVar('label', array(), 'array', $request); if (empty($label)) { $label = Common::getRequestVar('label', '', 'string', $request); if (!empty($label)) { $label = array($label); ...
[ "public", "static", "function", "getLabelFromRequest", "(", "$", "request", ")", "{", "$", "label", "=", "Common", "::", "getRequestVar", "(", "'label'", ",", "array", "(", ")", ",", "'array'", ",", "$", "request", ")", ";", "if", "(", "empty", "(", "$...
Returns the value for the label query parameter which can be either a string (ie, label=...) or array (ie, label[]=...). @param array $request @return array
[ "Returns", "the", "value", "for", "the", "label", "query", "parameter", "which", "can", "be", "either", "a", "string", "(", "ie", "label", "=", "...", ")", "or", "array", "(", "ie", "label", "[]", "=", "...", ")", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/API/DataTablePostProcessor.php#L384-L396
train
Returns the label of the language
[ 30522, 2270, 10763, 3853, 2131, 20470, 2884, 19699, 5358, 2890, 15500, 1006, 1002, 5227, 1007, 1063, 1002, 3830, 1027, 2691, 1024, 1024, 2131, 2890, 15500, 10755, 1006, 1005, 3830, 1005, 1010, 9140, 1006, 1007, 1010, 1005, 9140, 1005, 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/Translation/Dumper/YamlFileDumper.php
YamlFileDumper.formatCatalogue
public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = []) { if (!class_exists('Symfony\Component\Yaml\Yaml')) { throw new LogicException('Dumping translations in the YAML format requires the Symfony Yaml component.'); } $data = $messages->all($dom...
php
public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = []) { if (!class_exists('Symfony\Component\Yaml\Yaml')) { throw new LogicException('Dumping translations in the YAML format requires the Symfony Yaml component.'); } $data = $messages->all($dom...
[ "public", "function", "formatCatalogue", "(", "MessageCatalogue", "$", "messages", ",", "$", "domain", ",", "array", "$", "options", "=", "[", "]", ")", "{", "if", "(", "!", "class_exists", "(", "'Symfony\\Component\\Yaml\\Yaml'", ")", ")", "{", "throw", "ne...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Translation/Dumper/YamlFileDumper.php#L36-L53
train
Formats the given message catalogue into a YAML string.
[ 30522, 2270, 3853, 4289, 11266, 23067, 9077, 1006, 4471, 11266, 23067, 9077, 1002, 7696, 1010, 1002, 5884, 1010, 9140, 1002, 7047, 1027, 1031, 1033, 1007, 1063, 2065, 1006, 999, 2465, 1035, 6526, 1006, 1005, 25353, 2213, 14876, 4890, 1032, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/MiddlewareAwareTrait.php
MiddlewareAwareTrait.addMiddleware
protected function addMiddleware(callable $callable) { if ($this->middlewareLock) { throw new RuntimeException('Middleware can’t be added once the stack is dequeuing'); } if (is_null($this->tip)) { $this->seedMiddlewareStack(); } $next = $this->tip; ...
php
protected function addMiddleware(callable $callable) { if ($this->middlewareLock) { throw new RuntimeException('Middleware can’t be added once the stack is dequeuing'); } if (is_null($this->tip)) { $this->seedMiddlewareStack(); } $next = $this->tip; ...
[ "protected", "function", "addMiddleware", "(", "callable", "$", "callable", ")", "{", "if", "(", "$", "this", "->", "middlewareLock", ")", "{", "throw", "new", "RuntimeException", "(", "'Middleware can’t be added once the stack is dequeuing');", "", "", "}", "if", ...
Add middleware This method prepends new middleware to the application middleware stack. @param callable $callable Any callable that accepts three arguments: 1. A Request object 2. A Response object 3. A "next" middleware callable @return static @throws RuntimeException If middleware is added while the stack...
[ "Add", "middleware" ]
ccef5f7d8bcd469d59cbe64f6210d83764f91543
https://github.com/slimphp/Slim/blob/ccef5f7d8bcd469d59cbe64f6210d83764f91543/Slim/MiddlewareAwareTrait.php#L53-L81
train
Add middleware to stack
[ 30522, 5123, 3853, 5587, 4328, 20338, 8059, 1006, 2655, 3085, 1002, 2655, 3085, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 2690, 8059, 7878, 1007, 1063, 5466, 2047, 2448, 7292, 10288, 24422, 1006, 1005, 2690, 8059, 2064, 1521, 1056, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/system/classes/UpdateManager.php
UpdateManager.requestPopularProducts
public function requestPopularProducts($type = null) { if ($type != 'plugin' && $type != 'theme') { $type = 'plugin'; } $cacheKey = 'system-updates-popular-'.$type; if (Cache::has($cacheKey)) { return @unserialize(@base64_decode(Cache::get($cacheKey))) ?: []...
php
public function requestPopularProducts($type = null) { if ($type != 'plugin' && $type != 'theme') { $type = 'plugin'; } $cacheKey = 'system-updates-popular-'.$type; if (Cache::has($cacheKey)) { return @unserialize(@base64_decode(Cache::get($cacheKey))) ?: []...
[ "public", "function", "requestPopularProducts", "(", "$", "type", "=", "null", ")", "{", "if", "(", "$", "type", "!=", "'plugin'", "&&", "$", "type", "!=", "'theme'", ")", "{", "$", "type", "=", "'plugin'", ";", "}", "$", "cacheKey", "=", "'system-upda...
Returns popular themes found on the marketplace.
[ "Returns", "popular", "themes", "found", "on", "the", "marketplace", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/classes/UpdateManager.php#L693-L716
train
Request popular products
[ 30522, 2270, 3853, 5227, 16340, 7934, 21572, 8566, 16649, 1006, 1002, 2828, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 2828, 999, 1027, 1005, 13354, 2378, 1005, 1004, 1004, 1002, 2828, 999, 1027, 1005, 4323, 1005, 1007, 1063, 1002, 2828, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/system/classes/UpdateManager.php
UpdateManager.createSignature
protected function createSignature($data, $secret) { return base64_encode(hash_hmac('sha512', http_build_query($data, '', '&'), base64_decode($secret), true)); }
php
protected function createSignature($data, $secret) { return base64_encode(hash_hmac('sha512', http_build_query($data, '', '&'), base64_decode($secret), true)); }
[ "protected", "function", "createSignature", "(", "$", "data", ",", "$", "secret", ")", "{", "return", "base64_encode", "(", "hash_hmac", "(", "'sha512'", ",", "http_build_query", "(", "$", "data", ",", "''", ",", "'&'", ")", ",", "base64_decode", "(", "$",...
Create a unique signature for transmission. @return string
[ "Create", "a", "unique", "signature", "for", "transmission", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/classes/UpdateManager.php#L967-L970
train
Create signature for data and secret
[ 30522, 5123, 3853, 9005, 23773, 4017, 5397, 1006, 1002, 2951, 1010, 1002, 3595, 1007, 1063, 2709, 2918, 21084, 1035, 4372, 16044, 1006, 23325, 1035, 20287, 6305, 1006, 1005, 21146, 22203, 2475, 1005, 1010, 8299, 1035, 3857, 1035, 23032, 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...
z-song/laravel-admin
src/Show/Field.php
Field.label
public function label($style = 'success') { return $this->unescape()->as(function ($value) use ($style) { if ($value instanceof Arrayable) { $value = $value->toArray(); } return collect((array) $value)->map(function ($name) use ($style) { ...
php
public function label($style = 'success') { return $this->unescape()->as(function ($value) use ($style) { if ($value instanceof Arrayable) { $value = $value->toArray(); } return collect((array) $value)->map(function ($name) use ($style) { ...
[ "public", "function", "label", "(", "$", "style", "=", "'success'", ")", "{", "return", "$", "this", "->", "unescape", "(", ")", "->", "as", "(", "function", "(", "$", "value", ")", "use", "(", "$", "style", ")", "{", "if", "(", "$", "value", "in...
Show field as labels. @param string $style @return Field
[ "Show", "field", "as", "labels", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Show/Field.php#L316-L327
train
Returns the field s label
[ 30522, 2270, 3853, 3830, 1006, 1002, 2806, 1027, 1005, 3112, 1005, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 16655, 15782, 5051, 1006, 1007, 1011, 1028, 2004, 1006, 3853, 1006, 1002, 3643, 1007, 2224, 1006, 1002, 2806, 1007, 1063, 2065, 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/Bundle/WebServerBundle/Command/ServerRunCommand.php
ServerRunCommand.execute
protected function execute(InputInterface $input, OutputInterface $output) { $io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output); if (null === $documentRoot = $input->getOption('docroot')) { if (!$this->documentRoot) { ...
php
protected function execute(InputInterface $input, OutputInterface $output) { $io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output); if (null === $documentRoot = $input->getOption('docroot')) { if (!$this->documentRoot) { ...
[ "protected", "function", "execute", "(", "InputInterface", "$", "input", ",", "OutputInterface", "$", "output", ")", "{", "$", "io", "=", "new", "SymfonyStyle", "(", "$", "input", ",", "$", "output", "instanceof", "ConsoleOutputInterface", "?", "$", "output", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/WebServerBundle/Command/ServerRunCommand.php#L91-L155
train
Execute the web server
[ 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, 6013, 11253, 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
core/API/Proxy.php
Proxy.includeApiFile
private function includeApiFile($fileName) { $module = self::getModuleNameFromClassName($fileName); $path = Manager::getPluginDirectory($module) . '/API.php'; if (is_readable($path)) { require_once $path; // prefixed by PIWIK_INCLUDE_PATH } else { throw new E...
php
private function includeApiFile($fileName) { $module = self::getModuleNameFromClassName($fileName); $path = Manager::getPluginDirectory($module) . '/API.php'; if (is_readable($path)) { require_once $path; // prefixed by PIWIK_INCLUDE_PATH } else { throw new E...
[ "private", "function", "includeApiFile", "(", "$", "fileName", ")", "{", "$", "module", "=", "self", "::", "getModuleNameFromClassName", "(", "$", "fileName", ")", ";", "$", "path", "=", "Manager", "::", "getPluginDirectory", "(", "$", "module", ")", ".", ...
Includes the class API by looking up plugins/xxx/API.php @param string $fileName api class name eg. "API" @throws Exception
[ "Includes", "the", "class", "API", "by", "looking", "up", "plugins", "/", "xxx", "/", "API", ".", "php" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/API/Proxy.php#L442-L452
train
Include API file
[ 30522, 2797, 3853, 2421, 9331, 10128, 9463, 1006, 1002, 5371, 18442, 1007, 1063, 1002, 11336, 1027, 2969, 1024, 1024, 2131, 5302, 8566, 20844, 4168, 19699, 5358, 26266, 18442, 1006, 1002, 5371, 18442, 1007, 1025, 1002, 4130, 1027, 3208, 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...
matomo-org/matomo
core/DataTable/Renderer.php
Renderer.translateColumnNames
protected function translateColumnNames($names) { if (!$this->apiMethod) { return $names; } // load the translations only once // when multiple dates are requested (date=...,...&period=day), the meta data would // be loaded lots of times otherwise if ($th...
php
protected function translateColumnNames($names) { if (!$this->apiMethod) { return $names; } // load the translations only once // when multiple dates are requested (date=...,...&period=day), the meta data would // be loaded lots of times otherwise if ($th...
[ "protected", "function", "translateColumnNames", "(", "$", "names", ")", "{", "if", "(", "!", "$", "this", "->", "apiMethod", ")", "{", "return", "$", "names", ";", "}", "// load the translations only once", "// when multiple dates are requested (date=...,...&period=day...
Translate column names to the current language. Used in subclasses. @param array $names @return array
[ "Translate", "column", "names", "to", "the", "current", "language", ".", "Used", "in", "subclasses", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataTable/Renderer.php#L212-L253
train
Translates column names
[ 30522, 5123, 3853, 17637, 25778, 2819, 9516, 7834, 1006, 1002, 3415, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 17928, 11368, 6806, 2094, 1007, 1063, 2709, 1002, 3415, 1025, 1065, 1013, 1013, 7170, 1996, 11913, 2069, 2320, 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...
getgrav/grav
system/src/Grav/Common/Utils.php
Utils.arrayDiffMultidimensional
public static function arrayDiffMultidimensional($array1, $array2) { $result = array(); foreach ($array1 as $key => $value) { if (!is_array($array2) || !array_key_exists($key, $array2)) { $result[$key] = $value; continue; } if (is_a...
php
public static function arrayDiffMultidimensional($array1, $array2) { $result = array(); foreach ($array1 as $key => $value) { if (!is_array($array2) || !array_key_exists($key, $array2)) { $result[$key] = $value; continue; } if (is_a...
[ "public", "static", "function", "arrayDiffMultidimensional", "(", "$", "array1", ",", "$", "array2", ")", "{", "$", "result", "=", "array", "(", ")", ";", "foreach", "(", "$", "array1", "as", "$", "key", "=>", "$", "value", ")", "{", "if", "(", "!", ...
Returns an array with the differences between $array1 and $array2 @param array $array1 @param array $array2 @return array
[ "Returns", "an", "array", "with", "the", "differences", "between", "$array1", "and", "$array2" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Utils.php#L308-L329
train
Array diff Multidimensional
[ 30522, 2270, 10763, 3853, 9140, 4305, 4246, 12274, 7096, 28173, 3549, 10992, 2389, 1006, 1002, 9140, 2487, 1010, 1002, 9140, 2475, 1007, 1063, 1002, 2765, 1027, 9140, 1006, 1007, 1025, 18921, 6776, 1006, 1002, 9140, 2487, 2004, 1002, 3145, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/UsersManager/UserUpdater.php
UserUpdater.updateUserWithoutCurrentPassword
public function updateUserWithoutCurrentPassword($userLogin, $password = false, $email = false, $alias = false, $_isPasswordHashed = false) { API::$UPDATE_USER_REQUIRE_PASSWORD_CONFIRMATION = false; try { Request::processRequest('Users...
php
public function updateUserWithoutCurrentPassword($userLogin, $password = false, $email = false, $alias = false, $_isPasswordHashed = false) { API::$UPDATE_USER_REQUIRE_PASSWORD_CONFIRMATION = false; try { Request::processRequest('Users...
[ "public", "function", "updateUserWithoutCurrentPassword", "(", "$", "userLogin", ",", "$", "password", "=", "false", ",", "$", "email", "=", "false", ",", "$", "alias", "=", "false", ",", "$", "_isPasswordHashed", "=", "false", ")", "{", "API", "::", "$", ...
Use this method if you have to update the user without having the ability to ask the user for a password confirmation @param $userLogin @param bool $password @param bool $email @param bool $alias @param bool $_isPasswordHashed @throws \Exception
[ "Use", "this", "method", "if", "you", "have", "to", "update", "the", "user", "without", "having", "the", "ability", "to", "ask", "the", "user", "for", "a", "password", "confirmation" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/UsersManager/UserUpdater.php#L25-L42
train
Update user without current password confirmation
[ 30522, 2270, 3853, 10651, 20330, 24415, 5833, 10841, 14343, 3372, 15194, 18351, 1006, 1002, 5310, 21197, 2378, 1010, 1002, 20786, 1027, 6270, 1010, 1002, 10373, 1027, 6270, 1010, 1002, 14593, 1027, 6270, 1010, 1002, 1035, 2003, 15194, 18351, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/MobileMessaging/SMSProvider.php
SMSProvider.findAvailableSmsProviders
public static function findAvailableSmsProviders() { /** @var SMSProvider[] $smsProviders */ $smsProviders = Plugin\Manager::getInstance()->findMultipleComponents('SMSProvider', 'Piwik\Plugins\MobileMessaging\SMSProvider'); $providers = array(); foreach ($smsProviders as $provider)...
php
public static function findAvailableSmsProviders() { /** @var SMSProvider[] $smsProviders */ $smsProviders = Plugin\Manager::getInstance()->findMultipleComponents('SMSProvider', 'Piwik\Plugins\MobileMessaging\SMSProvider'); $providers = array(); foreach ($smsProviders as $provider)...
[ "public", "static", "function", "findAvailableSmsProviders", "(", ")", "{", "/** @var SMSProvider[] $smsProviders */", "$", "smsProviders", "=", "Plugin", "\\", "Manager", "::", "getInstance", "(", ")", "->", "findMultipleComponents", "(", "'SMSProvider'", ",", "'Piwik\...
Returns all available SMS Providers @return SMSProvider[] @ignore
[ "Returns", "all", "available", "SMS", "Providers" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/MobileMessaging/SMSProvider.php#L135-L151
train
Returns all available SMS Providers
[ 30522, 2270, 10763, 3853, 2424, 12462, 11733, 13510, 5244, 21572, 17258, 2545, 1006, 1007, 1063, 1013, 1008, 1008, 1030, 13075, 22434, 21572, 17258, 2121, 1031, 1033, 1002, 22434, 21572, 30524, 1011, 1028, 2424, 12274, 7096, 11514, 2571, 9006...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/GPM/GPM.php
GPM.getPackageType
public static function getPackageType($source) { $plugin_regex = '/^class\\s{1,}[a-zA-Z0-9]{1,}\\s{1,}extends.+Plugin/m'; $theme_regex = '/^class\\s{1,}[a-zA-Z0-9]{1,}\\s{1,}extends.+Theme/m'; if ( file_exists($source . 'system/defines.php') && file_exists($source . ...
php
public static function getPackageType($source) { $plugin_regex = '/^class\\s{1,}[a-zA-Z0-9]{1,}\\s{1,}extends.+Plugin/m'; $theme_regex = '/^class\\s{1,}[a-zA-Z0-9]{1,}\\s{1,}extends.+Theme/m'; if ( file_exists($source . 'system/defines.php') && file_exists($source . ...
[ "public", "static", "function", "getPackageType", "(", "$", "source", ")", "{", "$", "plugin_regex", "=", "'/^class\\\\s{1,}[a-zA-Z0-9]{1,}\\\\s{1,}extends.+Plugin/m'", ";", "$", "theme_regex", "=", "'/^class\\\\s{1,}[a-zA-Z0-9]{1,}\\\\s{1,}extends.+Theme/m'", ";", "if", "(",...
Try to guess the package type from the source files @param string $source @return bool|string
[ "Try", "to", "guess", "the", "package", "type", "from", "the", "source", "files" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/GPM/GPM.php#L559-L596
train
Get the package type
[ 30522, 2270, 10763, 3853, 2131, 23947, 4270, 13874, 1006, 1002, 3120, 1007, 1063, 1002, 13354, 2378, 1035, 19723, 10288, 1027, 1005, 1013, 1034, 2465, 1032, 1032, 1055, 1063, 1015, 1010, 1065, 1031, 1037, 1011, 23564, 1011, 1062, 2692, 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/VarDumper/Dumper/CliDumper.php
CliDumper.dumpScalar
public function dumpScalar(Cursor $cursor, $type, $value) { $this->dumpKey($cursor); $style = 'const'; $attr = $cursor->attr; switch ($type) { case 'default': $style = 'default'; break; case 'integer': $style ...
php
public function dumpScalar(Cursor $cursor, $type, $value) { $this->dumpKey($cursor); $style = 'const'; $attr = $cursor->attr; switch ($type) { case 'default': $style = 'default'; break; case 'integer': $style ...
[ "public", "function", "dumpScalar", "(", "Cursor", "$", "cursor", ",", "$", "type", ",", "$", "value", ")", "{", "$", "this", "->", "dumpKey", "(", "$", "cursor", ")", ";", "$", "style", "=", "'const'", ";", "$", "attr", "=", "$", "cursor", "->", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/VarDumper/Dumper/CliDumper.php#L132-L181
train
Dump a scalar value
[ 30522, 2270, 3853, 15653, 15782, 8017, 1006, 12731, 25301, 30524, 12731, 25301, 2099, 1007, 1025, 1002, 2806, 1027, 1005, 9530, 3367, 1005, 1025, 1002, 2012, 16344, 1027, 1002, 12731, 25301, 2099, 1011, 1028, 2012, 16344, 1025, 6942, 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...
octobercms/october
modules/backend/widgets/MediaManager.php
MediaManager.setSortDirection
protected function setSortDirection($sortDirection) { if (!in_array($sortDirection, [ MediaLibrary::SORT_DIRECTION_ASC, MediaLibrary::SORT_DIRECTION_DESC ])) { throw new ApplicationException('Invalid input data'); } $this->putSession('media_sort_d...
php
protected function setSortDirection($sortDirection) { if (!in_array($sortDirection, [ MediaLibrary::SORT_DIRECTION_ASC, MediaLibrary::SORT_DIRECTION_DESC ])) { throw new ApplicationException('Invalid input data'); } $this->putSession('media_sort_d...
[ "protected", "function", "setSortDirection", "(", "$", "sortDirection", ")", "{", "if", "(", "!", "in_array", "(", "$", "sortDirection", ",", "[", "MediaLibrary", "::", "SORT_DIRECTION_ASC", ",", "MediaLibrary", "::", "SORT_DIRECTION_DESC", "]", ")", ")", "{", ...
Sets the user sort direction from the session state @param string $sortDirection @return void
[ "Sets", "the", "user", "sort", "direction", "from", "the", "session", "state" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/widgets/MediaManager.php#L978-L988
train
Set sort direction in session
[ 30522, 5123, 3853, 4520, 11589, 4305, 2890, 7542, 1006, 1002, 4066, 4305, 2890, 7542, 1007, 1063, 2065, 1006, 999, 1999, 1035, 9140, 1006, 1002, 4066, 4305, 2890, 7542, 1010, 1031, 23828, 12322, 19848, 2100, 1024, 1024, 4066, 1035, 3257, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Browser.php
Browser.isHuman
public function isHuman() { $browser = $this->getBrowser(); if (empty($browser)) { return false; } if (preg_match('~(bot|crawl)~i', $browser)) { return false; } return true; }
php
public function isHuman() { $browser = $this->getBrowser(); if (empty($browser)) { return false; } if (preg_match('~(bot|crawl)~i', $browser)) { return false; } return true; }
[ "public", "function", "isHuman", "(", ")", "{", "$", "browser", "=", "$", "this", "->", "getBrowser", "(", ")", ";", "if", "(", "empty", "(", "$", "browser", ")", ")", "{", "return", "false", ";", "}", "if", "(", "preg_match", "(", "'~(bot|crawl)~i'"...
Determine if the request comes from a human, or from a bot/crawler @return bool
[ "Determine", "if", "the", "request", "comes", "from", "a", "human", "or", "from", "a", "bot", "/", "crawler" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Browser.php#L125-L137
train
Return true if the browser is a human
[ 30522, 2270, 3853, 2003, 28600, 2319, 1006, 1007, 1063, 1002, 16602, 1027, 1002, 2023, 1011, 1028, 2131, 12618, 9333, 2121, 1006, 1007, 1025, 2065, 1006, 4064, 1006, 1002, 16602, 1007, 1007, 1063, 2709, 6270, 1025, 1065, 2065, 1006, 3653, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/GPM/GPM.php
GPM.getBlueprints
public static function getBlueprints($source) { $blueprint_file = $source . 'blueprints.yaml'; if (!file_exists($blueprint_file)) { return false; } $file = YamlFile::instance($blueprint_file); $blueprint = (array)$file->content(); $file->free(); ...
php
public static function getBlueprints($source) { $blueprint_file = $source . 'blueprints.yaml'; if (!file_exists($blueprint_file)) { return false; } $file = YamlFile::instance($blueprint_file); $blueprint = (array)$file->content(); $file->free(); ...
[ "public", "static", "function", "getBlueprints", "(", "$", "source", ")", "{", "$", "blueprint_file", "=", "$", "source", ".", "'blueprints.yaml'", ";", "if", "(", "!", "file_exists", "(", "$", "blueprint_file", ")", ")", "{", "return", "false", ";", "}", ...
Find/Parse the blueprint file @param string $source @return array|bool
[ "Find", "/", "Parse", "the", "blueprint", "file" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/GPM/GPM.php#L624-L636
train
Get blueprints from source
[ 30522, 2270, 10763, 3853, 2131, 16558, 5657, 16550, 2015, 1006, 1002, 3120, 1007, 1063, 1002, 2630, 16550, 1035, 5371, 1027, 1002, 3120, 1012, 1005, 2630, 16550, 2015, 1012, 8038, 19968, 1005, 1025, 2065, 1006, 999, 5371, 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/Intl/DateFormatter/DateFormat/Transformer.php
Transformer.padLeft
protected function padLeft(string $value, int $length): string { return str_pad($value, $length, '0', STR_PAD_LEFT); }
php
protected function padLeft(string $value, int $length): string { return str_pad($value, $length, '0', STR_PAD_LEFT); }
[ "protected", "function", "padLeft", "(", "string", "$", "value", ",", "int", "$", "length", ")", ":", "string", "{", "return", "str_pad", "(", "$", "value", ",", "$", "length", ",", "'0'", ",", "STR_PAD_LEFT", ")", ";", "}" ]
Pad a string with zeros to the left. @param string $value The string to be padded @param int $length The length to pad @return string The padded string
[ "Pad", "a", "string", "with", "zeros", "to", "the", "left", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Intl/DateFormatter/DateFormat/Transformer.php#L62-L65
train
Pad left with zeroes
[ 30522, 5123, 3853, 11687, 2571, 6199, 1006, 5164, 1002, 3643, 1010, 20014, 1002, 3091, 1007, 1024, 5164, 1063, 2709, 2358, 2099, 1035, 11687, 1006, 1002, 3643, 1010, 1002, 3091, 1010, 1005, 1014, 1005, 1010, 2358, 2099, 1035, 11687, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Type/FormType.php
FormType.buildForm
public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); $isDataOptionSet = \array_key_exists('data', $options); $builder ->setRequired($options['required']) ->setErrorBubbling($options['error_bubbling']) ...
php
public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); $isDataOptionSet = \array_key_exists('data', $options); $builder ->setRequired($options['required']) ->setErrorBubbling($options['error_bubbling']) ...
[ "public", "function", "buildForm", "(", "FormBuilderInterface", "$", "builder", ",", "array", "$", "options", ")", "{", "parent", "::", "buildForm", "(", "$", "builder", ",", "$", "options", ")", ";", "$", "isDataOptionSet", "=", "\\", "array_key_exists", "(...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/Extension/Core/Type/FormType.php#L37-L61
train
This method is called by the parent class to build the form.
[ 30522, 2270, 3853, 3857, 14192, 1006, 2433, 8569, 23891, 6657, 3334, 12172, 1002, 12508, 1010, 9140, 1002, 7047, 1007, 1063, 6687, 1024, 1024, 3857, 14192, 1006, 1002, 12508, 1010, 1002, 7047, 1007, 1025, 1002, 2003, 2850, 28555, 16790, 134...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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._execute
public function _execute(array $params = null) { try { if ($params !== null) { return $this->_stmt->execute($params); } else { return $this->_stmt->execute(); } } catch (PDOException $e) { // require_once 'Zend/Db/Statem...
php
public function _execute(array $params = null) { try { if ($params !== null) { return $this->_stmt->execute($params); } else { return $this->_stmt->execute(); } } catch (PDOException $e) { // require_once 'Zend/Db/Statem...
[ "public", "function", "_execute", "(", "array", "$", "params", "=", "null", ")", "{", "try", "{", "if", "(", "$", "params", "!==", "null", ")", "{", "return", "$", "this", "->", "_stmt", "->", "execute", "(", "$", "params", ")", ";", "}", "else", ...
Executes a prepared statement. @param array $params OPTIONAL Values to bind to parameter placeholders. @return bool @throws Zend_Db_Statement_Exception
[ "Executes", "a", "prepared", "statement", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Statement/Pdo.php#L224-L236
train
Execute the statement
[ 30522, 2270, 3853, 1035, 15389, 1006, 9140, 1002, 11498, 5244, 1027, 19701, 1007, 1063, 3046, 1063, 2065, 1006, 1002, 11498, 5244, 999, 1027, 1027, 19701, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 1035, 2358, 20492, 1011, 1028, 15389, 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/Encoder/BCryptPasswordEncoder.php
BCryptPasswordEncoder.isPasswordValid
public function isPasswordValid($encoded, $raw, $salt) { return !$this->isPasswordTooLong($raw) && password_verify($raw, $encoded); }
php
public function isPasswordValid($encoded, $raw, $salt) { return !$this->isPasswordTooLong($raw) && password_verify($raw, $encoded); }
[ "public", "function", "isPasswordValid", "(", "$", "encoded", ",", "$", "raw", ",", "$", "salt", ")", "{", "return", "!", "$", "this", "->", "isPasswordTooLong", "(", "$", "raw", ")", "&&", "password_verify", "(", "$", "raw", ",", "$", "encoded", ")", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php#L83-L86
train
Protected is password valid
[ 30522, 2270, 3853, 2003, 15194, 18351, 10175, 3593, 1006, 1002, 12359, 1010, 1002, 6315, 1010, 1002, 5474, 1007, 1063, 2709, 999, 1002, 2023, 1011, 1028, 2003, 15194, 18351, 3406, 12898, 3070, 1006, 1002, 6315, 1007, 1004, 1004, 20786, 1035...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/ValidatesAttributes.php
ValidatesAttributes.validateRequiredWithAll
public function validateRequiredWithAll($attribute, $value, $parameters) { if (! $this->anyFailingRequired($parameters)) { return $this->validateRequired($attribute, $value); } return true; }
php
public function validateRequiredWithAll($attribute, $value, $parameters) { if (! $this->anyFailingRequired($parameters)) { return $this->validateRequired($attribute, $value); } return true; }
[ "public", "function", "validateRequiredWithAll", "(", "$", "attribute", ",", "$", "value", ",", "$", "parameters", ")", "{", "if", "(", "!", "$", "this", "->", "anyFailingRequired", "(", "$", "parameters", ")", ")", "{", "return", "$", "this", "->", "val...
Validate that an attribute exists when all other attributes exists. @param string $attribute @param mixed $value @param mixed $parameters @return bool
[ "Validate", "that", "an", "attribute", "exists", "when", "all", "other", "attributes", "exists", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L1409-L1416
train
Validate that all required parameters are met
[ 30522, 2270, 3853, 9398, 24932, 2063, 15549, 5596, 24415, 8095, 1006, 1002, 17961, 1010, 1002, 3643, 1010, 1002, 11709, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 2151, 7011, 16281, 2890, 15549, 30524, 0, 0, 0, 0, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/ApcWrapper.php
ApcWrapper.decrement
public function decrement($key, $value) { return $this->apcu ? apcu_dec($key, $value) : apc_dec($key, $value); }
php
public function decrement($key, $value) { return $this->apcu ? apcu_dec($key, $value) : apc_dec($key, $value); }
[ "public", "function", "decrement", "(", "$", "key", ",", "$", "value", ")", "{", "return", "$", "this", "->", "apcu", "?", "apcu_dec", "(", "$", "key", ",", "$", "value", ")", ":", "apc_dec", "(", "$", "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/ApcWrapper.php#L67-L70
train
Decrement the value of the key in the APC or APCU cache
[ 30522, 2270, 3853, 11703, 28578, 4765, 1006, 1002, 3145, 1010, 1002, 3643, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 9706, 10841, 1029, 9706, 10841, 1035, 11703, 1006, 1002, 3145, 1010, 1002, 3643, 1007, 1024, 9706, 2278, 1035, 11703, 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/Http/RedirectResponse.php
RedirectResponse.removeFilesFromInput
protected function removeFilesFromInput(array $input) { foreach ($input as $key => $value) { if (is_array($value)) { $input[$key] = $this->removeFilesFromInput($value); } if ($value instanceof SymfonyUploadedFile) { unset($input[$key]); ...
php
protected function removeFilesFromInput(array $input) { foreach ($input as $key => $value) { if (is_array($value)) { $input[$key] = $this->removeFilesFromInput($value); } if ($value instanceof SymfonyUploadedFile) { unset($input[$key]); ...
[ "protected", "function", "removeFilesFromInput", "(", "array", "$", "input", ")", "{", "foreach", "(", "$", "input", "as", "$", "key", "=>", "$", "value", ")", "{", "if", "(", "is_array", "(", "$", "value", ")", ")", "{", "$", "input", "[", "$", "k...
Remove all uploaded files form the given input array. @param array $input @return array
[ "Remove", "all", "uploaded", "files", "form", "the", "given", "input", "array", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Http/RedirectResponse.php#L89-L102
train
Remove files from input array
[ 30522, 5123, 3853, 6366, 8873, 4244, 19699, 20936, 16275, 4904, 1006, 9140, 1002, 7953, 1007, 1063, 30524, 1006, 1002, 3643, 1007, 1025, 1065, 2065, 1006, 1002, 3643, 6013, 11253, 25353, 2213, 14876, 4890, 6279, 17468, 8873, 2571, 1007, 106...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Pop3.php
Zend_Mail_Protocol_Pop3.login
public function login($user, $password, $tryApop = true) { if ($tryApop && $this->_timestamp) { try { $this->request("APOP $user " . md5($this->_timestamp . $password)); return; } catch (Zend_Mail_Protocol_Exception $e) { // ignore ...
php
public function login($user, $password, $tryApop = true) { if ($tryApop && $this->_timestamp) { try { $this->request("APOP $user " . md5($this->_timestamp . $password)); return; } catch (Zend_Mail_Protocol_Exception $e) { // ignore ...
[ "public", "function", "login", "(", "$", "user", ",", "$", "password", ",", "$", "tryApop", "=", "true", ")", "{", "if", "(", "$", "tryApop", "&&", "$", "this", "->", "_timestamp", ")", "{", "try", "{", "$", "this", "->", "request", "(", "\"APOP $u...
Login to POP3 server. Can use APOP @param string $user username @param string $password password @param bool $try_apop should APOP be tried? @return void @throws Zend_Mail_Protocol_Exception
[ "Login", "to", "POP3", "server", ".", "Can", "use", "APOP" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail/Protocol/Pop3.php#L270-L283
train
Login to the server
[ 30522, 2270, 3853, 8833, 2378, 1006, 1002, 5310, 1010, 1002, 20786, 1010, 1002, 3046, 9331, 7361, 1027, 2995, 1007, 1063, 2065, 1006, 1002, 3046, 9331, 7361, 1004, 1004, 1002, 2023, 1011, 1028, 1035, 2335, 15464, 2361, 1007, 1063, 3046, 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...
octobercms/october
modules/system/traits/ConfigMaker.php
ConfigMaker.makeConfig
public function makeConfig($configFile = [], $requiredConfig = []) { if (!$configFile) { $configFile = []; } /* * Config already made */ if (is_object($configFile)) { $config = $configFile; } /* * Embedded config ...
php
public function makeConfig($configFile = [], $requiredConfig = []) { if (!$configFile) { $configFile = []; } /* * Config already made */ if (is_object($configFile)) { $config = $configFile; } /* * Embedded config ...
[ "public", "function", "makeConfig", "(", "$", "configFile", "=", "[", "]", ",", "$", "requiredConfig", "=", "[", "]", ")", "{", "if", "(", "!", "$", "configFile", ")", "{", "$", "configFile", "=", "[", "]", ";", "}", "/*\n * Config already made\n...
Reads the contents of the supplied file and applies it to this object. @param array $configFile @param array $requiredConfig @return array|stdClass
[ "Reads", "the", "contents", "of", "the", "supplied", "file", "and", "applies", "it", "to", "this", "object", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/traits/ConfigMaker.php#L32-L100
train
Build config from file or array
[ 30522, 2270, 3853, 2191, 8663, 8873, 2290, 1006, 1002, 9530, 8873, 25708, 9463, 1027, 1031, 1033, 1010, 1002, 3223, 8663, 8873, 2290, 1027, 1031, 1033, 1007, 1063, 2065, 1006, 999, 1002, 9530, 8873, 25708, 9463, 1007, 1063, 1002, 9530, 88...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/CoreConsole/Commands/CoreArchiver.php
CoreArchiver.configureArchiveCommand
public static function configureArchiveCommand(ConsoleCommand $command) { $command->setName('core:archive'); $command->setDescription("Runs the CLI archiver. It is an important tool for general maintenance and to keep Piwik very fast."); $command->setHelp("* It is recommended to run the scri...
php
public static function configureArchiveCommand(ConsoleCommand $command) { $command->setName('core:archive'); $command->setDescription("Runs the CLI archiver. It is an important tool for general maintenance and to keep Piwik very fast."); $command->setHelp("* It is recommended to run the scri...
[ "public", "static", "function", "configureArchiveCommand", "(", "ConsoleCommand", "$", "command", ")", "{", "$", "command", "->", "setName", "(", "'core:archive'", ")", ";", "$", "command", "->", "setDescription", "(", "\"Runs the CLI archiver. It is an important tool f...
This is reused by another console command
[ "This", "is", "reused", "by", "another", "console", "command" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/CoreConsole/Commands/CoreArchiver.php#L72-L124
train
Configure the archiver command
[ 30522, 2270, 10763, 3853, 9530, 8873, 27390, 14644, 5428, 3726, 9006, 2386, 2094, 1006, 10122, 9006, 2386, 2094, 1002, 3094, 1007, 1063, 1002, 3094, 1011, 1028, 2275, 18442, 1006, 1005, 4563, 1024, 8756, 1005, 1007, 1025, 1002, 3094, 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...
z-song/laravel-admin
src/Grid/Tools/TotalRow.php
TotalRow.render
public function render() { $columns = $this->getGrid()->columns()->flatMap(function (Column $column) { $name = $column->getName(); $total = ($display = Arr::get($this->columns, $name)) ? $this->total($name, $display) : ''; return [$name => $total]; })->toArray()...
php
public function render() { $columns = $this->getGrid()->columns()->flatMap(function (Column $column) { $name = $column->getName(); $total = ($display = Arr::get($this->columns, $name)) ? $this->total($name, $display) : ''; return [$name => $total]; })->toArray()...
[ "public", "function", "render", "(", ")", "{", "$", "columns", "=", "$", "this", "->", "getGrid", "(", ")", "->", "columns", "(", ")", "->", "flatMap", "(", "function", "(", "Column", "$", "column", ")", "{", "$", "name", "=", "$", "column", "->", ...
Render total-row. @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
[ "Render", "total", "-", "row", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Grid/Tools/TotalRow.php#L62-L73
train
Render total row
[ 30522, 2270, 3853, 17552, 1006, 1007, 1063, 1002, 7753, 1027, 1002, 2023, 1011, 1028, 2131, 16523, 3593, 1006, 1007, 1011, 1028, 7753, 1006, 1007, 1011, 1028, 4257, 2863, 2361, 1006, 3853, 1006, 5930, 1002, 5930, 1007, 1063, 1002, 2171, 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/UserCountry/LocationProvider/GeoIp/Pecl.php
Pecl.isWorking
public function isWorking() { // if no no location database is available, this implementation is not setup correctly if (!self::isLocationDatabaseAvailable()) { $dbDir = dirname(geoip_db_filename(GEOIP_COUNTRY_EDITION)) . '/'; $quotedDir = "'$dbDir'"; // check if...
php
public function isWorking() { // if no no location database is available, this implementation is not setup correctly if (!self::isLocationDatabaseAvailable()) { $dbDir = dirname(geoip_db_filename(GEOIP_COUNTRY_EDITION)) . '/'; $quotedDir = "'$dbDir'"; // check if...
[ "public", "function", "isWorking", "(", ")", "{", "// if no no location database is available, this implementation is not setup correctly", "if", "(", "!", "self", "::", "isLocationDatabaseAvailable", "(", ")", ")", "{", "$", "dbDir", "=", "dirname", "(", "geoip_db_filena...
Returns true if the PECL module that is installed can be successfully used to get the location of an IP address. @return bool
[ "Returns", "true", "if", "the", "PECL", "module", "that", "is", "installed", "can", "be", "successfully", "used", "to", "get", "the", "location", "of", "an", "IP", "address", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/UserCountry/LocationProvider/GeoIp/Pecl.php#L122-L145
train
Returns true if the location database is available and false if not
[ 30522, 2270, 3853, 2003, 21398, 1006, 1007, 1063, 1013, 1013, 2065, 2053, 2053, 3295, 7809, 2003, 2800, 1010, 2023, 7375, 2003, 2025, 16437, 11178, 2065, 1006, 999, 2969, 1024, 1024, 2003, 4135, 10719, 2850, 2696, 15058, 12462, 11733, 3468,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/system/classes/MailManager.php
MailManager.startTwig
protected function startTwig() { if ($this->isTwigStarted) { return; } $this->isTwigStarted = true; $markupManager = MarkupManager::instance(); $markupManager->beginTransaction(); $markupManager->registerTokenParsers([ new MailPartialTokenPar...
php
protected function startTwig() { if ($this->isTwigStarted) { return; } $this->isTwigStarted = true; $markupManager = MarkupManager::instance(); $markupManager->beginTransaction(); $markupManager->registerTokenParsers([ new MailPartialTokenPar...
[ "protected", "function", "startTwig", "(", ")", "{", "if", "(", "$", "this", "->", "isTwigStarted", ")", "{", "return", ";", "}", "$", "this", "->", "isTwigStarted", "=", "true", ";", "$", "markupManager", "=", "MarkupManager", "::", "instance", "(", ")"...
Temporarily registers mail based token parsers with Twig. @return void
[ "Temporarily", "registers", "mail", "based", "token", "parsers", "with", "Twig", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/classes/MailManager.php#L296-L309
train
Starts Twig.
[ 30522, 5123, 3853, 2707, 2102, 16279, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 21541, 16279, 14117, 3064, 1007, 1063, 2709, 1025, 1065, 1002, 2023, 1011, 1028, 21541, 16279, 14117, 3064, 1027, 2995, 1025, 1002, 2928, 6279, 2480...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Console/Style/SymfonyStyle.php
SymfonyStyle.table
public function table(array $headers, array $rows) { $style = clone Table::getStyleDefinition('symfony-style-guide'); $style->setCellHeaderFormat('<info>%s</info>'); $table = new Table($this); $table->setHeaders($headers); $table->setRows($rows); $table->setStyle($st...
php
public function table(array $headers, array $rows) { $style = clone Table::getStyleDefinition('symfony-style-guide'); $style->setCellHeaderFormat('<info>%s</info>'); $table = new Table($this); $table->setHeaders($headers); $table->setRows($rows); $table->setStyle($st...
[ "public", "function", "table", "(", "array", "$", "headers", ",", "array", "$", "rows", ")", "{", "$", "style", "=", "clone", "Table", "::", "getStyleDefinition", "(", "'symfony-style-guide'", ")", ";", "$", "style", "->", "setCellHeaderFormat", "(", "'<info...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Style/SymfonyStyle.php#L179-L191
train
Table to be rendered
[ 30522, 2270, 3853, 2795, 1006, 9140, 1002, 20346, 2015, 1010, 9140, 1002, 10281, 1007, 1063, 1002, 2806, 1027, 17598, 2795, 1024, 1024, 4152, 27983, 3207, 16294, 22753, 1006, 1005, 25353, 2213, 14876, 4890, 1011, 2806, 1011, 5009, 1005, 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...
symfony/symfony
src/Symfony/Component/HttpFoundation/Request.php
Request.getPathInfo
public function getPathInfo() { if (null === $this->pathInfo) { $this->pathInfo = $this->preparePathInfo(); } return $this->pathInfo; }
php
public function getPathInfo() { if (null === $this->pathInfo) { $this->pathInfo = $this->preparePathInfo(); } return $this->pathInfo; }
[ "public", "function", "getPathInfo", "(", ")", "{", "if", "(", "null", "===", "$", "this", "->", "pathInfo", ")", "{", "$", "this", "->", "pathInfo", "=", "$", "this", "->", "preparePathInfo", "(", ")", ";", "}", "return", "$", "this", "->", "pathInf...
Returns the path being requested relative to the executed script. The path info always starts with a /. Suppose this request is instantiated from /mysite on localhost: * http://localhost/mysite returns an empty string * http://localhost/mysite/about returns '/about' * http://localhost/mysite/enco...
[ "Returns", "the", "path", "being", "requested", "relative", "to", "the", "executed", "script", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Request.php#L831-L838
train
Get the pathname of the current request
[ 30522, 2270, 3853, 2131, 15069, 2378, 14876, 1006, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 1027, 1002, 2023, 1011, 1028, 4130, 2378, 14876, 1007, 1063, 1002, 2023, 1011, 1028, 4130, 2378, 14876, 1027, 1002, 2023, 1011, 1028, 7374, 15069,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.compileForeign
public function compileForeign(Blueprint $blueprint, Fluent $command) { $sql = parent::compileForeign($blueprint, $command); if (! is_null($command->deferrable)) { $sql .= $command->deferrable ? ' deferrable' : ' not deferrable'; } if ($command->deferrable && ! is_null(...
php
public function compileForeign(Blueprint $blueprint, Fluent $command) { $sql = parent::compileForeign($blueprint, $command); if (! is_null($command->deferrable)) { $sql .= $command->deferrable ? ' deferrable' : ' not deferrable'; } if ($command->deferrable && ! is_null(...
[ "public", "function", "compileForeign", "(", "Blueprint", "$", "blueprint", ",", "Fluent", "$", "command", ")", "{", "$", "sql", "=", "parent", "::", "compileForeign", "(", "$", "blueprint", ",", "$", "command", ")", ";", "if", "(", "!", "is_null", "(", ...
Compile a foreign key command. @param \Illuminate\Database\Schema\Blueprint $blueprint @param \Illuminate\Support\Fluent $command @return string
[ "Compile", "a", "foreign", "key", "command", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php#L157-L174
train
Compiles foreign key fields into SQL
[ 30522, 2270, 3853, 4012, 22090, 29278, 7416, 16206, 1006, 2630, 16550, 1002, 2630, 16550, 1010, 19376, 1002, 3094, 1007, 1063, 1002, 29296, 1027, 6687, 1024, 1024, 4012, 22090, 29278, 7416, 16206, 1006, 1002, 2630, 16550, 1010, 1002, 3094, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...