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/Database/Eloquent/Builder.php
Builder.delete
public function delete() { if (isset($this->onDelete)) { return call_user_func($this->onDelete, $this); } return $this->toBase()->delete(); }
php
public function delete() { if (isset($this->onDelete)) { return call_user_func($this->onDelete, $this); } return $this->toBase()->delete(); }
[ "public", "function", "delete", "(", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "onDelete", ")", ")", "{", "return", "call_user_func", "(", "$", "this", "->", "onDelete", ",", "$", "this", ")", ";", "}", "return", "$", "this", "->", "toB...
Delete a record from the database. @return mixed
[ "Delete", "a", "record", "from", "the", "database", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Builder.php#L883-L890
train
Delete the record
[ 30522, 2270, 3853, 3972, 12870, 1006, 1007, 1063, 2065, 1006, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 2006, 9247, 12870, 1007, 1007, 1063, 2709, 2655, 1035, 5310, 1035, 4569, 2278, 1006, 1002, 2023, 1011, 1028, 2006, 9247, 12870, 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...
spatie/laravel-permission
src/Traits/HasRoles.php
HasRoles.scopeRole
public function scopeRole(Builder $query, $roles, $guard = null): Builder { if ($roles instanceof Collection) { $roles = $roles->all(); } if (! is_array($roles)) { $roles = [$roles]; } $roles = array_map(function ($role) use ($guard) { if...
php
public function scopeRole(Builder $query, $roles, $guard = null): Builder { if ($roles instanceof Collection) { $roles = $roles->all(); } if (! is_array($roles)) { $roles = [$roles]; } $roles = array_map(function ($role) use ($guard) { if...
[ "public", "function", "scopeRole", "(", "Builder", "$", "query", ",", "$", "roles", ",", "$", "guard", "=", "null", ")", ":", "Builder", "{", "if", "(", "$", "roles", "instanceof", "Collection", ")", "{", "$", "roles", "=", "$", "roles", "->", "all",...
Scope the model query to certain roles only. @param \Illuminate\Database\Eloquent\Builder $query @param string|array|\Spatie\Permission\Contracts\Role|\Illuminate\Support\Collection $roles @param string $guard @return \Illuminate\Database\Eloquent\Builder
[ "Scope", "the", "model", "query", "to", "certain", "roles", "only", "." ]
81dbe9d372d70c255b66a2727a235076509f8d45
https://github.com/spatie/laravel-permission/blob/81dbe9d372d70c255b66a2727a235076509f8d45/src/Traits/HasRoles.php#L60-L88
train
Scope the query to only include roles.
[ 30522, 2270, 3853, 9531, 13153, 2063, 1006, 12508, 1002, 23032, 1010, 1002, 4395, 1010, 1002, 3457, 1027, 19701, 1007, 1024, 12508, 1063, 2065, 1006, 1002, 4395, 6013, 11253, 3074, 1007, 1063, 1002, 4395, 1027, 1002, 4395, 1011, 1028, 2035,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Validators/BaseValidator.php
BaseValidator.check
public static function check($name, $value, $validators) { foreach ($validators as $validator) { try { $validator->validate($value); } catch (\Exception $e) { throw new Exception(strip_tags($name) . ': ' . $e->getMessage(), $e->getCode()); ...
php
public static function check($name, $value, $validators) { foreach ($validators as $validator) { try { $validator->validate($value); } catch (\Exception $e) { throw new Exception(strip_tags($name) . ': ' . $e->getMessage(), $e->getCode()); ...
[ "public", "static", "function", "check", "(", "$", "name", ",", "$", "value", ",", "$", "validators", ")", "{", "foreach", "(", "$", "validators", "as", "$", "validator", ")", "{", "try", "{", "$", "validator", "->", "validate", "(", "$", "value", ")...
Lets you easily check a value against multiple validators. @param string $name The name/description of the field you want to validate the value for. The name will be prefixed in case there is any error. @param mixed $value The value which needs to be tested @param BaseValidator[] $validators
[ "Lets", "you", "easily", "check", "a", "value", "against", "multiple", "validators", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Validators/BaseValidator.php#L38-L47
train
Check if value passes all the validators
[ 30522, 2270, 10763, 3853, 4638, 1006, 1002, 2171, 1010, 1002, 3643, 1010, 1002, 9398, 18926, 1007, 1063, 18921, 6776, 1006, 1002, 9398, 18926, 2004, 1002, 9398, 8844, 1007, 1063, 3046, 1063, 1002, 9398, 8844, 1011, 1028, 9398, 3686, 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...
z-song/laravel-admin
src/Traits/ModelTree.php
ModelTree.delete
public function delete() { $this->where($this->parentColumn, $this->getKey())->delete(); return parent::delete(); }
php
public function delete() { $this->where($this->parentColumn, $this->getKey())->delete(); return parent::delete(); }
[ "public", "function", "delete", "(", ")", "{", "$", "this", "->", "where", "(", "$", "this", "->", "parentColumn", ",", "$", "this", "->", "getKey", "(", ")", ")", "->", "delete", "(", ")", ";", "return", "parent", "::", "delete", "(", ")", ";", ...
{@inheritdoc}
[ "{" ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Traits/ModelTree.php#L283-L288
train
Delete the record in the database
[ 30522, 2270, 3853, 3972, 12870, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 2073, 1006, 1002, 2023, 1011, 1028, 6687, 25778, 2819, 2078, 1010, 1002, 2023, 1011, 1028, 2131, 14839, 1006, 1007, 1007, 1011, 1028, 3972, 12870, 1006, 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...
matomo-org/matomo
core/Segment.php
Segment.combine
public static function combine($segment, $operator, $segmentCondition) { if (empty($segment)) { return $segmentCondition; } if (empty($segmentCondition) || self::containsCondition($segment, $operator, $segmentCondition) ) { return $segment; ...
php
public static function combine($segment, $operator, $segmentCondition) { if (empty($segment)) { return $segmentCondition; } if (empty($segmentCondition) || self::containsCondition($segment, $operator, $segmentCondition) ) { return $segment; ...
[ "public", "static", "function", "combine", "(", "$", "segment", ",", "$", "operator", ",", "$", "segmentCondition", ")", "{", "if", "(", "empty", "(", "$", "segment", ")", ")", "{", "return", "$", "segmentCondition", ";", "}", "if", "(", "empty", "(", ...
Combines this segment with another segment condition, if the segment condition is not already in the segment. The combination is naive in that it does not take order of operations into account. @param string $segment @param string $operator The operator to use. Should be either SegmentExpression::AND_DELIMITER or Seg...
[ "Combines", "this", "segment", "with", "another", "segment", "condition", "if", "the", "segment", "condition", "is", "not", "already", "in", "the", "segment", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Segment.php#L371-L384
train
Combine segment with segment condition
[ 30522, 2270, 10763, 3853, 11506, 1006, 1002, 6903, 1010, 1002, 6872, 1010, 1002, 6903, 8663, 20562, 1007, 1063, 2065, 1006, 4064, 1006, 1002, 6903, 1007, 1007, 1063, 2709, 1002, 6903, 8663, 20562, 1025, 1065, 2065, 1006, 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...
php-ai/php-ml
src/Tokenization/NGramTokenizer.php
NGramTokenizer.tokenize
public function tokenize(string $text): array { $words = []; preg_match_all('/\w\w+/u', $text, $words); $nGrams = []; foreach ($words[0] as $word) { $this->generateNGrams($word, $nGrams); } return $nGrams; }
php
public function tokenize(string $text): array { $words = []; preg_match_all('/\w\w+/u', $text, $words); $nGrams = []; foreach ($words[0] as $word) { $this->generateNGrams($word, $nGrams); } return $nGrams; }
[ "public", "function", "tokenize", "(", "string", "$", "text", ")", ":", "array", "{", "$", "words", "=", "[", "]", ";", "preg_match_all", "(", "'/\\w\\w+/u'", ",", "$", "text", ",", "$", "words", ")", ";", "$", "nGrams", "=", "[", "]", ";", "foreac...
{@inheritdoc}
[ "{" ]
f6aa1a59b0525b8fca3d2786d661ab3e70904016
https://github.com/php-ai/php-ml/blob/f6aa1a59b0525b8fca3d2786d661ab3e70904016/src/Tokenization/NGramTokenizer.php#L34-L45
train
Tokenize text into an array of words
[ 30522, 2270, 3853, 19204, 4697, 1006, 5164, 1002, 3793, 1007, 1024, 9140, 1063, 1002, 2616, 1027, 1031, 1033, 1025, 3653, 2290, 1035, 2674, 1035, 2035, 1006, 1005, 1013, 1032, 1059, 1032, 1059, 1009, 1013, 1057, 1005, 1010, 1002, 3793, 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...
PHPMailer/PHPMailer
src/PHPMailer.php
PHPMailer.DKIM_QP
public function DKIM_QP($txt) { $line = ''; $len = strlen($txt); for ($i = 0; $i < $len; ++$i) { $ord = ord($txt[$i]); if (((0x21 <= $ord) and ($ord <= 0x3A)) or $ord == 0x3C or ((0x3E <= $ord) and ($ord <= 0x7E))) { $line .= $txt[$i]; } el...
php
public function DKIM_QP($txt) { $line = ''; $len = strlen($txt); for ($i = 0; $i < $len; ++$i) { $ord = ord($txt[$i]); if (((0x21 <= $ord) and ($ord <= 0x3A)) or $ord == 0x3C or ((0x3E <= $ord) and ($ord <= 0x7E))) { $line .= $txt[$i]; } el...
[ "public", "function", "DKIM_QP", "(", "$", "txt", ")", "{", "$", "line", "=", "''", ";", "$", "len", "=", "strlen", "(", "$", "txt", ")", ";", "for", "(", "$", "i", "=", "0", ";", "$", "i", "<", "$", "len", ";", "++", "$", "i", ")", "{", ...
Quoted-Printable-encode a DKIM header. @param string $txt @return string
[ "Quoted", "-", "Printable", "-", "encode", "a", "DKIM", "header", "." ]
3d7132341659a8a201adbc3ba11b1e202ee2857c
https://github.com/PHPMailer/PHPMailer/blob/3d7132341659a8a201adbc3ba11b1e202ee2857c/src/PHPMailer.php#L4195-L4209
train
DKIM_QP - QP - QP - QP - QP - QP - QP - QP - QP - QP - QP - QP - QP - QP - QP - QP - QP - QP - QP - QP - QP - QP - QP - QP - QP - QP - QP - QP - QP - QP - QP - QP
[ 30522, 2270, 3853, 1040, 21138, 1035, 1053, 2361, 1006, 1002, 19067, 2102, 1007, 1063, 1002, 2240, 1027, 1005, 1005, 1025, 1002, 18798, 1027, 2358, 20927, 2078, 1006, 1002, 19067, 2102, 1007, 1025, 2005, 1006, 1002, 1045, 1027, 1014, 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/system/classes/UpdateManager.php
UpdateManager.rollbackPlugin
public function rollbackPlugin($name) { /* * Remove the plugin database and version */ if (!($plugin = $this->pluginManager->findByIdentifier($name)) && $this->versionManager->purgePlugin($name) ) { $this->note('<info>Purged from database:</info> ' ....
php
public function rollbackPlugin($name) { /* * Remove the plugin database and version */ if (!($plugin = $this->pluginManager->findByIdentifier($name)) && $this->versionManager->purgePlugin($name) ) { $this->note('<info>Purged from database:</info> ' ....
[ "public", "function", "rollbackPlugin", "(", "$", "name", ")", "{", "/*\n * Remove the plugin database and version\n */", "if", "(", "!", "(", "$", "plugin", "=", "$", "this", "->", "pluginManager", "->", "findByIdentifier", "(", "$", "name", ")", ...
Removes an existing plugin @param string $name Plugin name. @return self
[ "Removes", "an", "existing", "plugin" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/classes/UpdateManager.php#L540-L560
train
Rolls back a plugin
[ 30522, 2270, 3853, 4897, 5963, 24759, 15916, 2378, 1006, 1002, 2171, 1007, 1063, 1013, 1008, 1008, 6366, 1996, 13354, 2378, 7809, 1998, 2544, 1008, 1013, 2065, 1006, 999, 1006, 1002, 13354, 2378, 1027, 1002, 2023, 1011, 1028, 13354, 2378, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php
DoctrineExtractor.getTypes
public function getTypes($class, $property, array $context = []) { try { $metadata = $this->entityManager ? $this->entityManager->getClassMetadata($class) : $this->classMetadataFactory->getMetadataFor($class); } catch (MappingException $exception) { return; } catch (O...
php
public function getTypes($class, $property, array $context = []) { try { $metadata = $this->entityManager ? $this->entityManager->getClassMetadata($class) : $this->classMetadataFactory->getMetadataFor($class); } catch (MappingException $exception) { return; } catch (O...
[ "public", "function", "getTypes", "(", "$", "class", ",", "$", "property", ",", "array", "$", "context", "=", "[", "]", ")", "{", "try", "{", "$", "metadata", "=", "$", "this", "->", "entityManager", "?", "$", "this", "->", "entityManager", "->", "ge...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php#L78-L177
train
Get types of a class property
[ 30522, 2270, 3853, 2131, 13874, 2015, 1006, 1002, 2465, 1010, 1002, 3200, 1010, 9140, 1002, 6123, 1027, 1031, 1033, 1007, 1063, 3046, 1063, 1002, 27425, 1027, 30524, 1028, 2131, 11368, 8447, 2696, 29278, 1006, 1002, 2465, 1007, 1025, 1065, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php
NativeSessionStorage.start
public function start() { if ($this->started) { return true; } if (\PHP_SESSION_ACTIVE === session_status()) { throw new \RuntimeException('Failed to start the session: already started by PHP.'); } if (filter_var(ini_get('session.use_cookies'), FILTE...
php
public function start() { if ($this->started) { return true; } if (\PHP_SESSION_ACTIVE === session_status()) { throw new \RuntimeException('Failed to start the session: already started by PHP.'); } if (filter_var(ini_get('session.use_cookies'), FILTE...
[ "public", "function", "start", "(", ")", "{", "if", "(", "$", "this", "->", "started", ")", "{", "return", "true", ";", "}", "if", "(", "\\", "PHP_SESSION_ACTIVE", "===", "session_status", "(", ")", ")", "{", "throw", "new", "\\", "RuntimeException", "...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php#L134-L163
train
Start the session
[ 30522, 2270, 3853, 2707, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 2318, 1007, 1063, 2709, 2995, 1025, 1065, 2065, 1006, 1032, 25718, 1035, 5219, 1035, 3161, 1027, 1027, 1027, 5219, 1035, 3570, 1006, 1007, 1007, 1063, 5466, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Framework/Form/Traits/FormTrait.php
FormTrait.validateUpload
protected function validateUpload(UploadedFileInterface $file): void { // Handle bad filenames. $filename = $file->getClientFilename(); if (!Utils::checkFilename($filename)) { $grav = Grav::instance(); throw new \RuntimeException( sprintf($grav['langu...
php
protected function validateUpload(UploadedFileInterface $file): void { // Handle bad filenames. $filename = $file->getClientFilename(); if (!Utils::checkFilename($filename)) { $grav = Grav::instance(); throw new \RuntimeException( sprintf($grav['langu...
[ "protected", "function", "validateUpload", "(", "UploadedFileInterface", "$", "file", ")", ":", "void", "{", "// Handle bad filenames.", "$", "filename", "=", "$", "file", "->", "getClientFilename", "(", ")", ";", "if", "(", "!", "Utils", "::", "checkFilename", ...
Validate uploaded file. @param UploadedFileInterface $file
[ "Validate", "uploaded", "file", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Framework/Form/Traits/FormTrait.php#L535-L546
train
Validate uploaded file
[ 30522, 5123, 3853, 9398, 3686, 6279, 11066, 1006, 21345, 8873, 19856, 3334, 12172, 1002, 5371, 1007, 1024, 11675, 1063, 1013, 1013, 5047, 2919, 5371, 18442, 2015, 1012, 1002, 5371, 18442, 1027, 1002, 5371, 1011, 1028, 2131, 20464, 11638, 88...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Asset/PathPackage.php
PathPackage.getUrl
public function getUrl($path) { $versionedPath = parent::getUrl($path); // if absolute or begins with /, we're done if ($this->isAbsoluteUrl($versionedPath) || ($versionedPath && '/' === $versionedPath[0])) { return $versionedPath; } return $this->getBasePath()....
php
public function getUrl($path) { $versionedPath = parent::getUrl($path); // if absolute or begins with /, we're done if ($this->isAbsoluteUrl($versionedPath) || ($versionedPath && '/' === $versionedPath[0])) { return $versionedPath; } return $this->getBasePath()....
[ "public", "function", "getUrl", "(", "$", "path", ")", "{", "$", "versionedPath", "=", "parent", "::", "getUrl", "(", "$", "path", ")", ";", "// if absolute or begins with /, we're done", "if", "(", "$", "this", "->", "isAbsoluteUrl", "(", "$", "versionedPath"...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Asset/PathPackage.php#L54-L64
train
Get versioned path
[ 30522, 2270, 3853, 2131, 3126, 2140, 1006, 1002, 4130, 1007, 1063, 1002, 2544, 2098, 15069, 1027, 6687, 1024, 1024, 2131, 3126, 2140, 1006, 1002, 4130, 1007, 1025, 1013, 1013, 2065, 7619, 2030, 4269, 2007, 1013, 1010, 2057, 1005, 2128, 25...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Folder.php
Folder.lastModifiedFile
public static function lastModifiedFile($path, $extensions = 'md|yaml') { $last_modified = 0; /** @var UniformResourceLocator $locator */ $locator = Grav::instance()['locator']; $flags = \RecursiveDirectoryIterator::SKIP_DOTS; if ($locator->isStream($path)) { $di...
php
public static function lastModifiedFile($path, $extensions = 'md|yaml') { $last_modified = 0; /** @var UniformResourceLocator $locator */ $locator = Grav::instance()['locator']; $flags = \RecursiveDirectoryIterator::SKIP_DOTS; if ($locator->isStream($path)) { $di...
[ "public", "static", "function", "lastModifiedFile", "(", "$", "path", ",", "$", "extensions", "=", "'md|yaml'", ")", "{", "$", "last_modified", "=", "0", ";", "/** @var UniformResourceLocator $locator */", "$", "locator", "=", "Grav", "::", "instance", "(", ")",...
Recursively find the last modified time under given path by file. @param string $path @param string $extensions which files to search for specifically @return int
[ "Recursively", "find", "the", "last", "modified", "time", "under", "given", "path", "by", "file", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Filesystem/Folder.php#L57-L85
train
Get the last modified time of a file
[ 30522, 2270, 10763, 3853, 2197, 5302, 4305, 10451, 8873, 2571, 1006, 1002, 4130, 1010, 1002, 14305, 30524, 1035, 6310, 1027, 1014, 1025, 1013, 1008, 1008, 1030, 13075, 6375, 6072, 8162, 29109, 24755, 4263, 1002, 8840, 11266, 2953, 1008, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.registerMenuItems
public function registerMenuItems($owner, array $definitions) { if (!$this->items) { $this->items = []; } $this->addMainMenuItems($owner, $definitions); }
php
public function registerMenuItems($owner, array $definitions) { if (!$this->items) { $this->items = []; } $this->addMainMenuItems($owner, $definitions); }
[ "public", "function", "registerMenuItems", "(", "$", "owner", ",", "array", "$", "definitions", ")", "{", "if", "(", "!", "$", "this", "->", "items", ")", "{", "$", "this", "->", "items", "=", "[", "]", ";", "}", "$", "this", "->", "addMainMenuItems"...
Registers the back-end menu items. The argument is an array of the main menu items. The array keys represent the menu item codes, specific for the plugin/module. Each element in the array should be an associative array with the following keys: - label - specifies the menu label localization string key, required. - icon...
[ "Registers", "the", "back", "-", "end", "menu", "items", ".", "The", "argument", "is", "an", "array", "of", "the", "main", "menu", "items", ".", "The", "array", "keys", "represent", "the", "menu", "item", "codes", "specific", "for", "the", "plugin", "/",...
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/classes/NavigationManager.php#L185-L192
train
Registers main menu items
[ 30522, 2270, 3853, 4236, 3549, 14663, 6633, 2015, 1006, 1002, 3954, 1010, 9140, 1002, 15182, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 5167, 1007, 1063, 1002, 2023, 1011, 1028, 5167, 1027, 1031, 1033, 1025, 1065, 1002, 2023, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Common.php
Common.getCountry
public static function getCountry($lang, $enableLanguageToCountryGuess, $ip) { if (empty($lang) || strlen($lang) < 2 || $lang == self::LANGUAGE_CODE_INVALID) { return self::LANGUAGE_CODE_INVALID; } /** @var RegionDataProvider $dataProvider */ $dataProvider = StaticContai...
php
public static function getCountry($lang, $enableLanguageToCountryGuess, $ip) { if (empty($lang) || strlen($lang) < 2 || $lang == self::LANGUAGE_CODE_INVALID) { return self::LANGUAGE_CODE_INVALID; } /** @var RegionDataProvider $dataProvider */ $dataProvider = StaticContai...
[ "public", "static", "function", "getCountry", "(", "$", "lang", ",", "$", "enableLanguageToCountryGuess", ",", "$", "ip", ")", "{", "if", "(", "empty", "(", "$", "lang", ")", "||", "strlen", "(", "$", "lang", ")", "<", "2", "||", "$", "lang", "==", ...
Returns the visitor country based on the Browser 'accepted language' information, but provides a hook for geolocation via IP address. @param string $lang browser lang @param bool $enableLanguageToCountryGuess If set to true, some assumption will be made and detection guessed more often, but accuracy could be affected ...
[ "Returns", "the", "visitor", "country", "based", "on", "the", "Browser", "accepted", "language", "information", "but", "provides", "a", "hook", "for", "geolocation", "via", "IP", "address", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Common.php#L951-L963
train
Returns the country code for the given language and ip
[ 30522, 2270, 10763, 3853, 2131, 3597, 16671, 2854, 1006, 1002, 11374, 1010, 1002, 9585, 25023, 6692, 18150, 24163, 16671, 2854, 22967, 2015, 1010, 1002, 12997, 1007, 1063, 2065, 1006, 4064, 1006, 1002, 11374, 1007, 1064, 1064, 2358, 20927, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
overtrue/wechat
src/Kernel/BaseClient.php
BaseClient.requestRaw
public function requestRaw(string $url, string $method = 'GET', array $options = []) { return Response::buildFromPsrResponse($this->request($url, $method, $options, true)); }
php
public function requestRaw(string $url, string $method = 'GET', array $options = []) { return Response::buildFromPsrResponse($this->request($url, $method, $options, true)); }
[ "public", "function", "requestRaw", "(", "string", "$", "url", ",", "string", "$", "method", "=", "'GET'", ",", "array", "$", "options", "=", "[", "]", ")", "{", "return", "Response", "::", "buildFromPsrResponse", "(", "$", "this", "->", "request", "(", ...
@param string $url @param string $method @param array $options @return \EasyWeChat\Kernel\Http\Response @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
[ "@param", "string", "$url", "@param", "string", "$method", "@param", "array", "$options" ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Kernel/BaseClient.php#L184-L187
train
Sends a request to the given url and returns a Response object
[ 30522, 2270, 3853, 5227, 2527, 2860, 1006, 5164, 1002, 24471, 2140, 1010, 5164, 1002, 4118, 1027, 1005, 2131, 1005, 1010, 9140, 1002, 7047, 1027, 1031, 1033, 1007, 1063, 2709, 3433, 1024, 1024, 3857, 19699, 25377, 21338, 6072, 26029, 3366, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeServices.php
AbstractRememberMeServices.autoLogin
final public function autoLogin(Request $request): ?TokenInterface { if (null === $cookie = $request->cookies->get($this->options['name'])) { return null; } if (null !== $this->logger) { $this->logger->debug('Remember-me cookie detected.'); } $cookie...
php
final public function autoLogin(Request $request): ?TokenInterface { if (null === $cookie = $request->cookies->get($this->options['name'])) { return null; } if (null !== $this->logger) { $this->logger->debug('Remember-me cookie detected.'); } $cookie...
[ "final", "public", "function", "autoLogin", "(", "Request", "$", "request", ")", ":", "?", "TokenInterface", "{", "if", "(", "null", "===", "$", "cookie", "=", "$", "request", "->", "cookies", "->", "get", "(", "$", "this", "->", "options", "[", "'name...
Implementation of RememberMeServicesInterface. Detects whether a remember-me cookie was set, decodes it, and hands it to subclasses for further processing. @throws CookieTheftException @throws \RuntimeException
[ "Implementation", "of", "RememberMeServicesInterface", ".", "Detects", "whether", "a", "remember", "-", "me", "cookie", "was", "set", "decodes", "it", "and", "hands", "it", "to", "subclasses", "for", "further", "processing", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeServices.php#L94-L147
train
Tries to process the remember - me cookie and returns the token if successful.
[ 30522, 2345, 2270, 3853, 8285, 21197, 2378, 1006, 5227, 1002, 5227, 1007, 1024, 1029, 19204, 18447, 2121, 12172, 1063, 2065, 1006, 19701, 1027, 1027, 1027, 1002, 17387, 1027, 1002, 5227, 1011, 1028, 16324, 1011, 1028, 2131, 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...
matomo-org/matomo
plugins/CoreHome/Controller.php
Controller.getRowEvolutionPopover
public function getRowEvolutionPopover() { $rowEvolution = $this->makeRowEvolution($isMulti = false); $view = new View('@CoreHome/getRowEvolutionPopover'); return $rowEvolution->renderPopover($this, $view); }
php
public function getRowEvolutionPopover() { $rowEvolution = $this->makeRowEvolution($isMulti = false); $view = new View('@CoreHome/getRowEvolutionPopover'); return $rowEvolution->renderPopover($this, $view); }
[ "public", "function", "getRowEvolutionPopover", "(", ")", "{", "$", "rowEvolution", "=", "$", "this", "->", "makeRowEvolution", "(", "$", "isMulti", "=", "false", ")", ";", "$", "view", "=", "new", "View", "(", "'@CoreHome/getRowEvolutionPopover'", ")", ";", ...
Render the entire row evolution popover for a single row
[ "Render", "the", "entire", "row", "evolution", "popover", "for", "a", "single", "row" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/CoreHome/Controller.php#L208-L213
train
Get RowEvolution Popover
[ 30522, 2270, 3853, 2131, 10524, 6777, 4747, 13700, 16340, 7840, 1006, 1007, 1063, 1002, 20538, 6767, 7630, 3508, 1027, 1002, 2023, 1011, 1028, 9338, 29385, 6767, 7630, 3508, 1006, 1002, 2003, 12274, 7096, 2072, 1027, 6270, 1007, 1025, 30524...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Validation/Concerns/ValidatesAttributes.php
ValidatesAttributes.validateAfter
public function validateAfter($attribute, $value, $parameters) { $this->requireParameterCount(1, $parameters, 'after'); return $this->compareDates($attribute, $value, $parameters, '>'); }
php
public function validateAfter($attribute, $value, $parameters) { $this->requireParameterCount(1, $parameters, 'after'); return $this->compareDates($attribute, $value, $parameters, '>'); }
[ "public", "function", "validateAfter", "(", "$", "attribute", ",", "$", "value", ",", "$", "parameters", ")", "{", "$", "this", "->", "requireParameterCount", "(", "1", ",", "$", "parameters", ",", "'after'", ")", ";", "return", "$", "this", "->", "compa...
Validate the date is after a given date. @param string $attribute @param mixed $value @param array $parameters @return bool
[ "Validate", "the", "date", "is", "after", "a", "given", "date", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L116-L121
train
Validate that an attribute is after an attribute value.
[ 30522, 2270, 3853, 9398, 3686, 10354, 3334, 1006, 1002, 17961, 1010, 1002, 3643, 1010, 1002, 11709, 1007, 1063, 1002, 2023, 1011, 1028, 5478, 28689, 22828, 3597, 16671, 1006, 1015, 1010, 1002, 11709, 1010, 1005, 2044, 1005, 1007, 1025, 2709...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dompdf/dompdf
src/Css/Style.php
Style.set_background
function set_background($val) { $val = trim($val); $important = isset($this->_important_props["background"]); if ($val === "none") { $this->_set_style("background_image", "none", $important); $this->_set_style("background_color", "transparent", $important); }...
php
function set_background($val) { $val = trim($val); $important = isset($this->_important_props["background"]); if ($val === "none") { $this->_set_style("background_image", "none", $important); $this->_set_style("background_color", "transparent", $important); }...
[ "function", "set_background", "(", "$", "val", ")", "{", "$", "val", "=", "trim", "(", "$", "val", ")", ";", "$", "important", "=", "isset", "(", "$", "this", "->", "_important_props", "[", "\"background\"", "]", ")", ";", "if", "(", "$", "val", "=...
Sets the background - combined options @link http://www.w3.org/TR/CSS21/colors.html#propdef-background @param string $val
[ "Sets", "the", "background", "-", "combined", "options" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/Css/Style.php#L1909-L1944
train
set background property
[ 30522, 3853, 2275, 1035, 4281, 1006, 1002, 11748, 1007, 1063, 1002, 11748, 1027, 12241, 1006, 1002, 11748, 1007, 1025, 1002, 2590, 1027, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 1035, 2590, 1035, 24387, 1031, 1000, 4281, 1000, 1033, 1007,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Plugin/Manager.php
Manager.loadAllPluginsAndGetTheirInfo
public function loadAllPluginsAndGetTheirInfo() { /** @var Translator $translator */ $translator = StaticContainer::get('Piwik\Translation\Translator'); $plugins = array(); $listPlugins = array_merge( $this->readPluginsDirectory(), $this->pluginList->getActi...
php
public function loadAllPluginsAndGetTheirInfo() { /** @var Translator $translator */ $translator = StaticContainer::get('Piwik\Translation\Translator'); $plugins = array(); $listPlugins = array_merge( $this->readPluginsDirectory(), $this->pluginList->getActi...
[ "public", "function", "loadAllPluginsAndGetTheirInfo", "(", ")", "{", "/** @var Translator $translator */", "$", "translator", "=", "StaticContainer", "::", "get", "(", "'Piwik\\Translation\\Translator'", ")", ";", "$", "plugins", "=", "array", "(", ")", ";", "$", "...
Returns info regarding all plugins. Loads plugins that can be loaded. @return array An array that maps plugin names with arrays of plugin information. Plugin information consists of the following entries: - **activated**: Whether the plugin is activated. - **alwaysActivated**: Whether the plugin should always be acti...
[ "Returns", "info", "regarding", "all", "plugins", ".", "Loads", "plugins", "that", "can", "be", "loaded", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Plugin/Manager.php#L756-L811
train
Returns the information of all plugins and their status
[ 30522, 2270, 3853, 7170, 8095, 24759, 15916, 7076, 5685, 18150, 10760, 15735, 2078, 14876, 1006, 1007, 1063, 1013, 1008, 1008, 1030, 13075, 11403, 1002, 11403, 1008, 1013, 1002, 11403, 1027, 10763, 8663, 18249, 2121, 1024, 1024, 2131, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/classes/ListColumn.php
ListColumn.evalConfig
protected function evalConfig($config) { if (isset($config['width'])) { $this->width = $config['width']; } if (isset($config['cssClass'])) { $this->cssClass = $config['cssClass']; } if (isset($config['searchable'])) { $this->searchable = $c...
php
protected function evalConfig($config) { if (isset($config['width'])) { $this->width = $config['width']; } if (isset($config['cssClass'])) { $this->cssClass = $config['cssClass']; } if (isset($config['searchable'])) { $this->searchable = $c...
[ "protected", "function", "evalConfig", "(", "$", "config", ")", "{", "if", "(", "isset", "(", "$", "config", "[", "'width'", "]", ")", ")", "{", "$", "this", "->", "width", "=", "$", "config", "[", "'width'", "]", ";", "}", "if", "(", "isset", "(...
Process options and apply them to this object. @param array $config @return array
[ "Process", "options", "and", "apply", "them", "to", "this", "object", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/classes/ListColumn.php#L133-L176
train
Evaluate the config array
[ 30522, 5123, 3853, 9345, 22499, 2078, 8873, 2290, 1006, 1002, 9530, 8873, 2290, 1007, 1063, 2065, 1006, 26354, 3388, 1006, 1002, 9530, 8873, 2290, 1031, 1005, 9381, 1005, 1033, 1007, 1007, 1063, 1002, 2023, 1011, 1028, 9381, 1027, 1002, 9...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
guzzle/guzzle
src/Client.php
Client.configureDefaults
private function configureDefaults(array $config) { $defaults = [ 'allow_redirects' => RedirectMiddleware::$defaultSettings, 'http_errors' => true, 'decode_content' => true, 'verify' => true, 'cookies' => false ]; ...
php
private function configureDefaults(array $config) { $defaults = [ 'allow_redirects' => RedirectMiddleware::$defaultSettings, 'http_errors' => true, 'decode_content' => true, 'verify' => true, 'cookies' => false ]; ...
[ "private", "function", "configureDefaults", "(", "array", "$", "config", ")", "{", "$", "defaults", "=", "[", "'allow_redirects'", "=>", "RedirectMiddleware", "::", "$", "defaultSettings", ",", "'http_errors'", "=>", "true", ",", "'decode_content'", "=>", "true", ...
Configures the default options for a client. @param array $config
[ "Configures", "the", "default", "options", "for", "a", "client", "." ]
bf595424e4d442a190582e088985dc835a789071
https://github.com/guzzle/guzzle/blob/bf595424e4d442a190582e088985dc835a789071/src/Client.php#L158-L204
train
Configure the default values for the HTTP_PROXY and HTTP_NO_PROXY environment variables.
[ 30522, 2797, 3853, 26928, 12879, 23505, 2015, 1006, 9140, 1002, 9530, 8873, 2290, 1007, 1063, 1002, 12398, 2015, 1027, 1031, 1005, 3499, 1035, 2417, 7442, 16649, 1005, 1027, 1028, 2417, 7442, 6593, 4328, 20338, 8059, 1024, 1024, 1002, 12398...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
database/migrations/2016_01_04_173148_create_admin_tables.php
CreateAdminTables.down
public function down() { Schema::dropIfExists(config('admin.database.users_table')); Schema::dropIfExists(config('admin.database.roles_table')); Schema::dropIfExists(config('admin.database.permissions_table')); Schema::dropIfExists(config('admin.database.menu_table')); Schema...
php
public function down() { Schema::dropIfExists(config('admin.database.users_table')); Schema::dropIfExists(config('admin.database.roles_table')); Schema::dropIfExists(config('admin.database.permissions_table')); Schema::dropIfExists(config('admin.database.menu_table')); Schema...
[ "public", "function", "down", "(", ")", "{", "Schema", "::", "dropIfExists", "(", "config", "(", "'admin.database.users_table'", ")", ")", ";", "Schema", "::", "dropIfExists", "(", "config", "(", "'admin.database.roles_table'", ")", ")", ";", "Schema", "::", "...
Reverse the migrations. @return void
[ "Reverse", "the", "migrations", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/database/migrations/2016_01_04_173148_create_admin_tables.php#L107-L118
train
Down method to drop all tables in the database
[ 30522, 2270, 3853, 2091, 1006, 1007, 1063, 8040, 28433, 1024, 30524, 2795, 1005, 1007, 1007, 1025, 8040, 28433, 1024, 1024, 4530, 29323, 9048, 12837, 1006, 9530, 8873, 2290, 1006, 1005, 4748, 10020, 1012, 7809, 1012, 4395, 1035, 2795, 1005,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Validator/Constraints/CallbackValidator.php
CallbackValidator.validate
public function validate($object, Constraint $constraint) { if (!$constraint instanceof Callback) { throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Callback'); } $method = $constraint->callback; if ($method instanceof \Closure) { $method($objec...
php
public function validate($object, Constraint $constraint) { if (!$constraint instanceof Callback) { throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Callback'); } $method = $constraint->callback; if ($method instanceof \Closure) { $method($objec...
[ "public", "function", "validate", "(", "$", "object", ",", "Constraint", "$", "constraint", ")", "{", "if", "(", "!", "$", "constraint", "instanceof", "Callback", ")", "{", "throw", "new", "UnexpectedTypeException", "(", "$", "constraint", ",", "__NAMESPACE__"...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Validator/Constraints/CallbackValidator.php#L29-L60
train
Validate the object with the callback
[ 30522, 2270, 3853, 9398, 3686, 1006, 1002, 4874, 1010, 27142, 1002, 27142, 1007, 1063, 2065, 1006, 999, 1002, 27142, 6013, 11253, 2655, 5963, 1007, 1063, 5466, 2047, 9223, 13874, 10288, 24422, 1006, 1002, 27142, 1010, 1035, 1035, 3415, 1532...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
barryvdh/laravel-debugbar
src/DataFormatter/QueryFormatter.php
QueryFormatter.formatSource
public function formatSource($source) { if (! is_object($source)) { return ''; } $parts = []; if ($source->namespace) { $parts['namespace'] = $source->namespace . '::'; } $parts['name'] = $source->name; $parts['line'] = ':' . $source...
php
public function formatSource($source) { if (! is_object($source)) { return ''; } $parts = []; if ($source->namespace) { $parts['namespace'] = $source->namespace . '::'; } $parts['name'] = $source->name; $parts['line'] = ':' . $source...
[ "public", "function", "formatSource", "(", "$", "source", ")", "{", "if", "(", "!", "is_object", "(", "$", "source", ")", ")", "{", "return", "''", ";", "}", "$", "parts", "=", "[", "]", ";", "if", "(", "$", "source", "->", "namespace", ")", "{",...
Format a source object. @param object|null $source If the backtrace is disabled, the $source will be null. @return string
[ "Format", "a", "source", "object", "." ]
2d195779ea4f809f69764a795e2ec371dbb76a96
https://github.com/barryvdh/laravel-debugbar/blob/2d195779ea4f809f69764a795e2ec371dbb76a96/src/DataFormatter/QueryFormatter.php#L59-L75
train
Formats the source of the exception.
[ 30522, 2270, 3853, 11630, 8162, 3401, 1006, 1002, 3120, 1007, 1063, 2065, 1006, 999, 2003, 1035, 4874, 1006, 1002, 3120, 1007, 1007, 1063, 2709, 1005, 1005, 1025, 1065, 1002, 3033, 1027, 1031, 1033, 1025, 2065, 1006, 1002, 3120, 1011, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Form/Field/UploadField.php
UploadField.disk
public function disk($disk) { try { $this->storage = Storage::disk($disk); } catch (\Exception $exception) { if (!array_key_exists($disk, config('filesystems.disks'))) { admin_error( 'Config error.', "Disk [$disk] not co...
php
public function disk($disk) { try { $this->storage = Storage::disk($disk); } catch (\Exception $exception) { if (!array_key_exists($disk, config('filesystems.disks'))) { admin_error( 'Config error.', "Disk [$disk] not co...
[ "public", "function", "disk", "(", "$", "disk", ")", "{", "try", "{", "$", "this", "->", "storage", "=", "Storage", "::", "disk", "(", "$", "disk", ")", ";", "}", "catch", "(", "\\", "Exception", "$", "exception", ")", "{", "if", "(", "!", "array...
Set disk for storage. @param string $disk Disks defined in `config/filesystems.php`. @throws \Exception @return $this
[ "Set", "disk", "for", "storage", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Form/Field/UploadField.php#L153-L171
train
Load the filesystem storage
[ 30522, 2270, 3853, 9785, 1006, 1002, 9785, 1007, 1063, 3046, 1063, 1002, 2023, 1011, 1028, 5527, 30524, 6453, 1002, 6453, 1007, 1063, 2065, 1006, 999, 9140, 1035, 3145, 1035, 6526, 1006, 1002, 9785, 1010, 9530, 8873, 2290, 1006, 1005, 676...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Framework/Flex/Storage/FolderStorage.php
FolderStorage.hasKey
public function hasKey(string $key): bool { return $key && strpos($key, '@@') === false && file_exists($this->getPathFromKey($key)); }
php
public function hasKey(string $key): bool { return $key && strpos($key, '@@') === false && file_exists($this->getPathFromKey($key)); }
[ "public", "function", "hasKey", "(", "string", "$", "key", ")", ":", "bool", "{", "return", "$", "key", "&&", "strpos", "(", "$", "key", ",", "'@@'", ")", "===", "false", "&&", "file_exists", "(", "$", "this", "->", "getPathFromKey", "(", "$", "key",...
{@inheritdoc} @see FlexStorageInterface::hasKey()
[ "{" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Framework/Flex/Storage/FolderStorage.php#L72-L75
train
Has key?
[ 30522, 2270, 3853, 2038, 14839, 1006, 5164, 1002, 3145, 1007, 1024, 22017, 2140, 1063, 2709, 1002, 3145, 1004, 1004, 2358, 14536, 2891, 1006, 1002, 3145, 1010, 1005, 1030, 1030, 1005, 1007, 1027, 1027, 1027, 6270, 1004, 1004, 5371, 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...
getgrav/grav
system/src/Grav/Framework/File/AbstractFile.php
AbstractFile.isWritable
public function isWritable(): bool { if (!file_exists($this->filepath)) { return $this->isWritablePath($this->getPath()); } return is_writable($this->filepath) && is_file($this->filepath); }
php
public function isWritable(): bool { if (!file_exists($this->filepath)) { return $this->isWritablePath($this->getPath()); } return is_writable($this->filepath) && is_file($this->filepath); }
[ "public", "function", "isWritable", "(", ")", ":", "bool", "{", "if", "(", "!", "file_exists", "(", "$", "this", "->", "filepath", ")", ")", "{", "return", "$", "this", "->", "isWritablePath", "(", "$", "this", "->", "getPath", "(", ")", ")", ";", ...
{@inheritdoc} @see FileInterface::isWritable()
[ "{" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Framework/File/AbstractFile.php#L242-L249
train
Is writable path
[ 30522, 2270, 3853, 2003, 13088, 6590, 3468, 1006, 1007, 1024, 22017, 2140, 1063, 2065, 1006, 999, 5371, 1035, 6526, 1006, 1002, 2023, 1011, 1028, 5371, 15069, 1007, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 2003, 13088, 6590, 3468, 15069, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Cache/DynamoDbStore.php
DynamoDbStore.isExpired
protected function isExpired(array $item, $expiration = null) { $expiration = $expiration ?: Carbon::now(); return isset($item[$this->expirationAttribute]) && $expiration->getTimestamp() >= $item[$this->expirationAttribute]['N']; }
php
protected function isExpired(array $item, $expiration = null) { $expiration = $expiration ?: Carbon::now(); return isset($item[$this->expirationAttribute]) && $expiration->getTimestamp() >= $item[$this->expirationAttribute]['N']; }
[ "protected", "function", "isExpired", "(", "array", "$", "item", ",", "$", "expiration", "=", "null", ")", "{", "$", "expiration", "=", "$", "expiration", "?", ":", "Carbon", "::", "now", "(", ")", ";", "return", "isset", "(", "$", "item", "[", "$", ...
Determine if the given item is expired. @param array $item @param \DateTimeInterface|null $expiration @return bool
[ "Determine", "if", "the", "given", "item", "is", "expired", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Cache/DynamoDbStore.php#L176-L182
train
Checks if an item is expired
[ 30522, 5123, 3853, 2003, 10288, 21649, 1006, 9140, 1002, 8875, 1010, 1002, 4654, 16781, 1027, 19701, 1007, 1063, 1002, 4654, 16781, 1027, 1002, 4654, 16781, 1029, 1024, 6351, 1024, 1024, 2085, 1006, 1007, 1025, 2709, 26354, 30524, 1028, 465...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Db/Statement/Db2.php
Zend_Db_Statement_Db2._execute
public function _execute(array $params = null) { if (!$this->_stmt) { return false; } $retval = true; if ($params !== null) { $retval = @db2_execute($this->_stmt, $params); } else { $retval = @db2_execute($this->_stmt); } ...
php
public function _execute(array $params = null) { if (!$this->_stmt) { return false; } $retval = true; if ($params !== null) { $retval = @db2_execute($this->_stmt, $params); } else { $retval = @db2_execute($this->_stmt); } ...
[ "public", "function", "_execute", "(", "array", "$", "params", "=", "null", ")", "{", "if", "(", "!", "$", "this", "->", "_stmt", ")", "{", "return", "false", ";", "}", "$", "retval", "=", "true", ";", "if", "(", "$", "params", "!==", "null", ")"...
Executes a prepared statement. @param array $params OPTIONAL Values to bind to parameter placeholders. @return bool @throws Zend_Db_Statement_Db2_Exception
[ "Executes", "a", "prepared", "statement", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Statement/Db2.php#L194-L231
train
Execute the statement and return the result as an array
[ 30522, 2270, 3853, 1035, 15389, 1006, 9140, 1002, 11498, 5244, 1027, 19701, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 1035, 2358, 20492, 1007, 1063, 2709, 6270, 1025, 1065, 1002, 2128, 9189, 2389, 1027, 2995, 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...
octobercms/october
modules/backend/controllers/Users.php
Users.myaccount_onSave
public function myaccount_onSave() { $result = $this->asExtension('FormController')->update_onSave($this->user->id, 'myaccount'); /* * If the password or login name has been updated, reauthenticate the user */ $loginChanged = $this->user->login != post('User[login]'); ...
php
public function myaccount_onSave() { $result = $this->asExtension('FormController')->update_onSave($this->user->id, 'myaccount'); /* * If the password or login name has been updated, reauthenticate the user */ $loginChanged = $this->user->login != post('User[login]'); ...
[ "public", "function", "myaccount_onSave", "(", ")", "{", "$", "result", "=", "$", "this", "->", "asExtension", "(", "'FormController'", ")", "->", "update_onSave", "(", "$", "this", "->", "user", "->", "id", ",", "'myaccount'", ")", ";", "/*\n * If t...
Proxy update onSave event
[ "Proxy", "update", "onSave", "event" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/controllers/Users.php#L147-L161
train
Update the myaccount field
[ 30522, 2270, 3853, 2026, 6305, 3597, 16671, 1035, 2006, 3736, 3726, 1006, 1007, 1063, 1002, 2765, 1027, 1002, 2023, 1011, 1028, 2004, 10288, 29048, 1006, 1005, 2433, 8663, 13181, 10820, 1005, 1007, 1011, 1028, 10651, 1035, 2006, 3736, 3726,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Lock/Store/FlockStore.php
FlockStore.delete
public function delete(Key $key) { // The lock is maybe not acquired. if (!$key->hasState(__CLASS__)) { return; } $handle = $key->getState(__CLASS__); flock($handle, LOCK_UN | LOCK_NB); fclose($handle); $key->removeState(__CLASS__); }
php
public function delete(Key $key) { // The lock is maybe not acquired. if (!$key->hasState(__CLASS__)) { return; } $handle = $key->getState(__CLASS__); flock($handle, LOCK_UN | LOCK_NB); fclose($handle); $key->removeState(__CLASS__); }
[ "public", "function", "delete", "(", "Key", "$", "key", ")", "{", "// The lock is maybe not acquired.", "if", "(", "!", "$", "key", "->", "hasState", "(", "__CLASS__", ")", ")", "{", "return", ";", "}", "$", "handle", "=", "$", "key", "->", "getState", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Lock/Store/FlockStore.php#L117-L130
train
Delete the key
[ 30522, 2270, 3853, 3972, 12870, 1006, 3145, 1002, 3145, 1007, 1063, 1013, 1013, 1996, 5843, 2003, 2672, 2025, 3734, 1012, 2065, 1006, 999, 1002, 3145, 1011, 1028, 2038, 9153, 2618, 1006, 1035, 1035, 2465, 1035, 1035, 1007, 1007, 1063, 270...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php
NodeBuilder.getNodeClass
protected function getNodeClass($type) { $type = strtolower($type); if (!isset($this->nodeMapping[$type])) { throw new \RuntimeException(sprintf('The node type "%s" is not registered.', $type)); } $class = $this->nodeMapping[$type]; if (!class_exists($class)) {...
php
protected function getNodeClass($type) { $type = strtolower($type); if (!isset($this->nodeMapping[$type])) { throw new \RuntimeException(sprintf('The node type "%s" is not registered.', $type)); } $class = $this->nodeMapping[$type]; if (!class_exists($class)) {...
[ "protected", "function", "getNodeClass", "(", "$", "type", ")", "{", "$", "type", "=", "strtolower", "(", "$", "type", ")", ";", "if", "(", "!", "isset", "(", "$", "this", "->", "nodeMapping", "[", "$", "type", "]", ")", ")", "{", "throw", "new", ...
Returns the class name of the node definition. @param string $type The node type @return string The node definition class name @throws \RuntimeException When the node type is not registered @throws \RuntimeException When the node class is not found
[ "Returns", "the", "class", "name", "of", "the", "node", "definition", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Config/Definition/Builder/NodeBuilder.php#L222-L237
train
Returns the node class name for the given type
[ 30522, 5123, 3853, 2131, 3630, 3207, 26266, 1006, 1002, 2828, 1007, 1063, 1002, 2828, 1027, 2358, 5339, 12898, 13777, 1006, 1002, 2828, 1007, 1025, 2065, 1006, 999, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 13045, 2863, 14853, 1031, 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...
octobercms/october
modules/backend/classes/FormTabs.php
FormTabs.getPaneCssClass
public function getPaneCssClass($index = null, $label = null) { if (is_string($this->paneCssClass)) { return $this->paneCssClass; } if ($index !== null && isset($this->paneCssClass[$index])) { return $this->paneCssClass[$index]; } if ($label !== null...
php
public function getPaneCssClass($index = null, $label = null) { if (is_string($this->paneCssClass)) { return $this->paneCssClass; } if ($index !== null && isset($this->paneCssClass[$index])) { return $this->paneCssClass[$index]; } if ($label !== null...
[ "public", "function", "getPaneCssClass", "(", "$", "index", "=", "null", ",", "$", "label", "=", "null", ")", "{", "if", "(", "is_string", "(", "$", "this", "->", "paneCssClass", ")", ")", "{", "return", "$", "this", "->", "paneCssClass", ";", "}", "...
Returns a tab pane CSS class. @param string $index @param string $label @return string
[ "Returns", "a", "tab", "pane", "CSS", "class", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/classes/FormTabs.php#L204-L217
train
Return the pane CSS classes
[ 30522, 2270, 3853, 2131, 9739, 8586, 4757, 26266, 1006, 1002, 5950, 1027, 19701, 1010, 1002, 3830, 1027, 19701, 1007, 1063, 2065, 1006, 2003, 1035, 5164, 1006, 1002, 2023, 1011, 1028, 6090, 8586, 4757, 26266, 1007, 1007, 1063, 2709, 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...
dompdf/dompdf
src/Cellmap.php
Cellmap.update_row_group
public function update_row_group(Frame $group, Frame $last_row) { $g_key = $group->get_id(); $r_key = $last_row->get_id(); $r_rows = $this->_frames[$g_key]["rows"]; $this->_frames[$g_key]["rows"] = range($this->_frames[$g_key]["rows"][0], end($r_rows)); }
php
public function update_row_group(Frame $group, Frame $last_row) { $g_key = $group->get_id(); $r_key = $last_row->get_id(); $r_rows = $this->_frames[$g_key]["rows"]; $this->_frames[$g_key]["rows"] = range($this->_frames[$g_key]["rows"][0], end($r_rows)); }
[ "public", "function", "update_row_group", "(", "Frame", "$", "group", ",", "Frame", "$", "last_row", ")", "{", "$", "g_key", "=", "$", "group", "->", "get_id", "(", ")", ";", "$", "r_key", "=", "$", "last_row", "->", "get_id", "(", ")", ";", "$", "...
Update a row group after rows have been removed @param Frame $group The group to update @param Frame $last_row The last row in the row group
[ "Update", "a", "row", "group", "after", "rows", "have", "been", "removed" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/Cellmap.php#L797-L804
train
Update the row group
[ 30522, 2270, 3853, 10651, 1035, 5216, 1035, 2177, 1006, 4853, 1002, 2177, 1010, 4853, 1002, 2197, 1035, 5216, 1007, 1063, 1002, 1043, 1035, 3145, 1027, 1002, 2177, 1011, 1028, 2131, 1035, 8909, 1006, 1007, 1025, 1002, 1054, 1035, 3145, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select.joinInner
public function joinInner($name, $cond, $cols = self::SQL_WILDCARD, $schema = null) { return $this->_join(self::INNER_JOIN, $name, $cond, $cols, $schema); }
php
public function joinInner($name, $cond, $cols = self::SQL_WILDCARD, $schema = null) { return $this->_join(self::INNER_JOIN, $name, $cond, $cols, $schema); }
[ "public", "function", "joinInner", "(", "$", "name", ",", "$", "cond", ",", "$", "cols", "=", "self", "::", "SQL_WILDCARD", ",", "$", "schema", "=", "null", ")", "{", "return", "$", "this", "->", "_join", "(", "self", "::", "INNER_JOIN", ",", "$", ...
Add an INNER JOIN table and colums to the query Rows in both tables are matched according to the expression in the $cond argument. The result set is comprised of all cases where rows from the left table match rows from the right table. The $name and $cols parameters follow the same logic as described in the from() me...
[ "Add", "an", "INNER", "JOIN", "table", "and", "colums", "to", "the", "query", "Rows", "in", "both", "tables", "are", "matched", "according", "to", "the", "expression", "in", "the", "$cond", "argument", ".", "The", "result", "set", "is", "comprised", "of", ...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L334-L337
train
Inner join of the table and the columns of the table
[ 30522, 2270, 3853, 3693, 23111, 2121, 1006, 1002, 2171, 1010, 1002, 9530, 2094, 1010, 1002, 8902, 2015, 1027, 2969, 1024, 1024, 29296, 1035, 3748, 11522, 1010, 1002, 8040, 28433, 1027, 19701, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 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...
matomo-org/matomo
plugins/SitesManager/API.php
API.setGlobalExcludedUserAgents
public function setGlobalExcludedUserAgents($excludedUserAgents) { Piwik::checkUserHasSuperUserAccess(); // update option $excludedUserAgents = $this->checkAndReturnCommaSeparatedStringList($excludedUserAgents); Option::set(self::OPTION_EXCLUDED_USER_AGENTS_GLOBAL, $excludedUserAgen...
php
public function setGlobalExcludedUserAgents($excludedUserAgents) { Piwik::checkUserHasSuperUserAccess(); // update option $excludedUserAgents = $this->checkAndReturnCommaSeparatedStringList($excludedUserAgents); Option::set(self::OPTION_EXCLUDED_USER_AGENTS_GLOBAL, $excludedUserAgen...
[ "public", "function", "setGlobalExcludedUserAgents", "(", "$", "excludedUserAgents", ")", "{", "Piwik", "::", "checkUserHasSuperUserAccess", "(", ")", ";", "// update option", "$", "excludedUserAgents", "=", "$", "this", "->", "checkAndReturnCommaSeparatedStringList", "("...
Sets list of user agent substrings to look for when excluding visits. For more info, @see getExcludedUserAgentsGlobal. @param string $excludedUserAgents Comma separated list of strings. Each element is trimmed, and empty strings are removed.
[ "Sets", "list", "of", "user", "agent", "substrings", "to", "look", "for", "when", "excluding", "visits", ".", "For", "more", "info", "@see", "getExcludedUserAgentsGlobal", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/SitesManager/API.php#L1050-L1060
train
Sets the list of excluded user agents that should be excluded from the user agent list.
[ 30522, 2270, 3853, 2275, 23296, 16429, 9453, 2595, 20464, 13936, 20330, 4270, 7666, 1006, 1002, 12421, 20330, 4270, 7666, 1007, 1063, 14255, 9148, 2243, 1024, 1024, 4638, 20330, 14949, 6342, 4842, 20330, 6305, 9623, 2015, 1006, 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...
z-song/laravel-admin
src/Widgets/Widget.php
Widget.attributeElement
protected function attributeElement($key, $value) { if (is_numeric($key)) { $key = $value; } if (!is_null($value)) { return $key.'="'.htmlentities($value, ENT_QUOTES, 'UTF-8').'"'; } }
php
protected function attributeElement($key, $value) { if (is_numeric($key)) { $key = $value; } if (!is_null($value)) { return $key.'="'.htmlentities($value, ENT_QUOTES, 'UTF-8').'"'; } }
[ "protected", "function", "attributeElement", "(", "$", "key", ",", "$", "value", ")", "{", "if", "(", "is_numeric", "(", "$", "key", ")", ")", "{", "$", "key", "=", "$", "value", ";", "}", "if", "(", "!", "is_null", "(", "$", "value", ")", ")", ...
Build a single attribute element. @param string $key @param string $value @return string
[ "Build", "a", "single", "attribute", "element", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Widgets/Widget.php#L55-L63
train
Protected attribute element
[ 30522, 5123, 3853, 17961, 12260, 3672, 1006, 1002, 3145, 1010, 1002, 3643, 1007, 1063, 2065, 1006, 2003, 1035, 16371, 25531, 1006, 1002, 3145, 1007, 1007, 1063, 1002, 3145, 1027, 1002, 3643, 1025, 1065, 2065, 1006, 999, 2003, 1035, 19701, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Console/ForgetCommand.php
ForgetCommand.handle
public function handle() { $this->cache->store($this->argument('store'))->forget( $this->argument('key') ); $this->info('The ['.$this->argument('key').'] key has been removed from the cache.'); }
php
public function handle() { $this->cache->store($this->argument('store'))->forget( $this->argument('key') ); $this->info('The ['.$this->argument('key').'] key has been removed from the cache.'); }
[ "public", "function", "handle", "(", ")", "{", "$", "this", "->", "cache", "->", "store", "(", "$", "this", "->", "argument", "(", "'store'", ")", ")", "->", "forget", "(", "$", "this", "->", "argument", "(", "'key'", ")", ")", ";", "$", "this", ...
Execute the console command. @return void
[ "Execute", "the", "console", "command", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Cache/Console/ForgetCommand.php#L49-L56
train
Handle the remove action
[ 30522, 2270, 3853, 5047, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 17053, 1011, 1028, 3573, 1006, 1002, 2023, 1011, 1028, 6685, 1006, 1005, 3573, 1005, 1007, 1007, 1011, 1028, 5293, 1006, 1002, 2023, 1011, 1028, 6685, 1006, 1005, 3145, 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/HTML/QuickForm2/Element/Select.php
HTML_QuickForm2_Element_Select_OptionContainer.addOption
public function addOption($text, $value, $attributes = null) { if (null === $attributes) { $attributes = array('value' => (string)$value); } else { $attributes = self::prepareAttributes($attributes); if (isset($attributes['selected'])) { // the 'se...
php
public function addOption($text, $value, $attributes = null) { if (null === $attributes) { $attributes = array('value' => (string)$value); } else { $attributes = self::prepareAttributes($attributes); if (isset($attributes['selected'])) { // the 'se...
[ "public", "function", "addOption", "(", "$", "text", ",", "$", "value", ",", "$", "attributes", "=", "null", ")", "{", "if", "(", "null", "===", "$", "attributes", ")", "{", "$", "attributes", "=", "array", "(", "'value'", "=>", "(", "string", ")", ...
Adds a new option Please note that if you pass 'selected' attribute in the $attributes parameter then this option's value will be added to <select>'s values. @param string Option text @param string 'value' attribute for <option> tag @param mixed Additional attributes for <option> tag (either as a string ...
[ "Adds", "a", "new", "option" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Element/Select.php#L113-L132
train
Add option to list
[ 30522, 2270, 3853, 5587, 7361, 3508, 1006, 1002, 3793, 1010, 1002, 3643, 1010, 1002, 12332, 1027, 19701, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 1027, 1002, 12332, 1007, 1063, 1002, 12332, 1027, 9140, 1006, 1005, 3643, 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/Component/Validator/Constraints/ChoiceValidator.php
ChoiceValidator.validate
public function validate($value, Constraint $constraint) { if (!$constraint instanceof Choice) { throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Choice'); } if (!\is_array($constraint->choices) && !$constraint->callback) { throw new ConstraintDefinitio...
php
public function validate($value, Constraint $constraint) { if (!$constraint instanceof Choice) { throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Choice'); } if (!\is_array($constraint->choices) && !$constraint->callback) { throw new ConstraintDefinitio...
[ "public", "function", "validate", "(", "$", "value", ",", "Constraint", "$", "constraint", ")", "{", "if", "(", "!", "$", "constraint", "instanceof", "Choice", ")", "{", "throw", "new", "UnexpectedTypeException", "(", "$", "constraint", ",", "__NAMESPACE__", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Validator/Constraints/ChoiceValidator.php#L32-L108
train
Validates the value against the Choice constraint
[ 30522, 2270, 3853, 9398, 3686, 1006, 1002, 3643, 1010, 27142, 1002, 27142, 1007, 1063, 2065, 1006, 999, 1002, 27142, 6013, 11253, 3601, 1007, 1063, 5466, 2047, 9223, 13874, 10288, 24422, 1006, 1002, 27142, 1010, 1035, 1035, 3415, 15327, 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...
laravel/framework
src/Illuminate/Routing/Middleware/ThrottleRequests.php
ThrottleRequests.resolveRequestSignature
protected function resolveRequestSignature($request) { if ($user = $request->user()) { return sha1($user->getAuthIdentifier()); } if ($route = $request->route()) { return sha1($route->getDomain().'|'.$request->ip()); } throw new RuntimeException('Una...
php
protected function resolveRequestSignature($request) { if ($user = $request->user()) { return sha1($user->getAuthIdentifier()); } if ($route = $request->route()) { return sha1($route->getDomain().'|'.$request->ip()); } throw new RuntimeException('Una...
[ "protected", "function", "resolveRequestSignature", "(", "$", "request", ")", "{", "if", "(", "$", "user", "=", "$", "request", "->", "user", "(", ")", ")", "{", "return", "sha1", "(", "$", "user", "->", "getAuthIdentifier", "(", ")", ")", ";", "}", ...
Resolve request signature. @param \Illuminate\Http\Request $request @return string @throws \RuntimeException
[ "Resolve", "request", "signature", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/Middleware/ThrottleRequests.php#L94-L105
train
Resolve the request signature
[ 30522, 5123, 3853, 10663, 2890, 15500, 5332, 16989, 11244, 1006, 1002, 5227, 1007, 1063, 2065, 1006, 1002, 5310, 1027, 1002, 5227, 1011, 1028, 5310, 1006, 1007, 1007, 1063, 2709, 21146, 2487, 1006, 1002, 5310, 1011, 1028, 2131, 4887, 15222,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
overtrue/wechat
src/OfficialAccount/Broadcasting/Client.php
Client.sendMessage
public function sendMessage(MessageInterface $message, $reception = null, $attributes = []) { $message = (new MessageBuilder())->message($message)->with($attributes)->toAll(); if (\is_int($reception)) { $message->toTag($reception); } elseif (\is_array($reception)) { ...
php
public function sendMessage(MessageInterface $message, $reception = null, $attributes = []) { $message = (new MessageBuilder())->message($message)->with($attributes)->toAll(); if (\is_int($reception)) { $message->toTag($reception); } elseif (\is_array($reception)) { ...
[ "public", "function", "sendMessage", "(", "MessageInterface", "$", "message", ",", "$", "reception", "=", "null", ",", "$", "attributes", "=", "[", "]", ")", "{", "$", "message", "=", "(", "new", "MessageBuilder", "(", ")", ")", "->", "message", "(", "...
@param \EasyWeChat\Kernel\Contracts\MessageInterface $message @param mixed $reception @param array $attributes @return mixed @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException @throws \EasyWeChat\Kernel\Exceptions\RuntimeExcepti...
[ "@param", "\\", "EasyWeChat", "\\", "Kernel", "\\", "Contracts", "\\", "MessageInterface", "$message", "@param", "mixed", "$reception", "@param", "array", "$attributes" ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/Broadcasting/Client.php#L348-L359
train
Send a message to all users or tags
[ 30522, 2270, 3853, 4604, 7834, 3736, 3351, 1006, 4471, 18447, 2121, 12172, 1002, 4471, 1010, 1002, 7684, 1027, 19701, 1010, 1002, 12332, 1027, 1031, 1033, 1007, 1063, 1002, 4471, 1027, 1006, 2047, 4471, 8569, 23891, 2099, 1006, 1007, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/Annotations/API.php
API.getDateRangeForPeriod
public static function getDateRangeForPeriod($date, $period, $lastN = false) { if ($date === false) { return array(false, false); } $isMultiplePeriod = Range::isMultiplePeriod($date, $period); // if the range is just a normal period (or the period is a range in which ca...
php
public static function getDateRangeForPeriod($date, $period, $lastN = false) { if ($date === false) { return array(false, false); } $isMultiplePeriod = Range::isMultiplePeriod($date, $period); // if the range is just a normal period (or the period is a range in which ca...
[ "public", "static", "function", "getDateRangeForPeriod", "(", "$", "date", ",", "$", "period", ",", "$", "lastN", "=", "false", ")", "{", "if", "(", "$", "date", "===", "false", ")", "{", "return", "array", "(", "false", ",", "false", ")", ";", "}", ...
Returns start & end dates for the range described by a period and optional lastN argument. @param string|bool $date The start date of the period (or the date range of a range period). @param string $period The period type ('day', 'week', 'month', 'year' or 'range'). @param bool|int $lastN Whether to include the last N...
[ "Returns", "start", "&", "end", "dates", "for", "the", "range", "described", "by", "a", "period", "and", "optional", "lastN", "argument", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Annotations/API.php#L317-L344
train
Get the start and end dates for a period
[ 30522, 2270, 10763, 3853, 2131, 13701, 24388, 12879, 2953, 4842, 3695, 2094, 1006, 1002, 3058, 1010, 1002, 2558, 1010, 1002, 2197, 2078, 1027, 6270, 1007, 1063, 2065, 1006, 1002, 3058, 1027, 1027, 1027, 6270, 1007, 1063, 2709, 9140, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Validator/Mapping/Loader/FilesLoader.php
FilesLoader.getFileLoaders
protected function getFileLoaders($paths) { $loaders = []; foreach ($paths as $path) { $loaders[] = $this->getFileLoaderInstance($path); } return $loaders; }
php
protected function getFileLoaders($paths) { $loaders = []; foreach ($paths as $path) { $loaders[] = $this->getFileLoaderInstance($path); } return $loaders; }
[ "protected", "function", "getFileLoaders", "(", "$", "paths", ")", "{", "$", "loaders", "=", "[", "]", ";", "foreach", "(", "$", "paths", "as", "$", "path", ")", "{", "$", "loaders", "[", "]", "=", "$", "this", "->", "getFileLoaderInstance", "(", "$"...
Returns an array of file loaders for the given file paths. @param array $paths An array of file paths @return LoaderInterface[] The metadata loaders
[ "Returns", "an", "array", "of", "file", "loaders", "for", "the", "given", "file", "paths", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Validator/Mapping/Loader/FilesLoader.php#L42-L51
train
Get all file loaders
[ 30522, 5123, 3853, 2131, 8873, 2571, 11066, 2545, 1006, 1002, 10425, 1007, 1063, 1002, 7170, 2545, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1002, 10425, 2004, 1002, 4130, 1007, 1063, 1002, 7170, 2545, 1031, 1033, 1027, 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
plugins/Annotations/AnnotationList.php
AnnotationList.search
public function search($startDate, $endDate, $idSite = false) { if ($idSite) { $idSites = Site::getIdSitesFromIdSitesString($idSite); } else { $idSites = array_keys($this->annotations); } // collect annotations that are within the right date range & belong to...
php
public function search($startDate, $endDate, $idSite = false) { if ($idSite) { $idSites = Site::getIdSitesFromIdSitesString($idSite); } else { $idSites = array_keys($this->annotations); } // collect annotations that are within the right date range & belong to...
[ "public", "function", "search", "(", "$", "startDate", ",", "$", "endDate", ",", "$", "idSite", "=", "false", ")", "{", "if", "(", "$", "idSite", ")", "{", "$", "idSites", "=", "Site", "::", "getIdSitesFromIdSitesString", "(", "$", "idSite", ")", ";", ...
Returns all annotations within a specific date range. The result is an array that maps site IDs with arrays of annotations within the range. Note: The date range is inclusive. @see self::get for info on what attributes stored within annotations. @param Date|bool $startDate The start of the date range. @param Date|bo...
[ "Returns", "all", "annotations", "within", "a", "specific", "date", "range", ".", "The", "result", "is", "an", "array", "that", "maps", "site", "IDs", "with", "arrays", "of", "annotations", "within", "the", "range", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Annotations/AnnotationList.php#L234-L270
train
Search for annotations within a given date range
[ 30522, 2270, 3853, 3945, 1006, 1002, 2707, 13701, 1010, 1002, 2203, 13701, 1010, 1002, 8909, 28032, 2063, 1027, 6270, 1007, 1063, 2065, 1006, 1002, 8909, 28032, 2063, 1007, 1063, 1002, 8909, 28032, 2229, 1027, 2609, 1024, 1024, 2131, 9821, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/AttributeTranslator.php
AttributeTranslator._set_body_link
static protected function _set_body_link(\DOMElement $node, $value) { $a_list = $node->getElementsByTagName("a"); $value = self::_get_valid_color($value); foreach ($a_list as $a) { self::append_style($a, "; color: $value;"); } return null; }
php
static protected function _set_body_link(\DOMElement $node, $value) { $a_list = $node->getElementsByTagName("a"); $value = self::_get_valid_color($value); foreach ($a_list as $a) { self::append_style($a, "; color: $value;"); } return null; }
[ "static", "protected", "function", "_set_body_link", "(", "\\", "DOMElement", "$", "node", ",", "$", "value", ")", "{", "$", "a_list", "=", "$", "node", "->", "getElementsByTagName", "(", "\"a\"", ")", ";", "$", "value", "=", "self", "::", "_get_valid_colo...
@param \DOMElement $node @param string $value @return null
[ "@param", "\\", "DOMElement", "$node", "@param", "string", "$value" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/Css/AttributeTranslator.php#L590-L600
train
Set the color link on the body of the page
[ 30522, 10763, 5123, 3853, 1035, 2275, 1035, 2303, 1035, 4957, 1006, 1032, 8514, 16930, 4765, 1002, 13045, 1010, 1002, 3643, 1007, 1063, 1002, 1037, 1035, 2862, 1027, 1002, 13045, 1011, 1028, 2131, 12260, 8163, 3762, 15900, 18442, 1006, 1000...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Filesystem/FilesystemAdapter.php
FilesystemAdapter.prepend
public function prepend($path, $data, $separator = PHP_EOL) { if ($this->exists($path)) { return $this->put($path, $data.$separator.$this->get($path)); } return $this->put($path, $data); }
php
public function prepend($path, $data, $separator = PHP_EOL) { if ($this->exists($path)) { return $this->put($path, $data.$separator.$this->get($path)); } return $this->put($path, $data); }
[ "public", "function", "prepend", "(", "$", "path", ",", "$", "data", ",", "$", "separator", "=", "PHP_EOL", ")", "{", "if", "(", "$", "this", "->", "exists", "(", "$", "path", ")", ")", "{", "return", "$", "this", "->", "put", "(", "$", "path", ...
Prepend to a file. @param string $path @param string $data @param string $separator @return bool
[ "Prepend", "to", "a", "file", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Filesystem/FilesystemAdapter.php#L273-L280
train
Prepends data to a file or directory.
[ 30522, 2270, 3853, 17463, 10497, 1006, 1002, 4130, 1010, 1002, 2951, 1010, 1002, 19802, 25879, 2953, 1027, 25718, 1035, 1041, 4747, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 6526, 1006, 1002, 4130, 1007, 1007, 1063, 2709, 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...
slimphp/Slim
Slim/Http/Request.php
Request.filterMethod
protected function filterMethod($method) { if ($method === null) { return $method; } if (!is_string($method)) { throw new InvalidArgumentException(sprintf( 'Unsupported HTTP method; must be a string, received %s', (is_object($method) ?...
php
protected function filterMethod($method) { if ($method === null) { return $method; } if (!is_string($method)) { throw new InvalidArgumentException(sprintf( 'Unsupported HTTP method; must be a string, received %s', (is_object($method) ?...
[ "protected", "function", "filterMethod", "(", "$", "method", ")", "{", "if", "(", "$", "method", "===", "null", ")", "{", "return", "$", "method", ";", "}", "if", "(", "!", "is_string", "(", "$", "method", ")", ")", "{", "throw", "new", "InvalidArgum...
Validate the HTTP method @param null|string $method @return null|string @throws InvalidArgumentException on invalid HTTP method.
[ "Validate", "the", "HTTP", "method" ]
ccef5f7d8bcd469d59cbe64f6210d83764f91543
https://github.com/slimphp/Slim/blob/ccef5f7d8bcd469d59cbe64f6210d83764f91543/Slim/Http/Request.php#L331-L350
train
Filter the HTTP method to the correct format
[ 30522, 5123, 3853, 11307, 11368, 6806, 2094, 1006, 1002, 4118, 1007, 1063, 2065, 1006, 1002, 4118, 1027, 1027, 1027, 19701, 1007, 1063, 2709, 1002, 4118, 1025, 1065, 2065, 1006, 999, 2003, 1035, 5164, 1006, 1002, 4118, 1007, 1007, 1063, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Collection.php
Collection.valueRetriever
protected function valueRetriever($value) { if ($this->useAsCallable($value)) { return $value; } return function ($item) use ($value) { return data_get($item, $value); }; }
php
protected function valueRetriever($value) { if ($this->useAsCallable($value)) { return $value; } return function ($item) use ($value) { return data_get($item, $value); }; }
[ "protected", "function", "valueRetriever", "(", "$", "value", ")", "{", "if", "(", "$", "this", "->", "useAsCallable", "(", "$", "value", ")", ")", "{", "return", "$", "value", ";", "}", "return", "function", "(", "$", "item", ")", "use", "(", "$", ...
Get a value retrieving callback. @param string $value @return callable
[ "Get", "a", "value", "retrieving", "callback", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Support/Collection.php#L1860-L1869
train
Returns a value that can be used to retrieve the value from the cache
[ 30522, 5123, 3853, 3643, 13465, 7373, 6299, 1006, 1002, 3643, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 2224, 3022, 9289, 20470, 2571, 1006, 1002, 3643, 1007, 1007, 1063, 2709, 1002, 3643, 1025, 1065, 2709, 3853, 1006, 1002, 8875, 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...
z-song/laravel-admin
src/Form/Builder.php
Builder.render
public function render() { $this->removeReservedFields(); $tabObj = $this->form->getTab(); if (!$tabObj->isEmpty()) { $script = <<<'SCRIPT' var hash = document.location.hash; if (hash) { $('.nav-tabs a[href="' + hash + '"]').tab('show'); } // Change hash for page-reload $...
php
public function render() { $this->removeReservedFields(); $tabObj = $this->form->getTab(); if (!$tabObj->isEmpty()) { $script = <<<'SCRIPT' var hash = document.location.hash; if (hash) { $('.nav-tabs a[href="' + hash + '"]').tab('show'); } // Change hash for page-reload $...
[ "public", "function", "render", "(", ")", "{", "$", "this", "->", "removeReservedFields", "(", ")", ";", "$", "tabObj", "=", "$", "this", "->", "form", "->", "getTab", "(", ")", ";", "if", "(", "!", "$", "tabObj", "->", "isEmpty", "(", ")", ")", ...
Render form. @return string
[ "Render", "form", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Form/Builder.php#L564-L604
train
Render the form
[ 30522, 2270, 3853, 17552, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 6366, 6072, 25944, 15155, 1006, 1007, 1025, 1002, 21628, 16429, 3501, 1027, 1002, 2023, 1011, 1028, 2433, 1011, 1028, 2131, 2696, 2497, 1006, 1007, 1025, 2065, 1006, 999, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Bus/Dispatcher.php
Dispatcher.dispatchNow
public function dispatchNow($command, $handler = null) { if ($handler || $handler = $this->getCommandHandler($command)) { $callback = function ($command) use ($handler) { return $handler->handle($command); }; } else { $callback = function ($command...
php
public function dispatchNow($command, $handler = null) { if ($handler || $handler = $this->getCommandHandler($command)) { $callback = function ($command) use ($handler) { return $handler->handle($command); }; } else { $callback = function ($command...
[ "public", "function", "dispatchNow", "(", "$", "command", ",", "$", "handler", "=", "null", ")", "{", "if", "(", "$", "handler", "||", "$", "handler", "=", "$", "this", "->", "getCommandHandler", "(", "$", "command", ")", ")", "{", "$", "callback", "...
Dispatch a command to its appropriate handler in the current process. @param mixed $command @param mixed $handler @return mixed
[ "Dispatch", "a", "command", "to", "its", "appropriate", "handler", "in", "the", "current", "process", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Bus/Dispatcher.php#L86-L99
train
Dispatches a command to the application
[ 30522, 2270, 3853, 18365, 19779, 1006, 1002, 3094, 1010, 1002, 28213, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 28213, 1064, 1064, 1002, 28213, 1027, 1002, 2023, 1011, 1028, 2131, 9006, 2386, 17516, 4859, 3917, 1006, 1002, 3094, 1007, 1007...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Mail/Storage/Imap.php
Zend_Mail_Storage_Imap.removeMessage
public function removeMessage($id) { if (!$this->_protocol->store(array(Zend_Mail_Storage::FLAG_DELETED), $id, null, '+')) { /** * @see Zend_Mail_Storage_Exception */ // require_once 'Zend/Mail/Storage/Exception.php'; throw new Zend_Mail_Storage_...
php
public function removeMessage($id) { if (!$this->_protocol->store(array(Zend_Mail_Storage::FLAG_DELETED), $id, null, '+')) { /** * @see Zend_Mail_Storage_Exception */ // require_once 'Zend/Mail/Storage/Exception.php'; throw new Zend_Mail_Storage_...
[ "public", "function", "removeMessage", "(", "$", "id", ")", "{", "if", "(", "!", "$", "this", "->", "_protocol", "->", "store", "(", "array", "(", "Zend_Mail_Storage", "::", "FLAG_DELETED", ")", ",", "$", "id", ",", "null", ",", "'+'", ")", ")", "{",...
Remove a message from server. If you're doing that from a web enviroment you should be careful and use a uniqueid as parameter if possible to identify the message. @param int $id number of message @return null @throws Zend_Mail_Storage_Exception
[ "Remove", "a", "message", "from", "server", ".", "If", "you", "re", "doing", "that", "from", "a", "web", "enviroment", "you", "should", "be", "careful", "and", "use", "a", "uniqueid", "as", "parameter", "if", "possible", "to", "identify", "the", "message",...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail/Storage/Imap.php#L322-L339
train
Remove a message from the store
[ 30522, 2270, 3853, 6366, 7834, 3736, 3351, 1006, 1002, 8909, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 1035, 8778, 1011, 1028, 3573, 1006, 9140, 1006, 16729, 2094, 1035, 5653, 1035, 5527, 1024, 1024, 5210, 1035, 17159, 1007, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/DependencyInjection/ContainerBuilder.php
ContainerBuilder.getEnv
protected function getEnv($name) { $value = parent::getEnv($name); $bag = $this->getParameterBag(); if (!\is_string($value) || !$bag instanceof EnvPlaceholderParameterBag) { return $value; } $envPlaceholders = $bag->getEnvPlaceholders(); if (isset($envPl...
php
protected function getEnv($name) { $value = parent::getEnv($name); $bag = $this->getParameterBag(); if (!\is_string($value) || !$bag instanceof EnvPlaceholderParameterBag) { return $value; } $envPlaceholders = $bag->getEnvPlaceholders(); if (isset($envPl...
[ "protected", "function", "getEnv", "(", "$", "name", ")", "{", "$", "value", "=", "parent", "::", "getEnv", "(", "$", "name", ")", ";", "$", "bag", "=", "$", "this", "->", "getParameterBag", "(", ")", ";", "if", "(", "!", "\\", "is_string", "(", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/ContainerBuilder.php#L1590-L1617
train
Get the value of the environment variable.
[ 30522, 5123, 3853, 2131, 2368, 2615, 1006, 1002, 2171, 1007, 1063, 1002, 3643, 1027, 6687, 1024, 1024, 2131, 2368, 2615, 1006, 1002, 2171, 1007, 1025, 1002, 4524, 1027, 1002, 2023, 1011, 1028, 2131, 28689, 22828, 16078, 1006, 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...
walkor/Workerman
Events/Event.php
Event.timerCallback
public function timerCallback($fd, $what, $param) { $timer_id = $param[4]; if ($param[2] === self::EV_TIMER_ONCE) { $this->_eventTimer[$timer_id]->del(); unset($this->_eventTimer[$timer_id]); } try { call_user_func_array($param[0], $param...
php
public function timerCallback($fd, $what, $param) { $timer_id = $param[4]; if ($param[2] === self::EV_TIMER_ONCE) { $this->_eventTimer[$timer_id]->del(); unset($this->_eventTimer[$timer_id]); } try { call_user_func_array($param[0], $param...
[ "public", "function", "timerCallback", "(", "$", "fd", ",", "$", "what", ",", "$", "param", ")", "{", "$", "timer_id", "=", "$", "param", "[", "4", "]", ";", "if", "(", "$", "param", "[", "2", "]", "===", "self", "::", "EV_TIMER_ONCE", ")", "{", ...
Timer callback. @param null $fd @param int $what @param int $timer_id
[ "Timer", "callback", "." ]
13649907f05014fcfffcfccaef01e63ad3339351
https://github.com/walkor/Workerman/blob/13649907f05014fcfffcfccaef01e63ad3339351/Events/Event.php#L157-L175
train
Timer Callback Callback
[ 30522, 2270, 3853, 25309, 9289, 20850, 8684, 1006, 1002, 1042, 2094, 1010, 1002, 2054, 1010, 1002, 11498, 2213, 1007, 1063, 1002, 25309, 1035, 8909, 1027, 1002, 11498, 2213, 1031, 1018, 1033, 1025, 2065, 1006, 1002, 11498, 2213, 1031, 1016,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/OpenPlatform/Application.php
Application.miniProgram
public function miniProgram(string $appId, string $refreshToken = null, AccessToken $accessToken = null): MiniProgram { return new MiniProgram($this->getAuthorizerConfig($appId, $refreshToken), $this->getReplaceServices($accessToken) + [ 'encryptor' => function () { return new En...
php
public function miniProgram(string $appId, string $refreshToken = null, AccessToken $accessToken = null): MiniProgram { return new MiniProgram($this->getAuthorizerConfig($appId, $refreshToken), $this->getReplaceServices($accessToken) + [ 'encryptor' => function () { return new En...
[ "public", "function", "miniProgram", "(", "string", "$", "appId", ",", "string", "$", "refreshToken", "=", "null", ",", "AccessToken", "$", "accessToken", "=", "null", ")", ":", "MiniProgram", "{", "return", "new", "MiniProgram", "(", "$", "this", "->", "g...
Creates the miniProgram application. @param string $appId @param string|null $refreshToken @param \EasyWeChat\OpenPlatform\Authorizer\Auth\AccessToken|null $accessToken @return \EasyWeChat\OpenPlatform\Authorizer\MiniProg...
[ "Creates", "the", "miniProgram", "application", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OpenPlatform/Application.php#L98-L109
train
Get MiniProgram instance
[ 30522, 2270, 3853, 7163, 21572, 13113, 1006, 5164, 1002, 10439, 3593, 1010, 5164, 1002, 25416, 21898, 18715, 2368, 1027, 19701, 1010, 3229, 18715, 2368, 1002, 3229, 18715, 2368, 1027, 19701, 1007, 1024, 7163, 21572, 13113, 1063, 2709, 2047, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/thrift
lib/php/lib/Transport/TBufferedTransport.php
TBufferedTransport.read
public function read($len) { if (TStringFuncFactory::create()->strlen($this->rBuf_) === 0) { $this->rBuf_ = $this->transport_->read($this->rBufSize_); } if (TStringFuncFactory::create()->strlen($this->rBuf_) <= $len) { $ret = $this->rBuf_; $this->rBuf_ = ...
php
public function read($len) { if (TStringFuncFactory::create()->strlen($this->rBuf_) === 0) { $this->rBuf_ = $this->transport_->read($this->rBufSize_); } if (TStringFuncFactory::create()->strlen($this->rBuf_) <= $len) { $ret = $this->rBuf_; $this->rBuf_ = ...
[ "public", "function", "read", "(", "$", "len", ")", "{", "if", "(", "TStringFuncFactory", "::", "create", "(", ")", "->", "strlen", "(", "$", "this", "->", "rBuf_", ")", "===", "0", ")", "{", "$", "this", "->", "rBuf_", "=", "$", "this", "->", "t...
@inheritdoc @param int $len @return string @throws TTransportException
[ "@inheritdoc" ]
acdd4226c210336e9e15eb812e5932a645fcd5ce
https://github.com/apache/thrift/blob/acdd4226c210336e9e15eb812e5932a645fcd5ce/lib/php/lib/Transport/TBufferedTransport.php#L149-L166
train
Read from the stream and return the result as a string.
[ 30522, 2270, 3853, 3191, 1006, 1002, 18798, 1007, 1063, 2065, 1006, 24529, 18886, 3070, 11263, 12273, 21450, 1024, 1024, 3443, 1006, 1007, 1011, 1028, 2358, 20927, 2078, 1006, 1002, 2023, 1011, 1028, 21144, 16093, 1035, 1007, 1027, 1027, 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/Blueprint.php
Blueprint.commandsNamed
protected function commandsNamed(array $names) { return collect($this->commands)->filter(function ($command) use ($names) { return in_array($command->name, $names); }); }
php
protected function commandsNamed(array $names) { return collect($this->commands)->filter(function ($command) use ($names) { return in_array($command->name, $names); }); }
[ "protected", "function", "commandsNamed", "(", "array", "$", "names", ")", "{", "return", "collect", "(", "$", "this", "->", "commands", ")", "->", "filter", "(", "function", "(", "$", "command", ")", "use", "(", "$", "names", ")", "{", "return", "in_a...
Get all of the commands matching the given names. @param array $names @return \Illuminate\Support\Collection
[ "Get", "all", "of", "the", "commands", "matching", "the", "given", "names", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Blueprint.php#L163-L168
train
Get all commands with the given name
[ 30522, 5123, 3853, 10954, 18442, 2094, 1006, 9140, 1002, 3415, 1007, 1063, 2709, 8145, 1006, 1002, 2023, 1011, 1028, 10954, 1007, 1011, 1028, 11307, 1006, 3853, 1006, 1002, 3094, 1007, 2224, 1006, 1002, 3415, 1007, 1063, 2709, 1999, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Cache/RedisTaggedCache.php
RedisTaggedCache.deleteValues
protected function deleteValues($referenceKey) { $values = array_unique($this->store->connection()->smembers($referenceKey)); if (count($values) > 0) { foreach (array_chunk($values, 1000) as $valuesChunk) { call_user_func_array([$this->store->connection(), 'del'], $value...
php
protected function deleteValues($referenceKey) { $values = array_unique($this->store->connection()->smembers($referenceKey)); if (count($values) > 0) { foreach (array_chunk($values, 1000) as $valuesChunk) { call_user_func_array([$this->store->connection(), 'del'], $value...
[ "protected", "function", "deleteValues", "(", "$", "referenceKey", ")", "{", "$", "values", "=", "array_unique", "(", "$", "this", "->", "store", "->", "connection", "(", ")", "->", "smembers", "(", "$", "referenceKey", ")", ")", ";", "if", "(", "count",...
Delete item keys that have been stored against a reference. @param string $referenceKey @return void
[ "Delete", "item", "keys", "that", "have", "been", "stored", "against", "a", "reference", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Cache/RedisTaggedCache.php#L176-L185
train
Delete all values from the store
[ 30522, 5123, 3853, 3972, 12870, 30524, 1007, 1007, 1025, 2065, 1006, 4175, 1006, 1002, 5300, 1007, 1028, 1014, 1007, 1063, 18921, 6776, 1006, 9140, 1035, 20000, 1006, 1002, 5300, 1010, 6694, 1007, 2004, 1002, 5300, 20760, 8950, 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...
laravel/framework
src/Illuminate/Auth/Middleware/AuthenticateWithBasicAuth.php
AuthenticateWithBasicAuth.handle
public function handle($request, Closure $next, $guard = null, $field = null) { $this->auth->guard($guard)->basic($field ?: 'email'); return $next($request); }
php
public function handle($request, Closure $next, $guard = null, $field = null) { $this->auth->guard($guard)->basic($field ?: 'email'); return $next($request); }
[ "public", "function", "handle", "(", "$", "request", ",", "Closure", "$", "next", ",", "$", "guard", "=", "null", ",", "$", "field", "=", "null", ")", "{", "$", "this", "->", "auth", "->", "guard", "(", "$", "guard", ")", "->", "basic", "(", "$",...
Handle an incoming request. @param \Illuminate\Http\Request $request @param \Closure $next @param string|null $guard @param string|null $field @return mixed @throws \Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException
[ "Handle", "an", "incoming", "request", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/Middleware/AuthenticateWithBasicAuth.php#L39-L44
train
Handle the request
[ 30522, 2270, 3853, 5047, 1006, 1002, 5227, 1010, 8503, 1002, 2279, 1010, 1002, 3457, 1027, 19701, 1010, 1002, 2492, 1027, 19701, 1007, 1063, 1002, 2023, 1011, 1028, 8740, 2705, 1011, 1028, 3457, 1006, 1002, 3457, 1007, 1011, 1028, 3937, 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/Login/SessionInitializer.php
SessionInitializer.getAuthCookie
protected function getAuthCookie($rememberMe) { $authCookieExpiry = $rememberMe ? time() + $this->authCookieValidTime : 0; $cookie = new Cookie($this->authCookieName, $authCookieExpiry, $this->authCookiePath); return $cookie; }
php
protected function getAuthCookie($rememberMe) { $authCookieExpiry = $rememberMe ? time() + $this->authCookieValidTime : 0; $cookie = new Cookie($this->authCookieName, $authCookieExpiry, $this->authCookiePath); return $cookie; }
[ "protected", "function", "getAuthCookie", "(", "$", "rememberMe", ")", "{", "$", "authCookieExpiry", "=", "$", "rememberMe", "?", "time", "(", ")", "+", "$", "this", "->", "authCookieValidTime", ":", "0", ";", "$", "cookie", "=", "new", "Cookie", "(", "$...
Returns a Cookie instance that manages the browser cookie used to store session information. @param bool $rememberMe Whether the authenticated session should be remembered after the browser is closed or not. @return Cookie
[ "Returns", "a", "Cookie", "instance", "that", "manages", "the", "browser", "cookie", "used", "to", "store", "session", "information", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Login/SessionInitializer.php#L153-L158
train
Get auth cookie
[ 30522, 5123, 3853, 2131, 4887, 2705, 3597, 23212, 2063, 1006, 1002, 3342, 4168, 1007, 1063, 1002, 8740, 2705, 3597, 23212, 4402, 2595, 8197, 2854, 1027, 1002, 3342, 4168, 1029, 2051, 1006, 1007, 30524, 1027, 2047, 17387, 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...
overtrue/wechat
src/OpenPlatform/Authorizer/Aggregate/Account/Client.php
Client.bindTo
public function bindTo(string $openAppId) { $params = [ 'appid' => $this->app['config']['app_id'], 'open_appid' => $openAppId, ]; return $this->httpPostJson('cgi-bin/open/bind', $params); }
php
public function bindTo(string $openAppId) { $params = [ 'appid' => $this->app['config']['app_id'], 'open_appid' => $openAppId, ]; return $this->httpPostJson('cgi-bin/open/bind', $params); }
[ "public", "function", "bindTo", "(", "string", "$", "openAppId", ")", "{", "$", "params", "=", "[", "'appid'", "=>", "$", "this", "->", "app", "[", "'config'", "]", "[", "'app_id'", "]", ",", "'open_appid'", "=>", "$", "openAppId", ",", "]", ";", "re...
将公众号/小程序绑定到开放平台帐号下. @param string $openAppId 开放平台帐号appid @return mixed @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
[ "将公众号", "/", "小程序绑定到开放平台帐号下", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OpenPlatform/Authorizer/Aggregate/Account/Client.php#L48-L56
train
Bind to open app
[ 30522, 2270, 3853, 14187, 3406, 1006, 5164, 1002, 2330, 29098, 3593, 1007, 1063, 1002, 11498, 5244, 1027, 1031, 1005, 10439, 3593, 1005, 1027, 1028, 1002, 2023, 1011, 1028, 10439, 1031, 1005, 9530, 8873, 2290, 1005, 1033, 1031, 1005, 10439,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Simple/ChainCache.php
ChainCache.getMultiple
public function getMultiple($keys, $default = null) { $miss = null !== $default && \is_object($default) ? $default : $this->miss; return $this->generateItems($this->caches[0]->getMultiple($keys, $miss), 0, $miss, $default); }
php
public function getMultiple($keys, $default = null) { $miss = null !== $default && \is_object($default) ? $default : $this->miss; return $this->generateItems($this->caches[0]->getMultiple($keys, $miss), 0, $miss, $default); }
[ "public", "function", "getMultiple", "(", "$", "keys", ",", "$", "default", "=", "null", ")", "{", "$", "miss", "=", "null", "!==", "$", "default", "&&", "\\", "is_object", "(", "$", "default", ")", "?", "$", "default", ":", "$", "this", "->", "mis...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Cache/Simple/ChainCache.php#L86-L91
train
Get multiple items from cache
[ 30522, 2270, 3853, 2131, 12274, 7096, 11514, 2571, 1006, 1002, 6309, 1010, 1002, 12398, 1027, 19701, 1007, 1063, 1002, 3335, 1027, 19701, 999, 1027, 1027, 1002, 12398, 1004, 1004, 1032, 2003, 1035, 4874, 1006, 1002, 12398, 1007, 1029, 1002,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpKernel/Bundle/Bundle.php
Bundle.getContainerExtension
public function getContainerExtension() { if (null === $this->extension) { $extension = $this->createContainerExtension(); if (null !== $extension) { if (!$extension instanceof ExtensionInterface) { throw new \LogicException(sprintf('Extension %s ...
php
public function getContainerExtension() { if (null === $this->extension) { $extension = $this->createContainerExtension(); if (null !== $extension) { if (!$extension instanceof ExtensionInterface) { throw new \LogicException(sprintf('Extension %s ...
[ "public", "function", "getContainerExtension", "(", ")", "{", "if", "(", "null", "===", "$", "this", "->", "extension", ")", "{", "$", "extension", "=", "$", "this", "->", "createContainerExtension", "(", ")", ";", "if", "(", "null", "!==", "$", "extensi...
Returns the bundle's container extension. @return ExtensionInterface|null The container extension @throws \LogicException
[ "Returns", "the", "bundle", "s", "container", "extension", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpKernel/Bundle/Bundle.php#L66-L93
train
Get the bundle s container extension
[ 30522, 2270, 3853, 2131, 8663, 18249, 7869, 18413, 6132, 3258, 1006, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 1027, 1002, 2023, 1011, 1028, 5331, 1007, 1063, 1002, 5331, 1027, 1002, 2023, 1011, 1028, 3443, 8663, 18249, 7869, 18413, 6132, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpClient/Response/CurlResponse.php
CurlResponse.select
private static function select(CurlClientState $multi, float $timeout): int { return curl_multi_select($multi->handle, $timeout); }
php
private static function select(CurlClientState $multi, float $timeout): int { return curl_multi_select($multi->handle, $timeout); }
[ "private", "static", "function", "select", "(", "CurlClientState", "$", "multi", ",", "float", "$", "timeout", ")", ":", "int", "{", "return", "curl_multi_select", "(", "$", "multi", "->", "handle", ",", "$", "timeout", ")", ";", "}" ]
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpClient/Response/CurlResponse.php#L258-L261
train
Select the next page of items from the multi handle.
[ 30522, 2797, 10763, 3853, 7276, 1006, 15390, 20464, 11638, 9153, 2618, 1002, 4800, 1010, 14257, 1002, 2051, 5833, 1007, 1024, 20014, 1063, 2709, 15390, 1035, 4800, 1035, 7276, 1006, 1002, 4800, 1011, 1028, 5047, 1010, 1002, 2051, 5833, 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/Controller.php
Controller.getPurgeSettingsFromRequest
private function getPurgeSettingsFromRequest() { $settings = array(); // delete logs settings $settings['delete_logs_enable'] = Common::getRequestVar("enableDeleteLogs", 0); $settings['delete_logs_schedule_lowest_interval'] = Common::getRequestVar("deleteLowestInterval", 7); ...
php
private function getPurgeSettingsFromRequest() { $settings = array(); // delete logs settings $settings['delete_logs_enable'] = Common::getRequestVar("enableDeleteLogs", 0); $settings['delete_logs_schedule_lowest_interval'] = Common::getRequestVar("deleteLowestInterval", 7); ...
[ "private", "function", "getPurgeSettingsFromRequest", "(", ")", "{", "$", "settings", "=", "array", "(", ")", ";", "// delete logs settings", "$", "settings", "[", "'delete_logs_enable'", "]", "=", "Common", "::", "getRequestVar", "(", "\"enableDeleteLogs\"", ",", ...
Utility function. Gets the delete logs/reports settings from the request and uses them to populate config arrays. @return array An array containing the data deletion settings.
[ "Utility", "function", ".", "Gets", "the", "delete", "logs", "/", "reports", "settings", "from", "the", "request", "and", "uses", "them", "to", "populate", "config", "arrays", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/PrivacyManager/Controller.php#L48-L72
train
Returns the settings from the request
[ 30522, 2797, 3853, 2131, 5311, 8449, 18319, 3070, 22747, 21716, 2890, 15500, 1006, 1007, 1063, 1002, 10906, 1027, 9140, 1006, 1007, 1025, 1013, 1013, 3972, 12870, 15664, 10906, 1002, 10906, 1031, 1005, 3972, 12870, 1035, 15664, 1035, 9585, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Controller/SessionContainer.php
HTML_QuickForm2_Controller_SessionContainer.getValidationStatus
public function getValidationStatus($pageId) { return array_key_exists($pageId, $this->data['valid']) ? $this->data['valid'][$pageId]: null; }
php
public function getValidationStatus($pageId) { return array_key_exists($pageId, $this->data['valid']) ? $this->data['valid'][$pageId]: null; }
[ "public", "function", "getValidationStatus", "(", "$", "pageId", ")", "{", "return", "array_key_exists", "(", "$", "pageId", ",", "$", "this", "->", "data", "[", "'valid'", "]", ")", "?", "$", "this", "->", "data", "[", "'valid'", "]", "[", "$", "pageI...
Returns the page validation status kept in session @param string Page ID @return bool
[ "Returns", "the", "page", "validation", "status", "kept", "in", "session" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Controller/SessionContainer.php#L129-L134
train
Get Page Validation Status
[ 30522, 2270, 3853, 2131, 10175, 8524, 9285, 29336, 2271, 1006, 1002, 3931, 3593, 1007, 1063, 2709, 9140, 1035, 3145, 1035, 6526, 1006, 1002, 3931, 3593, 1010, 1002, 2023, 1011, 1028, 2951, 1031, 1005, 9398, 1005, 1033, 1007, 1029, 1002, 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...
z-song/laravel-admin
src/Grid/Column.php
Column.sorter
public function sorter() { if (!$this->sortable) { return ''; } $icon = 'fa-sort'; $type = 'desc'; if ($this->isSorted()) { $type = $this->sort['type'] == 'desc' ? 'asc' : 'desc'; $icon .= "-amount-{$this->sort['type']}"; } ...
php
public function sorter() { if (!$this->sortable) { return ''; } $icon = 'fa-sort'; $type = 'desc'; if ($this->isSorted()) { $type = $this->sort['type'] == 'desc' ? 'asc' : 'desc'; $icon .= "-amount-{$this->sort['type']}"; } ...
[ "public", "function", "sorter", "(", ")", "{", "if", "(", "!", "$", "this", "->", "sortable", ")", "{", "return", "''", ";", "}", "$", "icon", "=", "'fa-sort'", ";", "$", "type", "=", "'desc'", ";", "if", "(", "$", "this", "->", "isSorted", "(", ...
Create the column sorter. @return string
[ "Create", "the", "column", "sorter", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Grid/Column.php#L557-L583
train
Returns the sorter icon
[ 30522, 30524, 4066, 3085, 1007, 1063, 2709, 1005, 1005, 1025, 1065, 1002, 12696, 1027, 1005, 6904, 1011, 4066, 1005, 1025, 1002, 2828, 1027, 1005, 4078, 2278, 1005, 1025, 2065, 1006, 1002, 2023, 1011, 1028, 26354, 15613, 1006, 1007, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Intl/Util/Version.php
Version.compare
public static function compare($version1, $version2, $operator, $precision = null) { $version1 = self::normalize($version1, $precision); $version2 = self::normalize($version2, $precision); return version_compare($version1, $version2, $operator); }
php
public static function compare($version1, $version2, $operator, $precision = null) { $version1 = self::normalize($version1, $precision); $version2 = self::normalize($version2, $precision); return version_compare($version1, $version2, $operator); }
[ "public", "static", "function", "compare", "(", "$", "version1", ",", "$", "version2", ",", "$", "operator", ",", "$", "precision", "=", "null", ")", "{", "$", "version1", "=", "self", "::", "normalize", "(", "$", "version1", ",", "$", "precision", ")"...
Compares two versions with an operator. This method is identical to {@link version_compare()}, except that you can pass the number of regarded version components in the last argument $precision. Examples: Version::compare('1.2.3', '1.2.4', '==') // => false Version::compare('1.2.3', '1.2.4', '==', 2) // => true @p...
[ "Compares", "two", "versions", "with", "an", "operator", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Intl/Util/Version.php#L46-L52
train
Compare two version numbers using the version_compare function.
[ 30522, 2270, 10763, 3853, 12826, 1006, 1002, 2544, 2487, 1010, 1002, 2544, 2475, 1010, 1002, 6872, 1010, 1002, 11718, 1027, 19701, 1007, 1063, 1002, 2544, 2487, 1027, 2969, 1024, 1024, 3671, 4697, 1006, 1002, 2544, 2487, 1010, 1002, 11718, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpKernel/Profiler/Profile.php
Profile.setCollectors
public function setCollectors(array $collectors) { $this->collectors = []; foreach ($collectors as $collector) { $this->addCollector($collector); } }
php
public function setCollectors(array $collectors) { $this->collectors = []; foreach ($collectors as $collector) { $this->addCollector($collector); } }
[ "public", "function", "setCollectors", "(", "array", "$", "collectors", ")", "{", "$", "this", "->", "collectors", "=", "[", "]", ";", "foreach", "(", "$", "collectors", "as", "$", "collector", ")", "{", "$", "this", "->", "addCollector", "(", "$", "co...
Sets the Collectors associated with this profile. @param DataCollectorInterface[] $collectors
[ "Sets", "the", "Collectors", "associated", "with", "this", "profile", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpKernel/Profiler/Profile.php#L263-L269
train
Set the collectors
[ 30522, 2270, 3853, 2275, 26895, 22471, 5668, 1006, 9140, 1002, 14256, 1007, 1063, 1002, 2023, 1011, 1028, 14256, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1002, 14256, 2004, 1002, 10018, 1007, 1063, 1002, 2023, 1011, 1028, 5587, 26895, 224...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Common.php
Common.getBrowserLanguage
public static function getBrowserLanguage($browserLang = null) { static $replacementPatterns = array( // extraneous bits of RFC 3282 that we ignore '/(\\\\.)/', // quoted-pairs '/(\s+)/', // CFWcS white space '/(\([^)]*\))/', // CFWS comments '/(;q...
php
public static function getBrowserLanguage($browserLang = null) { static $replacementPatterns = array( // extraneous bits of RFC 3282 that we ignore '/(\\\\.)/', // quoted-pairs '/(\s+)/', // CFWcS white space '/(\([^)]*\))/', // CFWS comments '/(;q...
[ "public", "static", "function", "getBrowserLanguage", "(", "$", "browserLang", "=", "null", ")", "{", "static", "$", "replacementPatterns", "=", "array", "(", "// extraneous bits of RFC 3282 that we ignore", "'/(\\\\\\\\.)/'", ",", "// quoted-pairs", "'/(\\s+)/'", ",", ...
Returns the browser language code, eg. "en-gb,en;q=0.5" @param string|null $browserLang Optional browser language, otherwise taken from the request header @return string
[ "Returns", "the", "browser", "language", "code", "eg", ".", "en", "-", "gb", "en", ";", "q", "=", "0", ".", "5" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Common.php#L900-L940
train
Returns the browser language
[ 30522, 2270, 10763, 3853, 2131, 12618, 9333, 2121, 25023, 6692, 3351, 1006, 1002, 16602, 25023, 1027, 19701, 1007, 1063, 10763, 1002, 6110, 4502, 12079, 3619, 1027, 9140, 1006, 1013, 1013, 4469, 23585, 2271, 9017, 1997, 14645, 25256, 2475, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Builder.php
Builder.createNestedWhere
protected function createNestedWhere($whereSlice, $boolean = 'and') { $whereGroup = $this->getQuery()->forNestedWhere(); $whereGroup->wheres = $whereSlice; return ['type' => 'Nested', 'query' => $whereGroup, 'boolean' => $boolean]; }
php
protected function createNestedWhere($whereSlice, $boolean = 'and') { $whereGroup = $this->getQuery()->forNestedWhere(); $whereGroup->wheres = $whereSlice; return ['type' => 'Nested', 'query' => $whereGroup, 'boolean' => $boolean]; }
[ "protected", "function", "createNestedWhere", "(", "$", "whereSlice", ",", "$", "boolean", "=", "'and'", ")", "{", "$", "whereGroup", "=", "$", "this", "->", "getQuery", "(", ")", "->", "forNestedWhere", "(", ")", ";", "$", "whereGroup", "->", "wheres", ...
Create a where array with nested where conditions. @param array $whereSlice @param string $boolean @return array
[ "Create", "a", "where", "array", "with", "nested", "where", "conditions", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Builder.php#L1066-L1073
train
Create a nested where clause
[ 30522, 5123, 3853, 3443, 5267, 3064, 2860, 5886, 2063, 1006, 1002, 2073, 30524, 1002, 2073, 17058, 1011, 1028, 2073, 2015, 1027, 1002, 2073, 14540, 6610, 1025, 2709, 1031, 1005, 2828, 1005, 1027, 1028, 1005, 9089, 2098, 1005, 1010, 1005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/ViewDataTable/Manager.php
Manager.getFooterIconFor
private static function getFooterIconFor($viewDataTableId) { $tables = static::getAvailableViewDataTables(); if (!array_key_exists($viewDataTableId, $tables)) { return; } $klass = $tables[$viewDataTableId]; return array( 'id' => $klass::getViewDa...
php
private static function getFooterIconFor($viewDataTableId) { $tables = static::getAvailableViewDataTables(); if (!array_key_exists($viewDataTableId, $tables)) { return; } $klass = $tables[$viewDataTableId]; return array( 'id' => $klass::getViewDa...
[ "private", "static", "function", "getFooterIconFor", "(", "$", "viewDataTableId", ")", "{", "$", "tables", "=", "static", "::", "getAvailableViewDataTables", "(", ")", ";", "if", "(", "!", "array_key_exists", "(", "$", "viewDataTableId", ",", "$", "tables", ")...
Returns an array with information necessary for adding the viewDataTable to the footer. @param string $viewDataTableId @return array
[ "Returns", "an", "array", "with", "information", "necessary", "for", "adding", "the", "viewDataTable", "to", "the", "footer", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/ViewDataTable/Manager.php#L219-L234
train
Returns footer icon for given viewDataTableId
[ 30522, 2797, 10763, 3853, 2131, 13064, 22420, 2239, 29278, 1006, 1002, 3193, 2850, 29336, 3085, 3593, 1007, 1063, 1002, 7251, 1027, 10763, 1024, 1024, 2131, 12462, 11733, 3468, 8584, 2850, 29336, 3085, 2015, 1006, 1007, 1025, 2065, 1006, 99...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Foundation/Console/Presets/None.php
None.updatePackageArray
protected static function updatePackageArray(array $packages) { unset( $packages['bootstrap'], $packages['jquery'], $packages['popper.js'], $packages['vue'], $packages['vue-template-compiler'], $packages['@babel/preset-react'], ...
php
protected static function updatePackageArray(array $packages) { unset( $packages['bootstrap'], $packages['jquery'], $packages['popper.js'], $packages['vue'], $packages['vue-template-compiler'], $packages['@babel/preset-react'], ...
[ "protected", "static", "function", "updatePackageArray", "(", "array", "$", "packages", ")", "{", "unset", "(", "$", "packages", "[", "'bootstrap'", "]", ",", "$", "packages", "[", "'jquery'", "]", ",", "$", "packages", "[", "'popper.js'", "]", ",", "$", ...
Update the given package array. @param array $packages @return array
[ "Update", "the", "given", "package", "array", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Console/Presets/None.php#L34-L48
train
Updates the package array with the new values.
[ 30522, 5123, 10763, 3853, 10651, 23947, 4270, 2906, 9447, 1006, 9140, 1002, 14555, 1007, 1063, 4895, 13462, 1006, 1002, 14555, 1031, 1005, 6879, 6494, 2361, 1005, 1033, 1010, 1002, 14555, 1031, 1005, 1046, 4226, 2854, 1005, 1033, 1010, 1002...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Grid/Concerns/HasHeader.php
HasHeader.header
public function header(Closure $closure = null) { if (!$closure) { return $this->header; } $this->header = $closure; return $this; }
php
public function header(Closure $closure = null) { if (!$closure) { return $this->header; } $this->header = $closure; return $this; }
[ "public", "function", "header", "(", "Closure", "$", "closure", "=", "null", ")", "{", "if", "(", "!", "$", "closure", ")", "{", "return", "$", "this", "->", "header", ";", "}", "$", "this", "->", "header", "=", "$", "closure", ";", "return", "$", ...
Set grid header. @param Closure|null $closure @return $this|Closure
[ "Set", "grid", "header", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Grid/Concerns/HasHeader.php#L22-L31
train
Set the header closure
[ 30522, 2270, 3853, 20346, 1006, 8503, 1002, 8503, 1027, 19701, 1007, 1063, 2065, 1006, 999, 1002, 8503, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 20346, 1025, 1065, 1002, 2023, 1011, 1028, 20346, 1027, 1002, 8503, 1025, 2709, 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...
octobercms/october
modules/backend/widgets/Search.php
Search.prepareVars
public function prepareVars() { $this->vars['cssClasses'] = implode(' ', $this->cssClasses); $this->vars['placeholder'] = Lang::get($this->prompt); $this->vars['value'] = $this->getActiveTerm(); $this->vars['searchOnEnter'] = $this->searchOnEnter; }
php
public function prepareVars() { $this->vars['cssClasses'] = implode(' ', $this->cssClasses); $this->vars['placeholder'] = Lang::get($this->prompt); $this->vars['value'] = $this->getActiveTerm(); $this->vars['searchOnEnter'] = $this->searchOnEnter; }
[ "public", "function", "prepareVars", "(", ")", "{", "$", "this", "->", "vars", "[", "'cssClasses'", "]", "=", "implode", "(", "' '", ",", "$", "this", "->", "cssClasses", ")", ";", "$", "this", "->", "vars", "[", "'placeholder'", "]", "=", "Lang", ":...
Prepares the view data
[ "Prepares", "the", "view", "data" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/widgets/Search.php#L109-L115
train
Prepare vars for the page
[ 30522, 2270, 3853, 7374, 10755, 2015, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 13075, 2015, 1031, 1005, 20116, 11020, 27102, 2229, 1005, 1033, 1027, 17727, 4135, 3207, 1006, 1005, 1005, 1010, 1002, 2023, 1011, 1028, 20116, 11020, 27102, 22...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/system/classes/VersionManager.php
VersionManager.applyPluginUpdate
protected function applyPluginUpdate($code, $version, $details) { if (is_array($details)) { $comment = array_shift($details); $scripts = $details; } else { $comment = $details; $scripts = []; } /* * Apply scripts, if a...
php
protected function applyPluginUpdate($code, $version, $details) { if (is_array($details)) { $comment = array_shift($details); $scripts = $details; } else { $comment = $details; $scripts = []; } /* * Apply scripts, if a...
[ "protected", "function", "applyPluginUpdate", "(", "$", "code", ",", "$", "version", ",", "$", "details", ")", "{", "if", "(", "is_array", "(", "$", "details", ")", ")", "{", "$", "comment", "=", "array_shift", "(", "$", "details", ")", ";", "$", "sc...
Applies a single version update to a plugin.
[ "Applies", "a", "single", "version", "update", "to", "a", "plugin", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/classes/VersionManager.php#L126-L158
train
Apply plugin update
[ 30522, 5123, 3853, 6611, 24759, 15916, 2378, 6279, 13701, 1006, 1002, 3642, 1010, 1002, 2544, 1010, 1002, 4751, 1007, 1063, 2065, 1006, 2003, 1035, 9140, 1006, 1002, 4751, 1007, 1007, 1063, 1002, 7615, 1027, 9140, 1035, 5670, 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/HttpKernel/Profiler/Profiler.php
Profiler.set
public function set(array $collectors = []) { $this->collectors = []; foreach ($collectors as $collector) { $this->add($collector); } }
php
public function set(array $collectors = []) { $this->collectors = []; foreach ($collectors as $collector) { $this->add($collector); } }
[ "public", "function", "set", "(", "array", "$", "collectors", "=", "[", "]", ")", "{", "$", "this", "->", "collectors", "=", "[", "]", ";", "foreach", "(", "$", "collectors", "as", "$", "collector", ")", "{", "$", "this", "->", "add", "(", "$", "...
Sets the Collectors associated with this profiler. @param DataCollectorInterface[] $collectors An array of collectors
[ "Sets", "the", "Collectors", "associated", "with", "this", "profiler", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpKernel/Profiler/Profiler.php#L199-L205
train
Set the collectors
[ 30522, 2270, 3853, 2275, 1006, 9140, 1002, 14256, 1027, 1031, 1033, 1007, 1063, 1002, 2023, 1011, 1028, 14256, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1002, 14256, 2004, 1002, 10018, 1007, 1063, 1002, 2023, 1011, 1028, 5587, 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...
z-song/laravel-admin
src/Form/Field/Image.php
Image.prepare
public function prepare($image) { if (request()->has(static::FILE_DELETE_FLAG)) { return $this->destroy(); } $this->name = $this->getStoreName($image); $this->callInterventionMethods($image->getRealPath()); return $this->uploadAndDeleteOriginal($image); }
php
public function prepare($image) { if (request()->has(static::FILE_DELETE_FLAG)) { return $this->destroy(); } $this->name = $this->getStoreName($image); $this->callInterventionMethods($image->getRealPath()); return $this->uploadAndDeleteOriginal($image); }
[ "public", "function", "prepare", "(", "$", "image", ")", "{", "if", "(", "request", "(", ")", "->", "has", "(", "static", "::", "FILE_DELETE_FLAG", ")", ")", "{", "return", "$", "this", "->", "destroy", "(", ")", ";", "}", "$", "this", "->", "name"...
@param array|UploadedFile $image @return string
[ "@param", "array|UploadedFile", "$image" ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Form/Field/Image.php#L28-L39
train
Prepare the image and upload it to the store
[ 30522, 2270, 3853, 7374, 1006, 1002, 3746, 1007, 1063, 2065, 1006, 5227, 1006, 1007, 1011, 1028, 2038, 1006, 10763, 1024, 1024, 5371, 1035, 3972, 12870, 1035, 5210, 1007, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 6033, 1006, 1007, 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...
getgrav/grav
system/src/Grav/Common/GPM/Licenses.php
Licenses.getLicenseFile
public static function getLicenseFile() { if (!isset(self::$file)) { $path = Grav::instance()['locator']->findResource('user-data://') . '/licenses.yaml'; if (!file_exists($path)) { touch($path); } self::$file = CompiledYamlFile::instance($pat...
php
public static function getLicenseFile() { if (!isset(self::$file)) { $path = Grav::instance()['locator']->findResource('user-data://') . '/licenses.yaml'; if (!file_exists($path)) { touch($path); } self::$file = CompiledYamlFile::instance($pat...
[ "public", "static", "function", "getLicenseFile", "(", ")", "{", "if", "(", "!", "isset", "(", "self", "::", "$", "file", ")", ")", "{", "$", "path", "=", "Grav", "::", "instance", "(", ")", "[", "'locator'", "]", "->", "findResource", "(", "'user-da...
Get's the License File object @return \RocketTheme\Toolbox\File\FileInterface
[ "Get", "s", "the", "License", "File", "object" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/GPM/Licenses.php#L110-L122
train
Get License File
[ 30522, 2270, 10763, 3853, 2131, 13231, 12325, 8873, 2571, 1006, 1007, 1063, 2065, 1006, 999, 26354, 3388, 1006, 2969, 1024, 1024, 1002, 5371, 1007, 1007, 1063, 1002, 4130, 1027, 24665, 11431, 1024, 1024, 6013, 1006, 1007, 1031, 1005, 8840, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
overtrue/wechat
src/Payment/Notify/Paid.php
Paid.handle
public function handle(Closure $closure) { $this->strict( \call_user_func($closure, $this->getMessage(), [$this, 'fail']) ); return $this->toResponse(); }
php
public function handle(Closure $closure) { $this->strict( \call_user_func($closure, $this->getMessage(), [$this, 'fail']) ); return $this->toResponse(); }
[ "public", "function", "handle", "(", "Closure", "$", "closure", ")", "{", "$", "this", "->", "strict", "(", "\\", "call_user_func", "(", "$", "closure", ",", "$", "this", "->", "getMessage", "(", ")", ",", "[", "$", "this", ",", "'fail'", "]", ")", ...
@param \Closure $closure @return \Symfony\Component\HttpFoundation\Response @throws \EasyWeChat\Kernel\Exceptions\Exception
[ "@param", "\\", "Closure", "$closure" ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Payment/Notify/Paid.php#L25-L32
train
Handle the exception and return the response.
[ 30522, 2270, 3853, 5047, 1006, 8503, 1002, 8503, 1007, 1063, 1002, 2023, 1011, 1028, 9384, 1006, 1032, 2655, 1035, 5310, 1035, 4569, 2278, 1006, 1002, 8503, 1010, 1002, 2023, 1011, 1028, 2131, 7834, 3736, 3351, 1006, 1007, 30524, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Routing/Router.php
Router.has
public function has($name) { $names = is_array($name) ? $name : func_get_args(); foreach ($names as $value) { if (! $this->routes->hasNamedRoute($value)) { return false; } } return true; }
php
public function has($name) { $names = is_array($name) ? $name : func_get_args(); foreach ($names as $value) { if (! $this->routes->hasNamedRoute($value)) { return false; } } return true; }
[ "public", "function", "has", "(", "$", "name", ")", "{", "$", "names", "=", "is_array", "(", "$", "name", ")", "?", "$", "name", ":", "func_get_args", "(", ")", ";", "foreach", "(", "$", "names", "as", "$", "value", ")", "{", "if", "(", "!", "$...
Check if a route with the given name exists. @param string $name @return bool
[ "Check", "if", "a", "route", "with", "the", "given", "name", "exists", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/Router.php#L1058-L1069
train
Has Route? Name?
[ 30522, 2270, 3853, 2038, 1006, 1002, 2171, 30524, 1024, 4569, 2278, 1035, 2131, 1035, 12098, 5620, 1006, 1007, 1025, 18921, 6776, 1006, 1002, 3415, 2004, 1002, 3643, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 5847, 1011, 1028, 8...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.whereRowValues
public function whereRowValues($columns, $operator, $values, $boolean = 'and') { if (count($columns) !== count($values)) { throw new InvalidArgumentException('The number of columns must match the number of values'); } $type = 'RowValues'; $this->wheres[] = compact('type...
php
public function whereRowValues($columns, $operator, $values, $boolean = 'and') { if (count($columns) !== count($values)) { throw new InvalidArgumentException('The number of columns must match the number of values'); } $type = 'RowValues'; $this->wheres[] = compact('type...
[ "public", "function", "whereRowValues", "(", "$", "columns", ",", "$", "operator", ",", "$", "values", ",", "$", "boolean", "=", "'and'", ")", "{", "if", "(", "count", "(", "$", "columns", ")", "!==", "count", "(", "$", "values", ")", ")", "{", "th...
Adds a where condition using row values. @param array $columns @param string $operator @param array $values @param string $boolean @return $this
[ "Adds", "a", "where", "condition", "using", "row", "values", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L1478-L1491
train
Add a where row values clause to the current query
[ 30522, 2270, 3853, 2073, 10524, 10175, 15808, 1006, 1002, 7753, 1010, 1002, 6872, 1010, 1002, 5300, 1010, 1002, 22017, 20898, 1027, 1005, 1998, 1005, 1007, 1063, 2065, 1006, 4175, 1006, 1002, 7753, 1007, 999, 1027, 1027, 4175, 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/HttpKernel/DependencyInjection/AddAnnotatedClassesToCachePass.php
AddAnnotatedClassesToCachePass.process
public function process(ContainerBuilder $container) { $annotatedClasses = $this->kernel->getAnnotatedClassesToCompile(); foreach ($container->getExtensions() as $extension) { if ($extension instanceof Extension) { $annotatedClasses = array_merge($annotatedClasses, $exten...
php
public function process(ContainerBuilder $container) { $annotatedClasses = $this->kernel->getAnnotatedClassesToCompile(); foreach ($container->getExtensions() as $extension) { if ($extension instanceof Extension) { $annotatedClasses = array_merge($annotatedClasses, $exten...
[ "public", "function", "process", "(", "ContainerBuilder", "$", "container", ")", "{", "$", "annotatedClasses", "=", "$", "this", "->", "kernel", "->", "getAnnotatedClassesToCompile", "(", ")", ";", "foreach", "(", "$", "container", "->", "getExtensions", "(", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpKernel/DependencyInjection/AddAnnotatedClassesToCachePass.php#L37-L50
train
Process the container builder and add all annotated classes to the class tree
[ 30522, 2270, 3853, 2832, 1006, 11661, 8569, 23891, 2099, 1002, 11661, 1007, 1063, 1002, 5754, 17287, 3064, 26266, 2229, 1027, 1002, 2023, 1011, 1028, 16293, 1011, 1028, 2131, 11639, 17287, 3064, 26266, 4355, 24163, 8737, 9463, 1006, 1007, 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/Translation/MessageSelector.php
MessageSelector.getPluralIndex
public function getPluralIndex($locale, $number) { switch ($locale) { case 'az': case 'az_AZ': case 'bo': case 'bo_CN': case 'bo_IN': case 'dz': case 'dz_BT': case 'id': case 'id_ID': case...
php
public function getPluralIndex($locale, $number) { switch ($locale) { case 'az': case 'az_AZ': case 'bo': case 'bo_CN': case 'bo_IN': case 'dz': case 'dz_BT': case 'id': case 'id_ID': case...
[ "public", "function", "getPluralIndex", "(", "$", "locale", ",", "$", "number", ")", "{", "switch", "(", "$", "locale", ")", "{", "case", "'az'", ":", "case", "'az_AZ'", ":", "case", "'bo'", ":", "case", "'bo_CN'", ":", "case", "'bo_IN'", ":", "case", ...
Get the index to use for pluralization. The plural rules are derived from code of the Zend Framework (2010-09-25), which is subject to the new BSD license (http://framework.zend.com/license/new-bsd) Copyright (c) 2005-2010 - Zend Technologies USA Inc. (http://www.zend.com) @param string $locale @param int $number...
[ "Get", "the", "index", "to", "use", "for", "pluralization", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Translation/MessageSelector.php#L110-L411
train
Returns the plural index for the given locale
[ 30522, 2270, 3853, 2131, 24759, 11137, 22254, 10288, 1006, 1002, 2334, 2063, 1010, 1002, 2193, 1007, 1063, 6942, 1006, 1002, 2334, 2063, 1007, 1063, 2553, 1005, 17207, 1005, 1024, 2553, 1005, 17207, 1035, 17207, 1005, 1024, 2553, 1005, 8945...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/Actions/API.php
API.getPageTitlesFollowingSiteSearch
public function getPageTitlesFollowingSiteSearch($idSite, $period, $date, $segment = false, $expanded = false, $idSubtable = false) { Piwik::checkUserHasViewAccess($idSite); $dataTable = $this->getPageTitles($idSite, $period, $date, $segment, $expanded, $idSubtable); $this->keepPagesFollowi...
php
public function getPageTitlesFollowingSiteSearch($idSite, $period, $date, $segment = false, $expanded = false, $idSubtable = false) { Piwik::checkUserHasViewAccess($idSite); $dataTable = $this->getPageTitles($idSite, $period, $date, $segment, $expanded, $idSubtable); $this->keepPagesFollowi...
[ "public", "function", "getPageTitlesFollowingSiteSearch", "(", "$", "idSite", ",", "$", "period", ",", "$", "date", ",", "$", "segment", "=", "false", ",", "$", "expanded", "=", "false", ",", "$", "idSubtable", "=", "false", ")", "{", "Piwik", "::", "che...
@param int $idSite @param string $period @param Date $date @param bool $segment @param bool $expanded @param bool $idSubtable @return DataTable|DataTable\Map
[ "@param", "int", "$idSite", "@param", "string", "$period", "@param", "Date", "$date", "@param", "bool", "$segment", "@param", "bool", "$expanded", "@param", "bool", "$idSubtable" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Actions/API.php#L143-L150
train
Returns the page titles following a site search.
[ 30522, 2270, 3853, 2131, 13704, 27430, 14876, 7174, 9328, 28032, 6810, 2906, 2818, 1006, 1002, 8909, 28032, 2063, 1010, 1002, 2558, 1010, 1002, 3058, 1010, 1002, 6903, 1027, 6270, 1010, 1002, 4423, 1027, 6270, 1010, 1002, 8909, 6342, 19279,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Page/Collection.php
Collection.toExtendedArray
public function toExtendedArray() { $items = []; foreach ($this->items as $path => $slug) { $page = $this->pages->get($path); if ($page !== null) { $items[$page->route()] = $page->toArray(); } } return $items; }
php
public function toExtendedArray() { $items = []; foreach ($this->items as $path => $slug) { $page = $this->pages->get($path); if ($page !== null) { $items[$page->route()] = $page->toArray(); } } return $items; }
[ "public", "function", "toExtendedArray", "(", ")", "{", "$", "items", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "items", "as", "$", "path", "=>", "$", "slug", ")", "{", "$", "page", "=", "$", "this", "->", "pages", "->", "get", "(", ...
Get the extended version of this Collection with each page keyed by route @return array @throws \Exception
[ "Get", "the", "extended", "version", "of", "this", "Collection", "with", "each", "page", "keyed", "by", "route" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Page/Collection.php#L618-L629
train
Return an array of all pages
[ 30522, 2270, 3853, 11756, 18413, 21945, 2906, 9447, 1006, 1007, 1063, 1002, 5167, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 5167, 2004, 1002, 4130, 1027, 1028, 1002, 23667, 1007, 1063, 1002, 3931, 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
libs/Zend/Session/SaveHandler/DbTable.php
Zend_Session_SaveHandler_DbTable._getLifetime
protected function _getLifetime(Zend_Db_Table_Row_Abstract $row) { $return = $this->_lifetime; if (!$this->_overrideLifetime) { $return = (int) $row->{$this->_lifetimeColumn}; } return $return; }
php
protected function _getLifetime(Zend_Db_Table_Row_Abstract $row) { $return = $this->_lifetime; if (!$this->_overrideLifetime) { $return = (int) $row->{$this->_lifetimeColumn}; } return $return; }
[ "protected", "function", "_getLifetime", "(", "Zend_Db_Table_Row_Abstract", "$", "row", ")", "{", "$", "return", "=", "$", "this", "->", "_lifetime", ";", "if", "(", "!", "$", "this", "->", "_overrideLifetime", ")", "{", "$", "return", "=", "(", "int", "...
Retrieve session lifetime considering Zend_Session_SaveHandler_DbTable::OVERRIDE_LIFETIME @param Zend_Db_Table_Row_Abstract $row @return int
[ "Retrieve", "session", "lifetime", "considering", "Zend_Session_SaveHandler_DbTable", "::", "OVERRIDE_LIFETIME" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Session/SaveHandler/DbTable.php#L570-L579
train
Get lifetime of this record
[ 30522, 5123, 3853, 1035, 2131, 15509, 7292, 1006, 16729, 2094, 1035, 16962, 1035, 2795, 1035, 5216, 1035, 10061, 1002, 5216, 1007, 1063, 1002, 2709, 1027, 1002, 2023, 1011, 1028, 1035, 6480, 1025, 2065, 1006, 999, 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/Console/Helper/Table.php
Table.calculateNumberOfColumns
private function calculateNumberOfColumns($rows) { $columns = [0]; foreach ($rows as $row) { if ($row instanceof TableSeparator) { continue; } $columns[] = $this->getNumberOfColumns($row); } $this->numberOfColumns = max($columns);...
php
private function calculateNumberOfColumns($rows) { $columns = [0]; foreach ($rows as $row) { if ($row instanceof TableSeparator) { continue; } $columns[] = $this->getNumberOfColumns($row); } $this->numberOfColumns = max($columns);...
[ "private", "function", "calculateNumberOfColumns", "(", "$", "rows", ")", "{", "$", "columns", "=", "[", "0", "]", ";", "foreach", "(", "$", "rows", "as", "$", "row", ")", "{", "if", "(", "$", "row", "instanceof", "TableSeparator", ")", "{", "continue"...
Calculate number of columns for this table.
[ "Calculate", "number", "of", "columns", "for", "this", "table", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Helper/Table.php#L502-L514
train
Calculates the numberOfColumns property
[ 30522, 2797, 3853, 18422, 19172, 5677, 11253, 25778, 2819, 3619, 1006, 1002, 10281, 1007, 1063, 1002, 7753, 1027, 1031, 1014, 1033, 1025, 18921, 6776, 1006, 1002, 10281, 2004, 1002, 5216, 1007, 1063, 2065, 1006, 1002, 5216, 6013, 11253, 725...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.flash
public function flash(string $key, $value = true) { $this->put($key, $value); $this->push('_flash.new', $key); $this->removeFromOldFlashData([$key]); }
php
public function flash(string $key, $value = true) { $this->put($key, $value); $this->push('_flash.new', $key); $this->removeFromOldFlashData([$key]); }
[ "public", "function", "flash", "(", "string", "$", "key", ",", "$", "value", "=", "true", ")", "{", "$", "this", "->", "put", "(", "$", "key", ",", "$", "value", ")", ";", "$", "this", "->", "push", "(", "'_flash.new'", ",", "$", "key", ")", ";...
Flash a key / value pair to the session. @param string $key @param mixed $value @return void
[ "Flash", "a", "key", "/", "value", "pair", "to", "the", "session", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Session/Store.php#L343-L350
train
Add a flash value to the current session
[ 30522, 2270, 3853, 5956, 1006, 5164, 1002, 3145, 1010, 1002, 3643, 1027, 2995, 1007, 1063, 1002, 2023, 1011, 1028, 2404, 1006, 1002, 3145, 1010, 1002, 3643, 1007, 1025, 1002, 2023, 1011, 1028, 5245, 1006, 1005, 1035, 5956, 1012, 2047, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Archive/DataTableFactory.php
DataTableFactory.makeIndexedByRecordNameDataTable
private function makeIndexedByRecordNameDataTable($blobRow, $keyMetadata) { $table = new DataTable\Map(); $table->setKeyName('recordName'); $tableMetadata = array_merge(DataCollection::getDataRowMetadata($blobRow), $keyMetadata); foreach ($blobRow as $name => $blob) { $...
php
private function makeIndexedByRecordNameDataTable($blobRow, $keyMetadata) { $table = new DataTable\Map(); $table->setKeyName('recordName'); $tableMetadata = array_merge(DataCollection::getDataRowMetadata($blobRow), $keyMetadata); foreach ($blobRow as $name => $blob) { $...
[ "private", "function", "makeIndexedByRecordNameDataTable", "(", "$", "blobRow", ",", "$", "keyMetadata", ")", "{", "$", "table", "=", "new", "DataTable", "\\", "Map", "(", ")", ";", "$", "table", "->", "setKeyName", "(", "'recordName'", ")", ";", "$", "tab...
Creates a DataTable for every record in an archive data row and puts them in a DataTable\Map instance. @param array $blobRow @return DataTable\Map
[ "Creates", "a", "DataTable", "for", "every", "record", "in", "an", "archive", "data", "row", "and", "puts", "them", "in", "a", "DataTable", "\\", "Map", "instance", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Archive/DataTableFactory.php#L291-L306
train
This method is used to make a DataTable indexed by record name.
[ 30522, 2797, 3853, 2191, 22254, 10288, 2098, 3762, 2890, 27108, 28911, 7583, 6790, 10880, 1006, 1002, 1038, 4135, 12618, 2860, 1010, 1002, 3145, 11368, 8447, 2696, 1007, 1063, 1002, 2795, 1027, 2047, 2951, 10880, 1032, 4949, 1006, 1007, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Grid.php
Grid.setView
public function setView($view, $variables = []) { if (!empty($variables)) { $this->with($variables); } $this->view = $view; }
php
public function setView($view, $variables = []) { if (!empty($variables)) { $this->with($variables); } $this->view = $view; }
[ "public", "function", "setView", "(", "$", "view", ",", "$", "variables", "=", "[", "]", ")", "{", "if", "(", "!", "empty", "(", "$", "variables", ")", ")", "{", "$", "this", "->", "with", "(", "$", "variables", ")", ";", "}", "$", "this", "->"...
Set a view to render. @param string $view @param array $variables
[ "Set", "a", "view", "to", "render", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Grid.php#L951-L958
train
Set the view of the page.
[ 30522, 2270, 3853, 2275, 8584, 1006, 1002, 3193, 1010, 1002, 10857, 1027, 1031, 1033, 1007, 1063, 2065, 1006, 999, 4064, 1006, 1002, 10857, 1007, 1007, 1063, 1002, 2023, 1011, 1028, 2007, 1006, 1002, 10857, 1007, 1025, 1065, 1002, 2023, 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/Form/Extension/Core/DataMapper/RadioListMapper.php
RadioListMapper.mapFormsToData
public function mapFormsToData($radios, &$choice) { if (null !== $choice && !\is_string($choice)) { throw new UnexpectedTypeException($choice, 'null or string'); } $choice = null; foreach ($radios as $radio) { if ($radio->getData()) { if ('pl...
php
public function mapFormsToData($radios, &$choice) { if (null !== $choice && !\is_string($choice)) { throw new UnexpectedTypeException($choice, 'null or string'); } $choice = null; foreach ($radios as $radio) { if ($radio->getData()) { if ('pl...
[ "public", "function", "mapFormsToData", "(", "$", "radios", ",", "&", "$", "choice", ")", "{", "if", "(", "null", "!==", "$", "choice", "&&", "!", "\\", "is_string", "(", "$", "choice", ")", ")", "{", "throw", "new", "UnexpectedTypeException", "(", "$"...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/Extension/Core/DataMapper/RadioListMapper.php#L46-L65
train
Maps the form to the data
[ 30522, 2270, 3853, 4949, 22694, 3406, 2850, 2696, 1006, 1002, 22229, 1010, 1004, 1002, 3601, 1007, 1063, 2065, 1006, 19701, 999, 1027, 1027, 1002, 3601, 1004, 1004, 999, 1032, 2003, 1035, 5164, 1006, 1002, 3601, 1007, 1007, 1063, 5466, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Routing/UrlGenerator.php
UrlGenerator.setRequest
public function setRequest(Request $request) { $this->request = $request; $this->cachedRoot = null; $this->cachedScheme = null; $this->routeGenerator = null; }
php
public function setRequest(Request $request) { $this->request = $request; $this->cachedRoot = null; $this->cachedScheme = null; $this->routeGenerator = null; }
[ "public", "function", "setRequest", "(", "Request", "$", "request", ")", "{", "$", "this", "->", "request", "=", "$", "request", ";", "$", "this", "->", "cachedRoot", "=", "null", ";", "$", "this", "->", "cachedScheme", "=", "null", ";", "$", "this", ...
Set the current request instance. @param \Illuminate\Http\Request $request @return void
[ "Set", "the", "current", "request", "instance", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/UrlGenerator.php#L658-L665
train
Set the request
[ 30522, 2270, 3853, 2275, 2890, 15500, 1006, 5227, 1002, 5227, 1007, 1063, 1002, 2023, 1011, 1028, 5227, 1027, 1002, 5227, 1025, 1002, 2023, 1011, 1028, 17053, 22196, 4140, 1027, 19701, 1025, 1002, 2023, 1011, 1028, 17053, 5104, 5403, 4168, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/ServiceProvider.php
ServiceProvider.registerAssetBundles
protected function registerAssetBundles() { /* * Register asset bundles */ CombineAssets::registerCallback(function ($combiner) { $combiner->registerBundle('~/modules/system/assets/less/styles.less'); $combiner->registerBundle('~/modules/system/assets/ui/sto...
php
protected function registerAssetBundles() { /* * Register asset bundles */ CombineAssets::registerCallback(function ($combiner) { $combiner->registerBundle('~/modules/system/assets/less/styles.less'); $combiner->registerBundle('~/modules/system/assets/ui/sto...
[ "protected", "function", "registerAssetBundles", "(", ")", "{", "/*\n * Register asset bundles\n */", "CombineAssets", "::", "registerCallback", "(", "function", "(", "$", "combiner", ")", "{", "$", "combiner", "->", "registerBundle", "(", "'~/modules/syst...
Register asset bundles
[ "Register", "asset", "bundles" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/ServiceProvider.php#L510-L523
train
Register asset bundles
[ 30522, 5123, 3853, 4236, 27241, 2102, 27265, 4244, 1006, 1007, 1063, 1013, 1008, 1008, 4236, 11412, 26825, 1008, 1013, 11506, 27241, 3215, 1024, 1024, 4236, 9289, 20850, 8684, 1006, 3853, 1006, 1002, 11506, 2099, 1007, 1063, 1002, 11506, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Validator/Mapping/Loader/PropertyInfoLoader.php
PropertyInfoLoader.loadClassMetadata
public function loadClassMetadata(ClassMetadata $metadata) { $className = $metadata->getClassName(); if (null !== $this->classValidatorRegexp && !preg_match($this->classValidatorRegexp, $className)) { return false; } if (!$properties = $this->listExtractor->getProperties...
php
public function loadClassMetadata(ClassMetadata $metadata) { $className = $metadata->getClassName(); if (null !== $this->classValidatorRegexp && !preg_match($this->classValidatorRegexp, $className)) { return false; } if (!$properties = $this->listExtractor->getProperties...
[ "public", "function", "loadClassMetadata", "(", "ClassMetadata", "$", "metadata", ")", "{", "$", "className", "=", "$", "metadata", "->", "getClassName", "(", ")", ";", "if", "(", "null", "!==", "$", "this", "->", "classValidatorRegexp", "&&", "!", "preg_mat...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Validator/Mapping/Loader/PropertyInfoLoader.php#L44-L111
train
Load class metadata
[ 30522, 2270, 3853, 7170, 26266, 11368, 8447, 2696, 1006, 2465, 11368, 8447, 2696, 1002, 27425, 1007, 1063, 1002, 2465, 18442, 1027, 1002, 27425, 1011, 1028, 2131, 26266, 18442, 1006, 1007, 1025, 2065, 1006, 19701, 999, 1027, 1027, 1002, 202...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/HeaderUtils.php
HeaderUtils.split
public static function split(string $header, string $separators): array { $quotedSeparators = preg_quote($separators, '/'); preg_match_all(' / (?!\s) (?: # quoted-string "(?:[^"\\\\]|\\\\.)*(?:"|\\\\|$) ...
php
public static function split(string $header, string $separators): array { $quotedSeparators = preg_quote($separators, '/'); preg_match_all(' / (?!\s) (?: # quoted-string "(?:[^"\\\\]|\\\\.)*(?:"|\\\\|$) ...
[ "public", "static", "function", "split", "(", "string", "$", "header", ",", "string", "$", "separators", ")", ":", "array", "{", "$", "quotedSeparators", "=", "preg_quote", "(", "$", "separators", ",", "'/'", ")", ";", "preg_match_all", "(", "'\n ...
Splits an HTTP header by one or more separators. Example: HeaderUtils::split("da, en-gb;q=0.8", ",;") // => ['da'], ['en-gb', 'q=0.8']] @param string $header HTTP header value @param string $separators List of characters to split on, ordered by precedence, e.g. ",", ";=", or ",;=" @return array Nested array wit...
[ "Splits", "an", "HTTP", "header", "by", "one", "or", "more", "separators", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/HeaderUtils.php#L46-L69
train
Splits the header into an array of tokens
[ 30522, 2270, 10763, 3853, 3975, 1006, 5164, 1002, 20346, 1010, 5164, 1002, 19802, 25879, 5668, 1007, 1024, 9140, 1063, 1002, 9339, 3366, 28689, 6591, 1027, 3653, 2290, 1035, 14686, 1006, 1002, 19802, 25879, 5668, 1010, 1005, 1013, 1005, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
php-ai/php-ml
src/Helper/Optimizer/ConjugateGradient.php
MP.divs
public static function divs(array $m1, float $m2): array { $res = []; foreach ($m1 as $val) { $res[] = $val / ($m2 + 1e-32); } return $res; }
php
public static function divs(array $m1, float $m2): array { $res = []; foreach ($m1 as $val) { $res[] = $val / ($m2 + 1e-32); } return $res; }
[ "public", "static", "function", "divs", "(", "array", "$", "m1", ",", "float", "$", "m2", ")", ":", "array", "{", "$", "res", "=", "[", "]", ";", "foreach", "(", "$", "m1", "as", "$", "val", ")", "{", "$", "res", "[", "]", "=", "$", "val", ...
Element-wise <b>division</b> of a vector with a scalar
[ "Element", "-", "wise", "<b", ">", "division<", "/", "b", ">", "of", "a", "vector", "with", "a", "scalar" ]
f6aa1a59b0525b8fca3d2786d661ab3e70904016
https://github.com/php-ai/php-ml/blob/f6aa1a59b0525b8fca3d2786d661ab3e70904016/src/Helper/Optimizer/ConjugateGradient.php#L274-L282
train
Divide two values into an array
[ 30522, 2270, 10763, 3853, 4487, 15088, 1006, 9140, 1002, 23290, 1010, 14257, 1002, 25525, 1007, 1024, 9140, 1063, 1002, 24501, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1002, 23290, 2004, 1002, 11748, 1007, 1063, 1002, 24501, 1031, 1033, 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...
php-ai/php-ml
src/Classification/NaiveBayes.php
NaiveBayes.getSamplesByLabel
private function getSamplesByLabel(string $label): array { $samples = []; for ($i = 0; $i < $this->sampleCount; ++$i) { if ($this->targets[$i] == $label) { $samples[] = $this->samples[$i]; } } return $samples; }
php
private function getSamplesByLabel(string $label): array { $samples = []; for ($i = 0; $i < $this->sampleCount; ++$i) { if ($this->targets[$i] == $label) { $samples[] = $this->samples[$i]; } } return $samples; }
[ "private", "function", "getSamplesByLabel", "(", "string", "$", "label", ")", ":", "array", "{", "$", "samples", "=", "[", "]", ";", "for", "(", "$", "i", "=", "0", ";", "$", "i", "<", "$", "this", "->", "sampleCount", ";", "++", "$", "i", ")", ...
Return samples belonging to specific label
[ "Return", "samples", "belonging", "to", "specific", "label" ]
f6aa1a59b0525b8fca3d2786d661ab3e70904016
https://github.com/php-ai/php-ml/blob/f6aa1a59b0525b8fca3d2786d661ab3e70904016/src/Classification/NaiveBayes.php#L173-L183
train
Returns the samples by the given label
[ 30522, 2797, 3853, 4152, 16613, 4244, 3762, 20470, 2884, 1006, 5164, 1002, 3830, 1007, 1024, 9140, 1063, 1002, 8168, 1027, 1031, 1033, 1025, 2005, 1006, 1002, 1045, 1027, 1014, 1025, 1002, 1045, 1026, 1002, 2023, 1011, 1028, 7099, 3597, 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...