repo
stringclasses
21 values
path
stringlengths
10
105
func_name
stringlengths
6
64
original_string
stringlengths
105
15.6k
language
stringclasses
1 value
code
stringlengths
105
15.6k
code_tokens
listlengths
29
2.15k
docstring
stringlengths
11
2.85k
docstring_tokens
listlengths
1
290
sha
stringclasses
21 values
url
stringlengths
100
194
partition
stringclasses
1 value
summary
stringlengths
8
319
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
laravel/framework
src/Illuminate/Http/Resources/ConditionallyLoadsAttributes.php
ConditionallyLoadsAttributes.filter
protected function filter($data) { $index = -1; foreach ($data as $key => $value) { $index++; if (is_array($value)) { $data[$key] = $this->filter($value); continue; } if (is_numeric($key) && $value instanceof MergeVa...
php
protected function filter($data) { $index = -1; foreach ($data as $key => $value) { $index++; if (is_array($value)) { $data[$key] = $this->filter($value); continue; } if (is_numeric($key) && $value instanceof MergeVa...
[ "protected", "function", "filter", "(", "$", "data", ")", "{", "$", "index", "=", "-", "1", ";", "foreach", "(", "$", "data", "as", "$", "key", "=>", "$", "value", ")", "{", "$", "index", "++", ";", "if", "(", "is_array", "(", "$", "value", ")"...
Filter the given data, removing any optional values. @param array $data @return array
[ "Filter", "the", "given", "data", "removing", "any", "optional", "values", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Http/Resources/ConditionallyLoadsAttributes.php#L15-L41
train
Filter the data and return the result
[ 30522, 5123, 3853, 11307, 1006, 1002, 2951, 1007, 1063, 1002, 5950, 1027, 1011, 1015, 1025, 18921, 6776, 1006, 1002, 2951, 2004, 1002, 3145, 1027, 1028, 1002, 3643, 1007, 1063, 1002, 5950, 1009, 1009, 1025, 2065, 1006, 2003, 1035, 9140, 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/Archive.php
Archive.getDataTable
public function getDataTable($name, $idSubtable = null) { $data = $this->get($name, 'blob', $idSubtable); return $data->getDataTable($this->getResultIndices()); }
php
public function getDataTable($name, $idSubtable = null) { $data = $this->get($name, 'blob', $idSubtable); return $data->getDataTable($this->getResultIndices()); }
[ "public", "function", "getDataTable", "(", "$", "name", ",", "$", "idSubtable", "=", "null", ")", "{", "$", "data", "=", "$", "this", "->", "get", "(", "$", "name", ",", "'blob'", ",", "$", "idSubtable", ")", ";", "return", "$", "data", "->", "getD...
Queries and returns one or more reports as DataTable instances. This method will query blob data that is a serialized array of of {@link DataTable\Row}'s and unserialize it. If multiple sites were requested in {@link build()} or {@link factory()} the result will be a {@link DataTable\Map} that is indexed by site ID. ...
[ "Queries", "and", "returns", "one", "or", "more", "reports", "as", "DataTable", "instances", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Archive.php#L346-L350
train
Get Data Table
[ 30522, 2270, 3853, 2131, 2850, 29336, 3085, 1006, 1002, 2171, 1010, 1002, 8909, 6342, 19279, 3085, 1027, 19701, 1007, 1063, 1002, 2951, 30524, 2497, 1005, 1010, 1002, 8909, 6342, 19279, 3085, 1007, 1025, 2709, 1002, 2951, 1011, 1028, 2131, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.exists
public function exists($name) { if (!$this->validateCmsObject($name)) { return parent::exists($name); } return $this->obj->exists; }
php
public function exists($name) { if (!$this->validateCmsObject($name)) { return parent::exists($name); } return $this->obj->exists; }
[ "public", "function", "exists", "(", "$", "name", ")", "{", "if", "(", "!", "$", "this", "->", "validateCmsObject", "(", "$", "name", ")", ")", "{", "return", "parent", "::", "exists", "(", "$", "name", ")", ";", "}", "return", "$", "this", "->", ...
Checks that the template exists.
[ "Checks", "that", "the", "template", "exists", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/twig/Loader.php#L105-L112
train
Protected exists method
[ 30522, 2270, 3853, 6526, 1006, 1002, 2171, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 9398, 3686, 27487, 6499, 2497, 20614, 1006, 1002, 2171, 1007, 1007, 1063, 2709, 6687, 1024, 1024, 6526, 1006, 1002, 2171, 1007, 1025, 1065, 27...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/DependencyInjection/Definition.php
Definition.setPublic
public function setPublic($boolean) { $this->changes['public'] = true; $this->public = (bool) $boolean; $this->private = false; return $this; }
php
public function setPublic($boolean) { $this->changes['public'] = true; $this->public = (bool) $boolean; $this->private = false; return $this; }
[ "public", "function", "setPublic", "(", "$", "boolean", ")", "{", "$", "this", "->", "changes", "[", "'public'", "]", "=", "true", ";", "$", "this", "->", "public", "=", "(", "bool", ")", "$", "boolean", ";", "$", "this", "->", "private", "=", "fal...
Sets the visibility of this service. @param bool $boolean @return $this
[ "Sets", "the", "visibility", "of", "this", "service", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/Definition.php#L603-L611
train
Set the public flag
[ 30522, 2270, 3853, 2275, 14289, 16558, 2594, 1006, 1002, 22017, 20898, 1007, 1063, 1002, 2023, 1011, 1028, 3431, 1031, 1005, 2270, 1005, 1033, 1027, 2995, 1025, 1002, 2023, 1011, 1028, 2270, 1027, 1006, 22017, 2140, 1007, 1002, 22017, 20898...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Abstract.php
Zend_Db_Adapter_Pdo_Abstract._dsn
protected function _dsn() { // baseline of DSN parts $dsn = $this->_config; // don't pass the username, password, charset, persistent and driver_options in the DSN unset($dsn['username']); unset($dsn['password']); unset($dsn['options']); unset($dsn['charset']...
php
protected function _dsn() { // baseline of DSN parts $dsn = $this->_config; // don't pass the username, password, charset, persistent and driver_options in the DSN unset($dsn['username']); unset($dsn['password']); unset($dsn['options']); unset($dsn['charset']...
[ "protected", "function", "_dsn", "(", ")", "{", "// baseline of DSN parts", "$", "dsn", "=", "$", "this", "->", "_config", ";", "// don't pass the username, password, charset, persistent and driver_options in the DSN", "unset", "(", "$", "dsn", "[", "'username'", "]", "...
Creates a PDO DSN for the adapter from $this->_config settings. @return string
[ "Creates", "a", "PDO", "DSN", "for", "the", "adapter", "from", "$this", "-", ">", "_config", "settings", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Adapter/Pdo/Abstract.php#L60-L79
train
Return the DSN string
[ 30522, 5123, 3853, 1035, 16233, 2078, 1006, 1007, 1063, 1013, 1013, 26163, 1997, 16233, 2078, 3033, 1002, 16233, 2078, 1027, 1002, 2023, 1011, 1028, 1035, 9530, 8873, 2290, 1025, 1013, 1013, 2123, 1005, 1056, 3413, 1996, 5310, 18442, 1010, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Eloquent/Relations/HasOne.php
HasOne.newRelatedInstanceFor
public function newRelatedInstanceFor(Model $parent) { return $this->related->newInstance()->setAttribute( $this->getForeignKeyName(), $parent->{$this->localKey} ); }
php
public function newRelatedInstanceFor(Model $parent) { return $this->related->newInstance()->setAttribute( $this->getForeignKeyName(), $parent->{$this->localKey} ); }
[ "public", "function", "newRelatedInstanceFor", "(", "Model", "$", "parent", ")", "{", "return", "$", "this", "->", "related", "->", "newInstance", "(", ")", "->", "setAttribute", "(", "$", "this", "->", "getForeignKeyName", "(", ")", ",", "$", "parent", "-...
Make a new related instance for the given model. @param \Illuminate\Database\Eloquent\Model $parent @return \Illuminate\Database\Eloquent\Model
[ "Make", "a", "new", "related", "instance", "for", "the", "given", "model", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Relations/HasOne.php#L62-L67
train
Create a new related instance for the given parent model.
[ 30522, 2270, 3853, 2047, 16570, 4383, 7076, 26897, 29278, 1006, 2944, 1002, 6687, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 3141, 1011, 1028, 2047, 7076, 30524, 29278, 7416, 16206, 14839, 18442, 1006, 1007, 1010, 1002, 6687, 1011, 1028, 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...
laravel/framework
src/Illuminate/Container/Container.php
Container.flush
public function flush() { $this->aliases = []; $this->resolved = []; $this->bindings = []; $this->instances = []; $this->abstractAliases = []; }
php
public function flush() { $this->aliases = []; $this->resolved = []; $this->bindings = []; $this->instances = []; $this->abstractAliases = []; }
[ "public", "function", "flush", "(", ")", "{", "$", "this", "->", "aliases", "=", "[", "]", ";", "$", "this", "->", "resolved", "=", "[", "]", ";", "$", "this", "->", "bindings", "=", "[", "]", ";", "$", "this", "->", "instances", "=", "[", "]",...
Flush the container of all bindings and resolved instances. @return void
[ "Flush", "the", "container", "of", "all", "bindings", "and", "resolved", "instances", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Container/Container.php#L1172-L1179
train
Flushes all the caches
[ 30522, 2270, 3853, 13862, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 14593, 2229, 1027, 1031, 1033, 1025, 1002, 2023, 1011, 1028, 10395, 1027, 1031, 1033, 1025, 1002, 2023, 1011, 1028, 8031, 2015, 1027, 1031, 1033, 1025, 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...
php-ai/php-ml
src/Classification/Ensemble/AdaBoost.php
AdaBoost.getBestClassifier
protected function getBestClassifier(): Classifier { $ref = new ReflectionClass($this->baseClassifier); /** @var Classifier $classifier */ $classifier = count($this->classifierOptions) === 0 ? $ref->newInstance() : $ref->newInstanceArgs($this->classifierOptions); if ($classifier ins...
php
protected function getBestClassifier(): Classifier { $ref = new ReflectionClass($this->baseClassifier); /** @var Classifier $classifier */ $classifier = count($this->classifierOptions) === 0 ? $ref->newInstance() : $ref->newInstanceArgs($this->classifierOptions); if ($classifier ins...
[ "protected", "function", "getBestClassifier", "(", ")", ":", "Classifier", "{", "$", "ref", "=", "new", "ReflectionClass", "(", "$", "this", "->", "baseClassifier", ")", ";", "/** @var Classifier $classifier */", "$", "classifier", "=", "count", "(", "$", "this"...
Returns the classifier with the lowest error rate with the consideration of current sample weights
[ "Returns", "the", "classifier", "with", "the", "lowest", "error", "rate", "with", "the", "consideration", "of", "current", "sample", "weights" ]
f6aa1a59b0525b8fca3d2786d661ab3e70904016
https://github.com/php-ai/php-ml/blob/f6aa1a59b0525b8fca3d2786d661ab3e70904016/src/Classification/Ensemble/AdaBoost.php#L159-L174
train
Returns the best classifier for the current sample and target weights
[ 30522, 5123, 3853, 2131, 12681, 13535, 27102, 18095, 1006, 1007, 1024, 2465, 18095, 1063, 1002, 25416, 1027, 2047, 9185, 26266, 1006, 1002, 2023, 1011, 1028, 2918, 26266, 18095, 1007, 1025, 1013, 1008, 1008, 1030, 13075, 2465, 18095, 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...
laravel/framework
src/Illuminate/Validation/Validator.php
Validator.invalid
public function invalid() { if (! $this->messages) { $this->passes(); } return array_intersect_key( $this->data, $this->attributesThatHaveMessages() ); }
php
public function invalid() { if (! $this->messages) { $this->passes(); } return array_intersect_key( $this->data, $this->attributesThatHaveMessages() ); }
[ "public", "function", "invalid", "(", ")", "{", "if", "(", "!", "$", "this", "->", "messages", ")", "{", "$", "this", "->", "passes", "(", ")", ";", "}", "return", "array_intersect_key", "(", "$", "this", "->", "data", ",", "$", "this", "->", "attr...
Returns the data which was invalid. @return array
[ "Returns", "the", "data", "which", "was", "invalid", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Validator.php#L652-L661
train
Return array of invalid attributes
[ 30522, 2270, 3853, 19528, 1006, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 7696, 1007, 1063, 1002, 2023, 1011, 1028, 5235, 1006, 1007, 1025, 1065, 2709, 9140, 1035, 29261, 1035, 3145, 1006, 1002, 2023, 1011, 1028, 2951, 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
libs/Zend/Session/SaveHandler/DbTable.php
Zend_Session_SaveHandler_DbTable.gc
public function gc($maxlifetime) { $this->delete($this->getAdapter()->quoteIdentifier($this->_modifiedColumn, true) . ' + ' . $this->getAdapter()->quoteIdentifier($this->_lifetimeColumn, true) . ' < ' . $this->getAdapter()->quote(time())); return true; }
php
public function gc($maxlifetime) { $this->delete($this->getAdapter()->quoteIdentifier($this->_modifiedColumn, true) . ' + ' . $this->getAdapter()->quoteIdentifier($this->_lifetimeColumn, true) . ' < ' . $this->getAdapter()->quote(time())); return true; }
[ "public", "function", "gc", "(", "$", "maxlifetime", ")", "{", "$", "this", "->", "delete", "(", "$", "this", "->", "getAdapter", "(", ")", "->", "quoteIdentifier", "(", "$", "this", "->", "_modifiedColumn", ",", "true", ")", ".", "' + '", ".", "$", ...
Garbage Collection @param int $maxlifetime @return true
[ "Garbage", "Collection" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Session/SaveHandler/DbTable.php#L387-L394
train
Delete all records older than maxlifetime
[ 30522, 2270, 3853, 1043, 2278, 1006, 1002, 4098, 15509, 7292, 1007, 1063, 1002, 2023, 1011, 1028, 3972, 12870, 1006, 1002, 2023, 1011, 1028, 2131, 8447, 13876, 2121, 1006, 1007, 1011, 1028, 14686, 5178, 16778, 8873, 2121, 1006, 1002, 2023, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/FileBag.php
FileBag.set
public function set($key, $value) { if (!\is_array($value) && !$value instanceof UploadedFile) { throw new \InvalidArgumentException('An uploaded file must be an array or an instance of UploadedFile.'); } parent::set($key, $this->convertFileInformation($value)); }
php
public function set($key, $value) { if (!\is_array($value) && !$value instanceof UploadedFile) { throw new \InvalidArgumentException('An uploaded file must be an array or an instance of UploadedFile.'); } parent::set($key, $this->convertFileInformation($value)); }
[ "public", "function", "set", "(", "$", "key", ",", "$", "value", ")", "{", "if", "(", "!", "\\", "is_array", "(", "$", "value", ")", "&&", "!", "$", "value", "instanceof", "UploadedFile", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(",...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/FileBag.php#L46-L53
train
Set an uploaded file
[ 30522, 2270, 3853, 2275, 1006, 1002, 3145, 1010, 1002, 3643, 1007, 1063, 2065, 1006, 999, 1032, 2003, 1035, 9140, 1006, 1002, 3643, 1007, 1004, 1004, 999, 1002, 3643, 6013, 11253, 21345, 8873, 2571, 1007, 1063, 5466, 2047, 1032, 19528, 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...
octobercms/october
modules/backend/classes/NavigationManager.php
NavigationManager.filterItemPermissions
protected function filterItemPermissions($user, array $items) { if (!$user) { return $items; } $items = array_filter($items, function ($item) use ($user) { if (!$item->permissions || !count($item->permissions)) { return true; } ...
php
protected function filterItemPermissions($user, array $items) { if (!$user) { return $items; } $items = array_filter($items, function ($item) use ($user) { if (!$item->permissions || !count($item->permissions)) { return true; } ...
[ "protected", "function", "filterItemPermissions", "(", "$", "user", ",", "array", "$", "items", ")", "{", "if", "(", "!", "$", "user", ")", "{", "return", "$", "items", ";", "}", "$", "items", "=", "array_filter", "(", "$", "items", ",", "function", ...
Removes menu items from an array if the supplied user lacks permission. @param User $user A user object @param array $items A collection of menu items @return array The filtered menu items
[ "Removes", "menu", "items", "from", "an", "array", "if", "the", "supplied", "user", "lacks", "permission", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/classes/NavigationManager.php#L478-L493
train
Filter items by permissions
[ 30522, 5123, 3853, 11307, 4221, 8737, 2121, 25481, 2015, 1006, 1002, 5310, 1010, 9140, 1002, 5167, 1007, 1063, 2065, 1006, 999, 1002, 5310, 1007, 1063, 2709, 1002, 5167, 1025, 1065, 1002, 5167, 1027, 9140, 1035, 11307, 1006, 1002, 5167, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Cache/Backend/WinCache.php
Zend_Cache_Backend_WinCache.save
public function save($data, $id, $tags = array(), $specificLifetime = false) { $lifetime = $this->getLifetime($specificLifetime); $result = wincache_ucache_set($id, array($data, time(), $lifetime), $lifetime); if (count($tags) > 0) { $this->_log(self::TAGS_UNSUPPORTED_BY_SAVE_OF_...
php
public function save($data, $id, $tags = array(), $specificLifetime = false) { $lifetime = $this->getLifetime($specificLifetime); $result = wincache_ucache_set($id, array($data, time(), $lifetime), $lifetime); if (count($tags) > 0) { $this->_log(self::TAGS_UNSUPPORTED_BY_SAVE_OF_...
[ "public", "function", "save", "(", "$", "data", ",", "$", "id", ",", "$", "tags", "=", "array", "(", ")", ",", "$", "specificLifetime", "=", "false", ")", "{", "$", "lifetime", "=", "$", "this", "->", "getLifetime", "(", "$", "specificLifetime", ")",...
Save some string datas into a cache record Note : $data is always "string" (serialization is done by the core not by the backend) @param string $data datas to cache @param string $id cache id @param array $tags array of strings, the cache record will be tagged by each string entry @param int $specificLifetime if != f...
[ "Save", "some", "string", "datas", "into", "a", "cache", "record" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Cache/Backend/WinCache.php#L109-L117
train
Save data into the cache
[ 30522, 2270, 3853, 3828, 1006, 1002, 2951, 1010, 1002, 8909, 1010, 1002, 22073, 1027, 9140, 1006, 1007, 1010, 1002, 3563, 15509, 7292, 1027, 6270, 1007, 1063, 1002, 6480, 1027, 1002, 2023, 1011, 1028, 2131, 15509, 7292, 1006, 1002, 3563, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/NumberFormatter/NumberFormatter.php
NumberFormatter.getTextAttribute
public function getTextAttribute($attr) { return \array_key_exists($this->style, self::$enTextAttributes) && \array_key_exists($attr, self::$enTextAttributes[$this->style]) ? self::$enTextAttributes[$this->style][$attr] : false; }
php
public function getTextAttribute($attr) { return \array_key_exists($this->style, self::$enTextAttributes) && \array_key_exists($attr, self::$enTextAttributes[$this->style]) ? self::$enTextAttributes[$this->style][$attr] : false; }
[ "public", "function", "getTextAttribute", "(", "$", "attr", ")", "{", "return", "\\", "array_key_exists", "(", "$", "this", "->", "style", ",", "self", "::", "$", "enTextAttributes", ")", "&&", "\\", "array_key_exists", "(", "$", "attr", ",", "self", "::",...
Not supported. Returns a formatter text attribute value. @param int $attr An attribute specifier, one of the text attribute constants @return bool|string The attribute value or false on error @see http://www.php.net/manual/en/numberformatter.gettextattribute.php
[ "Not", "supported", ".", "Returns", "a", "formatter", "text", "attribute", "value", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php#L475-L478
train
Get the value of a text attribute
[ 30522, 2270, 3853, 2131, 18209, 19321, 3089, 8569, 2618, 1006, 1002, 2012, 16344, 1007, 1063, 2709, 1032, 9140, 1035, 3145, 1035, 6526, 1006, 1002, 2023, 1011, 1028, 2806, 1010, 2969, 1024, 1024, 1002, 4372, 18209, 19321, 3089, 8569, 4570, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Connectors/Connector.php
Connector.createConnection
public function createConnection($dsn, array $config, array $options) { [$username, $password] = [ $config['username'] ?? null, $config['password'] ?? null, ]; try { return $this->createPdoConnection( $dsn, $username, $password, $options )...
php
public function createConnection($dsn, array $config, array $options) { [$username, $password] = [ $config['username'] ?? null, $config['password'] ?? null, ]; try { return $this->createPdoConnection( $dsn, $username, $password, $options )...
[ "public", "function", "createConnection", "(", "$", "dsn", ",", "array", "$", "config", ",", "array", "$", "options", ")", "{", "[", "$", "username", ",", "$", "password", "]", "=", "[", "$", "config", "[", "'username'", "]", "??", "null", ",", "$", ...
Create a new PDO connection. @param string $dsn @param array $config @param array $options @return \PDO @throws \Exception
[ "Create", "a", "new", "PDO", "connection", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Connectors/Connector.php#L38-L53
train
Create a new PDO connection
[ 30522, 2270, 3853, 3443, 8663, 2638, 7542, 1006, 1002, 16233, 2078, 1010, 9140, 1002, 9530, 8873, 2290, 1010, 9140, 1002, 7047, 1007, 1063, 1031, 1002, 5310, 18442, 1010, 1002, 20786, 1033, 1027, 1031, 1002, 9530, 8873, 2290, 1031, 1005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dompdf/dompdf
lib/Cpdf.php
Cpdf.o_cidSystemInfo
protected function o_cidSystemInfo($id, $action) { switch ($action) { case 'new': $this->objects[$id] = array( 't' => 'cidSystemInfo' ); break; case 'add': break; case 'out': ...
php
protected function o_cidSystemInfo($id, $action) { switch ($action) { case 'new': $this->objects[$id] = array( 't' => 'cidSystemInfo' ); break; case 'add': break; case 'out': ...
[ "protected", "function", "o_cidSystemInfo", "(", "$", "id", ",", "$", "action", ")", "{", "switch", "(", "$", "action", ")", "{", "case", "'new'", ":", "$", "this", "->", "objects", "[", "$", "id", "]", "=", "array", "(", "'t'", "=>", "'cidSystemInfo...
CID system info section, needed for unicode fonts @param $id @param $action @return null|string
[ "CID", "system", "info", "section", "needed", "for", "unicode", "fonts" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/lib/Cpdf.php#L1230-L1264
train
o_cidSystemInfo - cidSystemInfo - cidSystemInfo - cidSystemInfo - cidSystemInfo - cidSystemInfo - cidSystemInfo - cidSystemInfo - cidSystemInfo - cidSystemInfo - cidSystemInfo - cidSystemInfo - cidSystemInfo - cidSystemInfo - cidSystemInfo - cidSystemInfo - cidSystemInfo - cidSystemInfo - cidSystemInfo - cidSystemInfo
[ 30522, 5123, 3853, 1051, 1035, 28744, 6508, 13473, 10020, 14876, 1006, 1002, 8909, 1010, 1002, 2895, 1007, 1063, 6942, 1006, 1002, 2895, 1007, 1063, 2553, 1005, 2047, 1005, 1024, 1002, 2023, 1011, 1028, 5200, 1031, 1002, 8909, 1033, 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/NumberFormatter.php
NumberFormatter.formatPercentEvolution
public function formatPercentEvolution($value) { $isPositiveEvolution = !empty($value) && ($value > 0 || $value[0] == '+'); $formatted = self::formatPercent($value); if ($isPositiveEvolution) { // $this->symbols has already been initialized from formatPercent(). $la...
php
public function formatPercentEvolution($value) { $isPositiveEvolution = !empty($value) && ($value > 0 || $value[0] == '+'); $formatted = self::formatPercent($value); if ($isPositiveEvolution) { // $this->symbols has already been initialized from formatPercent(). $la...
[ "public", "function", "formatPercentEvolution", "(", "$", "value", ")", "{", "$", "isPositiveEvolution", "=", "!", "empty", "(", "$", "value", ")", "&&", "(", "$", "value", ">", "0", "||", "$", "value", "[", "0", "]", "==", "'+'", ")", ";", "$", "f...
Formats given number as percent value, but keep the leading + sign if found @param $value @return string
[ "Formats", "given", "number", "as", "percent", "value", "but", "keep", "the", "leading", "+", "sign", "if", "found" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/NumberFormatter.php#L106-L118
train
Format percent evolution
[ 30522, 2270, 3853, 4289, 4842, 13013, 6777, 4747, 13700, 1006, 1002, 3643, 1007, 1063, 1002, 2003, 6873, 28032, 3512, 6777, 4747, 13700, 1027, 999, 4064, 1006, 1002, 3643, 1007, 1004, 1004, 1006, 1002, 3643, 1028, 1014, 1064, 1064, 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...
laravel/framework
src/Illuminate/Queue/Queue.php
Queue.withCreatePayloadHooks
protected function withCreatePayloadHooks($queue, array $payload) { if (! empty(static::$createPayloadCallbacks)) { foreach (static::$createPayloadCallbacks as $callback) { $payload = array_merge($payload, call_user_func( $callback, $this->getConnectionName(),...
php
protected function withCreatePayloadHooks($queue, array $payload) { if (! empty(static::$createPayloadCallbacks)) { foreach (static::$createPayloadCallbacks as $callback) { $payload = array_merge($payload, call_user_func( $callback, $this->getConnectionName(),...
[ "protected", "function", "withCreatePayloadHooks", "(", "$", "queue", ",", "array", "$", "payload", ")", "{", "if", "(", "!", "empty", "(", "static", "::", "$", "createPayloadCallbacks", ")", ")", "{", "foreach", "(", "static", "::", "$", "createPayloadCallb...
Create the given payload using any registered payload hooks. @param string $queue @param array $payload @return array
[ "Create", "the", "given", "payload", "using", "any", "registered", "payload", "hooks", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Queue/Queue.php#L234-L245
train
Create payload hooks
[ 30522, 5123, 3853, 2007, 16748, 3686, 4502, 8516, 10441, 16425, 14659, 2015, 1006, 1002, 24240, 1010, 9140, 1002, 18093, 1007, 1063, 2065, 1006, 999, 4064, 1006, 10763, 1024, 1024, 1002, 3443, 4502, 8516, 10441, 16409, 8095, 12221, 1007, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpFoundation/BinaryFileResponse.php
BinaryFileResponse.sendContent
public function sendContent() { if (!$this->isSuccessful()) { return parent::sendContent(); } if (0 === $this->maxlen) { return $this; } $out = fopen('php://output', 'wb'); $file = fopen($this->file->getPathname(), 'rb'); stream_copy...
php
public function sendContent() { if (!$this->isSuccessful()) { return parent::sendContent(); } if (0 === $this->maxlen) { return $this; } $out = fopen('php://output', 'wb'); $file = fopen($this->file->getPathname(), 'rb'); stream_copy...
[ "public", "function", "sendContent", "(", ")", "{", "if", "(", "!", "$", "this", "->", "isSuccessful", "(", ")", ")", "{", "return", "parent", "::", "sendContent", "(", ")", ";", "}", "if", "(", "0", "===", "$", "this", "->", "maxlen", ")", "{", ...
Sends the file. {@inheritdoc}
[ "Sends", "the", "file", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php#L285-L308
train
Send content to the file
[ 30522, 2270, 3853, 4604, 8663, 6528, 2102, 1006, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 26354, 14194, 9623, 22747, 5313, 1006, 1007, 1007, 1063, 2709, 6687, 1024, 1024, 4604, 8663, 6528, 2102, 1006, 1007, 1025, 1065, 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...
matomo-org/matomo
core/Url.php
Url.getCurrentUrlWithoutQueryString
public static function getCurrentUrlWithoutQueryString($checkTrustedHost = true) { return self::getCurrentScheme() . '://' . self::getCurrentHost($default = 'unknown', $checkTrustedHost) . self::getCurrentScriptName(false); }
php
public static function getCurrentUrlWithoutQueryString($checkTrustedHost = true) { return self::getCurrentScheme() . '://' . self::getCurrentHost($default = 'unknown', $checkTrustedHost) . self::getCurrentScriptName(false); }
[ "public", "static", "function", "getCurrentUrlWithoutQueryString", "(", "$", "checkTrustedHost", "=", "true", ")", "{", "return", "self", "::", "getCurrentScheme", "(", ")", ".", "'://'", ".", "self", "::", "getCurrentHost", "(", "$", "default", "=", "'unknown'"...
Returns the current URL without the query string. @param bool $checkTrustedHost Whether to do trusted host check. Should ALWAYS be true, except in {@link Piwik\Plugin\Controller}. @return string eg, `"http://example.org/dir1/dir2/index.php"` if the current URL is `"http://example.org/dir1/dir2/index.php?param1=value1&...
[ "Returns", "the", "current", "URL", "without", "the", "query", "string", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Url.php#L76-L81
train
Get Current URL without Query String
[ 30522, 2270, 10763, 3853, 2131, 10841, 14343, 3372, 3126, 2140, 24415, 5833, 4226, 24769, 18886, 3070, 1006, 1002, 4638, 24669, 2098, 15006, 2102, 1027, 2995, 1007, 1063, 2709, 2969, 1024, 1024, 2131, 10841, 14343, 7666, 5403, 4168, 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/Support/Str.php
Str.start
public static function start($value, $prefix) { $quoted = preg_quote($prefix, '/'); return $prefix.preg_replace('/^(?:'.$quoted.')+/u', '', $value); }
php
public static function start($value, $prefix) { $quoted = preg_quote($prefix, '/'); return $prefix.preg_replace('/^(?:'.$quoted.')+/u', '', $value); }
[ "public", "static", "function", "start", "(", "$", "value", ",", "$", "prefix", ")", "{", "$", "quoted", "=", "preg_quote", "(", "$", "prefix", ",", "'/'", ")", ";", "return", "$", "prefix", ".", "preg_replace", "(", "'/^(?:'", ".", "$", "quoted", "....
Begin a string with a single instance of a given value. @param string $value @param string $prefix @return string
[ "Begin", "a", "string", "with", "a", "single", "instance", "of", "a", "given", "value", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Support/Str.php#L390-L395
train
Starts the current namespace
[ 30522, 2270, 10763, 3853, 2707, 1006, 1002, 3643, 1010, 1002, 17576, 1007, 1063, 1002, 9339, 1027, 3653, 2290, 1035, 14686, 1006, 1002, 17576, 1010, 1005, 1013, 1005, 1007, 1025, 2709, 1002, 17576, 1012, 3653, 2290, 1035, 5672, 1006, 1005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Utils.php
Utils.arrayFilterRecursive
public static function arrayFilterRecursive(Array $source, $fn) { $result = []; foreach ($source as $key => $value) { if (is_array($value)) { $result[$key] = static::arrayFilterRecursive($value, $fn); continue; } if ($fn($key, $valu...
php
public static function arrayFilterRecursive(Array $source, $fn) { $result = []; foreach ($source as $key => $value) { if (is_array($value)) { $result[$key] = static::arrayFilterRecursive($value, $fn); continue; } if ($fn($key, $valu...
[ "public", "static", "function", "arrayFilterRecursive", "(", "Array", "$", "source", ",", "$", "fn", ")", "{", "$", "result", "=", "[", "]", ";", "foreach", "(", "$", "source", "as", "$", "key", "=>", "$", "value", ")", "{", "if", "(", "is_array", ...
Recursively filter an array, filtering values by processing them through the $fn function argument @param array $source the Array to filter @param callable $fn the function to pass through each array item @return array
[ "Recursively", "filter", "an", "array", "filtering", "values", "by", "processing", "them", "through", "the", "$fn", "function", "argument" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Utils.php#L883-L898
train
Array Filter Recursive
[ 30522, 2270, 10763, 3853, 9140, 8873, 21928, 2890, 10841, 2869, 3512, 1006, 9140, 1002, 3120, 1010, 1002, 1042, 2078, 1007, 1063, 1002, 2765, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1002, 3120, 2004, 1002, 3145, 1027, 1028, 1002, 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...
laravel/framework
src/Illuminate/Session/Store.php
Store.has
public function has($key) { return ! collect(is_array($key) ? $key : func_get_args())->contains(function ($key) { return is_null($this->get($key)); }); }
php
public function has($key) { return ! collect(is_array($key) ? $key : func_get_args())->contains(function ($key) { return is_null($this->get($key)); }); }
[ "public", "function", "has", "(", "$", "key", ")", "{", "return", "!", "collect", "(", "is_array", "(", "$", "key", ")", "?", "$", "key", ":", "func_get_args", "(", ")", ")", "->", "contains", "(", "function", "(", "$", "key", ")", "{", "return", ...
Checks if a key is present and not null. @param string|array $key @return bool
[ "Checks", "if", "a", "key", "is", "present", "and", "not", "null", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Session/Store.php#L191-L196
train
Has a key?
[ 30522, 2270, 3853, 2038, 1006, 1002, 3145, 1007, 1063, 2709, 999, 8145, 1006, 2003, 1035, 9140, 1006, 1002, 3145, 1007, 1029, 1002, 3145, 1024, 4569, 2278, 1035, 2131, 1035, 12098, 5620, 1006, 1007, 1007, 1011, 1028, 3397, 1006, 3853, 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/FrameDecorator/ListBulletImage.php
ListBulletImage.get_margin_width
function get_margin_width() { //ignore image width, use same width as on predefined bullet ListBullet //for proper alignment of bullet image and text. Allow image to not fitting on left border. //This controls the extra indentation of text to make room for the bullet image. //Here us...
php
function get_margin_width() { //ignore image width, use same width as on predefined bullet ListBullet //for proper alignment of bullet image and text. Allow image to not fitting on left border. //This controls the extra indentation of text to make room for the bullet image. //Here us...
[ "function", "get_margin_width", "(", ")", "{", "//ignore image width, use same width as on predefined bullet ListBullet", "//for proper alignment of bullet image and text. Allow image to not fitting on left border.", "//This controls the extra indentation of text to make room for the bullet image.", ...
Override get_margin_width @return int
[ "Override", "get_margin_width" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/FrameDecorator/ListBulletImage.php#L110-L130
train
Get the width of the bullet image
[ 30522, 3853, 2131, 1035, 7785, 1035, 9381, 1006, 1007, 1063, 1013, 1013, 8568, 3746, 9381, 1010, 2224, 2168, 9381, 2004, 2006, 3653, 3207, 23460, 2094, 7960, 2862, 8569, 22592, 1013, 1013, 2005, 5372, 12139, 1997, 7960, 3746, 1998, 3793, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/SitesManager/Model.php
Model.getSitesIdFromSiteUrlHavingAccess
public function getSitesIdFromSiteUrlHavingAccess($login, $urls) { $siteUrlTable = Common::prefixTable('site_url'); $sqlAccessSite = Access::getSqlAccessSite('idsite'); $db = $this->getDb(); $ids = $db->fetchAll( 'SELECT idsite FROM ' . $this->table . ' ...
php
public function getSitesIdFromSiteUrlHavingAccess($login, $urls) { $siteUrlTable = Common::prefixTable('site_url'); $sqlAccessSite = Access::getSqlAccessSite('idsite'); $db = $this->getDb(); $ids = $db->fetchAll( 'SELECT idsite FROM ' . $this->table . ' ...
[ "public", "function", "getSitesIdFromSiteUrlHavingAccess", "(", "$", "login", ",", "$", "urls", ")", "{", "$", "siteUrlTable", "=", "Common", "::", "prefixTable", "(", "'site_url'", ")", ";", "$", "sqlAccessSite", "=", "Access", "::", "getSqlAccessSite", "(", ...
Returns the list of websites ID associated with a URL. @param string $login @param array $urls @return array list of websites ID
[ "Returns", "the", "list", "of", "websites", "ID", "associated", "with", "a", "URL", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/SitesManager/Model.php#L139-L165
train
Get list of site ids from site_url having access
[ 30522, 2270, 3853, 4152, 7616, 3593, 19699, 22225, 4221, 3126, 2140, 3270, 6455, 6305, 9623, 2015, 1006, 1002, 8833, 2378, 1010, 1002, 24471, 4877, 1007, 1063, 1002, 2609, 3126, 24458, 3468, 1027, 2691, 1024, 1024, 17576, 10880, 1006, 1005,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/HTML/QuickForm2/Rule/Compare.php
HTML_QuickForm2_Rule_Compare.mergeConfig
public static function mergeConfig($localConfig, $globalConfig) { $config = null; if (is_array($globalConfig) && 0 < count($globalConfig)) { $config = self::toCanonicalForm($globalConfig, 'operator'); } if (is_array($localConfig) && 0 < count($localConfig)) { ...
php
public static function mergeConfig($localConfig, $globalConfig) { $config = null; if (is_array($globalConfig) && 0 < count($globalConfig)) { $config = self::toCanonicalForm($globalConfig, 'operator'); } if (is_array($localConfig) && 0 < count($localConfig)) { ...
[ "public", "static", "function", "mergeConfig", "(", "$", "localConfig", ",", "$", "globalConfig", ")", "{", "$", "config", "=", "null", ";", "if", "(", "is_array", "(", "$", "globalConfig", ")", "&&", "0", "<", "count", "(", "$", "globalConfig", ")", "...
Merges local configuration with that provided for registerRule() "Global" configuration may be passed to {@link HTML_QuickForm2_Factory::registerRule()} in either of the following formats - operator - array(operator[, operand]) - array(['operator' => operator, ]['operand' => operand]) "Local" configuration may be pas...
[ "Merges", "local", "configuration", "with", "that", "provided", "for", "registerRule", "()" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Rule/Compare.php#L175-L186
train
Merge local and global config with global config
[ 30522, 2270, 10763, 3853, 13590, 8663, 8873, 2290, 1006, 1002, 2334, 8663, 8873, 2290, 1010, 1002, 3795, 8663, 8873, 2290, 1007, 1063, 1002, 9530, 8873, 2290, 1027, 19701, 1025, 2065, 1006, 2003, 1035, 9140, 1006, 1002, 3795, 8663, 8873, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Form.php
Form.submit
public function submit($submittedData, $clearMissing = true) { if ($this->submitted) { throw new AlreadySubmittedException('A form can only be submitted once'); } // Initialize errors in the very beginning so we're sure // they are collectable during submission only ...
php
public function submit($submittedData, $clearMissing = true) { if ($this->submitted) { throw new AlreadySubmittedException('A form can only be submitted once'); } // Initialize errors in the very beginning so we're sure // they are collectable during submission only ...
[ "public", "function", "submit", "(", "$", "submittedData", ",", "$", "clearMissing", "=", "true", ")", "{", "if", "(", "$", "this", "->", "submitted", ")", "{", "throw", "new", "AlreadySubmittedException", "(", "'A form can only be submitted once'", ")", ";", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/Form.php#L501-L675
train
Submits the form with the given data.
[ 30522, 2270, 3853, 12040, 1006, 1002, 7864, 2850, 2696, 1010, 1002, 3154, 15630, 7741, 1027, 2995, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 7864, 1007, 1063, 5466, 2047, 2525, 6342, 25526, 27100, 3207, 2595, 24422, 1006, 1005, 1037, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/helpers/File.php
File.validatePath
public static function validatePath($filePath, $maxNesting = 2) { if (strpos($filePath, '..') !== false) { return false; } if (strpos($filePath, './') !== false || strpos($filePath, '//') !== false) { return false; } $segments = explode('/', $filePat...
php
public static function validatePath($filePath, $maxNesting = 2) { if (strpos($filePath, '..') !== false) { return false; } if (strpos($filePath, './') !== false || strpos($filePath, '//') !== false) { return false; } $segments = explode('/', $filePat...
[ "public", "static", "function", "validatePath", "(", "$", "filePath", ",", "$", "maxNesting", "=", "2", ")", "{", "if", "(", "strpos", "(", "$", "filePath", ",", "'..'", ")", "!==", "false", ")", "{", "return", "false", ";", "}", "if", "(", "strpos",...
Validates a CMS object path. CMS object directory and file names can contain only alphanumeric symbols, dashes and dots. CMS objects support only a single level of subdirectories. @param string $filePath Specifies a path to validate @param integer $maxNesting Specifies the maximum allowed nesting level @return boolean ...
[ "Validates", "a", "CMS", "object", "path", ".", "CMS", "object", "directory", "and", "file", "names", "can", "contain", "only", "alphanumeric", "symbols", "dashes", "and", "dots", ".", "CMS", "objects", "support", "only", "a", "single", "level", "of", "subdi...
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/helpers/File.php#L48-L70
train
Validate a file path
[ 30522, 2270, 10763, 3853, 9398, 3686, 15069, 1006, 1002, 5371, 15069, 1010, 1002, 4098, 5267, 3436, 1027, 1016, 1007, 1063, 2065, 1006, 2358, 14536, 2891, 1006, 1002, 5371, 15069, 1010, 1005, 1012, 1012, 1005, 1007, 999, 1027, 1027, 6270, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Debug/ErrorHandler.php
ErrorHandler.reRegister
private function reRegister($prev) { if ($prev !== $this->thrownErrors | $this->loggedErrors) { $handler = set_error_handler('var_dump'); $handler = \is_array($handler) ? $handler[0] : null; restore_error_handler(); if ($handler === $this) { re...
php
private function reRegister($prev) { if ($prev !== $this->thrownErrors | $this->loggedErrors) { $handler = set_error_handler('var_dump'); $handler = \is_array($handler) ? $handler[0] : null; restore_error_handler(); if ($handler === $this) { re...
[ "private", "function", "reRegister", "(", "$", "prev", ")", "{", "if", "(", "$", "prev", "!==", "$", "this", "->", "thrownErrors", "|", "$", "this", "->", "loggedErrors", ")", "{", "$", "handler", "=", "set_error_handler", "(", "'var_dump'", ")", ";", ...
Re-registers as a PHP error handler if levels changed.
[ "Re", "-", "registers", "as", "a", "PHP", "error", "handler", "if", "levels", "changed", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Debug/ErrorHandler.php#L352-L367
train
Re - registers error handlers
[ 30522, 2797, 3853, 2128, 2890, 24063, 2121, 1006, 1002, 3653, 2615, 1007, 1063, 2065, 1006, 1002, 3653, 2615, 999, 1027, 1027, 1002, 2023, 1011, 1028, 6908, 2121, 29165, 2015, 1064, 1002, 2023, 1011, 1028, 26618, 2121, 29165, 2015, 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
plugins/PrivacyManager/ReportsPurger.php
ReportsPurger.findSegmentArchives
private function findSegmentArchives($numericTables) { if (!is_null($this->segmentArchiveIds) || empty($numericTables)) { return; } foreach ($numericTables as $table) { $tableDate = ArchiveTableCreator::getDateFromTableName($table); $maxIdArchive = Db::f...
php
private function findSegmentArchives($numericTables) { if (!is_null($this->segmentArchiveIds) || empty($numericTables)) { return; } foreach ($numericTables as $table) { $tableDate = ArchiveTableCreator::getDateFromTableName($table); $maxIdArchive = Db::f...
[ "private", "function", "findSegmentArchives", "(", "$", "numericTables", ")", "{", "if", "(", "!", "is_null", "(", "$", "this", "->", "segmentArchiveIds", ")", "||", "empty", "(", "$", "numericTables", ")", ")", "{", "return", ";", "}", "foreach", "(", "...
If we're going to keep segmented reports, we need to know which archives are for segments. This info is only in the numeric tables, so we must query them.
[ "If", "we", "re", "going", "to", "keep", "segmented", "reports", "we", "need", "to", "know", "which", "archives", "are", "for", "segments", ".", "This", "info", "is", "only", "in", "the", "numeric", "tables", "so", "we", "must", "query", "them", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/PrivacyManager/ReportsPurger.php#L315-L341
train
Find segmentArchives for numeric tables
[ 30522, 2797, 3853, 4858, 13910, 3672, 2906, 5428, 6961, 1006, 1002, 16371, 25531, 10880, 2015, 1007, 1063, 2065, 1006, 999, 2003, 1035, 19701, 1006, 1002, 2023, 1011, 1028, 6903, 2906, 5428, 3726, 9821, 1007, 1064, 1064, 4064, 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/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php
TextDescriptor.describeContainerDefinition
protected function describeContainerDefinition(Definition $definition, array $options = []) { if (isset($options['id'])) { $options['output']->title(sprintf('Information for Service "<info>%s</info>"', $options['id'])); } if ('' !== $classDescription = $this->getClassDescription...
php
protected function describeContainerDefinition(Definition $definition, array $options = []) { if (isset($options['id'])) { $options['output']->title(sprintf('Information for Service "<info>%s</info>"', $options['id'])); } if ('' !== $classDescription = $this->getClassDescription...
[ "protected", "function", "describeContainerDefinition", "(", "Definition", "$", "definition", ",", "array", "$", "options", "=", "[", "]", ")", "{", "if", "(", "isset", "(", "$", "options", "[", "'id'", "]", ")", ")", "{", "$", "options", "[", "'output'"...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php#L266-L364
train
Describes the container definition
[ 30522, 5123, 3853, 6235, 8663, 18249, 2121, 3207, 16294, 22753, 1006, 6210, 1002, 6210, 1010, 9140, 1002, 7047, 1027, 1031, 1033, 1007, 1063, 2065, 1006, 26354, 3388, 1006, 1002, 7047, 1031, 1005, 8909, 1005, 1033, 1007, 1007, 1063, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Config/Util/XmlUtils.php
XmlUtils.parse
public static function parse($content, $schemaOrCallable = null) { if (!\extension_loaded('dom')) { throw new \LogicException('Extension DOM is required.'); } $internalErrors = libxml_use_internal_errors(true); $disableEntities = libxml_disable_entity_loader(true); ...
php
public static function parse($content, $schemaOrCallable = null) { if (!\extension_loaded('dom')) { throw new \LogicException('Extension DOM is required.'); } $internalErrors = libxml_use_internal_errors(true); $disableEntities = libxml_disable_entity_loader(true); ...
[ "public", "static", "function", "parse", "(", "$", "content", ",", "$", "schemaOrCallable", "=", "null", ")", "{", "if", "(", "!", "\\", "extension_loaded", "(", "'dom'", ")", ")", "{", "throw", "new", "\\", "LogicException", "(", "'Extension DOM is required...
Parses an XML string. @param string $content An XML string @param string|callable|null $schemaOrCallable An XSD schema file path, a callable, or null to disable validation @return \DOMDocument @throws XmlParsingException When parsing of XML file returns error @throws InvalidXmlException When p...
[ "Parses", "an", "XML", "string", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Config/Util/XmlUtils.php#L47-L109
train
Parse XML content
[ 30522, 2270, 10763, 3853, 11968, 3366, 1006, 1002, 4180, 1010, 1002, 8040, 28433, 2953, 9289, 20470, 2571, 1027, 19701, 1007, 1063, 2065, 1006, 999, 1032, 5331, 1035, 8209, 1006, 1005, 14383, 1005, 1007, 1007, 1063, 5466, 2047, 1032, 7961, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Session/Namespace.php
Zend_Session_Namespace.applySet
public function applySet($callback) { $arg_list = func_get_args(); $arg_list[0] = $_SESSION[$this->_namespace]; $result = call_user_func_array($callback, $arg_list); if (!is_array($result)) { /** * @see Zend_Session_Exception */ // re...
php
public function applySet($callback) { $arg_list = func_get_args(); $arg_list[0] = $_SESSION[$this->_namespace]; $result = call_user_func_array($callback, $arg_list); if (!is_array($result)) { /** * @see Zend_Session_Exception */ // re...
[ "public", "function", "applySet", "(", "$", "callback", ")", "{", "$", "arg_list", "=", "func_get_args", "(", ")", ";", "$", "arg_list", "[", "0", "]", "=", "$", "_SESSION", "[", "$", "this", "->", "_namespace", "]", ";", "$", "result", "=", "call_us...
applySet() - enables applying user-selected function, and sets entire namespace to the result Result of $callback must be an array. Parameters following the $callback argument are passed to the callback function. Caveat: ignores members expiring now. Example: $namespace->applySet('array_merge', array('tree' => 'apple'...
[ "applySet", "()", "-", "enables", "applying", "user", "-", "selected", "function", "and", "sets", "entire", "namespace", "to", "the", "result", "Result", "of", "$callback", "must", "be", "an", "array", ".", "Parameters", "following", "the", "$callback", "argum...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Session/Namespace.php#L361-L375
train
Apply a callback to the session
[ 30522, 2270, 3853, 6611, 13462, 1006, 1002, 2655, 5963, 1007, 1063, 1002, 12098, 2290, 1035, 2862, 1027, 4569, 2278, 1035, 2131, 1035, 12098, 5620, 1006, 1007, 1025, 1002, 12098, 2290, 1035, 2862, 1031, 1014, 1033, 1027, 1002, 1035, 5219, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Controller.php
Controller.runPage
public function runPage($page, $useAjax = true) { $this->page = $page; /* * If the page doesn't refer any layout, create the fallback layout. * Otherwise load the layout specified in the page. */ if (!$page->layout) { $layout = Layout::initFallback($th...
php
public function runPage($page, $useAjax = true) { $this->page = $page; /* * If the page doesn't refer any layout, create the fallback layout. * Otherwise load the layout specified in the page. */ if (!$page->layout) { $layout = Layout::initFallback($th...
[ "public", "function", "runPage", "(", "$", "page", ",", "$", "useAjax", "=", "true", ")", "{", "$", "this", "->", "page", "=", "$", "page", ";", "/*\n * If the page doesn't refer any layout, create the fallback layout.\n * Otherwise load the layout specified...
Runs a page directly from its object and supplied parameters. @param \Cms\Classes\Page $page Specifies the CMS page to run. @return string
[ "Runs", "a", "page", "directly", "from", "its", "object", "and", "supplied", "parameters", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/classes/Controller.php#L291-L438
train
Runs the page.
[ 30522, 2270, 3853, 2448, 13704, 1006, 1002, 3931, 1010, 1002, 2224, 22734, 2595, 1027, 2995, 1007, 1063, 1002, 2023, 1011, 1028, 3931, 1027, 1002, 3931, 1025, 1013, 1008, 1008, 2065, 1996, 3931, 2987, 1005, 1056, 6523, 2151, 9621, 1010, 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/Console/Style/SymfonyStyle.php
SymfonyStyle.newLine
public function newLine($count = 1) { parent::newLine($count); $this->bufferedOutput->write(str_repeat("\n", $count)); }
php
public function newLine($count = 1) { parent::newLine($count); $this->bufferedOutput->write(str_repeat("\n", $count)); }
[ "public", "function", "newLine", "(", "$", "count", "=", "1", ")", "{", "parent", "::", "newLine", "(", "$", "count", ")", ";", "$", "this", "->", "bufferedOutput", "->", "write", "(", "str_repeat", "(", "\"\\n\"", ",", "$", "count", ")", ")", ";", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Style/SymfonyStyle.php#L337-L341
train
This method is called by the parent class to write a new line of code.
[ 30522, 2270, 3853, 2047, 4179, 1006, 1002, 4175, 1027, 1015, 1007, 1063, 6687, 1024, 1024, 2047, 4179, 1006, 1002, 4175, 1007, 1025, 1002, 2023, 1011, 1028, 17698, 26010, 4904, 18780, 1011, 1028, 4339, 1006, 2358, 2099, 1035, 9377, 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
libs/Zend/Mail/Storage/Mbox.php
Zend_Mail_Storage_Mbox._openMboxFile
protected function _openMboxFile($filename) { if ($this->_fh) { $this->close(); } $this->_fh = @fopen($filename, 'r'); if (!$this->_fh) { /** * @see Zend_Mail_Storage_Exception */ // require_once 'Zend/Mail/Storage/Except...
php
protected function _openMboxFile($filename) { if ($this->_fh) { $this->close(); } $this->_fh = @fopen($filename, 'r'); if (!$this->_fh) { /** * @see Zend_Mail_Storage_Exception */ // require_once 'Zend/Mail/Storage/Except...
[ "protected", "function", "_openMboxFile", "(", "$", "filename", ")", "{", "if", "(", "$", "this", "->", "_fh", ")", "{", "$", "this", "->", "close", "(", ")", ";", "}", "$", "this", "->", "_fh", "=", "@", "fopen", "(", "$", "filename", ",", "'r'"...
open given file as current mbox file @param string $filename filename of mbox file @return null @throws Zend_Mail_Storage_Exception
[ "open", "given", "file", "as", "current", "mbox", "file" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail/Storage/Mbox.php#L282-L328
train
Open a mbox file and extract the message positions
[ 30522, 5123, 3853, 1035, 2330, 13344, 2595, 8873, 2571, 1006, 1002, 5371, 18442, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 1035, 1042, 2232, 1007, 1063, 1002, 2023, 1011, 1028, 2485, 1006, 1007, 1025, 1065, 1002, 2023, 1011, 1028, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Routing/Matcher/Dumper/CompiledUrlMatcherDumper.php
CompiledUrlMatcherDumper.getCompiledRoutes
public function getCompiledRoutes(bool $forDump = false): array { // Group hosts by same-suffix, re-order when possible $matchHost = false; $routes = new StaticPrefixCollection(); foreach ($this->getRoutes()->all() as $name => $route) { if ($host = $route->getHost()) { ...
php
public function getCompiledRoutes(bool $forDump = false): array { // Group hosts by same-suffix, re-order when possible $matchHost = false; $routes = new StaticPrefixCollection(); foreach ($this->getRoutes()->all() as $name => $route) { if ($host = $route->getHost()) { ...
[ "public", "function", "getCompiledRoutes", "(", "bool", "$", "forDump", "=", "false", ")", ":", "array", "{", "// Group hosts by same-suffix, re-order when possible", "$", "matchHost", "=", "false", ";", "$", "routes", "=", "new", "StaticPrefixCollection", "(", ")",...
Generates the arrays for CompiledUrlMatcher's constructor.
[ "Generates", "the", "arrays", "for", "CompiledUrlMatcher", "s", "constructor", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Routing/Matcher/Dumper/CompiledUrlMatcherDumper.php#L64-L130
train
Returns the compiled routes.
[ 30522, 2270, 3853, 2131, 9006, 22090, 22196, 10421, 2015, 1006, 22017, 2140, 1002, 4811, 24237, 1027, 6270, 1007, 1024, 9140, 1063, 1013, 1013, 2177, 6184, 2011, 2168, 1011, 16809, 1010, 2128, 1011, 2344, 2043, 2825, 1002, 2674, 15006, 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...
matomo-org/matomo
core/Db.php
Db.segmentedFetchOne
public static function segmentedFetchOne($sql, $first, $last, $step, $params = array()) { $result = array(); if ($step > 0) { for ($i = $first; $i <= $last; $i += $step) { $result[] = self::fetchOne($sql, array_merge($params, array($i, $i + $step))); } ...
php
public static function segmentedFetchOne($sql, $first, $last, $step, $params = array()) { $result = array(); if ($step > 0) { for ($i = $first; $i <= $last; $i += $step) { $result[] = self::fetchOne($sql, array_merge($params, array($i, $i + $step))); } ...
[ "public", "static", "function", "segmentedFetchOne", "(", "$", "sql", ",", "$", "first", ",", "$", "last", ",", "$", "step", ",", "$", "params", "=", "array", "(", ")", ")", "{", "$", "result", "=", "array", "(", ")", ";", "if", "(", "$", "step",...
Performs a `SELECT` on a table one chunk at a time and returns an array of every fetched value. This function will break up a `SELECT` query into several smaller queries by using only a limited number of rows at a time. It will accumulate the results of each smaller query and return the result. This function should b...
[ "Performs", "a", "SELECT", "on", "a", "table", "one", "chunk", "at", "a", "time", "and", "returns", "an", "array", "of", "every", "fetched", "value", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Db.php#L551-L566
train
Performs a SELECT or SHOW statement on the database.
[ 30522, 2270, 10763, 3853, 6903, 2098, 7959, 10649, 5643, 1006, 1002, 29296, 1010, 1002, 2034, 1010, 1002, 2197, 1010, 1002, 3357, 1010, 1002, 11498, 5244, 1027, 9140, 1006, 1007, 1007, 1063, 1002, 2765, 1027, 9140, 1006, 1007, 1025, 2065, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.modifySrid
protected function modifySrid(Blueprint $blueprint, Fluent $column) { if (! is_null($column->srid) && is_int($column->srid) && $column->srid > 0) { return ' srid '.$column->srid; } }
php
protected function modifySrid(Blueprint $blueprint, Fluent $column) { if (! is_null($column->srid) && is_int($column->srid) && $column->srid > 0) { return ' srid '.$column->srid; } }
[ "protected", "function", "modifySrid", "(", "Blueprint", "$", "blueprint", ",", "Fluent", "$", "column", ")", "{", "if", "(", "!", "is_null", "(", "$", "column", "->", "srid", ")", "&&", "is_int", "(", "$", "column", "->", "srid", ")", "&&", "$", "co...
Get the SQL for a SRID column modifier. @param \Illuminate\Database\Schema\Blueprint $blueprint @param \Illuminate\Support\Fluent $column @return string|null
[ "Get", "the", "SQL", "for", "a", "SRID", "column", "modifier", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php#L1024-L1029
train
Protected modify Srid
[ 30522, 5123, 3853, 19933, 21338, 3593, 1006, 2630, 16550, 1002, 2630, 16550, 1010, 19376, 1002, 5930, 1007, 1063, 2065, 1006, 999, 2003, 1035, 19701, 1006, 1002, 5930, 1011, 1028, 5185, 2094, 1007, 1004, 1004, 2003, 1035, 20014, 1006, 1002,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Db/Adapter/Abstract.php
Zend_Db_Adapter_Abstract.rollBack
public function rollBack() { $this->_connect(); $q = $this->_profiler->queryStart('rollback', Zend_Db_Profiler::TRANSACTION); $this->_rollBack(); $this->_profiler->queryEnd($q); return $this; }
php
public function rollBack() { $this->_connect(); $q = $this->_profiler->queryStart('rollback', Zend_Db_Profiler::TRANSACTION); $this->_rollBack(); $this->_profiler->queryEnd($q); return $this; }
[ "public", "function", "rollBack", "(", ")", "{", "$", "this", "->", "_connect", "(", ")", ";", "$", "q", "=", "$", "this", "->", "_profiler", "->", "queryStart", "(", "'rollback'", ",", "Zend_Db_Profiler", "::", "TRANSACTION", ")", ";", "$", "this", "-...
Roll back a transaction and return to autocommit mode. @return Zend_Db_Adapter_Abstract
[ "Roll", "back", "a", "transaction", "and", "return", "to", "autocommit", "mode", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Adapter/Abstract.php#L519-L526
train
Rollback all changes to the database
[ 30522, 2270, 3853, 4897, 5963, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 1035, 7532, 1006, 1007, 1025, 1002, 1053, 1027, 1002, 2023, 1011, 1028, 1035, 6337, 2099, 1011, 1028, 23032, 14117, 2102, 1006, 1005, 4897, 5963, 30524, 23032, 10497, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/models/ThemeData.php
ThemeData.getFormFields
public function getFormFields() { if (!$theme = CmsTheme::load($this->theme)) { throw new Exception(Lang::get('Unable to find theme with name :name', $this->theme)); } $config = $theme->getFormConfig(); return array_get($config, 'fields', []) + array_get($co...
php
public function getFormFields() { if (!$theme = CmsTheme::load($this->theme)) { throw new Exception(Lang::get('Unable to find theme with name :name', $this->theme)); } $config = $theme->getFormConfig(); return array_get($config, 'fields', []) + array_get($co...
[ "public", "function", "getFormFields", "(", ")", "{", "if", "(", "!", "$", "theme", "=", "CmsTheme", "::", "load", "(", "$", "this", "->", "theme", ")", ")", "{", "throw", "new", "Exception", "(", "Lang", "::", "get", "(", "'Unable to find theme with nam...
Returns all fields defined for this model, based on form field definitions. @return array
[ "Returns", "all", "fields", "defined", "for", "this", "model", "based", "on", "form", "field", "definitions", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/models/ThemeData.php#L190-L201
train
Get form fields
[ 30522, 2270, 3853, 2131, 14192, 15155, 1006, 1007, 1063, 2065, 1006, 999, 1002, 4323, 1027, 4642, 3367, 29122, 2063, 1024, 1024, 7170, 1006, 1002, 2023, 1011, 1028, 4323, 1007, 1007, 1063, 5466, 2047, 6453, 1006, 11374, 1024, 1024, 2131, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Twig/Node/DumpNode.php
DumpNode.compile
public function compile(Compiler $compiler) { $compiler ->write("if (\$this->env->isDebug()) {\n") ->indent(); if (!$this->hasNode('values')) { // remove embedded templates (macros) from the context $compiler ->write(sprintf('$%svars =...
php
public function compile(Compiler $compiler) { $compiler ->write("if (\$this->env->isDebug()) {\n") ->indent(); if (!$this->hasNode('values')) { // remove embedded templates (macros) from the context $compiler ->write(sprintf('$%svars =...
[ "public", "function", "compile", "(", "Compiler", "$", "compiler", ")", "{", "$", "compiler", "->", "write", "(", "\"if (\\$this->env->isDebug()) {\\n\"", ")", "->", "indent", "(", ")", ";", "if", "(", "!", "$", "this", "->", "hasNode", "(", "'values'", ")...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bridge/Twig/Node/DumpNode.php#L38-L89
train
Compiles the context into the PHP code
[ 30522, 2270, 3853, 4012, 22090, 1006, 21624, 1002, 21624, 1007, 1063, 1002, 21624, 1011, 1028, 4339, 1006, 1000, 2065, 1006, 1032, 1002, 2023, 1011, 1028, 4372, 2615, 1011, 1028, 2003, 3207, 8569, 2290, 1006, 1007, 1007, 1063, 1032, 1050, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/DatabaseStore.php
DatabaseStore.put
public function put($key, $value, $seconds) { $key = $this->prefix.$key; $value = $this->serialize($value); $expiration = $this->getTime() + $seconds; try { return $this->table()->insert(compact('key', 'value', 'expiration')); } catch (Exception $e) { ...
php
public function put($key, $value, $seconds) { $key = $this->prefix.$key; $value = $this->serialize($value); $expiration = $this->getTime() + $seconds; try { return $this->table()->insert(compact('key', 'value', 'expiration')); } catch (Exception $e) { ...
[ "public", "function", "put", "(", "$", "key", ",", "$", "value", ",", "$", "seconds", ")", "{", "$", "key", "=", "$", "this", "->", "prefix", ".", "$", "key", ";", "$", "value", "=", "$", "this", "->", "serialize", "(", "$", "value", ")", ";", ...
Store an item in the cache for a given number of seconds. @param string $key @param mixed $value @param int $seconds @return bool
[ "Store", "an", "item", "in", "the", "cache", "for", "a", "given", "number", "of", "seconds", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Cache/DatabaseStore.php#L94-L109
train
Put a value into the cache
[ 30522, 2270, 3853, 2404, 1006, 1002, 3145, 1010, 1002, 3643, 1010, 1002, 3823, 1007, 1063, 1002, 3145, 1027, 1002, 2023, 1011, 1028, 17576, 1012, 1002, 3145, 1025, 1002, 3643, 1027, 1002, 2023, 1011, 1028, 7642, 4697, 1006, 1002, 3643, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Schema/Grammars/RenameColumn.php
RenameColumn.compile
public static function compile(Grammar $grammar, Blueprint $blueprint, Fluent $command, Connection $connection) { $column = $connection->getDoctrineColumn( $grammar->getTablePrefix().$blueprint->getTable(), $command->from ); $schema = $connection->getDoctrineSchemaManager(); ...
php
public static function compile(Grammar $grammar, Blueprint $blueprint, Fluent $command, Connection $connection) { $column = $connection->getDoctrineColumn( $grammar->getTablePrefix().$blueprint->getTable(), $command->from ); $schema = $connection->getDoctrineSchemaManager(); ...
[ "public", "static", "function", "compile", "(", "Grammar", "$", "grammar", ",", "Blueprint", "$", "blueprint", ",", "Fluent", "$", "command", ",", "Connection", "$", "connection", ")", "{", "$", "column", "=", "$", "connection", "->", "getDoctrineColumn", "(...
Compile a rename column command. @param \Illuminate\Database\Schema\Grammars\Grammar $grammar @param \Illuminate\Database\Schema\Blueprint $blueprint @param \Illuminate\Support\Fluent $command @param \Illuminate\Database\Connection $connection @return array
[ "Compile", "a", "rename", "column", "command", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/RenameColumn.php#L23-L34
train
Compiles a alter table command.
[ 30522, 2270, 10763, 3853, 4012, 22090, 1006, 8035, 1002, 8035, 1010, 2630, 16550, 1002, 2630, 16550, 1010, 19376, 1002, 3094, 1010, 4434, 1002, 4434, 1007, 1063, 1002, 5930, 1027, 1002, 4434, 1011, 1028, 2131, 3527, 6593, 11467, 25778, 2819...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Archiver.php
Archiver.setLatitudeLongitude
private function setLatitudeLongitude(DataTable $tableCity) { foreach ($tableCity->getRows() as $row) { $label = $row->getColumn('label'); if (isset($this->latLongForCities[$label])) { // get lat/long for city list($lat, $long) = $this->latLongForCitie...
php
private function setLatitudeLongitude(DataTable $tableCity) { foreach ($tableCity->getRows() as $row) { $label = $row->getColumn('label'); if (isset($this->latLongForCities[$label])) { // get lat/long for city list($lat, $long) = $this->latLongForCitie...
[ "private", "function", "setLatitudeLongitude", "(", "DataTable", "$", "tableCity", ")", "{", "foreach", "(", "$", "tableCity", "->", "getRows", "(", ")", "as", "$", "row", ")", "{", "$", "label", "=", "$", "row", "->", "getColumn", "(", "'label'", ")", ...
Utility method, appends latitude/longitude pairs to city table labels, if that data exists for the city.
[ "Utility", "method", "appends", "latitude", "/", "longitude", "pairs", "to", "city", "table", "labels", "if", "that", "data", "exists", "for", "the", "city", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/UserCountry/Archiver.php#L172-L187
train
Set latitude + longitude metadata for city rows
[ 30522, 2797, 3853, 2275, 20051, 18679, 10052, 18679, 1006, 2951, 10880, 1002, 2795, 12972, 1007, 1063, 18921, 6776, 1006, 1002, 2795, 12972, 1011, 1028, 2131, 10524, 2015, 1006, 1007, 2004, 1002, 5216, 1007, 1063, 1002, 3830, 1027, 1002, 52...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php
BelongsToMany.save
public function save(Model $model, array $pivotAttributes = [], $touch = true) { $model->save(['touch' => false]); $this->attach($model, $pivotAttributes, $touch); return $model; }
php
public function save(Model $model, array $pivotAttributes = [], $touch = true) { $model->save(['touch' => false]); $this->attach($model, $pivotAttributes, $touch); return $model; }
[ "public", "function", "save", "(", "Model", "$", "model", ",", "array", "$", "pivotAttributes", "=", "[", "]", ",", "$", "touch", "=", "true", ")", "{", "$", "model", "->", "save", "(", "[", "'touch'", "=>", "false", "]", ")", ";", "$", "this", "...
Save a new model and attach it to the parent model. @param \Illuminate\Database\Eloquent\Model $model @param array $pivotAttributes @param bool $touch @return \Illuminate\Database\Eloquent\Model
[ "Save", "a", "new", "model", "and", "attach", "it", "to", "the", "parent", "model", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php#L871-L878
train
Save a model and attach it to the parent
[ 30522, 2270, 3853, 3828, 1006, 2944, 1002, 2944, 1010, 9140, 1002, 14255, 22994, 19321, 3089, 8569, 4570, 1027, 1031, 1033, 1010, 1002, 3543, 1027, 2995, 1007, 1063, 1002, 2944, 1011, 1028, 3828, 1006, 1031, 1005, 3543, 1005, 1027, 1028, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php
TextDescriptor.describeEventDispatcherListeners
protected function describeEventDispatcherListeners(EventDispatcherInterface $eventDispatcher, array $options = []) { $event = \array_key_exists('event', $options) ? $options['event'] : null; if (null !== $event) { $title = sprintf('Registered Listeners for "%s" Event', $event); ...
php
protected function describeEventDispatcherListeners(EventDispatcherInterface $eventDispatcher, array $options = []) { $event = \array_key_exists('event', $options) ? $options['event'] : null; if (null !== $event) { $title = sprintf('Registered Listeners for "%s" Event', $event); ...
[ "protected", "function", "describeEventDispatcherListeners", "(", "EventDispatcherInterface", "$", "eventDispatcher", ",", "array", "$", "options", "=", "[", "]", ")", "{", "$", "event", "=", "\\", "array_key_exists", "(", "'event'", ",", "$", "options", ")", "?...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php#L465-L487
train
Describes registered listeners
[ 30522, 5123, 3853, 6235, 18697, 3372, 10521, 4502, 10649, 2121, 9863, 24454, 2015, 1006, 2724, 10521, 4502, 10649, 23282, 3334, 12172, 1002, 2724, 10521, 4502, 10649, 2121, 1010, 9140, 1002, 7047, 1027, 1031, 1033, 1007, 1063, 1002, 2724, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Validator/Constraints/IbanValidator.php
IbanValidator.validate
public function validate($value, Constraint $constraint) { if (!$constraint instanceof Iban) { throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Iban'); } if (null === $value || '' === $value) { return; } if (!is_scalar($value) && !(\is_...
php
public function validate($value, Constraint $constraint) { if (!$constraint instanceof Iban) { throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Iban'); } if (null === $value || '' === $value) { return; } if (!is_scalar($value) && !(\is_...
[ "public", "function", "validate", "(", "$", "value", ",", "Constraint", "$", "constraint", ")", "{", "if", "(", "!", "$", "constraint", "instanceof", "Iban", ")", "{", "throw", "new", "UnexpectedTypeException", "(", "$", "constraint", ",", "__NAMESPACE__", "...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Validator/Constraints/IbanValidator.php#L143-L226
train
Validates IBAN value
[ 30522, 2270, 3853, 9398, 3686, 1006, 1002, 3643, 1010, 27142, 1002, 27142, 1007, 1063, 2065, 1006, 999, 1002, 27142, 6013, 11253, 21307, 2319, 1007, 1063, 5466, 2047, 9223, 13874, 10288, 24422, 1006, 1002, 27142, 1010, 1035, 1035, 3415, 153...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/FrameworkExtension.php
FrameworkExtension.load
public function load(array $configs, ContainerBuilder $container) { $loader = new XmlFileLoader($container, new FileLocator(\dirname(__DIR__).'/Resources/config')); $loader->load('web.xml'); $loader->load('services.xml'); $loader->load('fragment_renderer.xml'); $container->...
php
public function load(array $configs, ContainerBuilder $container) { $loader = new XmlFileLoader($container, new FileLocator(\dirname(__DIR__).'/Resources/config')); $loader->load('web.xml'); $loader->load('services.xml'); $loader->load('fragment_renderer.xml'); $container->...
[ "public", "function", "load", "(", "array", "$", "configs", ",", "ContainerBuilder", "$", "container", ")", "{", "$", "loader", "=", "new", "XmlFileLoader", "(", "$", "container", ",", "new", "FileLocator", "(", "\\", "dirname", "(", "__DIR__", ")", ".", ...
Responds to the app.config configuration parameter. @throws LogicException
[ "Responds", "to", "the", "app", ".", "config", "configuration", "parameter", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php#L148-L431
train
Loads the configuration and registers the alias for arguments and parameters bag.
[ 30522, 2270, 3853, 7170, 1006, 9140, 1002, 9530, 8873, 5620, 1010, 11661, 8569, 23891, 2099, 1002, 11661, 1007, 1063, 1002, 7170, 2121, 1027, 2047, 20950, 8873, 2571, 11066, 2121, 1006, 1002, 11661, 1010, 2047, 5371, 4135, 11266, 2953, 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/MobileMessaging/API.php
API.getCreditLeft
public function getCreditLeft() { $this->checkCredentialManagementRights(); $credential = $this->getSMSAPICredential(); $SMSProvider = SMSProvider::factory($credential[MobileMessaging::PROVIDER_OPTION]); return $SMSProvider->getCreditLeft( $credential[MobileMessaging::AP...
php
public function getCreditLeft() { $this->checkCredentialManagementRights(); $credential = $this->getSMSAPICredential(); $SMSProvider = SMSProvider::factory($credential[MobileMessaging::PROVIDER_OPTION]); return $SMSProvider->getCreditLeft( $credential[MobileMessaging::AP...
[ "public", "function", "getCreditLeft", "(", ")", "{", "$", "this", "->", "checkCredentialManagementRights", "(", ")", ";", "$", "credential", "=", "$", "this", "->", "getSMSAPICredential", "(", ")", ";", "$", "SMSProvider", "=", "SMSProvider", "::", "factory",...
get remaining credit @return string remaining credit
[ "get", "remaining", "credit" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/MobileMessaging/API.php#L181-L190
train
Get credit left
[ 30522, 2270, 3853, 2131, 16748, 23194, 2571, 6199, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 4638, 16748, 16454, 4818, 24805, 20511, 15950, 2015, 1006, 1007, 1025, 1002, 13675, 14728, 19909, 1027, 1002, 2023, 1011, 1028, 4152, 5244, 9331, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/CoreVisualizations/Visualizations/Graph.php
Graph.afterAllFiltersAreApplied
public function afterAllFiltersAreApplied() { $this->determineWhichRowsAreSelectable(); // set default selectable columns, if none specified $selectableColumns = $this->config->selectable_columns; if (false === $selectableColumns) { $this->generateSelectableColumns(); ...
php
public function afterAllFiltersAreApplied() { $this->determineWhichRowsAreSelectable(); // set default selectable columns, if none specified $selectableColumns = $this->config->selectable_columns; if (false === $selectableColumns) { $this->generateSelectableColumns(); ...
[ "public", "function", "afterAllFiltersAreApplied", "(", ")", "{", "$", "this", "->", "determineWhichRowsAreSelectable", "(", ")", ";", "// set default selectable columns, if none specified", "$", "selectableColumns", "=", "$", "this", "->", "config", "->", "selectable_col...
Defaults the selectable_columns property if it has not been set and then transforms it into something the SeriesPicker JavaScript class can use.
[ "Defaults", "the", "selectable_columns", "property", "if", "it", "has", "not", "been", "set", "and", "then", "transforms", "it", "into", "something", "the", "SeriesPicker", "JavaScript", "class", "can", "use", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/CoreVisualizations/Visualizations/Graph.php#L116-L132
train
This method is called after all filters are applied.
[ 30522, 2270, 3853, 2044, 8095, 8873, 21928, 10286, 5243, 9397, 8751, 2094, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 5646, 2860, 16066, 8093, 15568, 17933, 12260, 23576, 1006, 1007, 1025, 1013, 1013, 2275, 12398, 7276, 3085, 7753, 1010, 206...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Controller.php
Controller.run
public function run($url = '/') { if ($url === null) { $url = Request::path(); } if (empty($url)) { $url = '/'; } /* * Hidden page */ $page = $this->router->findByUrl($url); if ($page && $page->is_hidden && !BackendA...
php
public function run($url = '/') { if ($url === null) { $url = Request::path(); } if (empty($url)) { $url = '/'; } /* * Hidden page */ $page = $this->router->findByUrl($url); if ($page && $page->is_hidden && !BackendA...
[ "public", "function", "run", "(", "$", "url", "=", "'/'", ")", "{", "if", "(", "$", "url", "===", "null", ")", "{", "$", "url", "=", "Request", "::", "path", "(", ")", ";", "}", "if", "(", "empty", "(", "$", "url", ")", ")", "{", "$", "url"...
Finds and serves the requested page. If the page cannot be found, returns the page with the URL /404. If the /404 page doesn't exist, returns the system 404 page. @param string $url Specifies the requested page URL. If the parameter is omitted, the current URL used. @return string Returns the processed page content.
[ "Finds", "and", "serves", "the", "requested", "page", ".", "If", "the", "page", "cannot", "be", "found", "returns", "the", "page", "with", "the", "URL", "/", "404", ".", "If", "the", "/", "404", "page", "doesn", "t", "exist", "returns", "the", "system"...
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/classes/Controller.php#L140-L261
train
Runs the action
[ 30522, 2270, 3853, 2448, 1006, 1002, 24471, 2140, 1027, 1005, 1013, 1005, 1007, 1063, 2065, 1006, 1002, 24471, 2140, 1027, 1027, 1027, 19701, 1007, 1063, 1002, 24471, 2140, 1027, 5227, 1024, 1024, 4130, 1006, 1007, 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...
laravel/framework
src/Illuminate/Database/Eloquent/Relations/MorphOneOrMany.php
MorphOneOrMany.setForeignAttributesForCreate
protected function setForeignAttributesForCreate(Model $model) { $model->{$this->getForeignKeyName()} = $this->getParentKey(); $model->{$this->getMorphType()} = $this->morphClass; }
php
protected function setForeignAttributesForCreate(Model $model) { $model->{$this->getForeignKeyName()} = $this->getParentKey(); $model->{$this->getMorphType()} = $this->morphClass; }
[ "protected", "function", "setForeignAttributesForCreate", "(", "Model", "$", "model", ")", "{", "$", "model", "->", "{", "$", "this", "->", "getForeignKeyName", "(", ")", "}", "=", "$", "this", "->", "getParentKey", "(", ")", ";", "$", "model", "->", "{"...
Set the foreign ID and type for creating a related model. @param \Illuminate\Database\Eloquent\Model $model @return void
[ "Set", "the", "foreign", "ID", "and", "type", "for", "creating", "a", "related", "model", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Relations/MorphOneOrMany.php#L76-L81
train
Set foreign attributes for create
[ 30522, 5123, 3853, 2275, 29278, 7416, 16989, 4779, 3089, 8569, 4570, 29278, 16748, 3686, 1006, 2944, 1002, 2944, 1007, 1063, 30524, 2131, 5302, 14536, 11039, 18863, 1006, 1007, 1065, 1027, 1002, 2023, 1011, 1028, 22822, 8458, 26266, 1025, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/BrowserKit/Client.php
Client.getRequest
public function getRequest() { if (null === $this->request) { @trigger_error(sprintf('Calling the "%s()" method before the "request()" one is deprecated since Symfony 4.1 and will throw an exception in 5.0.', \get_class($this).'::'.__FUNCTION__), E_USER_DEPRECATED); // throw new BadM...
php
public function getRequest() { if (null === $this->request) { @trigger_error(sprintf('Calling the "%s()" method before the "request()" one is deprecated since Symfony 4.1 and will throw an exception in 5.0.', \get_class($this).'::'.__FUNCTION__), E_USER_DEPRECATED); // throw new BadM...
[ "public", "function", "getRequest", "(", ")", "{", "if", "(", "null", "===", "$", "this", "->", "request", ")", "{", "@", "trigger_error", "(", "sprintf", "(", "'Calling the \"%s()\" method before the \"request()\" one is deprecated since Symfony 4.1 and will throw an excep...
Returns the current origin Request instance. The origin request is the request instance that is sent to the code that handles requests. @return object A Request instance @see doRequest()
[ "Returns", "the", "current", "origin", "Request", "instance", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/BrowserKit/Client.php#L271-L279
train
Get the request object
[ 30522, 2270, 3853, 2131, 2890, 15500, 1006, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 1027, 1002, 2023, 1011, 1028, 5227, 1007, 1063, 1030, 9495, 1035, 7561, 1006, 9043, 2546, 1006, 1005, 4214, 1996, 1000, 1003, 1055, 1006, 1007, 1000, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.pathPrefixedByLangCode
public static function pathPrefixedByLangCode($string) { if (strlen($string) <= 3) { return false; } $languages_enabled = Grav::instance()['config']->get('system.languages.supported', []); $parts = explode('/', trim($string, '/')); if (count($parts) > 0 && in_ar...
php
public static function pathPrefixedByLangCode($string) { if (strlen($string) <= 3) { return false; } $languages_enabled = Grav::instance()['config']->get('system.languages.supported', []); $parts = explode('/', trim($string, '/')); if (count($parts) > 0 && in_ar...
[ "public", "static", "function", "pathPrefixedByLangCode", "(", "$", "string", ")", "{", "if", "(", "strlen", "(", "$", "string", ")", "<=", "3", ")", "{", "return", "false", ";", "}", "$", "languages_enabled", "=", "Grav", "::", "instance", "(", ")", "...
Checks if the passed path contains the language code prefix @param string $string The path @return bool
[ "Checks", "if", "the", "passed", "path", "contains", "the", "language", "code", "prefix" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Utils.php#L980-L994
train
Check if a path is in language code format
[ 30522, 2270, 10763, 3853, 4130, 28139, 23901, 3762, 25023, 16044, 1006, 1002, 5164, 1007, 1063, 2065, 1006, 2358, 20927, 2078, 1006, 1002, 5164, 1007, 1026, 1027, 1017, 1007, 1063, 2709, 6270, 1025, 1065, 1002, 4155, 1035, 9124, 1027, 24665...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php
NativeSessionStorage.clear
public function clear() { // clear out the bags foreach ($this->bags as $bag) { $bag->clear(); } // clear out the session $_SESSION = []; // reconnect the bags to the session $this->loadSession(); }
php
public function clear() { // clear out the bags foreach ($this->bags as $bag) { $bag->clear(); } // clear out the session $_SESSION = []; // reconnect the bags to the session $this->loadSession(); }
[ "public", "function", "clear", "(", ")", "{", "// clear out the bags", "foreach", "(", "$", "this", "->", "bags", "as", "$", "bag", ")", "{", "$", "bag", "->", "clear", "(", ")", ";", "}", "// clear out the session", "$", "_SESSION", "=", "[", "]", ";"...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php#L275-L287
train
Clear out all bags and session
[ 30522, 2270, 3853, 3154, 1006, 1007, 1063, 1013, 1013, 3154, 2041, 1996, 8641, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 8641, 2004, 1002, 4524, 1007, 1063, 1002, 4524, 1011, 1028, 3154, 1006, 1007, 1025, 1065, 1013, 1013, 3154, 2041, 19...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/CalculateEvolutionFilter.php
CalculateEvolutionFilter.formatValue
protected function formatValue($value, $divisor) { $value = self::getPercentageValue($value, $divisor, $this->quotientPrecision); $value = self::appendPercentSign($value); $value = Common::forceDotAsSeparatorForDecimalPoint($value); return $value; }
php
protected function formatValue($value, $divisor) { $value = self::getPercentageValue($value, $divisor, $this->quotientPrecision); $value = self::appendPercentSign($value); $value = Common::forceDotAsSeparatorForDecimalPoint($value); return $value; }
[ "protected", "function", "formatValue", "(", "$", "value", ",", "$", "divisor", ")", "{", "$", "value", "=", "self", "::", "getPercentageValue", "(", "$", "value", ",", "$", "divisor", ",", "$", "this", "->", "quotientPrecision", ")", ";", "$", "value", ...
Calculates and formats a quotient based on a divisor and dividend. Unlike ColumnCallbackAddColumnPercentage's, version of this method, this method will return 100% if the past value of a metric is 0, and the current value is not 0. For a value representative of an evolution, this makes sense. @param int|float $value ...
[ "Calculates", "and", "formats", "a", "quotient", "based", "on", "a", "divisor", "and", "dividend", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataTable/Filter/CalculateEvolutionFilter.php#L125-L133
train
Formats a value with percentage sign and quotient precision
[ 30522, 5123, 3853, 4289, 10175, 5657, 1006, 1002, 3643, 1010, 1002, 4487, 11365, 2953, 1007, 1063, 1002, 3643, 1027, 2969, 1024, 1024, 2131, 4842, 13013, 4270, 10175, 5657, 1006, 1002, 3643, 1010, 1002, 4487, 11365, 2953, 1010, 1002, 2023, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php
ObjectNormalizer.setAttributeValue
protected function setAttributeValue($object, $attribute, $value, $format = null, array $context = []) { try { $this->propertyAccessor->setValue($object, $attribute, $value); } catch (NoSuchPropertyException $exception) { // Properties not found are ignored } }
php
protected function setAttributeValue($object, $attribute, $value, $format = null, array $context = []) { try { $this->propertyAccessor->setValue($object, $attribute, $value); } catch (NoSuchPropertyException $exception) { // Properties not found are ignored } }
[ "protected", "function", "setAttributeValue", "(", "$", "object", ",", "$", "attribute", ",", "$", "value", ",", "$", "format", "=", "null", ",", "array", "$", "context", "=", "[", "]", ")", "{", "try", "{", "$", "this", "->", "propertyAccessor", "->",...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php#L138-L145
train
Set the value of an attribute in the object
[ 30522, 5123, 3853, 2275, 19321, 3089, 8569, 2618, 10175, 5657, 1006, 1002, 4874, 1010, 1002, 17961, 1010, 1002, 3643, 1010, 1002, 4289, 1027, 19701, 1010, 9140, 1002, 6123, 1027, 1031, 1033, 1007, 1063, 3046, 1063, 1002, 2023, 1011, 1028, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Cache/Adapter/ChainAdapter.php
ChainAdapter.getItem
public function getItem($key) { $syncItem = $this->syncItem; $misses = []; foreach ($this->adapters as $i => $adapter) { $item = $adapter->getItem($key); if ($item->isHit()) { while (0 <= --$i) { $this->adapters[$i]->save($syncIte...
php
public function getItem($key) { $syncItem = $this->syncItem; $misses = []; foreach ($this->adapters as $i => $adapter) { $item = $adapter->getItem($key); if ($item->isHit()) { while (0 <= --$i) { $this->adapters[$i]->save($syncIte...
[ "public", "function", "getItem", "(", "$", "key", ")", "{", "$", "syncItem", "=", "$", "this", "->", "syncItem", ";", "$", "misses", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "adapters", "as", "$", "i", "=>", "$", "adapter", ")", "{"...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Cache/Adapter/ChainAdapter.php#L118-L138
train
Get an item from the cache
[ 30522, 2270, 3853, 2131, 4221, 2213, 1006, 1002, 3145, 1007, 1063, 1002, 26351, 4221, 2213, 1027, 1002, 2023, 1011, 1028, 26351, 4221, 2213, 1025, 1002, 22182, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 15581, 2545, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/ReportRenderer/Pdf.php
Pdf.paintReportHeader
private function paintReportHeader() { $isAggregateReport = !empty($this->reportMetadata['dimension']); // Graph-only report static $graphOnlyReportCount = 0; $graphOnlyReport = $isAggregateReport && $this->displayGraph && !$this->displayTable; // Table-only report ...
php
private function paintReportHeader() { $isAggregateReport = !empty($this->reportMetadata['dimension']); // Graph-only report static $graphOnlyReportCount = 0; $graphOnlyReport = $isAggregateReport && $this->displayGraph && !$this->displayTable; // Table-only report ...
[ "private", "function", "paintReportHeader", "(", ")", "{", "$", "isAggregateReport", "=", "!", "empty", "(", "$", "this", "->", "reportMetadata", "[", "'dimension'", "]", ")", ";", "// Graph-only report", "static", "$", "graphOnlyReportCount", "=", "0", ";", "...
Generate a header of page.
[ "Generate", "a", "header", "of", "page", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/ReportRenderer/Pdf.php#L220-L292
train
paints the report header
[ 30522, 2797, 3853, 6773, 2890, 6442, 4974, 2121, 1006, 1007, 1063, 1002, 18061, 13871, 2890, 5867, 2890, 6442, 1027, 999, 4064, 1006, 1002, 2023, 1011, 1028, 3189, 11368, 8447, 2696, 1031, 1005, 9812, 1005, 1033, 1007, 1025, 1013, 1013, 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/LanguagesManager/API.php
API.getLanguageForUser
public function getLanguageForUser($login) { if ($login == 'anonymous') { return false; } Piwik::checkUserHasSuperUserAccessOrIsTheUser($login); $lang = $this->getModel()->getLanguageForUser($login); return $lang; }
php
public function getLanguageForUser($login) { if ($login == 'anonymous') { return false; } Piwik::checkUserHasSuperUserAccessOrIsTheUser($login); $lang = $this->getModel()->getLanguageForUser($login); return $lang; }
[ "public", "function", "getLanguageForUser", "(", "$", "login", ")", "{", "if", "(", "$", "login", "==", "'anonymous'", ")", "{", "return", "false", ";", "}", "Piwik", "::", "checkUserHasSuperUserAccessOrIsTheUser", "(", "$", "login", ")", ";", "$", "lang", ...
Returns the language for the user @param string $login @return string
[ "Returns", "the", "language", "for", "the", "user" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/LanguagesManager/API.php#L273-L284
train
Returns the language for the given user
[ 30522, 2270, 3853, 2131, 25023, 6692, 3351, 29278, 20330, 1006, 1002, 8833, 2378, 1007, 1063, 2065, 1006, 1002, 8833, 2378, 1027, 1027, 1005, 10812, 1005, 1007, 1063, 2709, 6270, 1025, 1065, 14255, 9148, 2243, 1024, 1024, 4638, 20330, 14949...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/ConfigFileFinder.php
ConfigFileFinder.locateFileInFolder
public function locateFileInFolder($filename, array $folders) { $list = []; foreach ($folders as $folder) { $list += $this->detectInFolder($folder, $filename); } return $list; }
php
public function locateFileInFolder($filename, array $folders) { $list = []; foreach ($folders as $folder) { $list += $this->detectInFolder($folder, $filename); } return $list; }
[ "public", "function", "locateFileInFolder", "(", "$", "filename", ",", "array", "$", "folders", ")", "{", "$", "list", "=", "[", "]", ";", "foreach", "(", "$", "folders", "as", "$", "folder", ")", "{", "$", "list", "+=", "$", "this", "->", "detectInF...
Find filename from a list of folders. Note: Only finds the last override. @param string $filename @param array $folders @return array
[ "Find", "filename", "from", "a", "list", "of", "folders", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Config/ConfigFileFinder.php#L93-L100
train
Locates a file in a list of folders
[ 30522, 2270, 3853, 12453, 8873, 19856, 10371, 2121, 1006, 1002, 5371, 18442, 1010, 9140, 1002, 19622, 2015, 1007, 1063, 1002, 2862, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1002, 19622, 2015, 2004, 1002, 19622, 1007, 1063, 1002, 2862, 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/Validator/Constraints/Collection.php
Collection.initializeNestedConstraints
protected function initializeNestedConstraints() { parent::initializeNestedConstraints(); if (!\is_array($this->fields)) { throw new ConstraintDefinitionException(sprintf('The option "fields" is expected to be an array in constraint %s', __CLASS__)); } foreach ($this->f...
php
protected function initializeNestedConstraints() { parent::initializeNestedConstraints(); if (!\is_array($this->fields)) { throw new ConstraintDefinitionException(sprintf('The option "fields" is expected to be an array in constraint %s', __CLASS__)); } foreach ($this->f...
[ "protected", "function", "initializeNestedConstraints", "(", ")", "{", "parent", "::", "initializeNestedConstraints", "(", ")", ";", "if", "(", "!", "\\", "is_array", "(", "$", "this", "->", "fields", ")", ")", "{", "throw", "new", "ConstraintDefinitionException...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Validator/Constraints/Collection.php#L55-L74
train
Initializes nested constraints
[ 30522, 5123, 3853, 3988, 4697, 5267, 3064, 8663, 20528, 18447, 2015, 1006, 1007, 1063, 6687, 1024, 1024, 3988, 4697, 5267, 3064, 8663, 20528, 18447, 2015, 1006, 1007, 1025, 2065, 1006, 999, 1032, 2003, 1035, 9140, 1006, 1002, 2023, 1011, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Tracker/VisitExcluded.php
VisitExcluded.isNonHumanBot
protected function isNonHumanBot() { $allowBots = $this->request->getParam('bots'); $deviceDetector = DeviceDetectorFactory::getInstance($this->userAgent); return !$allowBots && ($deviceDetector->isBot() || $this->isIpInRange()); }
php
protected function isNonHumanBot() { $allowBots = $this->request->getParam('bots'); $deviceDetector = DeviceDetectorFactory::getInstance($this->userAgent); return !$allowBots && ($deviceDetector->isBot() || $this->isIpInRange()); }
[ "protected", "function", "isNonHumanBot", "(", ")", "{", "$", "allowBots", "=", "$", "this", "->", "request", "->", "getParam", "(", "'bots'", ")", ";", "$", "deviceDetector", "=", "DeviceDetectorFactory", "::", "getInstance", "(", "$", "this", "->", "userAg...
Live/Bing/MSN bot and Googlebot are evolving to detect cloaked websites. As a result, these sophisticated bots exhibit characteristics of browsers (cookies enabled, executing JavaScript, etc). @see \DeviceDetector\Parser\Bot @return boolean
[ "Live", "/", "Bing", "/", "MSN", "bot", "and", "Googlebot", "are", "evolving", "to", "detect", "cloaked", "websites", ".", "As", "a", "result", "these", "sophisticated", "bots", "exhibit", "characteristics", "of", "browsers", "(", "cookies", "enabled", "execut...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Tracker/VisitExcluded.php#L174-L182
train
Check if the user is not a human bot
[ 30522, 5123, 3853, 3475, 2239, 28600, 2319, 18384, 1006, 1007, 1063, 1002, 3499, 27014, 1027, 1002, 2023, 1011, 1028, 5227, 1011, 1028, 2131, 28689, 2213, 1006, 1005, 28516, 2015, 1005, 1007, 1025, 1002, 5080, 3207, 26557, 4263, 1027, 5080,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Validator/Constraints/LuhnValidator.php
LuhnValidator.validate
public function validate($value, Constraint $constraint) { if (!$constraint instanceof Luhn) { throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Luhn'); } if (null === $value || '' === $value) { return; } // Work with strings only, becau...
php
public function validate($value, Constraint $constraint) { if (!$constraint instanceof Luhn) { throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Luhn'); } if (null === $value || '' === $value) { return; } // Work with strings only, becau...
[ "public", "function", "validate", "(", "$", "value", ",", "Constraint", "$", "constraint", ")", "{", "if", "(", "!", "$", "constraint", "instanceof", "Luhn", ")", "{", "throw", "new", "UnexpectedTypeException", "(", "$", "constraint", ",", "__NAMESPACE__", "...
Validates a credit card number with the Luhn algorithm. @param mixed $value @param Constraint $constraint @throws UnexpectedTypeException when the given credit card number is no string
[ "Validates", "a", "credit", "card", "number", "with", "the", "Luhn", "algorithm", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Validator/Constraints/LuhnValidator.php#L41-L96
train
Validate the value of the constraint
[ 30522, 2270, 3853, 9398, 3686, 1006, 1002, 3643, 1010, 27142, 1002, 27142, 1007, 1063, 2065, 1006, 999, 1002, 27142, 6013, 11253, 11320, 7295, 1007, 1063, 5466, 2047, 9223, 13874, 10288, 24422, 1006, 1002, 27142, 1010, 1035, 1035, 3415, 153...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/MediaLibrary.php
MediaLibrary.makeFolder
public function makeFolder($path) { $path = self::validatePath($path); $fullPath = $this->getMediaPath($path); return $this->getStorageDisk()->makeDirectory($fullPath); }
php
public function makeFolder($path) { $path = self::validatePath($path); $fullPath = $this->getMediaPath($path); return $this->getStorageDisk()->makeDirectory($fullPath); }
[ "public", "function", "makeFolder", "(", "$", "path", ")", "{", "$", "path", "=", "self", "::", "validatePath", "(", "$", "path", ")", ";", "$", "fullPath", "=", "$", "this", "->", "getMediaPath", "(", "$", "path", ")", ";", "return", "$", "this", ...
Creates a folder. @param string $path Specifies the folder path. @return boolean
[ "Creates", "a", "folder", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/classes/MediaLibrary.php#L435-L441
train
Create a folder in the current folder
[ 30522, 2270, 3853, 2191, 10371, 2121, 1006, 1002, 4130, 1007, 1063, 1002, 4130, 1027, 2969, 1024, 1024, 9398, 3686, 15069, 1006, 1002, 4130, 1007, 1025, 1002, 2440, 15069, 1027, 1002, 2023, 1011, 1028, 2131, 16969, 15069, 1006, 1002, 4130, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Traits/ModelTree.php
ModelTree.buildSelectOptions
protected function buildSelectOptions(array $nodes = [], $parentId = 0, $prefix = '') { $prefix = $prefix ?: str_repeat('&nbsp;', 6); $options = []; if (empty($nodes)) { $nodes = $this->allNodes(); } foreach ($nodes as $node) { $node[$this->titleCol...
php
protected function buildSelectOptions(array $nodes = [], $parentId = 0, $prefix = '') { $prefix = $prefix ?: str_repeat('&nbsp;', 6); $options = []; if (empty($nodes)) { $nodes = $this->allNodes(); } foreach ($nodes as $node) { $node[$this->titleCol...
[ "protected", "function", "buildSelectOptions", "(", "array", "$", "nodes", "=", "[", "]", ",", "$", "parentId", "=", "0", ",", "$", "prefix", "=", "''", ")", "{", "$", "prefix", "=", "$", "prefix", "?", ":", "str_repeat", "(", "'&nbsp;'", ",", "6", ...
Build options of select field in form. @param array $nodes @param int $parentId @param string $prefix @return array
[ "Build", "options", "of", "select", "field", "in", "form", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Traits/ModelTree.php#L254-L278
train
Build select options
[ 30522, 5123, 3853, 16473, 12260, 6593, 7361, 9285, 1006, 9140, 1002, 14164, 1027, 1031, 1033, 1010, 1002, 6687, 3593, 1027, 1014, 1010, 1002, 17576, 1027, 1005, 1005, 1007, 1063, 1002, 17576, 1027, 1002, 17576, 1029, 1024, 2358, 2099, 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/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php
PdoSessionHandler.updateTimestamp
public function updateTimestamp($sessionId, $data) { $maxlifetime = (int) ini_get('session.gc_maxlifetime'); try { $updateStmt = $this->pdo->prepare( "UPDATE $this->table SET $this->lifetimeCol = :lifetime, $this->timeCol = :time WHERE $this->idCol = :id" ); ...
php
public function updateTimestamp($sessionId, $data) { $maxlifetime = (int) ini_get('session.gc_maxlifetime'); try { $updateStmt = $this->pdo->prepare( "UPDATE $this->table SET $this->lifetimeCol = :lifetime, $this->timeCol = :time WHERE $this->idCol = :id" ); ...
[ "public", "function", "updateTimestamp", "(", "$", "sessionId", ",", "$", "data", ")", "{", "$", "maxlifetime", "=", "(", "int", ")", "ini_get", "(", "'session.gc_maxlifetime'", ")", ";", "try", "{", "$", "updateStmt", "=", "$", "this", "->", "pdo", "->"...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php#L370-L389
train
Update timestamp of session
[ 30522, 2270, 3853, 10651, 7292, 9153, 8737, 1006, 1002, 5219, 3593, 1010, 1002, 2951, 1007, 1063, 1002, 4098, 15509, 7292, 1027, 1006, 20014, 1007, 1999, 2072, 1035, 2131, 1006, 1005, 5219, 1012, 1043, 2278, 1035, 4098, 15509, 7292, 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...
laravel/framework
src/Illuminate/Mail/Transport/MailgunTransport.php
MailgunTransport.getTo
protected function getTo(Swift_Mime_SimpleMessage $message) { return collect($this->allContacts($message))->map(function ($display, $address) { return $display ? $display." <{$address}>" : $address; })->values()->implode(','); }
php
protected function getTo(Swift_Mime_SimpleMessage $message) { return collect($this->allContacts($message))->map(function ($display, $address) { return $display ? $display." <{$address}>" : $address; })->values()->implode(','); }
[ "protected", "function", "getTo", "(", "Swift_Mime_SimpleMessage", "$", "message", ")", "{", "return", "collect", "(", "$", "this", "->", "allContacts", "(", "$", "message", ")", ")", "->", "map", "(", "function", "(", "$", "display", ",", "$", "address", ...
Get the "to" payload field for the API request. @param \Swift_Mime_SimpleMessage $message @return string
[ "Get", "the", "to", "payload", "field", "for", "the", "API", "request", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Mail/Transport/MailgunTransport.php#L112-L117
train
Get To address of message
[ 30522, 5123, 3853, 2131, 3406, 1006, 9170, 1035, 2771, 4168, 1035, 3722, 7834, 3736, 3351, 1002, 4471, 1007, 1063, 2709, 8145, 1006, 1002, 2023, 1011, 1028, 2035, 8663, 2696, 16649, 1006, 1002, 4471, 1007, 1007, 1011, 1028, 4949, 1006, 38...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Cloner/Data.php
Data.dump
public function dump(DumperInterface $dumper) { $refs = [0]; $this->dumpItem($dumper, new Cursor(), $refs, $this->data[$this->position][$this->key]); }
php
public function dump(DumperInterface $dumper) { $refs = [0]; $this->dumpItem($dumper, new Cursor(), $refs, $this->data[$this->position][$this->key]); }
[ "public", "function", "dump", "(", "DumperInterface", "$", "dumper", ")", "{", "$", "refs", "=", "[", "0", "]", ";", "$", "this", "->", "dumpItem", "(", "$", "dumper", ",", "new", "Cursor", "(", ")", ",", "$", "refs", ",", "$", "this", "->", "dat...
Dumps data with a DumperInterface dumper.
[ "Dumps", "data", "with", "a", "DumperInterface", "dumper", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/VarDumper/Cloner/Data.php#L262-L266
train
Dump the current item to the given DumperInterface
[ 30522, 2270, 3853, 15653, 1006, 15653, 23282, 3334, 12172, 1002, 15653, 2121, 1007, 1063, 1002, 25416, 2015, 1027, 1031, 1014, 1033, 1025, 1002, 2023, 1011, 1028, 15653, 4221, 2213, 1006, 1002, 15653, 2121, 1010, 2047, 12731, 25301, 2099, 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/Common/Page/Pages.php
Pages.getHomeRoute
public static function getHomeRoute() { if (empty(self::$home_route)) { $grav = Grav::instance(); /** @var Config $config */ $config = $grav['config']; /** @var Language $language */ $language = $grav['language']; $home = $config->ge...
php
public static function getHomeRoute() { if (empty(self::$home_route)) { $grav = Grav::instance(); /** @var Config $config */ $config = $grav['config']; /** @var Language $language */ $language = $grav['language']; $home = $config->ge...
[ "public", "static", "function", "getHomeRoute", "(", ")", "{", "if", "(", "empty", "(", "self", "::", "$", "home_route", ")", ")", "{", "$", "grav", "=", "Grav", "::", "instance", "(", ")", ";", "/** @var Config $config */", "$", "config", "=", "$", "g...
Gets the home route @return string
[ "Gets", "the", "home", "route" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Page/Pages.php#L888-L924
train
Get home route
[ 30522, 2270, 10763, 3853, 2131, 23393, 10624, 10421, 1006, 1007, 1063, 2065, 1006, 4064, 1006, 2969, 1024, 1024, 1002, 2188, 1035, 2799, 1007, 1007, 1063, 1002, 24665, 11431, 1027, 24665, 11431, 1024, 1024, 6013, 1006, 1007, 1025, 1013, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Auth/TokenGuard.php
TokenGuard.validate
public function validate(array $credentials = []) { if (empty($credentials[$this->inputKey])) { return false; } $credentials = [$this->storageKey => $credentials[$this->inputKey]]; if ($this->provider->retrieveByCredentials($credentials)) { return true; ...
php
public function validate(array $credentials = []) { if (empty($credentials[$this->inputKey])) { return false; } $credentials = [$this->storageKey => $credentials[$this->inputKey]]; if ($this->provider->retrieveByCredentials($credentials)) { return true; ...
[ "public", "function", "validate", "(", "array", "$", "credentials", "=", "[", "]", ")", "{", "if", "(", "empty", "(", "$", "credentials", "[", "$", "this", "->", "inputKey", "]", ")", ")", "{", "return", "false", ";", "}", "$", "credentials", "=", ...
Validate a user's credentials. @param array $credentials @return bool
[ "Validate", "a", "user", "s", "credentials", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/TokenGuard.php#L122-L135
train
Validate if the user is logged in
[ 30522, 2270, 3853, 9398, 3686, 1006, 9140, 1002, 22496, 1027, 1031, 1033, 1007, 1063, 2065, 1006, 4064, 1006, 1002, 22496, 1031, 1002, 2023, 1011, 1028, 7953, 14839, 1033, 1007, 1007, 1063, 2709, 6270, 1025, 1065, 1002, 22496, 1027, 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...
symfony/symfony
src/Symfony/Component/Console/Helper/TableStyle.php
TableStyle.setHorizontalBorderChar
public function setHorizontalBorderChar($horizontalBorderChar) { @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use setHorizontalBorderChars() instead.', __METHOD__), E_USER_DEPRECATED); return $this->setHorizontalBorderChars($horizontalBorderChar, $horizontalBorderChar)...
php
public function setHorizontalBorderChar($horizontalBorderChar) { @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use setHorizontalBorderChars() instead.', __METHOD__), E_USER_DEPRECATED); return $this->setHorizontalBorderChars($horizontalBorderChar, $horizontalBorderChar)...
[ "public", "function", "setHorizontalBorderChar", "(", "$", "horizontalBorderChar", ")", "{", "@", "trigger_error", "(", "sprintf", "(", "'The \"%s()\" method is deprecated since Symfony 4.1, use setHorizontalBorderChars() instead.'", ",", "__METHOD__", ")", ",", "E_USER_DEPRECATE...
Sets horizontal border character. @param string $horizontalBorderChar @return $this @deprecated since Symfony 4.1, use {@link setHorizontalBorderChars()} instead.
[ "Sets", "horizontal", "border", "character", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Helper/TableStyle.php#L113-L118
train
Sets horizontal border character for all page elements
[ 30522, 2270, 3853, 6662, 10050, 11597, 9080, 12821, 4063, 7507, 2099, 1006, 1002, 9876, 12821, 4063, 7507, 2099, 1007, 1063, 1030, 9495, 1035, 7561, 1006, 9043, 2546, 1006, 1005, 1996, 1000, 1003, 1055, 1006, 1007, 1000, 4118, 2003, 2139, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/GeoIPAutoUpdater.php
GeoIPAutoUpdater.performRedundantDbChecks
protected function performRedundantDbChecks($logErrors = true) { $databaseTypes = array_keys(GeoIp::$dbNames); foreach ($databaseTypes as $type) { $customNames = array( 'loc' => array(), 'isp' => array(), 'org' => array() ); ...
php
protected function performRedundantDbChecks($logErrors = true) { $databaseTypes = array_keys(GeoIp::$dbNames); foreach ($databaseTypes as $type) { $customNames = array( 'loc' => array(), 'isp' => array(), 'org' => array() ); ...
[ "protected", "function", "performRedundantDbChecks", "(", "$", "logErrors", "=", "true", ")", "{", "$", "databaseTypes", "=", "array_keys", "(", "GeoIp", "::", "$", "dbNames", ")", ";", "foreach", "(", "$", "databaseTypes", "as", "$", "type", ")", "{", "$"...
Utility function that checks if geolocation works with each installed database, and if one or more doesn't, they are renamed to make sure tracking will work. This is a safety measure used to make sure tracking isn't affected if strange update errors occur. Databases are renamed to ${original}.broken . Note: method is...
[ "Utility", "function", "that", "checks", "if", "geolocation", "works", "with", "each", "installed", "database", "and", "if", "one", "or", "more", "doesn", "t", "they", "are", "renamed", "to", "make", "sure", "tracking", "will", "work", ".", "This", "is", "...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/UserCountry/GeoIPAutoUpdater.php#L559-L606
train
Perform redundant database checks
[ 30522, 5123, 3853, 4685, 5596, 18426, 3372, 18939, 5403, 10603, 1006, 1002, 8833, 2121, 29165, 2015, 1027, 2995, 1007, 1063, 1002, 7809, 13874, 2015, 1027, 9140, 1035, 6309, 1006, 20248, 11514, 1024, 1024, 1002, 16962, 18442, 2015, 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...
laravel/framework
src/Illuminate/Pipeline/Pipeline.php
Pipeline.carry
protected function carry() { return function ($stack, $pipe) { return function ($passable) use ($stack, $pipe) { if (is_callable($pipe)) { // If the pipe is an instance of a Closure, we will just call it directly but // otherwise we'll reso...
php
protected function carry() { return function ($stack, $pipe) { return function ($passable) use ($stack, $pipe) { if (is_callable($pipe)) { // If the pipe is an instance of a Closure, we will just call it directly but // otherwise we'll reso...
[ "protected", "function", "carry", "(", ")", "{", "return", "function", "(", "$", "stack", ",", "$", "pipe", ")", "{", "return", "function", "(", "$", "passable", ")", "use", "(", "$", "stack", ",", "$", "pipe", ")", "{", "if", "(", "is_callable", "...
Get a Closure that represents a slice of the application onion. @return \Closure
[ "Get", "a", "Closure", "that", "represents", "a", "slice", "of", "the", "application", "onion", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Pipeline/Pipeline.php#L137-L171
train
Returns a closure that will be used to carry the result of the method
[ 30522, 5123, 3853, 4287, 1006, 1007, 1063, 2709, 3853, 1006, 1002, 9991, 1010, 1002, 8667, 1007, 1063, 2709, 3853, 1006, 1002, 3413, 3085, 1007, 2224, 1006, 1002, 9991, 1010, 1002, 8667, 1007, 1063, 2065, 1006, 2003, 1035, 2655, 3085, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Query/Grammars/PostgresGrammar.php
PostgresGrammar.dateBasedWhere
protected function dateBasedWhere($type, Builder $query, $where) { $value = $this->parameter($where['value']); return 'extract('.$type.' from '.$this->wrap($where['column']).') '.$where['operator'].' '.$value; }
php
protected function dateBasedWhere($type, Builder $query, $where) { $value = $this->parameter($where['value']); return 'extract('.$type.' from '.$this->wrap($where['column']).') '.$where['operator'].' '.$value; }
[ "protected", "function", "dateBasedWhere", "(", "$", "type", ",", "Builder", "$", "query", ",", "$", "where", ")", "{", "$", "value", "=", "$", "this", "->", "parameter", "(", "$", "where", "[", "'value'", "]", ")", ";", "return", "'extract('", ".", ...
Compile a date based where clause. @param string $type @param \Illuminate\Database\Query\Builder $query @param array $where @return string
[ "Compile", "a", "date", "based", "where", "clause", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Grammars/PostgresGrammar.php#L100-L105
train
Date based where
[ 30522, 5123, 3853, 3058, 15058, 2094, 2860, 5886, 2063, 1006, 1002, 2828, 1010, 12508, 1002, 23032, 1010, 1002, 2073, 1007, 1063, 1002, 3643, 1027, 1002, 2023, 1011, 1028, 16381, 1006, 1002, 2073, 1031, 1005, 3643, 1005, 1033, 1007, 1025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Skin.php
Skin.getActive
public static function getActive() { if (self::$skinCache !== null) { return self::$skinCache; } $skinClass = Config::get('cms.backendSkin'); $skinObject = new $skinClass(); return self::$skinCache = $skinObject; }
php
public static function getActive() { if (self::$skinCache !== null) { return self::$skinCache; } $skinClass = Config::get('cms.backendSkin'); $skinObject = new $skinClass(); return self::$skinCache = $skinObject; }
[ "public", "static", "function", "getActive", "(", ")", "{", "if", "(", "self", "::", "$", "skinCache", "!==", "null", ")", "{", "return", "self", "::", "$", "skinCache", ";", "}", "$", "skinClass", "=", "Config", "::", "get", "(", "'cms.backendSkin'", ...
Returns the active skin.
[ "Returns", "the", "active", "skin", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/classes/Skin.php#L101-L110
train
Get the active backend skin
[ 30522, 2270, 10763, 3853, 2131, 19620, 1006, 1007, 1063, 2065, 1006, 2969, 1024, 1024, 1002, 3096, 3540, 5403, 999, 1027, 1027, 19701, 1007, 1063, 2709, 2969, 1024, 1024, 1002, 3096, 3540, 5403, 1025, 1065, 1002, 3096, 26266, 1027, 9530, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/system/console/OctoberUtil.php
OctoberUtil.utilGitPull
protected function utilGitPull() { foreach (File::directories(plugins_path()) as $authorDir) { foreach (File::directories($authorDir) as $pluginDir) { if (!File::isDirectory($pluginDir.'/.git')) continue; $exec = 'cd ' . $pluginDir . ' && '; $exec ...
php
protected function utilGitPull() { foreach (File::directories(plugins_path()) as $authorDir) { foreach (File::directories($authorDir) as $pluginDir) { if (!File::isDirectory($pluginDir.'/.git')) continue; $exec = 'cd ' . $pluginDir . ' && '; $exec ...
[ "protected", "function", "utilGitPull", "(", ")", "{", "foreach", "(", "File", "::", "directories", "(", "plugins_path", "(", ")", ")", "as", "$", "authorDir", ")", "{", "foreach", "(", "File", "::", "directories", "(", "$", "authorDir", ")", "as", "$", ...
This command requires the git binary to be installed.
[ "This", "command", "requires", "the", "git", "binary", "to", "be", "installed", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/console/OctoberUtil.php#L313-L332
train
Git pull - update all plugins and themes
[ 30522, 5123, 3853, 21183, 4014, 23806, 14289, 3363, 1006, 1007, 1063, 18921, 6776, 1006, 5371, 1024, 1024, 2472, 3111, 1006, 13354, 7076, 1035, 4130, 1006, 1007, 1007, 2004, 1002, 3166, 4305, 2099, 1007, 1063, 18921, 6776, 1006, 5371, 1024,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dompdf/dompdf
src/Css/Style.php
Style.set_background_image
function set_background_image($val) { //see __set and __get, on all assignments clear cache, not needed on direct set through __set $this->_prop_cache["background_image"] = null; $this->_props["background_image"] = $this->_image($val); }
php
function set_background_image($val) { //see __set and __get, on all assignments clear cache, not needed on direct set through __set $this->_prop_cache["background_image"] = null; $this->_props["background_image"] = $this->_image($val); }
[ "function", "set_background_image", "(", "$", "val", ")", "{", "//see __set and __get, on all assignments clear cache, not needed on direct set through __set", "$", "this", "->", "_prop_cache", "[", "\"background_image\"", "]", "=", "null", ";", "$", "this", "->", "_props",...
Set the background image url @link http://www.w3.org/TR/CSS21/colors.html#background-properties @param string $val
[ "Set", "the", "background", "image", "url", "@link", "http", ":", "//", "www", ".", "w3", ".", "org", "/", "TR", "/", "CSS21", "/", "colors", ".", "html#background", "-", "properties" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/Css/Style.php#L1845-L1850
train
set background image
[ 30522, 3853, 2275, 1035, 4281, 1035, 3746, 1006, 1002, 11748, 1007, 1063, 1013, 1013, 2156, 1035, 1035, 2275, 1998, 1035, 1035, 2131, 1010, 2006, 2035, 14799, 3154, 17053, 1010, 2025, 2734, 2006, 3622, 2275, 2083, 1035, 1035, 2275, 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/Console/Descriptor/MarkdownDescriptor.php
MarkdownDescriptor.describeInputArgument
protected function describeInputArgument(InputArgument $argument, array $options = []) { $this->write( '#### `'.($argument->getName() ?: '<none>')."`\n\n" .($argument->getDescription() ? preg_replace('/\s*[\r\n]\s*/', "\n", $argument->getDescription())."\n\n" : '') .'* Is...
php
protected function describeInputArgument(InputArgument $argument, array $options = []) { $this->write( '#### `'.($argument->getName() ?: '<none>')."`\n\n" .($argument->getDescription() ? preg_replace('/\s*[\r\n]\s*/', "\n", $argument->getDescription())."\n\n" : '') .'* Is...
[ "protected", "function", "describeInputArgument", "(", "InputArgument", "$", "argument", ",", "array", "$", "options", "=", "[", "]", ")", "{", "$", "this", "->", "write", "(", "'#### `'", ".", "(", "$", "argument", "->", "getName", "(", ")", "?", ":", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php#L55-L64
train
Describes an InputArgument
[ 30522, 5123, 3853, 6235, 2378, 18780, 2906, 22850, 4765, 1006, 7953, 2906, 22850, 4765, 1002, 6685, 1010, 9140, 1002, 7047, 1027, 1031, 1033, 1007, 1063, 1002, 2023, 1011, 1028, 4339, 1006, 1005, 1001, 1001, 1001, 1001, 1036, 1005, 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/Validation/Rules/Unique.php
Unique.ignoreModel
public function ignoreModel($model, $idColumn = null) { $this->idColumn = $idColumn ?? $model->getKeyName(); $this->ignore = $model->{$this->idColumn}; return $this; }
php
public function ignoreModel($model, $idColumn = null) { $this->idColumn = $idColumn ?? $model->getKeyName(); $this->ignore = $model->{$this->idColumn}; return $this; }
[ "public", "function", "ignoreModel", "(", "$", "model", ",", "$", "idColumn", "=", "null", ")", "{", "$", "this", "->", "idColumn", "=", "$", "idColumn", "??", "$", "model", "->", "getKeyName", "(", ")", ";", "$", "this", "->", "ignore", "=", "$", ...
Ignore the given model during the unique check. @param \Illuminate\Database\Eloquent\Model $model @param string|null $idColumn @return $this
[ "Ignore", "the", "given", "model", "during", "the", "unique", "check", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Rules/Unique.php#L51-L57
train
Ignore a model
[ 30522, 2270, 3853, 8568, 5302, 9247, 1006, 1002, 2944, 1010, 1002, 8909, 25778, 2819, 2078, 1027, 19701, 1007, 1063, 1002, 2023, 1011, 1028, 8909, 25778, 2819, 2078, 1027, 1002, 8909, 25778, 2819, 2078, 1029, 1029, 1002, 2944, 1011, 1028, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Form/Extension/Core/Type/DateIntervalType.php
DateIntervalType.buildForm
public function buildForm(FormBuilderInterface $builder, array $options) { if (!$options['with_years'] && !$options['with_months'] && !$options['with_weeks'] && !$options['with_days'] && !$options['with_hours'] && !$options['with_minutes'] && !$options['with_seconds']) { throw new InvalidConfigu...
php
public function buildForm(FormBuilderInterface $builder, array $options) { if (!$options['with_years'] && !$options['with_months'] && !$options['with_weeks'] && !$options['with_days'] && !$options['with_hours'] && !$options['with_minutes'] && !$options['with_seconds']) { throw new InvalidConfigu...
[ "public", "function", "buildForm", "(", "FormBuilderInterface", "$", "builder", ",", "array", "$", "options", ")", "{", "if", "(", "!", "$", "options", "[", "'with_years'", "]", "&&", "!", "$", "options", "[", "'with_months'", "]", "&&", "!", "$", "optio...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/Extension/Core/Type/DateIntervalType.php#L49-L149
train
Build the form.
[ 30522, 2270, 3853, 3857, 14192, 1006, 2433, 8569, 23891, 6657, 3334, 12172, 1002, 12508, 1010, 9140, 1002, 7047, 1007, 1063, 2065, 1006, 999, 1002, 7047, 1031, 1005, 2007, 1035, 2086, 1005, 1033, 1004, 1004, 999, 1002, 7047, 1031, 1005, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
overtrue/wechat
src/OpenWork/Corp/Client.php
Client.getAuthorization
public function getAuthorization(string $authCorpId, string $permanentCode) { $params = [ 'auth_corpid' => $authCorpId, 'permanent_code' => $permanentCode, ]; return $this->httpPostJson('cgi-bin/service/get_auth_info', $params); }
php
public function getAuthorization(string $authCorpId, string $permanentCode) { $params = [ 'auth_corpid' => $authCorpId, 'permanent_code' => $permanentCode, ]; return $this->httpPostJson('cgi-bin/service/get_auth_info', $params); }
[ "public", "function", "getAuthorization", "(", "string", "$", "authCorpId", ",", "string", "$", "permanentCode", ")", "{", "$", "params", "=", "[", "'auth_corpid'", "=>", "$", "authCorpId", ",", "'permanent_code'", "=>", "$", "permanentCode", ",", "]", ";", ...
获取企业授权信息. @param string $authCorpId @param string $permanentCode @return mixed @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
[ "获取企业授权信息", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OpenWork/Corp/Client.php#L123-L131
train
Get Authorization Info
[ 30522, 2270, 3853, 2131, 4887, 27844, 3989, 1006, 5164, 1002, 8740, 2705, 24586, 3593, 1010, 5164, 1002, 4568, 16044, 1007, 1063, 1002, 11498, 5244, 1027, 1031, 1005, 8740, 2705, 1035, 13058, 3593, 1005, 1027, 1028, 1002, 8740, 2705, 24586,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/KernelBrowser.php
KernelBrowser.doRequest
protected function doRequest($request) { // avoid shutting down the Kernel if no request has been performed yet // WebTestCase::createClient() boots the Kernel but do not handle a request if ($this->hasPerformedRequest && $this->reboot) { $this->kernel->shutdown(); } else...
php
protected function doRequest($request) { // avoid shutting down the Kernel if no request has been performed yet // WebTestCase::createClient() boots the Kernel but do not handle a request if ($this->hasPerformedRequest && $this->reboot) { $this->kernel->shutdown(); } else...
[ "protected", "function", "doRequest", "(", "$", "request", ")", "{", "// avoid shutting down the Kernel if no request has been performed yet", "// WebTestCase::createClient() boots the Kernel but do not handle a request", "if", "(", "$", "this", "->", "hasPerformedRequest", "&&", "...
{@inheritdoc} @param Request $request A Request instance @return Response A Response instance
[ "{", "@inheritdoc", "}" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/FrameworkBundle/KernelBrowser.php#L114-L132
train
Override doRequest to disable profiler and shutdown if request has been performed
[ 30522, 5123, 3853, 2079, 2890, 15500, 1006, 1002, 5227, 1007, 1063, 1013, 1013, 4468, 17521, 2091, 1996, 16293, 2065, 2053, 5227, 2038, 2042, 2864, 2664, 1013, 1013, 4773, 22199, 18382, 1024, 1024, 3443, 20464, 11638, 1006, 1007, 6879, 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...
matomo-org/matomo
core/Db.php
Db.getDatabaseConfig
public static function getDatabaseConfig($dbConfig = null) { $config = Config::getInstance(); if (is_null($dbConfig)) { $dbConfig = $config->database; } /** * Triggered before a database connection is established. * * This event can be used to...
php
public static function getDatabaseConfig($dbConfig = null) { $config = Config::getInstance(); if (is_null($dbConfig)) { $dbConfig = $config->database; } /** * Triggered before a database connection is established. * * This event can be used to...
[ "public", "static", "function", "getDatabaseConfig", "(", "$", "dbConfig", "=", "null", ")", "{", "$", "config", "=", "Config", "::", "getInstance", "(", ")", ";", "if", "(", "is_null", "(", "$", "dbConfig", ")", ")", "{", "$", "dbConfig", "=", "$", ...
Returns an array with the Database connection information. @param array|null $dbConfig @return array
[ "Returns", "an", "array", "with", "the", "Database", "connection", "information", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Db.php#L66-L97
train
Get the database configuration
[ 30522, 2270, 10763, 3853, 2131, 2850, 2696, 15058, 8663, 8873, 2290, 1006, 1002, 16962, 8663, 8873, 2290, 1027, 19701, 1007, 1063, 1002, 9530, 8873, 2290, 1027, 9530, 8873, 2290, 1024, 1024, 2131, 7076, 26897, 1006, 1007, 1025, 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
core/DataAccess/ArchiveTableCreator.php
ArchiveTableCreator.getTablesArchivesInstalled
public static function getTablesArchivesInstalled($type = null) { if (is_null(self::$tablesAlreadyInstalled)) { self::refreshTableList(); } if (empty($type)) { $tableMatchRegex = '/archive_(numeric|blob)_/'; } else { $tableMatchRegex = '/archive_'...
php
public static function getTablesArchivesInstalled($type = null) { if (is_null(self::$tablesAlreadyInstalled)) { self::refreshTableList(); } if (empty($type)) { $tableMatchRegex = '/archive_(numeric|blob)_/'; } else { $tableMatchRegex = '/archive_'...
[ "public", "static", "function", "getTablesArchivesInstalled", "(", "$", "type", "=", "null", ")", "{", "if", "(", "is_null", "(", "self", "::", "$", "tablesAlreadyInstalled", ")", ")", "{", "self", "::", "refreshTableList", "(", ")", ";", "}", "if", "(", ...
Returns all table names archive_* @param string $type The type of table to return. Either `self::NUMERIC_TABLE` or `self::BLOB_TABLE`. @return array
[ "Returns", "all", "table", "names", "archive_", "*" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataAccess/ArchiveTableCreator.php#L77-L96
train
Get tablesArchivesInstalled - Returns array of tables which match given type
[ 30522, 2270, 10763, 3853, 2131, 10880, 10286, 5428, 6961, 7076, 9080, 3709, 1006, 1002, 2828, 1027, 19701, 1007, 1063, 2065, 1006, 2003, 1035, 19701, 1006, 2969, 1024, 1024, 1002, 7251, 2389, 16416, 5149, 7076, 9080, 3709, 1007, 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...
dompdf/dompdf
lib/Cpdf.php
Cpdf.ARC4
function ARC4($text) { $len = mb_strlen($text, '8bit'); $a = 0; $b = 0; $c = $this->arc4; $out = ''; for ($i = 0; $i < $len; $i++) { $a = ($a + 1) % 256; $t = $c[$a]; $b = ($b + ord($t)) % 256; $c[$a] = $c[$b]; ...
php
function ARC4($text) { $len = mb_strlen($text, '8bit'); $a = 0; $b = 0; $c = $this->arc4; $out = ''; for ($i = 0; $i < $len; $i++) { $a = ($a + 1) % 256; $t = $c[$a]; $b = ($b + ord($t)) % 256; $c[$a] = $c[$b]; ...
[ "function", "ARC4", "(", "$", "text", ")", "{", "$", "len", "=", "mb_strlen", "(", "$", "text", ",", "'8bit'", ")", ";", "$", "a", "=", "0", ";", "$", "b", "=", "0", ";", "$", "c", "=", "$", "this", "->", "arc4", ";", "$", "out", "=", "''...
ARC4 encrypt a text string @param $text @return string
[ "ARC4", "encrypt", "a", "text", "string" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/lib/Cpdf.php#L2188-L2206
train
ARC4 - Format text
[ 30522, 3853, 8115, 2549, 1006, 1002, 3793, 1007, 1063, 1002, 18798, 1027, 16914, 1035, 2358, 20927, 2078, 1006, 1002, 3793, 1010, 1005, 1022, 16313, 1005, 1007, 1025, 1002, 1037, 1027, 1014, 1025, 1002, 1038, 1027, 1014, 1025, 1002, 1039, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.forPageBeforeId
public function forPageBeforeId($perPage = 15, $lastId = 0, $column = 'id') { $this->orders = $this->removeExistingOrdersFor($column); if (! is_null($lastId)) { $this->where($column, '<', $lastId); } return $this->orderBy($column, 'desc') ->take($per...
php
public function forPageBeforeId($perPage = 15, $lastId = 0, $column = 'id') { $this->orders = $this->removeExistingOrdersFor($column); if (! is_null($lastId)) { $this->where($column, '<', $lastId); } return $this->orderBy($column, 'desc') ->take($per...
[ "public", "function", "forPageBeforeId", "(", "$", "perPage", "=", "15", ",", "$", "lastId", "=", "0", ",", "$", "column", "=", "'id'", ")", "{", "$", "this", "->", "orders", "=", "$", "this", "->", "removeExistingOrdersFor", "(", "$", "column", ")", ...
Constrain the query to the previous "page" of results before a given ID. @param int $perPage @param int|null $lastId @param string $column @return \Illuminate\Database\Query\Builder|static
[ "Constrain", "the", "query", "to", "the", "previous", "page", "of", "results", "before", "a", "given", "ID", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L1953-L1963
train
take pages before id
[ 30522, 2270, 3853, 2005, 13704, 4783, 29278, 7416, 2094, 1006, 1002, 2566, 13704, 1027, 2321, 1010, 1002, 2197, 3593, 1027, 1014, 1010, 1002, 5930, 1027, 30524, 1006, 1002, 5930, 1007, 1025, 2065, 1006, 999, 2003, 1035, 19701, 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/Messenger/Middleware/SendMessageMiddleware.php
SendMessageMiddleware.getSenders
private function getSenders(Envelope $envelope, &$handle, ?RedeliveryStamp $redeliveryStamp): iterable { if (null !== $redeliveryStamp) { return [ $redeliveryStamp->getSenderClassOrAlias() => $this->sendersLocator->getSenderByAlias($redeliveryStamp->getSenderClassOrAlias()), ...
php
private function getSenders(Envelope $envelope, &$handle, ?RedeliveryStamp $redeliveryStamp): iterable { if (null !== $redeliveryStamp) { return [ $redeliveryStamp->getSenderClassOrAlias() => $this->sendersLocator->getSenderByAlias($redeliveryStamp->getSenderClassOrAlias()), ...
[ "private", "function", "getSenders", "(", "Envelope", "$", "envelope", ",", "&", "$", "handle", ",", "?", "RedeliveryStamp", "$", "redeliveryStamp", ")", ":", "iterable", "{", "if", "(", "null", "!==", "$", "redeliveryStamp", ")", "{", "return", "[", "$", ...
* @return iterable|SenderInterface[]
[ "*" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Messenger/Middleware/SendMessageMiddleware.php#L110-L119
train
Get all sender objects for a given envelope and handle.
[ 30522, 2797, 3853, 4152, 10497, 2545, 1006, 11255, 1002, 11255, 1010, 1004, 1002, 5047, 1010, 1029, 2417, 20806, 27900, 9153, 8737, 1002, 2417, 20806, 27900, 9153, 8737, 1007, 1024, 2009, 6906, 3468, 1063, 2065, 1006, 19701, 999, 1027, 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...
symfony/symfony
src/Symfony/Contracts/Service/ServiceLocatorTrait.php
ServiceLocatorTrait.get
public function get($id) { if (!isset($this->factories[$id])) { throw $this->createNotFoundException($id); } if (isset($this->loading[$id])) { $ids = array_values($this->loading); $ids = \array_slice($this->loading, array_search($id, $ids)); $...
php
public function get($id) { if (!isset($this->factories[$id])) { throw $this->createNotFoundException($id); } if (isset($this->loading[$id])) { $ids = array_values($this->loading); $ids = \array_slice($this->loading, array_search($id, $ids)); $...
[ "public", "function", "get", "(", "$", "id", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "factories", "[", "$", "id", "]", ")", ")", "{", "throw", "$", "this", "->", "createNotFoundException", "(", "$", "id", ")", ";", "}", "if", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Contracts/Service/ServiceLocatorTrait.php#L48-L68
train
Get a fact by its id
[ 30522, 2270, 3853, 2131, 1006, 1002, 8909, 1007, 1063, 2065, 1006, 999, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 11123, 1031, 1002, 8909, 1033, 1007, 1007, 1063, 5466, 1002, 2023, 1011, 1028, 3443, 17048, 14876, 8630, 10288, 24422, 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...
overtrue/wechat
src/Kernel/Support/AES.php
AES.encrypt
public static function encrypt(string $text, string $key, string $iv, int $option = OPENSSL_RAW_DATA): string { self::validateKey($key); self::validateIv($iv); return openssl_encrypt($text, self::getMode($key), $key, $option, $iv); }
php
public static function encrypt(string $text, string $key, string $iv, int $option = OPENSSL_RAW_DATA): string { self::validateKey($key); self::validateIv($iv); return openssl_encrypt($text, self::getMode($key), $key, $option, $iv); }
[ "public", "static", "function", "encrypt", "(", "string", "$", "text", ",", "string", "$", "key", ",", "string", "$", "iv", ",", "int", "$", "option", "=", "OPENSSL_RAW_DATA", ")", ":", "string", "{", "self", "::", "validateKey", "(", "$", "key", ")", ...
@param string $text @param string $key @param string $iv @param int $option @return string
[ "@param", "string", "$text", "@param", "string", "$key", "@param", "string", "$iv", "@param", "int", "$option" ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Kernel/Support/AES.php#L29-L35
train
Encrypts text using the openssl_encrypt function
[ 30522, 2270, 10763, 3853, 4372, 26775, 22571, 2102, 1006, 5164, 1002, 3793, 30524, 1007, 1025, 2969, 1024, 1024, 9398, 3686, 12848, 1006, 1002, 4921, 1007, 1025, 2709, 7480, 14540, 1035, 4372, 26775, 22571, 2102, 1006, 1002, 3793, 1010, 296...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
guzzle/guzzle
src/HandlerStack.php
HandlerStack.splice
private function splice($findName, $withName, callable $middleware, $before) { $this->cached = null; $idx = $this->findByName($findName); $tuple = [$middleware, $withName]; if ($before) { if ($idx === 0) { array_unshift($this->stack, $tuple); ...
php
private function splice($findName, $withName, callable $middleware, $before) { $this->cached = null; $idx = $this->findByName($findName); $tuple = [$middleware, $withName]; if ($before) { if ($idx === 0) { array_unshift($this->stack, $tuple); ...
[ "private", "function", "splice", "(", "$", "findName", ",", "$", "withName", ",", "callable", "$", "middleware", ",", "$", "before", ")", "{", "$", "this", "->", "cached", "=", "null", ";", "$", "idx", "=", "$", "this", "->", "findByName", "(", "$", ...
Splices a function into the middleware list at a specific position. @param string $findName @param string $withName @param callable $middleware @param bool $before
[ "Splices", "a", "function", "into", "the", "middleware", "list", "at", "a", "specific", "position", "." ]
bf595424e4d442a190582e088985dc835a789071
https://github.com/guzzle/guzzle/blob/bf595424e4d442a190582e088985dc835a789071/src/HandlerStack.php#L231-L250
train
Splice a middleware into the stack
[ 30522, 2797, 3853, 11867, 13231, 1006, 1002, 2424, 18442, 1010, 1002, 2007, 18442, 1010, 2655, 3085, 1002, 2690, 8059, 1010, 1002, 2077, 1007, 1063, 1002, 2023, 1011, 1028, 17053, 2094, 1027, 19701, 1025, 1002, 8909, 2595, 1027, 1002, 2023,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Login/Controller.php
Controller.configureView
protected function configureView($view) { $this->setBasicVariablesNoneAdminView($view); $view->linkTitle = Piwik::getRandomTitle(); // crsf token: don't trust the submitted value; generate/fetch it from session data $view->nonce = Nonce::getNonce('Login.login'); }
php
protected function configureView($view) { $this->setBasicVariablesNoneAdminView($view); $view->linkTitle = Piwik::getRandomTitle(); // crsf token: don't trust the submitted value; generate/fetch it from session data $view->nonce = Nonce::getNonce('Login.login'); }
[ "protected", "function", "configureView", "(", "$", "view", ")", "{", "$", "this", "->", "setBasicVariablesNoneAdminView", "(", "$", "view", ")", ";", "$", "view", "->", "linkTitle", "=", "Piwik", "::", "getRandomTitle", "(", ")", ";", "// crsf token: don't tr...
Configure common view properties @param View $view
[ "Configure", "common", "view", "properties" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Login/Controller.php#L175-L183
train
Configure the view for the admin
[ 30522, 5123, 3853, 9530, 8873, 27390, 6777, 2666, 2860, 1006, 1002, 3193, 1007, 1063, 1002, 2023, 1011, 1028, 2275, 22083, 2594, 10755, 19210, 2015, 8540, 13775, 10020, 8584, 1006, 1002, 3193, 1007, 1025, 1002, 3193, 1011, 1028, 4957, 3775,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Scheduling/Event.php
Event.callBeforeCallbacks
public function callBeforeCallbacks(Container $container) { foreach ($this->beforeCallbacks as $callback) { $container->call($callback); } }
php
public function callBeforeCallbacks(Container $container) { foreach ($this->beforeCallbacks as $callback) { $container->call($callback); } }
[ "public", "function", "callBeforeCallbacks", "(", "Container", "$", "container", ")", "{", "foreach", "(", "$", "this", "->", "beforeCallbacks", "as", "$", "callback", ")", "{", "$", "container", "->", "call", "(", "$", "callback", ")", ";", "}", "}" ]
Call all of the "before" callbacks for the event. @param \Illuminate\Contracts\Container\Container $container @return void
[ "Call", "all", "of", "the", "before", "callbacks", "for", "the", "event", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Console/Scheduling/Event.php#L242-L247
train
Call all before callbacks
[ 30522, 2270, 3853, 2655, 4783, 29278, 19281, 3363, 12221, 1006, 11661, 1002, 11661, 1007, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 2077, 9289, 20850, 8684, 2015, 2004, 1002, 2655, 5963, 1007, 1063, 1002, 11661, 1011, 1028, 2655, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Auth/SessionGuard.php
SessionGuard.once
public function once(array $credentials = []) { $this->fireAttemptEvent($credentials); if ($this->validate($credentials)) { $this->setUser($this->lastAttempted); return true; } return false; }
php
public function once(array $credentials = []) { $this->fireAttemptEvent($credentials); if ($this->validate($credentials)) { $this->setUser($this->lastAttempted); return true; } return false; }
[ "public", "function", "once", "(", "array", "$", "credentials", "=", "[", "]", ")", "{", "$", "this", "->", "fireAttemptEvent", "(", "$", "credentials", ")", ";", "if", "(", "$", "this", "->", "validate", "(", "$", "credentials", ")", ")", "{", "$", ...
Log a user into the application without sessions or cookies. @param array $credentials @return bool
[ "Log", "a", "user", "into", "the", "application", "without", "sessions", "or", "cookies", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/SessionGuard.php#L213-L224
train
This method is used to check if the user is logged in and if so if so if so if so if so if so if so if so if so if so if so if so if so if so if so if so if so if so if so if so if so if so if so if so if so if so if so if so if so if so if so if so if so if so if so if so if so if so if so if so if so if so if
[ 30522, 2270, 3853, 2320, 1006, 9140, 1002, 22496, 1027, 1031, 1033, 1007, 1063, 1002, 2023, 1011, 1028, 2543, 19321, 6633, 13876, 18697, 3372, 1006, 1002, 22496, 1007, 1025, 2065, 1006, 1002, 2023, 1011, 1028, 9398, 3686, 1006, 1002, 22496,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Nonce.php
Nonce.getAcceptableOrigins
public static function getAcceptableOrigins() { $host = Url::getCurrentHost(null); $port = ''; // parse host:port if (preg_match('/^([^:]+):([0-9]+)$/D', $host, $matches)) { $host = $matches[1]; $port = $matches[2]; } if (empty($host)) { ...
php
public static function getAcceptableOrigins() { $host = Url::getCurrentHost(null); $port = ''; // parse host:port if (preg_match('/^([^:]+):([0-9]+)$/D', $host, $matches)) { $host = $matches[1]; $port = $matches[2]; } if (empty($host)) { ...
[ "public", "static", "function", "getAcceptableOrigins", "(", ")", "{", "$", "host", "=", "Url", "::", "getCurrentHost", "(", "null", ")", ";", "$", "port", "=", "''", ";", "// parse host:port", "if", "(", "preg_match", "(", "'/^([^:]+):([0-9]+)$/D'", ",", "$...
Returns a list acceptable values for the HTTP **Origin** header. @return array
[ "Returns", "a", "list", "acceptable", "values", "for", "the", "HTTP", "**", "Origin", "**", "header", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Nonce.php#L127-L155
train
Get acceptable origins
[ 30522, 2270, 10763, 3853, 2131, 6305, 3401, 22799, 3468, 10050, 16529, 1006, 1007, 1063, 1002, 3677, 1027, 24471, 2140, 1024, 1024, 2131, 10841, 14343, 3372, 15006, 2102, 1006, 19701, 1007, 1025, 1002, 3417, 1027, 1005, 1005, 1025, 1013, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Mail/Storage/Writable/Maildir.php
Zend_Mail_Storage_Writable_Maildir.removeFolder
public function removeFolder($name) { // TODO: This could fail in the middle of the task, which is not optimal. // But there is no defined standard way to mark a folder as removed and there is no atomar fs-op // to remove a directory. Also moving the folder to a/the trash folder is not possi...
php
public function removeFolder($name) { // TODO: This could fail in the middle of the task, which is not optimal. // But there is no defined standard way to mark a folder as removed and there is no atomar fs-op // to remove a directory. Also moving the folder to a/the trash folder is not possi...
[ "public", "function", "removeFolder", "(", "$", "name", ")", "{", "// TODO: This could fail in the middle of the task, which is not optimal.", "// But there is no defined standard way to mark a folder as removed and there is no atomar fs-op", "// to remove a directory. Also moving the folder to ...
remove a folder @param string|Zend_Mail_Storage_Folder $name name or instance of folder @return null @throws Zend_Mail_Storage_Exception
[ "remove", "a", "folder" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail/Storage/Writable/Maildir.php#L222-L314
train
Remove folder from the store
[ 30522, 2270, 3853, 6366, 10371, 2121, 1006, 1002, 2171, 1007, 1063, 1013, 1013, 28681, 2080, 1024, 2023, 2071, 8246, 1999, 1996, 2690, 1997, 1996, 4708, 1010, 2029, 2003, 2025, 15502, 1012, 1013, 1013, 2021, 2045, 2003, 2053, 4225, 3115, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Filesystem/RecursiveDirectoryFilterIterator.php
RecursiveDirectoryFilterIterator.accept
public function accept() { /** @var \SplFileInfo $file */ $file = $this->current(); $filename = $file->getFilename(); $relative_filename = str_replace($this::$root . '/', '', $file->getPathname()); if ($file->isDir()) { if (in_array($relative_filename, $this::$ig...
php
public function accept() { /** @var \SplFileInfo $file */ $file = $this->current(); $filename = $file->getFilename(); $relative_filename = str_replace($this::$root . '/', '', $file->getPathname()); if ($file->isDir()) { if (in_array($relative_filename, $this::$ig...
[ "public", "function", "accept", "(", ")", "{", "/** @var \\SplFileInfo $file */", "$", "file", "=", "$", "this", "->", "current", "(", ")", ";", "$", "filename", "=", "$", "file", "->", "getFilename", "(", ")", ";", "$", "relative_filename", "=", "str_repl...
Check whether the current element of the iterator is acceptable @return bool true if the current element is acceptable, otherwise false.
[ "Check", "whether", "the", "current", "element", "of", "the", "iterator", "is", "acceptable" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Filesystem/RecursiveDirectoryFilterIterator.php#L40-L58
train
Accept a file or folder
[ 30522, 2270, 3853, 5138, 1006, 1007, 1063, 1013, 1008, 1008, 1030, 13075, 1032, 11867, 10270, 9463, 2378, 14876, 1002, 5371, 1008, 1013, 1002, 5371, 1027, 1002, 2023, 1011, 1028, 2783, 1006, 1007, 1025, 1002, 5371, 18442, 1027, 1002, 5371, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/CreditCard.php
Zend_Validate_CreditCard.addType
public function addType($type) { if (is_string($type)) { $type = array($type); } foreach($type as $typ) { if (defined('self::' . strtoupper($typ)) && !in_array($typ, $this->_type)) { $this->_type[] = $typ; } if (($typ == self:...
php
public function addType($type) { if (is_string($type)) { $type = array($type); } foreach($type as $typ) { if (defined('self::' . strtoupper($typ)) && !in_array($typ, $this->_type)) { $this->_type[] = $typ; } if (($typ == self:...
[ "public", "function", "addType", "(", "$", "type", ")", "{", "if", "(", "is_string", "(", "$", "type", ")", ")", "{", "$", "type", "=", "array", "(", "$", "type", ")", ";", "}", "foreach", "(", "$", "type", "as", "$", "typ", ")", "{", "if", "...
Adds a CCI to be accepted by validation @param string|array $type Type to allow for validation @return Zend_Validate_CreditCard Provides a fluid interface
[ "Adds", "a", "CCI", "to", "be", "accepted", "by", "validation" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Validate/CreditCard.php#L193-L210
train
Add type to the list of types
[ 30522, 2270, 3853, 5587, 13874, 1006, 1002, 2828, 1007, 1063, 2065, 1006, 2003, 1035, 5164, 1006, 1002, 2828, 1007, 1007, 1063, 1002, 2828, 1027, 9140, 1006, 1002, 2828, 1007, 1025, 1065, 18921, 6776, 1006, 1002, 2828, 2004, 1002, 5939, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Db/Adapter/Mysqli.php
Zend_Db_Adapter_Mysqli.setFetchMode
public function setFetchMode($mode) { switch ($mode) { case Zend_Db::FETCH_LAZY: case Zend_Db::FETCH_ASSOC: case Zend_Db::FETCH_NUM: case Zend_Db::FETCH_BOTH: case Zend_Db::FETCH_NAMED: case Zend_Db::FETCH_OBJ: $this->_f...
php
public function setFetchMode($mode) { switch ($mode) { case Zend_Db::FETCH_LAZY: case Zend_Db::FETCH_ASSOC: case Zend_Db::FETCH_NUM: case Zend_Db::FETCH_BOTH: case Zend_Db::FETCH_NAMED: case Zend_Db::FETCH_OBJ: $this->_f...
[ "public", "function", "setFetchMode", "(", "$", "mode", ")", "{", "switch", "(", "$", "mode", ")", "{", "case", "Zend_Db", "::", "FETCH_LAZY", ":", "case", "Zend_Db", "::", "FETCH_ASSOC", ":", "case", "Zend_Db", "::", "FETCH_NUM", ":", "case", "Zend_Db", ...
Set the fetch mode. @param int $mode @return void @throws Zend_Db_Adapter_Mysqli_Exception
[ "Set", "the", "fetch", "mode", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Adapter/Mysqli.php#L491-L516
train
Set the fetch mode
[ 30522, 2270, 3853, 2275, 7959, 10649, 5302, 3207, 1006, 1002, 5549, 1007, 1063, 6942, 1006, 1002, 5549, 1007, 1063, 2553, 16729, 2094, 1035, 16962, 1024, 1024, 18584, 1035, 13971, 1024, 2553, 16729, 2094, 1035, 16962, 1024, 1024, 18584, 103...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...