repo
stringclasses
21 values
path
stringlengths
10
105
func_name
stringlengths
6
64
original_string
stringlengths
105
15.6k
language
stringclasses
1 value
code
stringlengths
105
15.6k
code_tokens
listlengths
29
2.15k
docstring
stringlengths
11
2.85k
docstring_tokens
listlengths
1
290
sha
stringclasses
21 values
url
stringlengths
100
194
partition
stringclasses
1 value
summary
stringlengths
8
319
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
laravel/framework
src/Illuminate/Validation/Validator.php
Validator.shouldStopValidating
protected function shouldStopValidating($attribute) { if ($this->hasRule($attribute, ['Bail'])) { return $this->messages->has($attribute); } if (isset($this->failedRules[$attribute]) && array_key_exists('uploaded', $this->failedRules[$attribute])) { retur...
php
protected function shouldStopValidating($attribute) { if ($this->hasRule($attribute, ['Bail'])) { return $this->messages->has($attribute); } if (isset($this->failedRules[$attribute]) && array_key_exists('uploaded', $this->failedRules[$attribute])) { retur...
[ "protected", "function", "shouldStopValidating", "(", "$", "attribute", ")", "{", "if", "(", "$", "this", "->", "hasRule", "(", "$", "attribute", ",", "[", "'Bail'", "]", ")", ")", "{", "return", "$", "this", "->", "messages", "->", "has", "(", "$", ...
Check if we should stop further validations on a given attribute. @param string $attribute @return bool
[ "Check", "if", "we", "should", "stop", "further", "validations", "on", "a", "given", "attribute", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Validator.php#L591-L608
train
Checks if the attribute should be validated
[ 30522, 5123, 3853, 2323, 16033, 2361, 10175, 8524, 3436, 1006, 1002, 17961, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 2038, 6820, 2571, 1006, 1002, 17961, 1010, 1031, 1005, 15358, 1005, 1033, 1007, 1007, 1063, 2709, 1002, 2023, 1011, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Cache/Frontend/Class.php
Zend_Cache_Frontend_Class.setOption
public function setOption($name, $value) { if ($name == 'cached_entity') { $this->setCachedEntity($value); } else { parent::setOption($name, $value); } }
php
public function setOption($name, $value) { if ($name == 'cached_entity') { $this->setCachedEntity($value); } else { parent::setOption($name, $value); } }
[ "public", "function", "setOption", "(", "$", "name", ",", "$", "value", ")", "{", "if", "(", "$", "name", "==", "'cached_entity'", ")", "{", "$", "this", "->", "setCachedEntity", "(", "$", "value", ")", ";", "}", "else", "{", "parent", "::", "setOpti...
Public frontend to set an option Just a wrapper to get a specific behaviour for cached_entity @param string $name Name of the option @param mixed $value Value of the option @throws Zend_Cache_Exception @return void
[ "Public", "frontend", "to", "set", "an", "option" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Cache/Frontend/Class.php#L151-L158
train
Set an option value
[ 30522, 2270, 3853, 2275, 7361, 3508, 1006, 1002, 2171, 1010, 1002, 3643, 1007, 1063, 2065, 1006, 1002, 2171, 1027, 1027, 1005, 17053, 2094, 1035, 9178, 1005, 1007, 1063, 1002, 2023, 1011, 1028, 2275, 3540, 7690, 4765, 3012, 1006, 1002, 36...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Grid/Filter.php
Filter.getCurrentScope
public function getCurrentScope() { $key = request(Scope::QUERY_NAME); return $this->scopes->first(function ($scope) use ($key) { return $scope->key == $key; }); }
php
public function getCurrentScope() { $key = request(Scope::QUERY_NAME); return $this->scopes->first(function ($scope) use ($key) { return $scope->key == $key; }); }
[ "public", "function", "getCurrentScope", "(", ")", "{", "$", "key", "=", "request", "(", "Scope", "::", "QUERY_NAME", ")", ";", "return", "$", "this", "->", "scopes", "->", "first", "(", "function", "(", "$", "scope", ")", "use", "(", "$", "key", ")"...
Get current scope. @return Scope|null
[ "Get", "current", "scope", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Grid/Filter.php#L434-L441
train
Get current scope
[ 30522, 2270, 3853, 2131, 10841, 14343, 7666, 16186, 1006, 1007, 1063, 1002, 3145, 1027, 5227, 1006, 9531, 1024, 1024, 23032, 1035, 2171, 1007, 1025, 2709, 1002, 2023, 1011, 1028, 9531, 2015, 1011, 1028, 2034, 1006, 3853, 1006, 1002, 9531, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/cms/twig/Loader.php
Loader.validateCmsObject
protected function validateCmsObject($name) { if ($name === $this->obj->getFilePath()) { return true; } if ($fallbackObj = $this->findFallbackObject($name)) { $this->obj = $fallbackObj; return true; } return false; }
php
protected function validateCmsObject($name) { if ($name === $this->obj->getFilePath()) { return true; } if ($fallbackObj = $this->findFallbackObject($name)) { $this->obj = $fallbackObj; return true; } return false; }
[ "protected", "function", "validateCmsObject", "(", "$", "name", ")", "{", "if", "(", "$", "name", "===", "$", "this", "->", "obj", "->", "getFilePath", "(", ")", ")", "{", "return", "true", ";", "}", "if", "(", "$", "fallbackObj", "=", "$", "this", ...
Internal method that checks if the template name matches the loaded object, with fallback support to partials. @return bool
[ "Internal", "method", "that", "checks", "if", "the", "template", "name", "matches", "the", "loaded", "object", "with", "fallback", "support", "to", "partials", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/twig/Loader.php#L120-L132
train
Validate the CMS object
[ 30522, 5123, 3853, 9398, 3686, 27487, 6499, 2497, 20614, 1006, 1002, 2171, 1007, 1063, 2065, 1006, 1002, 2171, 1027, 1027, 1027, 1002, 2023, 1011, 1028, 27885, 3501, 1011, 1028, 2131, 8873, 2571, 15069, 1006, 1007, 1007, 1063, 2709, 2995, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/GPM/GPM.php
GPM.getVersionOfDependencyRequiredByPackage
public function getVersionOfDependencyRequiredByPackage($package_slug, $dependency_slug) { $dependencies = $this->getInstalledPackage($package_slug)->dependencies; foreach ($dependencies as $dependency) { if (isset($dependency[$dependency_slug])) { return $dependency[$dep...
php
public function getVersionOfDependencyRequiredByPackage($package_slug, $dependency_slug) { $dependencies = $this->getInstalledPackage($package_slug)->dependencies; foreach ($dependencies as $dependency) { if (isset($dependency[$dependency_slug])) { return $dependency[$dep...
[ "public", "function", "getVersionOfDependencyRequiredByPackage", "(", "$", "package_slug", ",", "$", "dependency_slug", ")", "{", "$", "dependencies", "=", "$", "this", "->", "getInstalledPackage", "(", "$", "package_slug", ")", "->", "dependencies", ";", "foreach",...
Get the required version of a dependency of a package @param string $package_slug @param string $dependency_slug @return mixed
[ "Get", "the", "required", "version", "of", "a", "dependency", "of", "a", "package" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/GPM/GPM.php#L752-L762
train
Get Version of Dependency Required By Package
[ 30522, 2270, 3853, 2131, 27774, 11253, 3207, 11837, 4181, 5666, 2890, 15549, 5596, 3762, 23947, 4270, 1006, 1002, 7427, 1035, 23667, 1010, 1002, 24394, 1035, 23667, 1007, 1063, 1002, 12530, 15266, 1027, 1002, 2023, 1011, 1028, 2131, 7076, 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...
overtrue/wechat
src/Work/Message/Messenger.php
Messenger.send
public function send($message = null) { if ($message) { $this->message($message); } if (empty($this->message)) { throw new RuntimeException('No message to send.'); } if (is_null($this->agentId)) { throw new RuntimeException('No agentid sp...
php
public function send($message = null) { if ($message) { $this->message($message); } if (empty($this->message)) { throw new RuntimeException('No message to send.'); } if (is_null($this->agentId)) { throw new RuntimeException('No agentid sp...
[ "public", "function", "send", "(", "$", "message", "=", "null", ")", "{", "if", "(", "$", "message", ")", "{", "$", "this", "->", "message", "(", "$", "message", ")", ";", "}", "if", "(", "empty", "(", "$", "this", "->", "message", ")", ")", "{...
@param \EasyWeChat\Kernel\Messages\Message|string|null $message @return mixed @throws \EasyWeChat\Kernel\Exceptions\RuntimeException @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException
[ "@param", "\\", "EasyWeChat", "\\", "Kernel", "\\", "Messages", "\\", "Message|string|null", "$message" ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Work/Message/Messenger.php#L164-L186
train
Send the message to the agent
[ 30522, 2270, 3853, 4604, 1006, 1002, 4471, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 4471, 1007, 1063, 1002, 2023, 1011, 1028, 4471, 1006, 1002, 4471, 1007, 1025, 1065, 2065, 1006, 4064, 1006, 1002, 2023, 1011, 1028, 4471, 1007, 1007, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Mail/Mailable.php
Mailable.text
public function text($textView, array $data = []) { $this->textView = $textView; $this->viewData = array_merge($this->viewData, $data); return $this; }
php
public function text($textView, array $data = []) { $this->textView = $textView; $this->viewData = array_merge($this->viewData, $data); return $this; }
[ "public", "function", "text", "(", "$", "textView", ",", "array", "$", "data", "=", "[", "]", ")", "{", "$", "this", "->", "textView", "=", "$", "textView", ";", "$", "this", "->", "viewData", "=", "array_merge", "(", "$", "this", "->", "viewData", ...
Set the plain text view for the message. @param string $textView @param array $data @return $this
[ "Set", "the", "plain", "text", "view", "for", "the", "message", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Mail/Mailable.php#L715-L721
train
Set the text view
[ 30522, 2270, 3853, 3793, 1006, 1002, 3793, 8584, 1010, 9140, 1002, 2951, 1027, 1031, 1033, 1007, 1063, 1002, 2023, 1011, 1028, 3793, 8584, 1027, 1002, 3793, 8584, 1025, 1002, 2023, 1011, 1028, 3193, 2850, 2696, 1027, 9140, 1035, 13590, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php
HasAttributes.setAttribute
public function setAttribute($key, $value) { // First we will check for the presence of a mutator for the set operation // which simply lets the developers tweak the attribute as it is set on // the model, such as "json_encoding" an listing of data for storage. if ($this->hasSetMutat...
php
public function setAttribute($key, $value) { // First we will check for the presence of a mutator for the set operation // which simply lets the developers tweak the attribute as it is set on // the model, such as "json_encoding" an listing of data for storage. if ($this->hasSetMutat...
[ "public", "function", "setAttribute", "(", "$", "key", ",", "$", "value", ")", "{", "// First we will check for the presence of a mutator for the set operation", "// which simply lets the developers tweak the attribute as it is set on", "// the model, such as \"json_encoding\" an listing o...
Set a given attribute on the model. @param string $key @param mixed $value @return mixed
[ "Set", "a", "given", "attribute", "on", "the", "model", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php#L559-L589
train
Set an attribute on the model
[ 30522, 2270, 3853, 2275, 19321, 3089, 8569, 2618, 1006, 1002, 30524, 1996, 9797, 1056, 8545, 4817, 1996, 17961, 2004, 2009, 2003, 2275, 2006, 1013, 1013, 1996, 2944, 1010, 2107, 2004, 1000, 1046, 3385, 1035, 17181, 1000, 2019, 10328, 1997, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Connection.php
Connection.unprepared
public function unprepared($query) { return $this->run($query, [], function ($query) { if ($this->pretending()) { return true; } $this->recordsHaveBeenModified( $change = $this->getPdo()->exec($query) !== false ); ...
php
public function unprepared($query) { return $this->run($query, [], function ($query) { if ($this->pretending()) { return true; } $this->recordsHaveBeenModified( $change = $this->getPdo()->exec($query) !== false ); ...
[ "public", "function", "unprepared", "(", "$", "query", ")", "{", "return", "$", "this", "->", "run", "(", "$", "query", ",", "[", "]", ",", "function", "(", "$", "query", ")", "{", "if", "(", "$", "this", "->", "pretending", "(", ")", ")", "{", ...
Run a raw, unprepared query against the PDO connection. @param string $query @return bool
[ "Run", "a", "raw", "unprepared", "query", "against", "the", "PDO", "connection", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Connection.php#L499-L512
train
Unprepared SQL query
[ 30522, 2270, 3853, 4895, 28139, 19362, 2098, 1006, 1002, 23032, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 2448, 1006, 1002, 23032, 1010, 1031, 1033, 1010, 3853, 1006, 1002, 23032, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 12097, 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/Filesystem/Filesystem.php
Filesystem.chmod
public function chmod($files, $mode, $umask = 0000, $recursive = false) { foreach ($this->toIterable($files) as $file) { if (true !== @chmod($file, $mode & ~$umask)) { throw new IOException(sprintf('Failed to chmod file "%s".', $file), 0, null, $file); } i...
php
public function chmod($files, $mode, $umask = 0000, $recursive = false) { foreach ($this->toIterable($files) as $file) { if (true !== @chmod($file, $mode & ~$umask)) { throw new IOException(sprintf('Failed to chmod file "%s".', $file), 0, null, $file); } i...
[ "public", "function", "chmod", "(", "$", "files", ",", "$", "mode", ",", "$", "umask", "=", "0000", ",", "$", "recursive", "=", "false", ")", "{", "foreach", "(", "$", "this", "->", "toIterable", "(", "$", "files", ")", "as", "$", "file", ")", "{...
Change mode for an array of files or directories. @param string|iterable $files A filename, an array of files, or a \Traversable instance to change mode @param int $mode The new mode (octal) @param int $umask The mode mask (octal) @param bool $recursive Whether change th...
[ "Change", "mode", "for", "an", "array", "of", "files", "or", "directories", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Filesystem/Filesystem.php#L199-L209
train
Change permissions on files and directories
[ 30522, 2270, 3853, 10381, 5302, 2094, 1006, 1002, 6764, 1010, 1002, 5549, 1010, 1002, 8529, 19895, 1027, 2199, 2692, 1010, 1002, 28667, 9236, 3512, 1027, 6270, 1007, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 2000, 21646, 3085, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/HTML/QuickForm2/Renderer/Default.php
HTML_QuickForm2_Renderer_Default.renderElement
public function renderElement(HTML_QuickForm2_Node $element) { $elTpl = $this->prepareTemplate($this->findTemplate($element), $element); $this->html[count($this->html) - 1][] = str_replace(array('{element}', '{id}'), array($element, $elemen...
php
public function renderElement(HTML_QuickForm2_Node $element) { $elTpl = $this->prepareTemplate($this->findTemplate($element), $element); $this->html[count($this->html) - 1][] = str_replace(array('{element}', '{id}'), array($element, $elemen...
[ "public", "function", "renderElement", "(", "HTML_QuickForm2_Node", "$", "element", ")", "{", "$", "elTpl", "=", "$", "this", "->", "prepareTemplate", "(", "$", "this", "->", "findTemplate", "(", "$", "element", ")", ",", "$", "element", ")", ";", "$", "...
Renders a generic element @param HTML_QuickForm2_Node Element being rendered
[ "Renders", "a", "generic", "element" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Renderer/Default.php#L287-L292
train
Render an element
[ 30522, 2270, 3853, 17552, 12260, 3672, 1006, 16129, 1035, 4248, 14192, 2475, 1035, 13045, 1002, 5783, 1007, 1063, 1002, 3449, 25856, 2140, 1027, 1002, 2023, 1011, 1028, 7374, 18532, 15725, 1006, 1002, 2023, 1011, 1028, 2424, 18532, 15725, 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/View/Concerns/ManagesStacks.php
ManagesStacks.stopPrepend
public function stopPrepend() { if (empty($this->pushStack)) { throw new InvalidArgumentException('Cannot end a prepend operation without first starting one.'); } return tap(array_pop($this->pushStack), function ($last) { $this->extendPrepend($last, ob_get_clean()); ...
php
public function stopPrepend() { if (empty($this->pushStack)) { throw new InvalidArgumentException('Cannot end a prepend operation without first starting one.'); } return tap(array_pop($this->pushStack), function ($last) { $this->extendPrepend($last, ob_get_clean()); ...
[ "public", "function", "stopPrepend", "(", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "pushStack", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", "'Cannot end a prepend operation without first starting one.'", ")", ";", "}", "return", "t...
Stop prepending content into a push section. @return string @throws \InvalidArgumentException
[ "Stop", "prepending", "content", "into", "a", "push", "section", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/View/Concerns/ManagesStacks.php#L111-L120
train
Stop prepending content to the stack.
[ 30522, 2270, 3853, 2644, 28139, 11837, 2094, 1006, 1007, 1063, 2065, 1006, 4064, 1006, 1002, 2023, 1011, 1028, 5245, 9153, 3600, 1007, 1007, 1063, 5466, 2047, 19528, 2906, 22850, 15781, 2595, 24422, 1006, 1005, 3685, 2203, 1037, 17463, 1049...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Form.php
Form.ajaxResponse
protected function ajaxResponse($message) { $request = Request::capture(); // ajax but not pjax if ($request->ajax() && !$request->pjax()) { return response()->json([ 'status' => true, 'message' => $message, ]); } ret...
php
protected function ajaxResponse($message) { $request = Request::capture(); // ajax but not pjax if ($request->ajax() && !$request->pjax()) { return response()->json([ 'status' => true, 'message' => $message, ]); } ret...
[ "protected", "function", "ajaxResponse", "(", "$", "message", ")", "{", "$", "request", "=", "Request", "::", "capture", "(", ")", ";", "// ajax but not pjax", "if", "(", "$", "request", "->", "ajax", "(", ")", "&&", "!", "$", "request", "->", "pjax", ...
Get ajax response. @param string $message @return bool|\Illuminate\Http\JsonResponse
[ "Get", "ajax", "response", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Form.php#L417-L430
train
Ajax response.
[ 30522, 5123, 3853, 18176, 6072, 26029, 3366, 1006, 1002, 4471, 1007, 1063, 1002, 5227, 1027, 5227, 1024, 1024, 5425, 1006, 1007, 1025, 1013, 1013, 18176, 2021, 2025, 1052, 3900, 2595, 2065, 1006, 1002, 5227, 1011, 1028, 18176, 1006, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpClient/HttpClientTrait.php
HttpClientTrait.normalizeBody
private static function normalizeBody($body) { if (\is_array($body)) { return http_build_query($body, '', '&', PHP_QUERY_RFC1738); } if ($body instanceof \Traversable) { $body = function () use ($body) { yield from $body; }; } if ($body instanceof \C...
php
private static function normalizeBody($body) { if (\is_array($body)) { return http_build_query($body, '', '&', PHP_QUERY_RFC1738); } if ($body instanceof \Traversable) { $body = function () use ($body) { yield from $body; }; } if ($body instanceof \C...
[ "private", "static", "function", "normalizeBody", "(", "$", "body", ")", "{", "if", "(", "\\", "is_array", "(", "$", "body", ")", ")", "{", "return", "http_build_query", "(", "$", "body", ",", "''", ",", "'&'", ",", "PHP_QUERY_RFC1738", ")", ";", "}", ...
@param array|string|resource|\Traversable|\Closure $body @return string|resource|\Closure @throws InvalidArgumentException When an invalid body is passed
[ "@param", "array|string|resource|", "\\", "Traversable|", "\\", "Closure", "$body" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpClient/HttpClientTrait.php#L224-L262
train
Normalize the body
[ 30522, 2797, 10763, 3853, 3671, 4697, 23684, 1006, 1002, 2303, 1007, 1063, 2065, 1006, 1032, 2003, 1035, 9140, 1006, 1002, 2303, 1007, 1007, 1063, 2709, 8299, 1035, 3857, 1035, 23032, 1006, 1002, 2303, 1010, 1005, 1005, 1010, 1005, 1004, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Iterator.php
Iterator.append
public function append($items) { if ($items instanceof static) { $items = $items->toArray(); } $this->items = array_merge($this->items, (array)$items); return $this; }
php
public function append($items) { if ($items instanceof static) { $items = $items->toArray(); } $this->items = array_merge($this->items, (array)$items); return $this; }
[ "public", "function", "append", "(", "$", "items", ")", "{", "if", "(", "$", "items", "instanceof", "static", ")", "{", "$", "items", "=", "$", "items", "->", "toArray", "(", ")", ";", "}", "$", "this", "->", "items", "=", "array_merge", "(", "$", ...
Append new elements to the list. @param array|Iterator $items Items to be appended. Existing keys will be overridden with the new values. @return $this
[ "Append", "new", "elements", "to", "the", "list", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Iterator.php#L210-L218
train
Append items to the end of the array
[ 30522, 2270, 3853, 10439, 10497, 1006, 1002, 5167, 1007, 1063, 2065, 1006, 1002, 5167, 6013, 11253, 10763, 1007, 1063, 1002, 5167, 1027, 1002, 5167, 1011, 1028, 2000, 2906, 9447, 1006, 1007, 1025, 1065, 1002, 2023, 1011, 1028, 5167, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Cache/Frontend/Page.php
Zend_Cache_Frontend_Page.start
public function start($id = false, $doNotDie = false) { $this->_cancel = false; $lastMatchingRegexp = null; if (isset($_SERVER['REQUEST_URI'])) { foreach ($this->_specificOptions['regexps'] as $regexp => $conf) { if (preg_match("`$regexp`", $_SERVER['REQUEST_URI']...
php
public function start($id = false, $doNotDie = false) { $this->_cancel = false; $lastMatchingRegexp = null; if (isset($_SERVER['REQUEST_URI'])) { foreach ($this->_specificOptions['regexps'] as $regexp => $conf) { if (preg_match("`$regexp`", $_SERVER['REQUEST_URI']...
[ "public", "function", "start", "(", "$", "id", "=", "false", ",", "$", "doNotDie", "=", "false", ")", "{", "$", "this", "->", "_cancel", "=", "false", ";", "$", "lastMatchingRegexp", "=", "null", ";", "if", "(", "isset", "(", "$", "_SERVER", "[", "...
Start the cache @param string $id (optional) A cache id (if you set a value here, maybe you have to use Output frontend instead) @param boolean $doNotDie For unit testing only ! @return boolean True if the cache is hit (false else)
[ "Start", "the", "cache" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Cache/Frontend/Page.php#L242-L292
train
Start the cache engine
[ 30522, 2270, 3853, 2707, 1006, 1002, 8909, 1027, 6270, 1010, 1002, 2123, 4140, 10265, 1027, 6270, 1007, 1063, 1002, 2023, 1011, 1028, 1035, 17542, 1027, 6270, 1025, 1002, 2197, 18900, 8450, 2890, 3351, 2595, 2361, 1027, 19701, 1025, 2065, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php
ProxyDumper.getProxyCode
public function getProxyCode(Definition $definition) { $code = $this->classGenerator->generate($this->generateProxyClass($definition)); if (version_compare(self::getProxyManagerVersion(), '2.2', '<')) { $code = preg_replace( '/((?:\$(?:this|initializer|instance)->)?(?:pu...
php
public function getProxyCode(Definition $definition) { $code = $this->classGenerator->generate($this->generateProxyClass($definition)); if (version_compare(self::getProxyManagerVersion(), '2.2', '<')) { $code = preg_replace( '/((?:\$(?:this|initializer|instance)->)?(?:pu...
[ "public", "function", "getProxyCode", "(", "Definition", "$", "definition", ")", "{", "$", "code", "=", "$", "this", "->", "classGenerator", "->", "generate", "(", "$", "this", "->", "generateProxyClass", "(", "$", "definition", ")", ")", ";", "if", "(", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php#L85-L98
train
Generate proxy class code
[ 30522, 2270, 3853, 2131, 21572, 18037, 16044, 1006, 6210, 1002, 6210, 1007, 1063, 1002, 3642, 1027, 1002, 2023, 1011, 1028, 2465, 6914, 6906, 4263, 1011, 1028, 9699, 1006, 1002, 2023, 1011, 1028, 9699, 21572, 18037, 26266, 1006, 1002, 6210,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Command/Command.php
Command.mergeApplicationDefinition
public function mergeApplicationDefinition($mergeArgs = true) { if (null === $this->application || (true === $this->applicationDefinitionMerged && ($this->applicationDefinitionMergedWithArgs || !$mergeArgs))) { return; } $this->definition->addOptions($this->application->getDefin...
php
public function mergeApplicationDefinition($mergeArgs = true) { if (null === $this->application || (true === $this->applicationDefinitionMerged && ($this->applicationDefinitionMergedWithArgs || !$mergeArgs))) { return; } $this->definition->addOptions($this->application->getDefin...
[ "public", "function", "mergeApplicationDefinition", "(", "$", "mergeArgs", "=", "true", ")", "{", "if", "(", "null", "===", "$", "this", "->", "application", "||", "(", "true", "===", "$", "this", "->", "applicationDefinitionMerged", "&&", "(", "$", "this", ...
Merges the application definition with the command definition. This method is not part of public API and should not be used directly. @param bool $mergeArgs Whether to merge or not the Application definition arguments to Command definition arguments
[ "Merges", "the", "application", "definition", "with", "the", "command", "definition", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Command/Command.php#L296-L313
train
Merge application definition with the current definition
[ 30522, 2270, 3853, 13590, 29098, 19341, 3508, 3207, 16294, 22753, 1006, 1002, 13590, 2906, 5620, 1027, 2995, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 1027, 1002, 2023, 1011, 1028, 4646, 1064, 1064, 1006, 2995, 1027, 1027, 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...
z-song/laravel-admin
src/Console/ExtendCommand.php
ExtendCommand.putFile
protected function putFile($to, $content) { $to = $this->extensionPath($to); $this->filesystem->put($to, $content); }
php
protected function putFile($to, $content) { $to = $this->extensionPath($to); $this->filesystem->put($to, $content); }
[ "protected", "function", "putFile", "(", "$", "to", ",", "$", "content", ")", "{", "$", "to", "=", "$", "this", "->", "extensionPath", "(", "$", "to", ")", ";", "$", "this", "->", "filesystem", "->", "put", "(", "$", "to", ",", "$", "content", ")...
Put contents to file. @param string $to @param string $content
[ "Put", "contents", "to", "file", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Console/ExtendCommand.php#L264-L269
train
Put file to extension path
[ 30522, 5123, 3853, 2404, 8873, 2571, 1006, 1002, 2000, 1010, 1002, 4180, 1007, 1063, 1002, 2000, 1027, 1002, 2023, 1011, 1028, 5331, 15069, 1006, 1002, 2000, 1007, 1025, 1002, 2023, 1011, 1028, 6764, 27268, 6633, 1011, 1028, 2404, 1006, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/GPM/GPM.php
GPM.calculateMergedDependenciesOfPackage
private function calculateMergedDependenciesOfPackage($packageName, $dependencies) { $packageData = $this->findPackage($packageName); //Check for dependencies if (isset($packageData->dependencies)) { foreach ($packageData->dependencies as $dependency) { $current_...
php
private function calculateMergedDependenciesOfPackage($packageName, $dependencies) { $packageData = $this->findPackage($packageName); //Check for dependencies if (isset($packageData->dependencies)) { foreach ($packageData->dependencies as $dependency) { $current_...
[ "private", "function", "calculateMergedDependenciesOfPackage", "(", "$", "packageName", ",", "$", "dependencies", ")", "{", "$", "packageData", "=", "$", "this", "->", "findPackage", "(", "$", "packageName", ")", ";", "//Check for dependencies", "if", "(", "isset"...
Calculates and merges the dependencies of a package @param string $packageName The package information @param array $dependencies The dependencies array @return array @throws \Exception
[ "Calculates", "and", "merges", "the", "dependencies", "of", "a", "package" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/GPM/GPM.php#L970-L1047
train
Calculate the merged dependencies of a package
[ 30522, 2797, 3853, 18422, 5017, 5999, 3207, 11837, 4181, 9243, 11253, 23947, 4270, 1006, 1002, 7427, 18442, 1010, 1002, 12530, 15266, 1007, 1063, 1002, 21972, 6790, 1027, 1002, 2023, 1011, 1028, 2424, 23947, 4270, 1006, 1002, 7427, 18442, 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...
guzzle/guzzle
src/Handler/MockHandler.php
MockHandler.createWithMiddleware
public static function createWithMiddleware( array $queue = null, callable $onFulfilled = null, callable $onRejected = null ) { return HandlerStack::create(new self($queue, $onFulfilled, $onRejected)); }
php
public static function createWithMiddleware( array $queue = null, callable $onFulfilled = null, callable $onRejected = null ) { return HandlerStack::create(new self($queue, $onFulfilled, $onRejected)); }
[ "public", "static", "function", "createWithMiddleware", "(", "array", "$", "queue", "=", "null", ",", "callable", "$", "onFulfilled", "=", "null", ",", "callable", "$", "onRejected", "=", "null", ")", "{", "return", "HandlerStack", "::", "create", "(", "new"...
Creates a new MockHandler that uses the default handler stack list of middlewares. @param array $queue Array of responses, callables, or exceptions. @param callable $onFulfilled Callback to invoke when the return value is fulfilled. @param callable $onRejected Callback to invoke when the return value is rejected. @r...
[ "Creates", "a", "new", "MockHandler", "that", "uses", "the", "default", "handler", "stack", "list", "of", "middlewares", "." ]
bf595424e4d442a190582e088985dc835a789071
https://github.com/guzzle/guzzle/blob/bf595424e4d442a190582e088985dc835a789071/src/Handler/MockHandler.php#L33-L39
train
Create a new HandlerStack with the optional middleware
[ 30522, 2270, 10763, 3853, 3443, 24415, 4328, 20338, 8059, 1006, 9140, 1002, 24240, 1027, 19701, 1010, 2655, 3085, 1002, 2006, 3993, 8873, 11001, 1027, 19701, 1010, 2655, 3085, 1002, 2006, 2890, 24455, 1027, 19701, 1007, 1063, 2709, 28213, 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...
symfony/symfony
src/Symfony/Component/Cache/Psr16Cache.php
Psr16Cache.set
public function set($key, $value, $ttl = null) { try { if (null !== $f = $this->createCacheItem) { $item = $f($key, $value); } else { $item = $this->pool->getItem($key)->set($value); } } catch (SimpleCacheException $e) { ...
php
public function set($key, $value, $ttl = null) { try { if (null !== $f = $this->createCacheItem) { $item = $f($key, $value); } else { $item = $this->pool->getItem($key)->set($value); } } catch (SimpleCacheException $e) { ...
[ "public", "function", "set", "(", "$", "key", ",", "$", "value", ",", "$", "ttl", "=", "null", ")", "{", "try", "{", "if", "(", "null", "!==", "$", "f", "=", "$", "this", "->", "createCacheItem", ")", "{", "$", "item", "=", "$", "f", "(", "$"...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Cache/Psr16Cache.php#L89-L107
train
Set a value in the cache
[ 30522, 2270, 3853, 2275, 1006, 1002, 3145, 1010, 1002, 3643, 1010, 1002, 23746, 2140, 1027, 19701, 1007, 1063, 3046, 1063, 2065, 1006, 19701, 999, 1027, 1027, 1002, 1042, 1027, 1002, 2023, 1011, 1028, 3443, 3540, 5403, 4221, 2213, 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/Queue/Queue.php
Queue.getJobRetryDelay
public function getJobRetryDelay($job) { if (! method_exists($job, 'retryAfter') && ! isset($job->retryAfter)) { return; } $delay = $job->retryAfter ?? $job->retryAfter(); return $delay instanceof DateTimeInterface ? $this->secondsUntil($delay) :...
php
public function getJobRetryDelay($job) { if (! method_exists($job, 'retryAfter') && ! isset($job->retryAfter)) { return; } $delay = $job->retryAfter ?? $job->retryAfter(); return $delay instanceof DateTimeInterface ? $this->secondsUntil($delay) :...
[ "public", "function", "getJobRetryDelay", "(", "$", "job", ")", "{", "if", "(", "!", "method_exists", "(", "$", "job", ",", "'retryAfter'", ")", "&&", "!", "isset", "(", "$", "job", "->", "retryAfter", ")", ")", "{", "return", ";", "}", "$", "delay",...
Get the retry delay for an object-based queue handler. @param mixed $job @return mixed
[ "Get", "the", "retry", "delay", "for", "an", "object", "-", "based", "queue", "handler", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Queue/Queue.php#L162-L172
train
Get the delay for a job
[ 30522, 2270, 3853, 2131, 5558, 13578, 11129, 9247, 4710, 30524, 26354, 3388, 1006, 1002, 3105, 1011, 1028, 2128, 11129, 10354, 3334, 1007, 1007, 1063, 2709, 1025, 1065, 1002, 8536, 1027, 1002, 3105, 1011, 1028, 2128, 11129, 10354, 3334, 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...
symfony/symfony
src/Symfony/Component/Console/Input/InputDefinition.php
InputDefinition.addArguments
public function addArguments($arguments = []) { if (null !== $arguments) { foreach ($arguments as $argument) { $this->addArgument($argument); } } }
php
public function addArguments($arguments = []) { if (null !== $arguments) { foreach ($arguments as $argument) { $this->addArgument($argument); } } }
[ "public", "function", "addArguments", "(", "$", "arguments", "=", "[", "]", ")", "{", "if", "(", "null", "!==", "$", "arguments", ")", "{", "foreach", "(", "$", "arguments", "as", "$", "argument", ")", "{", "$", "this", "->", "addArgument", "(", "$",...
Adds an array of InputArgument objects. @param InputArgument[] $arguments An array of InputArgument objects
[ "Adds", "an", "array", "of", "InputArgument", "objects", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Input/InputDefinition.php#L84-L91
train
Adds arguments to the page
[ 30522, 2270, 3853, 5587, 2906, 22850, 11187, 1006, 1002, 9918, 1027, 1031, 1033, 1007, 1063, 2065, 1006, 19701, 999, 1027, 1027, 1002, 9918, 1007, 1063, 18921, 6776, 1006, 1002, 9918, 2004, 1002, 6685, 1007, 1063, 1002, 2023, 1011, 1028, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dompdf/dompdf
src/FrameDecorator/AbstractFrameDecorator.php
AbstractFrameDecorator.deep_copy
function deep_copy() { $node = $this->_frame->get_node(); if ($node instanceof DOMElement && $node->hasAttribute("id")) { $node->setAttribute("data-dompdf-original-id", $node->getAttribute("id")); $node->removeAttribute("id"); } $frame = new Frame($node->clo...
php
function deep_copy() { $node = $this->_frame->get_node(); if ($node instanceof DOMElement && $node->hasAttribute("id")) { $node->setAttribute("data-dompdf-original-id", $node->getAttribute("id")); $node->removeAttribute("id"); } $frame = new Frame($node->clo...
[ "function", "deep_copy", "(", ")", "{", "$", "node", "=", "$", "this", "->", "_frame", "->", "get_node", "(", ")", ";", "if", "(", "$", "node", "instanceof", "DOMElement", "&&", "$", "node", "->", "hasAttribute", "(", "\"id\"", ")", ")", "{", "$", ...
Create a deep copy: copy this node and all children @return Frame
[ "Create", "a", "deep", "copy", ":", "copy", "this", "node", "and", "all", "children" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/FrameDecorator/AbstractFrameDecorator.php#L153-L172
train
Deep copy of the frame
[ 30522, 3853, 2784, 1035, 6100, 1006, 1007, 1063, 1002, 13045, 1027, 1002, 2023, 1011, 1028, 1035, 4853, 1011, 1028, 2131, 1035, 13045, 1006, 1007, 1025, 2065, 1006, 1002, 13045, 6013, 11253, 8514, 16930, 4765, 1004, 1004, 1002, 13045, 1011,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Cache.php
Cache.setLifetime
public function setLifetime($future) { if (!$future) { return; } $interval = $future - $this->now; if ($interval > 0 && $interval < $this->getLifetime()) { $this->lifetime = $interval; } }
php
public function setLifetime($future) { if (!$future) { return; } $interval = $future - $this->now; if ($interval > 0 && $interval < $this->getLifetime()) { $this->lifetime = $interval; } }
[ "public", "function", "setLifetime", "(", "$", "future", ")", "{", "if", "(", "!", "$", "future", ")", "{", "return", ";", "}", "$", "interval", "=", "$", "future", "-", "$", "this", "->", "now", ";", "if", "(", "$", "interval", ">", "0", "&&", ...
Set the cache lifetime programmatically @param int $future timestamp
[ "Set", "the", "cache", "lifetime", "programmatically" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Cache.php#L540-L550
train
Set lifetime of the current time
[ 30522, 2270, 3853, 2275, 15509, 7292, 1006, 1002, 2925, 1007, 1063, 2065, 1006, 999, 1002, 2925, 1007, 1063, 2709, 1025, 1065, 1002, 13483, 1027, 1002, 2925, 1011, 1002, 2023, 1011, 1028, 2085, 1025, 2065, 1006, 1002, 13483, 1028, 1014, 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/DimensionReduction/EigenTransformerBase.php
EigenTransformerBase.eigenDecomposition
protected function eigenDecomposition(array $matrix): void { $eig = new EigenvalueDecomposition($matrix); $eigVals = $eig->getRealEigenvalues(); $eigVects = $eig->getEigenvectors(); $totalEigVal = array_sum($eigVals); // Sort eigenvalues in descending order arsort($e...
php
protected function eigenDecomposition(array $matrix): void { $eig = new EigenvalueDecomposition($matrix); $eigVals = $eig->getRealEigenvalues(); $eigVects = $eig->getEigenvectors(); $totalEigVal = array_sum($eigVals); // Sort eigenvalues in descending order arsort($e...
[ "protected", "function", "eigenDecomposition", "(", "array", "$", "matrix", ")", ":", "void", "{", "$", "eig", "=", "new", "EigenvalueDecomposition", "(", "$", "matrix", ")", ";", "$", "eigVals", "=", "$", "eig", "->", "getRealEigenvalues", "(", ")", ";", ...
Calculates eigenValues and eigenVectors of the given matrix. Returns top eigenVectors along with the largest eigenValues. The total explained variance of these eigenVectors will be no less than desired $totalVariance value
[ "Calculates", "eigenValues", "and", "eigenVectors", "of", "the", "given", "matrix", ".", "Returns", "top", "eigenVectors", "along", "with", "the", "largest", "eigenValues", ".", "The", "total", "explained", "variance", "of", "these", "eigenVectors", "will", "be", ...
f6aa1a59b0525b8fca3d2786d661ab3e70904016
https://github.com/php-ai/php-ml/blob/f6aa1a59b0525b8fca3d2786d661ab3e70904016/src/DimensionReduction/EigenTransformerBase.php#L51-L82
train
Decomposition function.
[ 30522, 5123, 3853, 1041, 29206, 3207, 9006, 26994, 1006, 9140, 1002, 8185, 1007, 1024, 11675, 1063, 1002, 1041, 8004, 1027, 2047, 1041, 29206, 10175, 5657, 3207, 9006, 26994, 1006, 1002, 8185, 1007, 1025, 1002, 1041, 8004, 10175, 2015, 1027...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Intl/Data/Generator/ScriptDataGenerator.php
ScriptDataGenerator.generateDataForLocale
protected function generateDataForLocale(BundleReaderInterface $reader, $tempDir, $displayLocale) { $localeBundle = $reader->read($tempDir, $displayLocale); // isset() on \ResourceBundle returns true even if the value is null if (isset($localeBundle['Scripts']) && null !== $localeBundle['Sc...
php
protected function generateDataForLocale(BundleReaderInterface $reader, $tempDir, $displayLocale) { $localeBundle = $reader->read($tempDir, $displayLocale); // isset() on \ResourceBundle returns true even if the value is null if (isset($localeBundle['Scripts']) && null !== $localeBundle['Sc...
[ "protected", "function", "generateDataForLocale", "(", "BundleReaderInterface", "$", "reader", ",", "$", "tempDir", ",", "$", "displayLocale", ")", "{", "$", "localeBundle", "=", "$", "reader", "->", "read", "(", "$", "tempDir", ",", "$", "displayLocale", ")",...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Intl/Data/Generator/ScriptDataGenerator.php#L61-L76
train
Generate data for a locale
[ 30522, 5123, 3853, 7013, 6790, 29278, 4135, 9289, 2063, 1006, 14012, 16416, 4063, 18447, 2121, 12172, 1002, 8068, 1010, 1002, 8915, 8737, 4305, 2099, 1010, 1002, 4653, 4135, 9289, 2063, 1007, 1063, 1002, 2334, 15878, 8630, 2571, 1027, 1002,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/HTML/QuickForm2/Node.php
HTML_QuickForm2_Node.storeId
protected static function storeId($id) { $tokens = explode('-', $id); $container =& self::$ids; do { $token = array_shift($tokens); if (!isset($container[$token])) { $container[$token] = array(); } $container =& $container[...
php
protected static function storeId($id) { $tokens = explode('-', $id); $container =& self::$ids; do { $token = array_shift($tokens); if (!isset($container[$token])) { $container[$token] = array(); } $container =& $container[...
[ "protected", "static", "function", "storeId", "(", "$", "id", ")", "{", "$", "tokens", "=", "explode", "(", "'-'", ",", "$", "id", ")", ";", "$", "container", "=", "&", "self", "::", "$", "ids", ";", "do", "{", "$", "token", "=", "array_shift", "...
Stores the explicitly given id to prevent duplicate id generation @param string Element id
[ "Stores", "the", "explicitly", "given", "id", "to", "prevent", "duplicate", "id", "generation" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Node.php#L253-L265
train
Stores the ID of the language.
[ 30522, 5123, 10763, 3853, 3573, 3593, 1006, 1002, 8909, 1007, 1063, 1002, 19204, 2015, 1027, 15044, 1006, 1005, 1011, 1005, 1010, 1002, 8909, 1007, 1025, 1002, 11661, 1027, 1004, 2969, 1024, 1024, 1002, 8909, 2015, 1025, 2079, 1063, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/CronArchive.php
CronArchive.getVisitsRequestUrl
private function getVisitsRequestUrl($idSite, $period, $date, $segment = false) { $request = "?module=API&method=API.get&idSite=$idSite&period=$period&date=" . $date . "&format=php"; if ($segment) { $request .= '&segment=' . urlencode($segment); ; } return $re...
php
private function getVisitsRequestUrl($idSite, $period, $date, $segment = false) { $request = "?module=API&method=API.get&idSite=$idSite&period=$period&date=" . $date . "&format=php"; if ($segment) { $request .= '&segment=' . urlencode($segment); ; } return $re...
[ "private", "function", "getVisitsRequestUrl", "(", "$", "idSite", ",", "$", "period", ",", "$", "date", ",", "$", "segment", "=", "false", ")", "{", "$", "request", "=", "\"?module=API&method=API.get&idSite=$idSite&period=$period&date=\"", ".", "$", "date", ".", ...
Returns base URL to process reports for the $idSite on a given $period @param string $idSite @param string $period @param string $date @param bool|false $segment @return string
[ "Returns", "base", "URL", "to", "process", "reports", "for", "the", "$idSite", "on", "a", "given", "$period" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/CronArchive.php#L808-L816
train
Get the visits request url
[ 30522, 2797, 3853, 2131, 11365, 12762, 2890, 15500, 3126, 2140, 1006, 1002, 8909, 28032, 2063, 1010, 1002, 2558, 1010, 1002, 3058, 1010, 1002, 6903, 1027, 6270, 1007, 1063, 1002, 5227, 1027, 1000, 1029, 11336, 1027, 17928, 1004, 4118, 1027,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Db/Select.php
Zend_Db_Select._renderGroup
protected function _renderGroup($sql) { if ($this->_parts[self::FROM] && $this->_parts[self::GROUP]) { $group = array(); foreach ($this->_parts[self::GROUP] as $term) { $group[] = $this->_adapter->quoteIdentifier($term, true); } $sql .= ' ' . s...
php
protected function _renderGroup($sql) { if ($this->_parts[self::FROM] && $this->_parts[self::GROUP]) { $group = array(); foreach ($this->_parts[self::GROUP] as $term) { $group[] = $this->_adapter->quoteIdentifier($term, true); } $sql .= ' ' . s...
[ "protected", "function", "_renderGroup", "(", "$", "sql", ")", "{", "if", "(", "$", "this", "->", "_parts", "[", "self", "::", "FROM", "]", "&&", "$", "this", "->", "_parts", "[", "self", "::", "GROUP", "]", ")", "{", "$", "group", "=", "array", ...
Render GROUP clause @param string $sql SQL query @return string
[ "Render", "GROUP", "clause" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L1191-L1202
train
Render the GROUP clause of the query
[ 30522, 5123, 3853, 1035, 17552, 17058, 1006, 1002, 29296, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 1035, 3033, 1031, 2969, 1024, 1024, 2013, 1033, 1004, 1004, 1002, 2023, 1011, 1028, 1035, 3033, 1031, 2969, 1024, 1024, 2177, 1033, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.getPart
public function getPart($part) { $part = strtolower($part); if (!array_key_exists($part, $this->_parts)) { // require_once 'Zend/Db/Select/Exception.php'; throw new Zend_Db_Select_Exception("Invalid Select part '$part'"); } return $this->_parts[$part]; }
php
public function getPart($part) { $part = strtolower($part); if (!array_key_exists($part, $this->_parts)) { // require_once 'Zend/Db/Select/Exception.php'; throw new Zend_Db_Select_Exception("Invalid Select part '$part'"); } return $this->_parts[$part]; }
[ "public", "function", "getPart", "(", "$", "part", ")", "{", "$", "part", "=", "strtolower", "(", "$", "part", ")", ";", "if", "(", "!", "array_key_exists", "(", "$", "part", ",", "$", "this", "->", "_parts", ")", ")", "{", "// require_once 'Zend/Db/Se...
Get part of the structured information for the currect query. @param string $part @return mixed @throws Zend_Db_Select_Exception
[ "Get", "part", "of", "the", "structured", "information", "for", "the", "currect", "query", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L663-L671
train
Get part of the select statement
[ 30522, 2270, 3853, 2131, 19362, 2102, 1006, 1002, 2112, 1007, 1063, 1002, 2112, 1027, 2358, 5339, 12898, 13777, 1006, 1002, 2112, 1007, 1025, 2065, 1006, 999, 9140, 1035, 3145, 1035, 6526, 1006, 1002, 2112, 1010, 1002, 2023, 1011, 1028, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/formwidgets/FileUpload.php
FileUpload.getCssDimensions
protected function getCssDimensions($mode = null) { if (!$this->imageWidth && !$this->imageHeight) { return ''; } $cssDimensions = ''; if ($mode == 'block') { $cssDimensions .= $this->imageWidth ? 'width: '.$this->imageWidth.'px;' ...
php
protected function getCssDimensions($mode = null) { if (!$this->imageWidth && !$this->imageHeight) { return ''; } $cssDimensions = ''; if ($mode == 'block') { $cssDimensions .= $this->imageWidth ? 'width: '.$this->imageWidth.'px;' ...
[ "protected", "function", "getCssDimensions", "(", "$", "mode", "=", "null", ")", "{", "if", "(", "!", "$", "this", "->", "imageWidth", "&&", "!", "$", "this", "->", "imageHeight", ")", "{", "return", "''", ";", "}", "$", "cssDimensions", "=", "''", "...
Returns the CSS dimensions for the uploaded image, uses auto where no dimension is provided. @param string $mode @return string
[ "Returns", "the", "CSS", "dimensions", "for", "the", "uploaded", "image", "uses", "auto", "where", "no", "dimension", "is", "provided", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/formwidgets/FileUpload.php#L204-L232
train
Return CSS dimensions
[ 30522, 5123, 3853, 2131, 6169, 16150, 14428, 3619, 8496, 1006, 1002, 5549, 1027, 19701, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 3746, 9148, 11927, 2232, 1004, 1004, 999, 1002, 2023, 1011, 1028, 3746, 26036, 13900, 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...
overtrue/wechat
src/Kernel/BaseClient.php
BaseClient.registerHttpMiddlewares
protected function registerHttpMiddlewares() { // retry $this->pushMiddleware($this->retryMiddleware(), 'retry'); // access token $this->pushMiddleware($this->accessTokenMiddleware(), 'access_token'); // log $this->pushMiddleware($this->logMiddleware(), 'log'); }
php
protected function registerHttpMiddlewares() { // retry $this->pushMiddleware($this->retryMiddleware(), 'retry'); // access token $this->pushMiddleware($this->accessTokenMiddleware(), 'access_token'); // log $this->pushMiddleware($this->logMiddleware(), 'log'); }
[ "protected", "function", "registerHttpMiddlewares", "(", ")", "{", "// retry", "$", "this", "->", "pushMiddleware", "(", "$", "this", "->", "retryMiddleware", "(", ")", ",", "'retry'", ")", ";", "// access token", "$", "this", "->", "pushMiddleware", "(", "$",...
Register Guzzle middlewares.
[ "Register", "Guzzle", "middlewares", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Kernel/BaseClient.php#L192-L200
train
Register HTTP middlewares
[ 30522, 5123, 3853, 4236, 11039, 25856, 4328, 20338, 8059, 2015, 1006, 1007, 1063, 1013, 1013, 2128, 11129, 1002, 2023, 1011, 1028, 5245, 4328, 20338, 8059, 1006, 1002, 2023, 1011, 1028, 2128, 11129, 4328, 20338, 8059, 1006, 1007, 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...
getgrav/grav
system/src/Grav/Common/Twig/TokenParser/TwigTokenParserTryCatch.php
TwigTokenParserTryCatch.parse
public function parse(Token $token) { $lineno = $token->getLine(); $stream = $this->parser->getStream(); $stream->expect(Token::BLOCK_END_TYPE); $try = $this->parser->subparse([$this, 'decideCatch']); $stream->next(); $stream->expect(Token::BLOCK_END_TYPE); $...
php
public function parse(Token $token) { $lineno = $token->getLine(); $stream = $this->parser->getStream(); $stream->expect(Token::BLOCK_END_TYPE); $try = $this->parser->subparse([$this, 'decideCatch']); $stream->next(); $stream->expect(Token::BLOCK_END_TYPE); $...
[ "public", "function", "parse", "(", "Token", "$", "token", ")", "{", "$", "lineno", "=", "$", "token", "->", "getLine", "(", ")", ";", "$", "stream", "=", "$", "this", "->", "parser", "->", "getStream", "(", ")", ";", "$", "stream", "->", "expect",...
Parses a token and returns a node. @param Token $token A Twig_Token instance @return Node A Twig_Node instance
[ "Parses", "a", "token", "and", "returns", "a", "node", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Twig/TokenParser/TwigTokenParserTryCatch.php#L37-L51
train
Parse try catch statement
[ 30522, 2270, 3853, 11968, 3366, 1006, 19204, 1002, 19204, 1007, 1063, 1002, 17517, 2080, 1027, 1002, 19204, 1011, 1028, 2131, 4179, 1006, 1007, 1025, 1002, 5460, 1027, 1002, 2023, 1011, 1028, 11968, 8043, 1011, 1028, 4152, 25379, 1006, 1007...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php
DateTimeType.configureOptions
public function configureOptions(OptionsResolver $resolver) { $compound = function (Options $options) { return 'single_text' !== $options['widget']; }; // Defaults to the value of "widget" $dateWidget = function (Options $options) { return 'single_text' === $...
php
public function configureOptions(OptionsResolver $resolver) { $compound = function (Options $options) { return 'single_text' !== $options['widget']; }; // Defaults to the value of "widget" $dateWidget = function (Options $options) { return 'single_text' === $...
[ "public", "function", "configureOptions", "(", "OptionsResolver", "$", "resolver", ")", "{", "$", "compound", "=", "function", "(", "Options", "$", "options", ")", "{", "return", "'single_text'", "!==", "$", "options", "[", "'widget'", "]", ";", "}", ";", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php#L215-L335
train
Configures the options for the FormType
[ 30522, 2270, 3853, 9530, 8873, 27390, 8780, 16790, 2015, 1006, 7047, 6072, 4747, 6299, 1002, 10663, 2099, 1007, 1063, 1002, 7328, 1027, 3853, 1006, 7047, 1002, 7047, 1007, 1063, 2709, 1005, 2309, 1035, 3793, 1005, 999, 1027, 1027, 1002, 7...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpFoundation/Session/Attribute/NamespacedAttributeBag.php
NamespacedAttributeBag.remove
public function remove($name) { $retval = null; $attributes = &$this->resolveAttributePath($name); $name = $this->resolveKey($name); if (null !== $attributes && \array_key_exists($name, $attributes)) { $retval = $attributes[$name]; unset($attributes[$name]); ...
php
public function remove($name) { $retval = null; $attributes = &$this->resolveAttributePath($name); $name = $this->resolveKey($name); if (null !== $attributes && \array_key_exists($name, $attributes)) { $retval = $attributes[$name]; unset($attributes[$name]); ...
[ "public", "function", "remove", "(", "$", "name", ")", "{", "$", "retval", "=", "null", ";", "$", "attributes", "=", "&", "$", "this", "->", "resolveAttributePath", "(", "$", "name", ")", ";", "$", "name", "=", "$", "this", "->", "resolveKey", "(", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Session/Attribute/NamespacedAttributeBag.php#L79-L90
train
Remove an attribute from the attributes array
[ 30522, 2270, 3853, 6366, 1006, 1002, 2171, 1007, 1063, 1002, 2128, 9189, 2389, 1027, 19701, 1025, 1002, 12332, 1027, 1004, 1002, 2023, 1011, 1028, 10663, 19321, 3089, 8569, 2618, 15069, 1006, 1002, 2171, 1007, 1025, 1002, 2171, 1027, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Page/Medium/Medium.php
Medium.lightbox
public function lightbox($width = null, $height = null, $reset = true) { $attributes = ['rel' => 'lightbox']; if ($width && $height) { $attributes['data-width'] = $width; $attributes['data-height'] = $height; } return $this->link($reset, $attributes); }
php
public function lightbox($width = null, $height = null, $reset = true) { $attributes = ['rel' => 'lightbox']; if ($width && $height) { $attributes['data-width'] = $width; $attributes['data-height'] = $height; } return $this->link($reset, $attributes); }
[ "public", "function", "lightbox", "(", "$", "width", "=", "null", ",", "$", "height", "=", "null", ",", "$", "reset", "=", "true", ")", "{", "$", "attributes", "=", "[", "'rel'", "=>", "'lightbox'", "]", ";", "if", "(", "$", "width", "&&", "$", "...
Turn the current Medium into a Link with lightbox enabled @param int $width @param int $height @param bool $reset @return Link
[ "Turn", "the", "current", "Medium", "into", "a", "Link", "with", "lightbox", "enabled" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Page/Medium/Medium.php#L564-L574
train
Link to lightbox
[ 30522, 2270, 3853, 2422, 8758, 1006, 1002, 9381, 1027, 19701, 1010, 1002, 4578, 1027, 19701, 1010, 1002, 25141, 1027, 2995, 1007, 1063, 1002, 12332, 1027, 1031, 1005, 2128, 2140, 1005, 1027, 1028, 1005, 2422, 8758, 1005, 1033, 1025, 2065, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
guzzle/guzzle
src/Handler/Proxy.php
Proxy.wrapSync
public static function wrapSync( callable $default, callable $sync ) { return function (RequestInterface $request, array $options) use ($default, $sync) { return empty($options[RequestOptions::SYNCHRONOUS]) ? $default($request, $options) : $sync($r...
php
public static function wrapSync( callable $default, callable $sync ) { return function (RequestInterface $request, array $options) use ($default, $sync) { return empty($options[RequestOptions::SYNCHRONOUS]) ? $default($request, $options) : $sync($r...
[ "public", "static", "function", "wrapSync", "(", "callable", "$", "default", ",", "callable", "$", "sync", ")", "{", "return", "function", "(", "RequestInterface", "$", "request", ",", "array", "$", "options", ")", "use", "(", "$", "default", ",", "$", "...
Sends synchronous requests to a specific handler while sending all other requests to another handler. @param callable $default Handler used for normal responses @param callable $sync Handler used for synchronous responses. @return callable Returns the composed handler.
[ "Sends", "synchronous", "requests", "to", "a", "specific", "handler", "while", "sending", "all", "other", "requests", "to", "another", "handler", "." ]
bf595424e4d442a190582e088985dc835a789071
https://github.com/guzzle/guzzle/blob/bf595424e4d442a190582e088985dc835a789071/src/Handler/Proxy.php#L21-L30
train
Wraps the default and sync functions in a closure so that the result of the default and sync are not the same as the sync function.
[ 30522, 2270, 10763, 3853, 19735, 6038, 2278, 1006, 2655, 3085, 1002, 12398, 1010, 2655, 3085, 1002, 26351, 1007, 1063, 2709, 3853, 1006, 5227, 18447, 2121, 12172, 1002, 5227, 1010, 9140, 1002, 7047, 1007, 2224, 1006, 1002, 12398, 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...
matomo-org/matomo
plugins/Referrers/Columns/Base.php
Base.detectReferrerSearchEngine
protected function detectReferrerSearchEngine() { $cache = \Piwik\Cache::getTransientCache(); $cacheKey = 'cachedReferrerSearchEngine'; $cachedReferrerSearchEngine = []; if ($cache->contains($cacheKey)) { $cachedReferrerSearchEngine = $cache->fetch($cacheKey); ...
php
protected function detectReferrerSearchEngine() { $cache = \Piwik\Cache::getTransientCache(); $cacheKey = 'cachedReferrerSearchEngine'; $cachedReferrerSearchEngine = []; if ($cache->contains($cacheKey)) { $cachedReferrerSearchEngine = $cache->fetch($cacheKey); ...
[ "protected", "function", "detectReferrerSearchEngine", "(", ")", "{", "$", "cache", "=", "\\", "Piwik", "\\", "Cache", "::", "getTransientCache", "(", ")", ";", "$", "cacheKey", "=", "'cachedReferrerSearchEngine'", ";", "$", "cachedReferrerSearchEngine", "=", "[",...
Search engine detection @return bool
[ "Search", "engine", "detection" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Referrers/Columns/Base.php#L150-L195
train
Detects the search engine of a referrer URL
[ 30522, 5123, 3853, 11487, 2890, 7512, 14544, 17310, 11140, 13159, 3170, 1006, 1007, 1063, 1002, 17053, 1027, 1032, 14255, 9148, 2243, 1032, 17053, 1024, 1024, 2131, 6494, 3619, 11638, 3540, 5403, 1006, 1007, 1025, 1002, 17053, 14839, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Console/Input/ArgvInput.php
ArgvInput.getFirstArgument
public function getFirstArgument() { $isOption = false; foreach ($this->tokens as $i => $token) { if ($token && '-' === $token[0]) { if (false !== strpos($token, '=') || !isset($this->tokens[$i + 1])) { continue; } // I...
php
public function getFirstArgument() { $isOption = false; foreach ($this->tokens as $i => $token) { if ($token && '-' === $token[0]) { if (false !== strpos($token, '=') || !isset($this->tokens[$i + 1])) { continue; } // I...
[ "public", "function", "getFirstArgument", "(", ")", "{", "$", "isOption", "=", "false", ";", "foreach", "(", "$", "this", "->", "tokens", "as", "$", "i", "=>", "$", "token", ")", "{", "if", "(", "$", "token", "&&", "'-'", "===", "$", "token", "[", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Input/ArgvInput.php#L258-L286
train
Returns the first argument of the command
[ 30522, 2270, 3853, 2131, 8873, 12096, 2906, 22850, 4765, 1006, 1007, 1063, 1002, 11163, 16790, 1027, 6270, 1025, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 19204, 2015, 2004, 1002, 1045, 1027, 1028, 1002, 19204, 1007, 1063, 2065, 1006, 1002...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Tracker/TableLogAction.php
TableLogAction.loadIdsAction
public static function loadIdsAction($actionsNameAndType) { // Add url prefix if not set foreach ($actionsNameAndType as &$action) { if (2 == count($action)) { $action[] = null; } } $actionIds = self::queryIdsAction($actionsNameAndType); ...
php
public static function loadIdsAction($actionsNameAndType) { // Add url prefix if not set foreach ($actionsNameAndType as &$action) { if (2 == count($action)) { $action[] = null; } } $actionIds = self::queryIdsAction($actionsNameAndType); ...
[ "public", "static", "function", "loadIdsAction", "(", "$", "actionsNameAndType", ")", "{", "// Add url prefix if not set", "foreach", "(", "$", "actionsNameAndType", "as", "&", "$", "action", ")", "{", "if", "(", "2", "==", "count", "(", "$", "action", ")", ...
This function will find the idaction from the lookup table log_action, given an Action name, type, and an optional URL Prefix. This is used to record Page URLs, Page Titles, Ecommerce items SKUs, item names, item categories If the action name does not exist in the lookup table, it will INSERT it @param array $actions...
[ "This", "function", "will", "find", "the", "idaction", "from", "the", "lookup", "table", "log_action", "given", "an", "Action", "name", "type", "and", "an", "optional", "URL", "Prefix", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Tracker/TableLogAction.php#L36-L53
train
Load ids action
[ 30522, 2270, 10763, 3853, 7170, 9821, 18908, 3258, 1006, 1002, 4506, 18442, 5685, 13874, 1007, 1063, 1013, 1013, 5587, 24471, 2140, 17576, 2065, 2025, 2275, 18921, 6776, 1006, 1002, 4506, 18442, 5685, 13874, 2004, 1004, 1002, 2895, 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/Mime/Encoder/QpEncoder.php
QpEncoder.encodeString
public function encodeString(string $string, ?string $charset = 'utf-8', int $firstLineOffset = 0, int $maxLineLength = 0): string { if ($maxLineLength > 76 || $maxLineLength <= 0) { $maxLineLength = 76; } $thisLineLength = $maxLineLength - $firstLineOffset; $lines = []...
php
public function encodeString(string $string, ?string $charset = 'utf-8', int $firstLineOffset = 0, int $maxLineLength = 0): string { if ($maxLineLength > 76 || $maxLineLength <= 0) { $maxLineLength = 76; } $thisLineLength = $maxLineLength - $firstLineOffset; $lines = []...
[ "public", "function", "encodeString", "(", "string", "$", "string", ",", "?", "string", "$", "charset", "=", "'utf-8'", ",", "int", "$", "firstLineOffset", "=", "0", ",", "int", "$", "maxLineLength", "=", "0", ")", ":", "string", "{", "if", "(", "$", ...
{@inheritdoc} Takes an unencoded string and produces a QP encoded string from it. QP encoded strings have a maximum line length of 76 characters. If the first line needs to be shorter, indicate the difference with $firstLineOffset.
[ "{", "@inheritdoc", "}" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Mime/Encoder/QpEncoder.php#L119-L161
train
Encodes a string to UTF - 8
[ 30522, 2270, 3853, 4372, 23237, 18886, 3070, 1006, 5164, 1002, 5164, 1010, 1029, 5164, 1002, 25869, 13462, 1027, 1005, 21183, 2546, 1011, 1022, 1005, 1010, 20014, 1002, 2034, 4179, 27475, 3388, 1027, 1014, 1010, 20014, 1002, 4098, 4179, 777...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/PrivacyManager.php
PrivacyManager.getAllMetricsToKeep
public static function getAllMetricsToKeep() { $metricsToKeep = self::getMetricsToKeep(); // convert goal metric names to correct archive names if (Common::isGoalPluginEnabled()) { $goalMetricsToKeep = self::getGoalMetricsToKeep(); $maxGoalId = self::getMaxGoalId();...
php
public static function getAllMetricsToKeep() { $metricsToKeep = self::getMetricsToKeep(); // convert goal metric names to correct archive names if (Common::isGoalPluginEnabled()) { $goalMetricsToKeep = self::getGoalMetricsToKeep(); $maxGoalId = self::getMaxGoalId();...
[ "public", "static", "function", "getAllMetricsToKeep", "(", ")", "{", "$", "metricsToKeep", "=", "self", "::", "getMetricsToKeep", "(", ")", ";", "// convert goal metric names to correct archive names", "if", "(", "Common", "::", "isGoalPluginEnabled", "(", ")", ")", ...
Returns the names of metrics that should be kept when purging as they appear in archive tables.
[ "Returns", "the", "names", "of", "metrics", "that", "should", "be", "kept", "when", "purging", "as", "they", "appear", "in", "archive", "tables", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/PrivacyManager/PrivacyManager.php#L535-L560
train
Get all metrics to keep
[ 30522, 2270, 10763, 3853, 2131, 8095, 12589, 16033, 20553, 2361, 1006, 1007, 1063, 1002, 12046, 16033, 20553, 2361, 1027, 2969, 1024, 1024, 2131, 12589, 16033, 20553, 2361, 1006, 1007, 1025, 1013, 1013, 10463, 3125, 12046, 3415, 2000, 6149, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Updater/Migration/Db/Factory.php
Factory.dropIndex
public function dropIndex($table, $indexName) { $table = $this->prefixTable($table); return $this->container->make('Piwik\Updater\Migration\Db\DropIndex', array( 'table' => $table, 'indexName' => $indexName )); }
php
public function dropIndex($table, $indexName) { $table = $this->prefixTable($table); return $this->container->make('Piwik\Updater\Migration\Db\DropIndex', array( 'table' => $table, 'indexName' => $indexName )); }
[ "public", "function", "dropIndex", "(", "$", "table", ",", "$", "indexName", ")", "{", "$", "table", "=", "$", "this", "->", "prefixTable", "(", "$", "table", ")", ";", "return", "$", "this", "->", "container", "->", "make", "(", "'Piwik\\Updater\\Migrat...
Drops an existing index from a database table. @param string $table Unprefixed database table name, eg 'log_visit'. @param string $indexName The name of the index that shall be dropped. @return DropIndex
[ "Drops", "an", "existing", "index", "from", "a", "database", "table", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Updater/Migration/Db/Factory.php#L304-L311
train
Drop an index from a table
[ 30522, 2270, 3853, 4530, 22254, 10288, 1006, 1002, 2795, 1010, 1002, 5950, 18442, 1007, 1063, 1002, 2795, 1027, 1002, 2023, 1011, 1028, 17576, 10880, 1006, 1002, 2795, 1007, 1025, 2709, 1002, 2023, 1011, 1028, 11661, 1011, 1028, 2191, 1006,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Cache/ApcStore.php
ApcStore.put
public function put($key, $value, $seconds) { return $this->apc->put($this->prefix.$key, $value, $seconds); }
php
public function put($key, $value, $seconds) { return $this->apc->put($this->prefix.$key, $value, $seconds); }
[ "public", "function", "put", "(", "$", "key", ",", "$", "value", ",", "$", "seconds", ")", "{", "return", "$", "this", "->", "apc", "->", "put", "(", "$", "this", "->", "prefix", ".", "$", "key", ",", "$", "value", ",", "$", "seconds", ")", ";"...
Store an item in the cache for a given number of seconds. @param string $key @param mixed $value @param int $seconds @return bool
[ "Store", "an", "item", "in", "the", "cache", "for", "a", "given", "number", "of", "seconds", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Cache/ApcStore.php#L59-L62
train
Put value into cache
[ 30522, 2270, 3853, 2404, 1006, 1002, 3145, 1010, 1002, 3643, 1010, 1002, 3823, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 9706, 2278, 1011, 1028, 2404, 1006, 1002, 2023, 1011, 1028, 17576, 1012, 1002, 3145, 1010, 1002, 3643, 1010, 1002, 38...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Auth/Access/Gate.php
Gate.guessPolicyName
protected function guessPolicyName($class) { if ($this->guessPolicyNamesUsingCallback) { return Arr::wrap(call_user_func($this->guessPolicyNamesUsingCallback, $class)); } $classDirname = str_replace('/', '\\', dirname(str_replace('\\', '/', $class))); return [$classDirn...
php
protected function guessPolicyName($class) { if ($this->guessPolicyNamesUsingCallback) { return Arr::wrap(call_user_func($this->guessPolicyNamesUsingCallback, $class)); } $classDirname = str_replace('/', '\\', dirname(str_replace('\\', '/', $class))); return [$classDirn...
[ "protected", "function", "guessPolicyName", "(", "$", "class", ")", "{", "if", "(", "$", "this", "->", "guessPolicyNamesUsingCallback", ")", "{", "return", "Arr", "::", "wrap", "(", "call_user_func", "(", "$", "this", "->", "guessPolicyNamesUsingCallback", ",", ...
Guess the policy name for the given class. @param string $class @return array
[ "Guess", "the", "policy", "name", "for", "the", "given", "class", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/Access/Gate.php#L572-L581
train
Guesses the policy name from the class name.
[ 30522, 5123, 3853, 3984, 18155, 2594, 18279, 4168, 1006, 1002, 2465, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 3984, 18155, 2594, 18279, 7834, 18161, 9289, 20850, 8684, 1007, 1063, 2709, 12098, 2099, 1024, 1024, 10236, 1006, 2655, 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...
getgrav/grav
system/src/Grav/Framework/Collection/AbstractFileCollection.php
AbstractFileCollection.doInitialize
protected function doInitialize() { $filtered = $this->doInitializeByIterator($this->iterator, $this->nestingLimit); ksort($filtered); $this->collection = new ArrayCollection($filtered); }
php
protected function doInitialize() { $filtered = $this->doInitializeByIterator($this->iterator, $this->nestingLimit); ksort($filtered); $this->collection = new ArrayCollection($filtered); }
[ "protected", "function", "doInitialize", "(", ")", "{", "$", "filtered", "=", "$", "this", "->", "doInitializeByIterator", "(", "$", "this", "->", "iterator", ",", "$", "this", "->", "nestingLimit", ")", ";", "ksort", "(", "$", "filtered", ")", ";", "$",...
{@inheritDoc}
[ "{" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Framework/Collection/AbstractFileCollection.php#L151-L157
train
Initializes the iterator and the collection.
[ 30522, 5123, 3853, 24341, 29050, 3669, 4371, 1006, 1007, 1063, 1002, 21839, 1027, 1002, 2023, 1011, 1028, 24341, 29050, 3669, 4371, 3762, 21646, 8844, 1006, 1002, 2023, 1011, 1028, 2009, 6906, 4263, 1010, 1002, 2023, 1011, 1028, 21016, 1796...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/system/classes/MailManager.php
MailManager.addContentToMailerInternal
protected function addContentToMailerInternal($message, $template, $data, $plainOnly = false) { /* * Start twig transaction */ $this->startTwig(); /* * Inject global view variables */ $globalVars = ViewHelper::getGlobalVars(); if (!empty($...
php
protected function addContentToMailerInternal($message, $template, $data, $plainOnly = false) { /* * Start twig transaction */ $this->startTwig(); /* * Inject global view variables */ $globalVars = ViewHelper::getGlobalVars(); if (!empty($...
[ "protected", "function", "addContentToMailerInternal", "(", "$", "message", ",", "$", "template", ",", "$", "data", ",", "$", "plainOnly", "=", "false", ")", "{", "/*\n * Start twig transaction\n */", "$", "this", "->", "startTwig", "(", ")", ";", ...
Internal method used to share logic between `addRawContentToMailer` and `addContentToMailer` @param \Illuminate\Mail\Message $message @param string $template @param array $data @param bool $plainOnly Add only plain text content to the message @return void
[ "Internal", "method", "used", "to", "share", "logic", "between", "addRawContentToMailer", "and", "addContentToMailer" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/classes/MailManager.php#L110-L158
train
Internal method to add content to mailer
[ 30522, 5123, 3853, 5587, 8663, 6528, 9284, 21397, 23282, 16451, 2389, 1006, 1002, 4471, 1010, 1002, 23561, 1010, 1002, 2951, 1010, 1002, 5810, 2239, 2135, 1027, 6270, 1007, 1063, 1013, 1008, 1008, 2707, 1056, 16279, 12598, 1008, 1013, 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...
PHPMailer/PHPMailer
src/PHPMailer.php
PHPMailer.addrAppend
public function addrAppend($type, $addr) { $addresses = []; foreach ($addr as $address) { $addresses[] = $this->addrFormat($address); } return $type . ': ' . implode(', ', $addresses) . static::$LE; }
php
public function addrAppend($type, $addr) { $addresses = []; foreach ($addr as $address) { $addresses[] = $this->addrFormat($address); } return $type . ': ' . implode(', ', $addresses) . static::$LE; }
[ "public", "function", "addrAppend", "(", "$", "type", ",", "$", "addr", ")", "{", "$", "addresses", "=", "[", "]", ";", "foreach", "(", "$", "addr", "as", "$", "address", ")", "{", "$", "addresses", "[", "]", "=", "$", "this", "->", "addrFormat", ...
Create recipient headers. @param string $type @param array $addr An array of recipients, where each recipient is a 2-element indexed array with element 0 containing an address and element 1 containing a name, like: [['joe@example.com', 'Joe User'], ['zoe@example.com', 'Zoe User']] @return string
[ "Create", "recipient", "headers", "." ]
3d7132341659a8a201adbc3ba11b1e202ee2857c
https://github.com/PHPMailer/PHPMailer/blob/3d7132341659a8a201adbc3ba11b1e202ee2857c/src/PHPMailer.php#L2115-L2123
train
Append address to type
[ 30522, 2270, 3853, 5587, 2527, 21512, 4859, 1006, 1002, 2828, 1010, 1002, 5587, 2099, 1007, 30524, 5587, 12881, 2953, 18900, 1006, 1002, 4769, 1007, 1025, 1065, 2709, 1002, 2828, 1012, 1005, 1024, 1005, 1012, 17727, 4135, 3207, 1006, 1005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Redis/Connections/PhpRedisConnection.php
PhpRedisConnection.mget
public function mget(array $keys) { return array_map(function ($value) { return $value !== false ? $value : null; }, $this->command('mget', [$keys])); }
php
public function mget(array $keys) { return array_map(function ($value) { return $value !== false ? $value : null; }, $this->command('mget', [$keys])); }
[ "public", "function", "mget", "(", "array", "$", "keys", ")", "{", "return", "array_map", "(", "function", "(", "$", "value", ")", "{", "return", "$", "value", "!==", "false", "?", "$", "value", ":", "null", ";", "}", ",", "$", "this", "->", "comma...
Get the values of all the given keys. @param array $keys @return array
[ "Get", "the", "values", "of", "all", "the", "given", "keys", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Redis/Connections/PhpRedisConnection.php#L44-L49
train
Get the value of one or more keys
[ 30522, 2270, 3853, 11460, 3388, 1006, 9140, 1002, 6309, 1007, 1063, 2709, 9140, 1035, 4949, 1006, 3853, 1006, 1002, 3643, 1007, 1063, 2709, 1002, 3643, 999, 1027, 1027, 6270, 1029, 1002, 3643, 1024, 19701, 1025, 1065, 1010, 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...
laravel/framework
src/Illuminate/Mail/PendingMail.php
PendingMail.fill
protected function fill(MailableContract $mailable) { return $mailable->to($this->to) ->cc($this->cc) ->bcc($this->bcc) ->locale($this->locale); }
php
protected function fill(MailableContract $mailable) { return $mailable->to($this->to) ->cc($this->cc) ->bcc($this->bcc) ->locale($this->locale); }
[ "protected", "function", "fill", "(", "MailableContract", "$", "mailable", ")", "{", "return", "$", "mailable", "->", "to", "(", "$", "this", "->", "to", ")", "->", "cc", "(", "$", "this", "->", "cc", ")", "->", "bcc", "(", "$", "this", "->", "bcc"...
Populate the mailable with the addresses. @param \Illuminate\Contracts\Mail\Mailable $mailable; @return \Illuminate\Mail\Mailable
[ "Populate", "the", "mailable", "with", "the", "addresses", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Mail/PendingMail.php#L176-L182
train
fills the array with the values of the fields
[ 30522, 5123, 3853, 6039, 1006, 5653, 3085, 8663, 6494, 6593, 1002, 5653, 3085, 1007, 1063, 2709, 1002, 5653, 3085, 1011, 1028, 2000, 1006, 1002, 2023, 1011, 1028, 2000, 1007, 1011, 1028, 10507, 1006, 1002, 2023, 1011, 1028, 10507, 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...
octobercms/october
modules/system/classes/PluginManager.php
PluginManager.disablePlugin
public function disablePlugin($id, $isUser = false) { $code = $this->getIdentifier($id); if (array_key_exists($code, $this->disabledPlugins)) { return false; } $this->disabledPlugins[$code] = $isUser; $this->writeDisabled(); if ($pluginObj = $this->findB...
php
public function disablePlugin($id, $isUser = false) { $code = $this->getIdentifier($id); if (array_key_exists($code, $this->disabledPlugins)) { return false; } $this->disabledPlugins[$code] = $isUser; $this->writeDisabled(); if ($pluginObj = $this->findB...
[ "public", "function", "disablePlugin", "(", "$", "id", ",", "$", "isUser", "=", "false", ")", "{", "$", "code", "=", "$", "this", "->", "getIdentifier", "(", "$", "id", ")", ";", "if", "(", "array_key_exists", "(", "$", "code", ",", "$", "this", "-...
Disables a single plugin in the system. @param string $id Plugin code/namespace @param bool $isUser Set to true if disabled by the user @return bool
[ "Disables", "a", "single", "plugin", "in", "the", "system", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/classes/PluginManager.php#L563-L578
train
Disable a plugin
[ 30522, 2270, 3853, 4487, 19150, 24759, 15916, 2378, 1006, 1002, 8909, 1010, 1002, 2003, 20330, 1027, 6270, 1007, 1063, 1002, 3642, 1027, 1002, 2023, 1011, 1028, 2131, 5178, 16778, 8873, 2121, 1006, 1002, 8909, 1007, 1025, 2065, 1006, 9140, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Tasks.php
Tasks.hourly
protected function hourly($methodName, $methodParameter = null, $priority = self::NORMAL_PRIORITY) { return $this->custom($this, $methodName, $methodParameter, 'hourly', $priority); }
php
protected function hourly($methodName, $methodParameter = null, $priority = self::NORMAL_PRIORITY) { return $this->custom($this, $methodName, $methodParameter, 'hourly', $priority); }
[ "protected", "function", "hourly", "(", "$", "methodName", ",", "$", "methodParameter", "=", "null", ",", "$", "priority", "=", "self", "::", "NORMAL_PRIORITY", ")", "{", "return", "$", "this", "->", "custom", "(", "$", "this", ",", "$", "methodName", ",...
Schedule the given tasks/method to run once every hour. @param string $methodName The name of the method that will be called when the task is being exectuted. To make it work you need to create a public method having the given method name in your Tasks class. @param null|string $methodParameter Can be nu...
[ "Schedule", "the", "given", "tasks", "/", "method", "to", "run", "once", "every", "hour", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Plugin/Tasks.php#L66-L69
train
Protected hourly method
[ 30522, 5123, 3853, 21462, 1006, 1002, 4118, 18442, 1010, 1002, 4118, 28689, 22828, 1027, 19701, 1010, 1002, 9470, 1027, 2969, 1024, 1024, 3671, 1035, 9470, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 7661, 1006, 1002, 2023, 1010, 1002, 4118, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/Login/Controller.php
Controller.ajaxNoAccess
public function ajaxNoAccess($errorMessage) { return sprintf( '<div class="alert alert-danger"> <p><strong>%s:</strong> %s</p> <p><a href="%s">%s</a></p> </div>', Piwik::translate('General_Error'), htmlentities($errorMessage, Co...
php
public function ajaxNoAccess($errorMessage) { return sprintf( '<div class="alert alert-danger"> <p><strong>%s:</strong> %s</p> <p><a href="%s">%s</a></p> </div>', Piwik::translate('General_Error'), htmlentities($errorMessage, Co...
[ "public", "function", "ajaxNoAccess", "(", "$", "errorMessage", ")", "{", "return", "sprintf", "(", "'<div class=\"alert alert-danger\">\n <p><strong>%s:</strong> %s</p>\n <p><a href=\"%s\">%s</a></p>\n </div>'", ",", "Piwik", "::", "translate",...
Error message shown when an AJAX request has no access @param string $errorMessage @return string
[ "Error", "message", "shown", "when", "an", "AJAX", "request", "has", "no", "access" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Login/Controller.php#L266-L278
train
Ajax error message
[ 30522, 2270, 3853, 18176, 3630, 6305, 9623, 2015, 1006, 1002, 7561, 7834, 3736, 3351, 1007, 1063, 2709, 9043, 2546, 1006, 1005, 1026, 4487, 2615, 2465, 1027, 1000, 9499, 9499, 1011, 5473, 1000, 1028, 1026, 1052, 1028, 1026, 2844, 1028, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/CoreAdminHome/Tasks/ArchivesToPurgeDistributedList.php
ArchivesToPurgeDistributedList.convertOldDistributedList
private function convertOldDistributedList(&$yearMonths) { foreach ($yearMonths as $key => $value) { if (preg_match("/^[0-9]{4}_[0-9]{2}$/", $key)) { unset($yearMonths[$key]); $yearMonths[] = $key; } } }
php
private function convertOldDistributedList(&$yearMonths) { foreach ($yearMonths as $key => $value) { if (preg_match("/^[0-9]{4}_[0-9]{2}$/", $key)) { unset($yearMonths[$key]); $yearMonths[] = $key; } } }
[ "private", "function", "convertOldDistributedList", "(", "&", "$", "yearMonths", ")", "{", "foreach", "(", "$", "yearMonths", "as", "$", "key", "=>", "$", "value", ")", "{", "if", "(", "preg_match", "(", "\"/^[0-9]{4}_[0-9]{2}$/\"", ",", "$", "key", ")", "...
Before 2.12.0 Piwik stored this list as an array mapping year months to arrays of site IDs. If this is found in the DB, we convert the array to an array of year months to avoid errors and to make sure the correct tables are still purged.
[ "Before", "2", ".", "12", ".", "0", "Piwik", "stored", "this", "list", "as", "an", "array", "mapping", "year", "months", "to", "arrays", "of", "site", "IDs", ".", "If", "this", "is", "found", "in", "the", "DB", "we", "convert", "the", "array", "to", ...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/CoreAdminHome/Tasks/ArchivesToPurgeDistributedList.php#L77-L86
train
Convert old distributed list to new list
[ 30522, 2797, 3853, 10463, 11614, 10521, 18886, 8569, 3064, 9863, 1006, 1004, 1002, 2095, 9629, 7898, 1007, 1063, 18921, 6776, 1006, 1002, 2095, 9629, 7898, 2004, 1002, 3145, 1027, 1028, 1002, 3643, 1007, 1063, 2065, 1006, 3653, 2290, 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/Common/Scheduler/Job.php
Job.postRun
private function postRun() { if (count($this->outputTo) > 0) { foreach ($this->outputTo as $file) { $output_mode = $this->outputMode === 'append' ? FILE_APPEND | LOCK_EX : LOCK_EX; file_put_contents($file, $this->output, $output_mode); } } ...
php
private function postRun() { if (count($this->outputTo) > 0) { foreach ($this->outputTo as $file) { $output_mode = $this->outputMode === 'append' ? FILE_APPEND | LOCK_EX : LOCK_EX; file_put_contents($file, $this->output, $output_mode); } } ...
[ "private", "function", "postRun", "(", ")", "{", "if", "(", "count", "(", "$", "this", "->", "outputTo", ")", ">", "0", ")", "{", "foreach", "(", "$", "this", "->", "outputTo", "as", "$", "file", ")", "{", "$", "output_mode", "=", "$", "this", "-...
Things to run after job has run
[ "Things", "to", "run", "after", "job", "has", "run" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Scheduler/Job.php#L348-L366
train
Post run processing
[ 30522, 2797, 3853, 2695, 15532, 1006, 1007, 1063, 2065, 1006, 4175, 1006, 1002, 2023, 1011, 1028, 6434, 3406, 1007, 1028, 1014, 1007, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 6434, 3406, 2004, 1002, 5371, 1007, 1063, 1002, 6434, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Schema/Blueprint.php
Blueprint.primary
public function primary($columns, $name = null, $algorithm = null) { return $this->indexCommand('primary', $columns, $name, $algorithm); }
php
public function primary($columns, $name = null, $algorithm = null) { return $this->indexCommand('primary', $columns, $name, $algorithm); }
[ "public", "function", "primary", "(", "$", "columns", ",", "$", "name", "=", "null", ",", "$", "algorithm", "=", "null", ")", "{", "return", "$", "this", "->", "indexCommand", "(", "'primary'", ",", "$", "columns", ",", "$", "name", ",", "$", "algori...
Specify the primary key(s) for the table. @param string|array $columns @param string $name @param string|null $algorithm @return \Illuminate\Support\Fluent
[ "Specify", "the", "primary", "key", "(", "s", ")", "for", "the", "table", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Blueprint.php#L475-L478
train
Create a new primary index
[ 30522, 2270, 3853, 3078, 1006, 1002, 7753, 1010, 1002, 2171, 1027, 19701, 1010, 1002, 9896, 1027, 19701, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 5950, 9006, 2386, 2094, 1006, 1005, 3078, 1005, 1010, 1002, 7753, 1010, 1002, 2171, 1010, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Queue/RedisQueue.php
RedisQueue.retrieveNextJob
protected function retrieveNextJob($queue, $block = true) { $nextJob = $this->getConnection()->eval( LuaScripts::pop(), 3, $queue, $queue.':reserved', $queue.':notify', $this->availableAt($this->retryAfter) ); if (empty($nextJob)) { return [null, null]; ...
php
protected function retrieveNextJob($queue, $block = true) { $nextJob = $this->getConnection()->eval( LuaScripts::pop(), 3, $queue, $queue.':reserved', $queue.':notify', $this->availableAt($this->retryAfter) ); if (empty($nextJob)) { return [null, null]; ...
[ "protected", "function", "retrieveNextJob", "(", "$", "queue", ",", "$", "block", "=", "true", ")", "{", "$", "nextJob", "=", "$", "this", "->", "getConnection", "(", ")", "->", "eval", "(", "LuaScripts", "::", "pop", "(", ")", ",", "3", ",", "$", ...
Retrieve the next job from the queue. @param string $queue @param bool $block @return array
[ "Retrieve", "the", "next", "job", "from", "the", "queue", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Queue/RedisQueue.php#L219-L238
train
Retrieve next job from queue
[ 30522, 5123, 3853, 12850, 2638, 18413, 5558, 2497, 1006, 1002, 24240, 1010, 1002, 3796, 1027, 2995, 1007, 1063, 1002, 2279, 5558, 2497, 1027, 1002, 2023, 1011, 1028, 2131, 8663, 2638, 7542, 1006, 1007, 1011, 1028, 9345, 2140, 1006, 11320, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php
PdoSessionHandler.open
public function open($savePath, $sessionName) { $this->sessionExpired = false; if (null === $this->pdo) { $this->connect($this->dsn ?: $savePath); } return parent::open($savePath, $sessionName); }
php
public function open($savePath, $sessionName) { $this->sessionExpired = false; if (null === $this->pdo) { $this->connect($this->dsn ?: $savePath); } return parent::open($savePath, $sessionName); }
[ "public", "function", "open", "(", "$", "savePath", ",", "$", "sessionName", ")", "{", "$", "this", "->", "sessionExpired", "=", "false", ";", "if", "(", "null", "===", "$", "this", "->", "pdo", ")", "{", "$", "this", "->", "connect", "(", "$", "th...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php#L263-L272
train
Open the session
[ 30522, 2270, 3853, 2330, 1006, 1002, 3828, 15069, 1010, 1002, 5219, 18442, 1007, 1063, 1002, 2023, 1011, 1028, 5219, 10288, 21649, 1027, 6270, 1025, 2065, 1006, 19701, 1027, 1027, 1027, 1002, 2023, 1011, 1028, 22851, 2080, 1007, 1063, 1002,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Auth/Middleware/EnsureEmailIsVerified.php
EnsureEmailIsVerified.handle
public function handle($request, Closure $next, $redirectToRoute = null) { if (! $request->user() || ($request->user() instanceof MustVerifyEmail && ! $request->user()->hasVerifiedEmail())) { return $request->expectsJson() ? abort(403, 'Your email addr...
php
public function handle($request, Closure $next, $redirectToRoute = null) { if (! $request->user() || ($request->user() instanceof MustVerifyEmail && ! $request->user()->hasVerifiedEmail())) { return $request->expectsJson() ? abort(403, 'Your email addr...
[ "public", "function", "handle", "(", "$", "request", ",", "Closure", "$", "next", ",", "$", "redirectToRoute", "=", "null", ")", "{", "if", "(", "!", "$", "request", "->", "user", "(", ")", "||", "(", "$", "request", "->", "user", "(", ")", "instan...
Handle an incoming request. @param \Illuminate\Http\Request $request @param \Closure $next @param string $redirectToRoute @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse
[ "Handle", "an", "incoming", "request", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/Middleware/EnsureEmailIsVerified.php#L19-L30
train
Handle the request
[ 30522, 2270, 3853, 5047, 1006, 1002, 5227, 1010, 8503, 1002, 2279, 1010, 1002, 2417, 7442, 6593, 4263, 5833, 2063, 1027, 19701, 1007, 1063, 2065, 1006, 999, 1002, 5227, 1011, 1028, 5310, 1006, 1007, 1064, 1064, 1006, 1002, 5227, 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...
overtrue/wechat
src/Work/OA/Client.php
Client.approvalRecords
public function approvalRecords(int $startTime, int $endTime, int $nextNumber = null) { $params = [ 'starttime' => $startTime, 'endtime' => $endTime, 'next_spnum' => $nextNumber, ]; return $this->httpPostJson('cgi-bin/corp/getapprovaldata', $params); ...
php
public function approvalRecords(int $startTime, int $endTime, int $nextNumber = null) { $params = [ 'starttime' => $startTime, 'endtime' => $endTime, 'next_spnum' => $nextNumber, ]; return $this->httpPostJson('cgi-bin/corp/getapprovaldata', $params); ...
[ "public", "function", "approvalRecords", "(", "int", "$", "startTime", ",", "int", "$", "endTime", ",", "int", "$", "nextNumber", "=", "null", ")", "{", "$", "params", "=", "[", "'starttime'", "=>", "$", "startTime", ",", "'endtime'", "=>", "$", "endTime...
Get Approval Data. @param int $startTime @param int $endTime @param int $nextNumber @return mixed
[ "Get", "Approval", "Data", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Work/OA/Client.php#L54-L63
train
Get Approval Data
[ 30522, 2270, 3853, 6226, 2890, 27108, 5104, 1006, 20014, 1002, 2707, 7292, 1010, 20014, 1002, 2203, 7292, 1010, 20014, 1002, 2279, 19172, 5677, 1027, 19701, 1007, 1063, 1002, 11498, 5244, 1027, 1031, 1005, 2707, 7292, 1005, 1027, 1028, 1002...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php
ArrayNodeDefinition.ignoreExtraKeys
public function ignoreExtraKeys($remove = true) { $this->ignoreExtraKeys = true; $this->removeExtraKeys = $remove; return $this; }
php
public function ignoreExtraKeys($remove = true) { $this->ignoreExtraKeys = true; $this->removeExtraKeys = $remove; return $this; }
[ "public", "function", "ignoreExtraKeys", "(", "$", "remove", "=", "true", ")", "{", "$", "this", "->", "ignoreExtraKeys", "=", "true", ";", "$", "this", "->", "removeExtraKeys", "=", "$", "remove", ";", "return", "$", "this", ";", "}" ]
Allows extra config keys to be specified under an array without throwing an exception. Those config values are ignored and removed from the resulting array. This should be used only in special cases where you want to send an entire configuration array through a special tree that processes only part of the array. @par...
[ "Allows", "extra", "config", "keys", "to", "be", "specified", "under", "an", "array", "without", "throwing", "an", "exception", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php#L344-L350
train
ignore extra keys
[ 30522, 2270, 3853, 8568, 10288, 6494, 14839, 2015, 1006, 1002, 6366, 1027, 2995, 1007, 1063, 1002, 2023, 1011, 1028, 8568, 10288, 6494, 14839, 2015, 1027, 2995, 1025, 1002, 2023, 1011, 1028, 6366, 10288, 6494, 14839, 2015, 1027, 1002, 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...
getgrav/grav
system/src/Grav/Framework/Form/Traits/FormTrait.php
FormTrait.unserialize
public function unserialize($serialized): void { $data = unserialize($serialized, ['allowed_classes' => false]); $this->doUnserialize($data); }
php
public function unserialize($serialized): void { $data = unserialize($serialized, ['allowed_classes' => false]); $this->doUnserialize($data); }
[ "public", "function", "unserialize", "(", "$", "serialized", ")", ":", "void", "{", "$", "data", "=", "unserialize", "(", "$", "serialized", ",", "[", "'allowed_classes'", "=>", "false", "]", ")", ";", "$", "this", "->", "doUnserialize", "(", "$", "data"...
Implements \Serializable::unserialize(). @param string $serialized
[ "Implements", "\\", "Serializable", "::", "unserialize", "()", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Framework/Form/Traits/FormTrait.php#L324-L329
train
Unserializes the current object
[ 30522, 2270, 3853, 4895, 8043, 4818, 4697, 1006, 1002, 27289, 1007, 1024, 11675, 1063, 1002, 2951, 1027, 4895, 8043, 4818, 4697, 1006, 1002, 27289, 1010, 1031, 1005, 3039, 1035, 4280, 1005, 1027, 1028, 6270, 1033, 1007, 1025, 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/SitesManager/Model.php
Model.getSiteUrlsFromId
public function getSiteUrlsFromId($idSite) { $urls = $this->getAliasSiteUrlsFromId($idSite); $site = $this->getSiteFromId($idSite); if (empty($site)) { return $urls; } return array_merge(array($site['main_url']), $urls); }
php
public function getSiteUrlsFromId($idSite) { $urls = $this->getAliasSiteUrlsFromId($idSite); $site = $this->getSiteFromId($idSite); if (empty($site)) { return $urls; } return array_merge(array($site['main_url']), $urls); }
[ "public", "function", "getSiteUrlsFromId", "(", "$", "idSite", ")", "{", "$", "urls", "=", "$", "this", "->", "getAliasSiteUrlsFromId", "(", "$", "idSite", ")", ";", "$", "site", "=", "$", "this", "->", "getSiteFromId", "(", "$", "idSite", ")", ";", "i...
Returns the list of all URLs registered for the given idSite (main_url + alias URLs). @throws Exception if the website ID doesn't exist or the user doesn't have access to it @param int $idSite @return array list of URLs
[ "Returns", "the", "list", "of", "all", "URLs", "registered", "for", "the", "given", "idSite", "(", "main_url", "+", "alias", "URLs", ")", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/SitesManager/Model.php#L264-L274
train
Get alias site urls from id
[ 30522, 2270, 3853, 4152, 4221, 3126, 4877, 19699, 20936, 2094, 1006, 1002, 8909, 28032, 2063, 1007, 1063, 1002, 24471, 4877, 1027, 1002, 2023, 1011, 1028, 2131, 22786, 18719, 2618, 3126, 4877, 19699, 20936, 2094, 1006, 1002, 8909, 28032, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/SitesManager/API.php
API.getDefaultCurrency
public function getDefaultCurrency() { Piwik::checkUserHasSomeAdminAccess(); $defaultCurrency = Option::get(self::OPTION_DEFAULT_CURRENCY); if ($defaultCurrency) { return $defaultCurrency; } return 'USD'; }
php
public function getDefaultCurrency() { Piwik::checkUserHasSomeAdminAccess(); $defaultCurrency = Option::get(self::OPTION_DEFAULT_CURRENCY); if ($defaultCurrency) { return $defaultCurrency; } return 'USD'; }
[ "public", "function", "getDefaultCurrency", "(", ")", "{", "Piwik", "::", "checkUserHasSomeAdminAccess", "(", ")", ";", "$", "defaultCurrency", "=", "Option", "::", "get", "(", "self", "::", "OPTION_DEFAULT_CURRENCY", ")", ";", "if", "(", "$", "defaultCurrency",...
Returns the default currency that will be set when creating a website through the API. @return string Currency ID eg. 'USD'
[ "Returns", "the", "default", "currency", "that", "will", "be", "set", "when", "creating", "a", "website", "through", "the", "API", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/SitesManager/API.php#L1154-L1162
train
Returns the default currency
[ 30522, 2270, 3853, 2131, 3207, 7011, 11314, 10841, 14343, 9407, 1006, 1007, 1063, 14255, 9148, 2243, 1024, 1024, 4638, 20330, 14949, 14045, 4215, 22311, 9468, 7971, 1006, 1007, 1025, 1002, 12398, 10841, 14343, 9407, 1027, 5724, 1024, 1024, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/CoreVisualizations/Visualizations/JqplotGraph/Evolution.php
Evolution.getDateRangeAndLastN
public static function getDateRangeAndLastN($period, $endDate, $defaultLastN = null) { if ($defaultLastN === null) { $defaultLastN = self::getDefaultLastN($period); } $lastNParamName = self::getLastNParamName($period); $lastN = Common::getRequestVar($lastNParamName, $def...
php
public static function getDateRangeAndLastN($period, $endDate, $defaultLastN = null) { if ($defaultLastN === null) { $defaultLastN = self::getDefaultLastN($period); } $lastNParamName = self::getLastNParamName($period); $lastN = Common::getRequestVar($lastNParamName, $def...
[ "public", "static", "function", "getDateRangeAndLastN", "(", "$", "period", ",", "$", "endDate", ",", "$", "defaultLastN", "=", "null", ")", "{", "if", "(", "$", "defaultLastN", "===", "null", ")", "{", "$", "defaultLastN", "=", "self", "::", "getDefaultLa...
Returns the entire date range and lastN value for the current request, based on a period type and end date. @param string $period The period type, 'day', 'week', 'month' or 'year' @param string $endDate The end date. @param int|null $defaultLastN The default lastN to use. If null, the result of getDefaultLastN is used...
[ "Returns", "the", "entire", "date", "range", "and", "lastN", "value", "for", "the", "current", "request", "based", "on", "a", "period", "type", "and", "end", "date", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/CoreVisualizations/Visualizations/JqplotGraph/Evolution.php#L119-L133
train
Returns the date range and lastN for the passed period and end date.
[ 30522, 2270, 10763, 3853, 2131, 13701, 24388, 11219, 19422, 14083, 2078, 1006, 1002, 2558, 1010, 1002, 2203, 13701, 1010, 1002, 12398, 8523, 2102, 2078, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 12398, 8523, 2102, 2078, 1027, 1027, 1027, 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/MultiSites/API.php
API.setMetricsTotalsMetadata
private function setMetricsTotalsMetadata($dataTable, $apiMetrics) { if ($dataTable instanceof DataTable\Map) { foreach ($dataTable->getDataTables() as $table) { $this->setMetricsTotalsMetadata($table, $apiMetrics); } } else { $totals = array(); ...
php
private function setMetricsTotalsMetadata($dataTable, $apiMetrics) { if ($dataTable instanceof DataTable\Map) { foreach ($dataTable->getDataTables() as $table) { $this->setMetricsTotalsMetadata($table, $apiMetrics); } } else { $totals = array(); ...
[ "private", "function", "setMetricsTotalsMetadata", "(", "$", "dataTable", ",", "$", "apiMetrics", ")", "{", "if", "(", "$", "dataTable", "instanceof", "DataTable", "\\", "Map", ")", "{", "foreach", "(", "$", "dataTable", "->", "getDataTables", "(", ")", "as"...
Sets the total visits, actions & revenue for a DataTable returned by $this->buildDataTable. @param DataTable $dataTable @param array $apiMetrics Metrics info. @return array Array of three values: total visits, total actions, total revenue
[ "Sets", "the", "total", "visits", "actions", "&", "revenue", "for", "a", "DataTable", "returned", "by", "$this", "-", ">", "buildDataTable", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/MultiSites/API.php#L431-L455
train
Set totals metadata for all tables
[ 30522, 2797, 3853, 2275, 12589, 16033, 9080, 6491, 12928, 2850, 2696, 1006, 1002, 2951, 10880, 1010, 1002, 17928, 12589, 2015, 1007, 1063, 2065, 1006, 1002, 2951, 10880, 6013, 11253, 2951, 10880, 1032, 4949, 1007, 1063, 18921, 6776, 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...
getgrav/grav
system/src/Grav/Common/Page/Collection.php
Collection.ofOneOfTheseAccessLevels
public function ofOneOfTheseAccessLevels($accessLevels) { $items = []; foreach ($this->items as $path => $slug) { $page = $this->pages->get($path); if ($page !== null && isset($page->header()->access)) { if (\is_array($page->header()->access)) { ...
php
public function ofOneOfTheseAccessLevels($accessLevels) { $items = []; foreach ($this->items as $path => $slug) { $page = $this->pages->get($path); if ($page !== null && isset($page->header()->access)) { if (\is_array($page->header()->access)) { ...
[ "public", "function", "ofOneOfTheseAccessLevels", "(", "$", "accessLevels", ")", "{", "$", "items", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "items", "as", "$", "path", "=>", "$", "slug", ")", "{", "$", "page", "=", "$", "this", "->", ...
Creates new collection with only pages of one of the specified access levels @param array $accessLevels @return Collection The collection
[ "Creates", "new", "collection", "with", "only", "pages", "of", "one", "of", "the", "specified", "access", "levels" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Page/Collection.php#L569-L610
train
This method will return the page items of one of the access levels
[ 30522, 2270, 3853, 1997, 5643, 15794, 15689, 5243, 9468, 7971, 20414, 9050, 1006, 1002, 3229, 20414, 9050, 1007, 1063, 1002, 5167, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 5167, 2004, 1002, 4130, 1027, 1028, 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...
overtrue/wechat
src/OfficialAccount/ShakeAround/StatsClient.php
StatsClient.deviceSummary
public function deviceSummary(array $deviceIdentifier, int $beginTime, int $endTime) { $params = [ 'device_identifier' => $deviceIdentifier, 'begin_date' => $beginTime, 'end_date' => $endTime, ]; return $this->httpPostJson('shakearound/statistics/device',...
php
public function deviceSummary(array $deviceIdentifier, int $beginTime, int $endTime) { $params = [ 'device_identifier' => $deviceIdentifier, 'begin_date' => $beginTime, 'end_date' => $endTime, ]; return $this->httpPostJson('shakearound/statistics/device',...
[ "public", "function", "deviceSummary", "(", "array", "$", "deviceIdentifier", ",", "int", "$", "beginTime", ",", "int", "$", "endTime", ")", "{", "$", "params", "=", "[", "'device_identifier'", "=>", "$", "deviceIdentifier", ",", "'begin_date'", "=>", "$", "...
Fetch statistics data by deviceId. @param array $deviceIdentifier @param int $beginTime (Unix timestamp) @param int $endTime (Unix timestamp) @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
[ "Fetch", "statistics", "data", "by", "deviceId", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/ShakeAround/StatsClient.php#L32-L41
train
This method returns a summary of the statistics of a device
[ 30522, 2270, 3853, 5733, 2819, 7849, 2100, 1006, 9140, 1002, 5080, 5178, 16778, 8873, 2121, 1010, 20014, 1002, 4088, 7292, 1010, 20014, 1002, 2203, 7292, 1007, 1063, 1002, 11498, 5244, 1027, 1031, 1005, 5080, 1035, 8909, 4765, 18095, 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
plugins/UserCountry/GeoIPAutoUpdater.php
GeoIPAutoUpdater.update
public function update() { try { Option::set(self::LAST_RUN_TIME_OPTION_NAME, Date::factory('today')->getTimestamp()); $locUrl = Option::get(self::LOC_URL_OPTION_NAME); if (!empty($locUrl)) { $this->downloadFile('loc', $locUrl); } ...
php
public function update() { try { Option::set(self::LAST_RUN_TIME_OPTION_NAME, Date::factory('today')->getTimestamp()); $locUrl = Option::get(self::LOC_URL_OPTION_NAME); if (!empty($locUrl)) { $this->downloadFile('loc', $locUrl); } ...
[ "public", "function", "update", "(", ")", "{", "try", "{", "Option", "::", "set", "(", "self", "::", "LAST_RUN_TIME_OPTION_NAME", ",", "Date", "::", "factory", "(", "'today'", ")", "->", "getTimestamp", "(", ")", ")", ";", "$", "locUrl", "=", "Option", ...
Attempts to download new location, ISP & organization GeoIP databases and replace the existing ones w/ them.
[ "Attempts", "to", "download", "new", "location", "ISP", "&", "organization", "GeoIP", "databases", "and", "replace", "the", "existing", "ones", "w", "/", "them", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/UserCountry/GeoIPAutoUpdater.php#L96-L126
train
Update the database
[ 30522, 2270, 3853, 10651, 1006, 1007, 1063, 3046, 1063, 5724, 1024, 1024, 2275, 1006, 2969, 1024, 1024, 2197, 1035, 2448, 1035, 2051, 1035, 5724, 1035, 2171, 1010, 3058, 1024, 1024, 4713, 1006, 1005, 2651, 1005, 1007, 1011, 1028, 2131, 72...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.addSiteAliasUrls
public function addSiteAliasUrls($idSite, $urls) { Piwik::checkUserHasAdminAccess($idSite); if (empty($urls)) { return 0; } if (!is_array($urls)) { $urls = array($urls); } $urlsInit = $this->getSiteUrlsFromId($idSite); $toInsert = ar...
php
public function addSiteAliasUrls($idSite, $urls) { Piwik::checkUserHasAdminAccess($idSite); if (empty($urls)) { return 0; } if (!is_array($urls)) { $urls = array($urls); } $urlsInit = $this->getSiteUrlsFromId($idSite); $toInsert = ar...
[ "public", "function", "addSiteAliasUrls", "(", "$", "idSite", ",", "$", "urls", ")", "{", "Piwik", "::", "checkUserHasAdminAccess", "(", "$", "idSite", ")", ";", "if", "(", "empty", "(", "$", "urls", ")", ")", "{", "return", "0", ";", "}", "if", "(",...
Add a list of alias Urls to the given idSite If some URLs given in parameter are already recorded as alias URLs for this website, they won't be duplicated. The 'main_url' of the website won't be affected by this method. @param int $idSite @param array|string $urls When calling API via HTTP specify multiple URLs via `...
[ "Add", "a", "list", "of", "alias", "Urls", "to", "the", "given", "idSite" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/SitesManager/API.php#L893-L917
train
Add alias URLs to a site
[ 30522, 2270, 3853, 9909, 4221, 22786, 26210, 4877, 1006, 1002, 8909, 28032, 2063, 1010, 1002, 24471, 4877, 1007, 1063, 14255, 9148, 2243, 1024, 1024, 4638, 20330, 14949, 4215, 22311, 9468, 7971, 1006, 1002, 8909, 28032, 2063, 1007, 1025, 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/HttpKernel/Fragment/RoutableFragmentRenderer.php
RoutableFragmentRenderer.generateFragmentUri
protected function generateFragmentUri(ControllerReference $reference, Request $request, $absolute = false, $strict = true) { if ($strict) { $this->checkNonScalar($reference->attributes); } // We need to forward the current _format and _locale values as we don't have // ...
php
protected function generateFragmentUri(ControllerReference $reference, Request $request, $absolute = false, $strict = true) { if ($strict) { $this->checkNonScalar($reference->attributes); } // We need to forward the current _format and _locale values as we don't have // ...
[ "protected", "function", "generateFragmentUri", "(", "ControllerReference", "$", "reference", ",", "Request", "$", "request", ",", "$", "absolute", "=", "false", ",", "$", "strict", "=", "true", ")", "{", "if", "(", "$", "strict", ")", "{", "$", "this", ...
Generates a fragment URI for a given controller. @param ControllerReference $reference A ControllerReference instance @param Request $request A Request instance @param bool $absolute Whether to generate an absolute URL or not @param bool $strict Whether to allow non-scal...
[ "Generates", "a", "fragment", "URI", "for", "a", "given", "controller", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpKernel/Fragment/RoutableFragmentRenderer.php#L49-L78
train
Generate the fragment URI
[ 30522, 5123, 3853, 9699, 27843, 21693, 4765, 9496, 1006, 11486, 2890, 25523, 1002, 4431, 1010, 5227, 1002, 5227, 1010, 1002, 7619, 1027, 6270, 1010, 1002, 9384, 1027, 2995, 1007, 1063, 2065, 30524, 2063, 5300, 2004, 2057, 2123, 1005, 1056, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Validator/Constraints/DivisibleByValidator.php
DivisibleByValidator.compareValues
protected function compareValues($value1, $value2) { if (!$value2 = abs($value2)) { return false; } if (\is_int($value1 = abs($value1)) && \is_int($value2)) { return 0 === ($value1 % $value2); } if (!$remainder = fmod($value1, $value2)) { r...
php
protected function compareValues($value1, $value2) { if (!$value2 = abs($value2)) { return false; } if (\is_int($value1 = abs($value1)) && \is_int($value2)) { return 0 === ($value1 % $value2); } if (!$remainder = fmod($value1, $value2)) { r...
[ "protected", "function", "compareValues", "(", "$", "value1", ",", "$", "value2", ")", "{", "if", "(", "!", "$", "value2", "=", "abs", "(", "$", "value2", ")", ")", "{", "return", "false", ";", "}", "if", "(", "\\", "is_int", "(", "$", "value1", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Validator/Constraints/DivisibleByValidator.php#L24-L37
train
Compare values of two numbers
[ 30522, 5123, 3853, 12826, 10175, 15808, 1006, 1002, 3643, 2487, 1010, 1002, 3643, 2475, 1007, 1063, 2065, 1006, 999, 1002, 3643, 2475, 1027, 14689, 1006, 1002, 3643, 30524, 3643, 2487, 1007, 1007, 1004, 1004, 1032, 2003, 1035, 20014, 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...
slimphp/Slim
Slim/Http/Stream.php
Stream.isPipe
public function isPipe() { if ($this->isPipe === null) { $this->isPipe = false; if ($this->isAttached()) { $mode = fstat($this->stream)['mode']; $this->isPipe = ($mode & self::FSTAT_MODE_S_IFIFO) !== 0; } } return $this->is...
php
public function isPipe() { if ($this->isPipe === null) { $this->isPipe = false; if ($this->isAttached()) { $mode = fstat($this->stream)['mode']; $this->isPipe = ($mode & self::FSTAT_MODE_S_IFIFO) !== 0; } } return $this->is...
[ "public", "function", "isPipe", "(", ")", "{", "if", "(", "$", "this", "->", "isPipe", "===", "null", ")", "{", "$", "this", "->", "isPipe", "=", "false", ";", "if", "(", "$", "this", "->", "isAttached", "(", ")", ")", "{", "$", "mode", "=", "f...
Returns whether or not the stream is a pipe. @return bool
[ "Returns", "whether", "or", "not", "the", "stream", "is", "a", "pipe", "." ]
ccef5f7d8bcd469d59cbe64f6210d83764f91543
https://github.com/slimphp/Slim/blob/ccef5f7d8bcd469d59cbe64f6210d83764f91543/Slim/Http/Stream.php#L433-L444
train
Is this stream pipe?
[ 30522, 2270, 3853, 2003, 24548, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 2003, 24548, 1027, 1027, 1027, 19701, 1007, 1063, 30524, 1028, 2003, 24548, 1027, 1006, 1002, 5549, 1004, 2969, 1024, 1024, 1042, 9153, 2102, 1035, 5549, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Settings/Storage/Backend/PluginSettingsTable.php
PluginSettingsTable.removeAllSettingsForPlugin
public static function removeAllSettingsForPlugin($pluginName) { try { $table = Common::prefixTable('plugin_setting'); Db::get()->query(sprintf('DELETE FROM %s WHERE plugin_name = ?', $table), array($pluginName)); } catch (Exception $e) { if ($e->getCode() != 42) ...
php
public static function removeAllSettingsForPlugin($pluginName) { try { $table = Common::prefixTable('plugin_setting'); Db::get()->query(sprintf('DELETE FROM %s WHERE plugin_name = ?', $table), array($pluginName)); } catch (Exception $e) { if ($e->getCode() != 42) ...
[ "public", "static", "function", "removeAllSettingsForPlugin", "(", "$", "pluginName", ")", "{", "try", "{", "$", "table", "=", "Common", "::", "prefixTable", "(", "'plugin_setting'", ")", ";", "Db", "::", "get", "(", ")", "->", "query", "(", "sprintf", "("...
Unsets all settings for a plugin. The settings will be removed from the database. Used when a plugin is uninstalled. @internal @param string $pluginName @throws \Exception If the `$userLogin` is empty.
[ "Unsets", "all", "settings", "for", "a", "plugin", ".", "The", "settings", "will", "be", "removed", "from", "the", "database", ".", "Used", "when", "a", "plugin", "is", "uninstalled", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Settings/Storage/Backend/PluginSettingsTable.php#L197-L208
train
Remove all settings for a plugin
[ 30522, 2270, 10763, 3853, 6366, 8095, 21678, 8613, 29278, 24759, 15916, 2378, 1006, 1002, 13354, 23111, 14074, 1007, 1063, 3046, 1063, 1002, 2795, 1027, 2691, 1024, 1024, 17576, 10880, 1006, 1005, 13354, 2378, 1035, 4292, 1005, 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...
getgrav/grav
system/src/Grav/Common/Page/Medium/ImageFile.php
ImageFile.getHash
public function getHash($type = 'guess', $quality = 80, $extras = []) { if (null === $this->hash) { $this->generateHash($type, $quality, $extras); } return $this->hash; }
php
public function getHash($type = 'guess', $quality = 80, $extras = []) { if (null === $this->hash) { $this->generateHash($type, $quality, $extras); } return $this->hash; }
[ "public", "function", "getHash", "(", "$", "type", "=", "'guess'", ",", "$", "quality", "=", "80", ",", "$", "extras", "=", "[", "]", ")", "{", "if", "(", "null", "===", "$", "this", "->", "hash", ")", "{", "$", "this", "->", "generateHash", "(",...
Gets the hash. @param string $type @param int $quality @param [] $extras @return null
[ "Gets", "the", "hash", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Page/Medium/ImageFile.php#L115-L122
train
Get the hash of the current language
[ 30522, 2270, 3853, 2131, 14949, 2232, 1006, 1002, 2828, 1027, 1005, 3984, 1005, 1010, 1002, 3737, 1027, 3770, 1010, 1002, 26279, 1027, 1031, 1033, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 1027, 1002, 2023, 1011, 1028, 23325, 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...
symfony/symfony
src/Symfony/Component/HttpKernel/Profiler/Profiler.php
Profiler.loadProfileFromResponse
public function loadProfileFromResponse(Response $response) { if (!$token = $response->headers->get('X-Debug-Token')) { return false; } return $this->loadProfile($token); }
php
public function loadProfileFromResponse(Response $response) { if (!$token = $response->headers->get('X-Debug-Token')) { return false; } return $this->loadProfile($token); }
[ "public", "function", "loadProfileFromResponse", "(", "Response", "$", "response", ")", "{", "if", "(", "!", "$", "token", "=", "$", "response", "->", "headers", "->", "get", "(", "'X-Debug-Token'", ")", ")", "{", "return", "false", ";", "}", "return", "...
Loads the Profile for the given Response. @return Profile|false A Profile instance
[ "Loads", "the", "Profile", "for", "the", "given", "Response", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpKernel/Profiler/Profiler.php#L68-L75
train
Load Profile from Response
[ 30522, 2270, 3853, 7170, 21572, 8873, 2571, 19699, 5358, 6072, 26029, 3366, 1006, 3433, 1002, 3433, 1007, 1063, 2065, 1006, 999, 1002, 19204, 1027, 1002, 3433, 1011, 1028, 20346, 2015, 1011, 1028, 2131, 1006, 1005, 1060, 1011, 2139, 8569, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
overtrue/wechat
src/OpenWork/Provider/Client.php
Client.getLoginUrl
public function getLoginUrl(string $redirectUri = '', string $userType = 'admin', string $state = '') { $redirectUri || $redirectUri = $this->app->config['redirect_uri_single']; $state || $state = rand(); $params = [ 'appid' => $this->app['config']['corp_id'], 'redire...
php
public function getLoginUrl(string $redirectUri = '', string $userType = 'admin', string $state = '') { $redirectUri || $redirectUri = $this->app->config['redirect_uri_single']; $state || $state = rand(); $params = [ 'appid' => $this->app['config']['corp_id'], 'redire...
[ "public", "function", "getLoginUrl", "(", "string", "$", "redirectUri", "=", "''", ",", "string", "$", "userType", "=", "'admin'", ",", "string", "$", "state", "=", "''", ")", "{", "$", "redirectUri", "||", "$", "redirectUri", "=", "$", "this", "->", "...
单点登录 - 获取登录的地址. @param string $redirectUri @param string $userType @param string $state @return string
[ "单点登录", "-", "获取登录的地址", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OpenWork/Provider/Client.php#L44-L56
train
Get login url
[ 30522, 2270, 3853, 2131, 21197, 2378, 3126, 2140, 1006, 5164, 1002, 2417, 7442, 6593, 9496, 1027, 1005, 1005, 1010, 5164, 1002, 5310, 13874, 1027, 1005, 4748, 10020, 1005, 1010, 5164, 1002, 2110, 1027, 1005, 1005, 1007, 1063, 1002, 2417, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/DataTable/Renderer.php
Renderer.setTable
public function setTable($table) { if (!is_array($table) && !($table instanceof DataTableInterface) ) { throw new Exception("DataTable renderers renderer accepts only DataTable, Simple and Map instances, and arrays."); } $this->table = $table; }
php
public function setTable($table) { if (!is_array($table) && !($table instanceof DataTableInterface) ) { throw new Exception("DataTable renderers renderer accepts only DataTable, Simple and Map instances, and arrays."); } $this->table = $table; }
[ "public", "function", "setTable", "(", "$", "table", ")", "{", "if", "(", "!", "is_array", "(", "$", "table", ")", "&&", "!", "(", "$", "table", "instanceof", "DataTableInterface", ")", ")", "{", "throw", "new", "Exception", "(", "\"DataTable renderers ren...
Set the DataTable to be rendered @param DataTable|Simple|DataTable\Map $table table to be rendered @throws Exception
[ "Set", "the", "DataTable", "to", "be", "rendered" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataTable/Renderer.php#L130-L138
train
Set the table
[ 30522, 2270, 3853, 2275, 10880, 1006, 1002, 2795, 1007, 1063, 2065, 1006, 999, 2003, 1035, 9140, 1006, 1002, 2795, 1007, 1004, 1004, 999, 1006, 1002, 2795, 6013, 11253, 2951, 10880, 18447, 2121, 12172, 1007, 1007, 1063, 5466, 2047, 6453, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Exception/RequestException.php
RequestException.getResponseBodySummary
public static function getResponseBodySummary(ResponseInterface $response) { $body = $response->getBody(); if (!$body->isSeekable() || !$body->isReadable()) { return null; } $size = $body->getSize(); if ($size === 0) { return null; } ...
php
public static function getResponseBodySummary(ResponseInterface $response) { $body = $response->getBody(); if (!$body->isSeekable() || !$body->isReadable()) { return null; } $size = $body->getSize(); if ($size === 0) { return null; } ...
[ "public", "static", "function", "getResponseBodySummary", "(", "ResponseInterface", "$", "response", ")", "{", "$", "body", "=", "$", "response", "->", "getBody", "(", ")", ";", "if", "(", "!", "$", "body", "->", "isSeekable", "(", ")", "||", "!", "$", ...
Get a short summary of the response Will return `null` if the response is not printable. @param ResponseInterface $response @return string|null
[ "Get", "a", "short", "summary", "of", "the", "response" ]
bf595424e4d442a190582e088985dc835a789071
https://github.com/guzzle/guzzle/blob/bf595424e4d442a190582e088985dc835a789071/src/Exception/RequestException.php#L125-L153
train
Get Response Body Summary
[ 30522, 2270, 10763, 3853, 2131, 6072, 26029, 3366, 23684, 17421, 7849, 2100, 1006, 3433, 18447, 2121, 12172, 1002, 3433, 1007, 1063, 1002, 2303, 1027, 1002, 3433, 1011, 1028, 2131, 23684, 1006, 1007, 1025, 2065, 1006, 999, 1002, 2303, 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...
dompdf/dompdf
src/Helpers.php
Helpers.rle8_decode
public static function rle8_decode($str, $width) { $lineWidth = $width + (3 - ($width - 1) % 4); $out = ''; $cnt = strlen($str); for ($i = 0; $i < $cnt; $i++) { $o = ord($str[$i]); switch ($o) { case 0: # ESCAPE $i++; ...
php
public static function rle8_decode($str, $width) { $lineWidth = $width + (3 - ($width - 1) % 4); $out = ''; $cnt = strlen($str); for ($i = 0; $i < $cnt; $i++) { $o = ord($str[$i]); switch ($o) { case 0: # ESCAPE $i++; ...
[ "public", "static", "function", "rle8_decode", "(", "$", "str", ",", "$", "width", ")", "{", "$", "lineWidth", "=", "$", "width", "+", "(", "3", "-", "(", "$", "width", "-", "1", ")", "%", "4", ")", ";", "$", "out", "=", "''", ";", "$", "cnt"...
Decoder for RLE8 compression in windows bitmaps http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps_6x0u.asp @param string $str Data to decode @param integer $width Image width @return string
[ "Decoder", "for", "RLE8", "compression", "in", "windows", "bitmaps", "http", ":", "//", "msdn", ".", "microsoft", ".", "com", "/", "library", "/", "default", ".", "asp?url", "=", "/", "library", "/", "en", "-", "us", "/", "gdi", "/", "bitmaps_6x0u", "....
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/Helpers.php#L252-L294
train
Decode the string to the correct width
[ 30522, 2270, 10763, 3853, 1054, 2571, 2620, 1035, 21933, 3207, 1006, 1002, 2358, 2099, 1010, 1002, 9381, 1007, 1063, 1002, 2240, 9148, 11927, 2232, 1027, 1002, 9381, 1009, 1006, 1017, 1011, 1006, 1002, 9381, 1011, 1015, 1007, 1003, 1018, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dompdf/dompdf
lib/html5lib/InputStream.php
HTML5_InputStream.getCurrentLine
public function getCurrentLine() { // Check the string isn't empty if ($this->EOF) { // Add one to $this->char because we want the number for the next // byte to be processed. return substr_count($this->data, "\n", 0, min($this->char, $this->EOF)) + 1; } else ...
php
public function getCurrentLine() { // Check the string isn't empty if ($this->EOF) { // Add one to $this->char because we want the number for the next // byte to be processed. return substr_count($this->data, "\n", 0, min($this->char, $this->EOF)) + 1; } else ...
[ "public", "function", "getCurrentLine", "(", ")", "{", "// Check the string isn't empty", "if", "(", "$", "this", "->", "EOF", ")", "{", "// Add one to $this->char because we want the number for the next", "// byte to be processed.", "return", "substr_count", "(", "$", "thi...
Returns the current line that the tokenizer is at. @return int
[ "Returns", "the", "current", "line", "that", "the", "tokenizer", "is", "at", "." ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/lib/html5lib/InputStream.php#L168-L178
train
Get the current line number
[ 30522, 2270, 3853, 2131, 10841, 14343, 3372, 4179, 1006, 1007, 1063, 1013, 1013, 4638, 1996, 5164, 3475, 1005, 1056, 4064, 2065, 1006, 1002, 2023, 1011, 1028, 1041, 11253, 1007, 1063, 1013, 1013, 5587, 2028, 2000, 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...
matomo-org/matomo
core/Plugin/LogTablesProvider.php
LogTablesProvider.getAllLogTables
public function getAllLogTables() { if (!isset($this->tablesCache)) { $tables = $this->pluginManager->findMultipleComponents('Tracker', 'Piwik\\Tracker\\LogTable'); $logTables = array(); /** * Only used for tests. Triggered to add custom log tables which ar...
php
public function getAllLogTables() { if (!isset($this->tablesCache)) { $tables = $this->pluginManager->findMultipleComponents('Tracker', 'Piwik\\Tracker\\LogTable'); $logTables = array(); /** * Only used for tests. Triggered to add custom log tables which ar...
[ "public", "function", "getAllLogTables", "(", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "tablesCache", ")", ")", "{", "$", "tables", "=", "$", "this", "->", "pluginManager", "->", "findMultipleComponents", "(", "'Tracker'", ",", "'Piwik\\\...
Get all log table instances defined by any activated and loaded plugin. The returned tables are not sorted in any order. @return LogTable[]
[ "Get", "all", "log", "table", "instances", "defined", "by", "any", "activated", "and", "loaded", "plugin", ".", "The", "returned", "tables", "are", "not", "sorted", "in", "any", "order", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Plugin/LogTablesProvider.php#L52-L86
train
Returns all log tables
[ 30522, 2270, 3853, 2131, 8095, 21197, 10880, 2015, 1006, 1007, 1063, 2065, 1006, 999, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 7251, 3540, 5403, 1007, 1007, 1063, 1002, 7251, 1027, 1002, 2023, 1011, 1028, 13354, 2378, 24805, 4590, 1011, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php
AutowirePass.autowireMethod
private function autowireMethod(\ReflectionFunctionAbstract $reflectionMethod, array $arguments): array { $class = $reflectionMethod instanceof \ReflectionMethod ? $reflectionMethod->class : $this->currentId; $method = $reflectionMethod->name; $parameters = $reflectionMethod->getParameters()...
php
private function autowireMethod(\ReflectionFunctionAbstract $reflectionMethod, array $arguments): array { $class = $reflectionMethod instanceof \ReflectionMethod ? $reflectionMethod->class : $this->currentId; $method = $reflectionMethod->name; $parameters = $reflectionMethod->getParameters()...
[ "private", "function", "autowireMethod", "(", "\\", "ReflectionFunctionAbstract", "$", "reflectionMethod", ",", "array", "$", "arguments", ")", ":", "array", "{", "$", "class", "=", "$", "reflectionMethod", "instanceof", "\\", "ReflectionMethod", "?", "$", "reflec...
Autowires the constructor or a method. @return array The autowired arguments @throws AutowiringFailedException
[ "Autowires", "the", "constructor", "or", "a", "method", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php#L189-L280
train
Autowires a method.
[ 30522, 2797, 3853, 8285, 20357, 11368, 6806, 2094, 1006, 1032, 9185, 11263, 27989, 7875, 20528, 6593, 1002, 9185, 11368, 6806, 2094, 1010, 9140, 1002, 9918, 1007, 1024, 9140, 1063, 1002, 2465, 1027, 1002, 9185, 11368, 6806, 2094, 6013, 1125...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Config/ConfigFileFinder.php
ConfigFileFinder.listFiles
public function listFiles(array $paths, $pattern = '|\.yaml$|', $levels = -1) { $list = []; foreach ($paths as $folder) { $list = array_merge_recursive($list, $this->detectAll($folder, $pattern, $levels)); } return $list; }
php
public function listFiles(array $paths, $pattern = '|\.yaml$|', $levels = -1) { $list = []; foreach ($paths as $folder) { $list = array_merge_recursive($list, $this->detectAll($folder, $pattern, $levels)); } return $list; }
[ "public", "function", "listFiles", "(", "array", "$", "paths", ",", "$", "pattern", "=", "'|\\.yaml$|'", ",", "$", "levels", "=", "-", "1", ")", "{", "$", "list", "=", "[", "]", ";", "foreach", "(", "$", "paths", "as", "$", "folder", ")", "{", "$...
Return all paths for all the files with a timestamp. @param array $paths List of folders to look from. @param string $pattern Pattern to match the file. Pattern will also be removed from the key. @param int $levels Maximum number of recursive directories. @return array
[ "Return", "all", "paths", "for", "all", "the", "files", "with", "a", "timestamp", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Config/ConfigFileFinder.php#L75-L82
train
Returns an array of all the language files in the given path
[ 30522, 2270, 3853, 2862, 8873, 4244, 1006, 9140, 1002, 10425, 1010, 1002, 5418, 1027, 1005, 1064, 1032, 1012, 8038, 19968, 1002, 1064, 1005, 1010, 1002, 3798, 1027, 1011, 1015, 1007, 1063, 1002, 2862, 1027, 1031, 1033, 1025, 18921, 6776, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
overtrue/wechat
src/OfficialAccount/Menu/Client.php
Client.create
public function create(array $buttons, array $matchRule = []) { if (!empty($matchRule)) { return $this->httpPostJson('cgi-bin/menu/addconditional', [ 'button' => $buttons, 'matchrule' => $matchRule, ]); } return $this->httpPostJson('cg...
php
public function create(array $buttons, array $matchRule = []) { if (!empty($matchRule)) { return $this->httpPostJson('cgi-bin/menu/addconditional', [ 'button' => $buttons, 'matchrule' => $matchRule, ]); } return $this->httpPostJson('cg...
[ "public", "function", "create", "(", "array", "$", "buttons", ",", "array", "$", "matchRule", "=", "[", "]", ")", "{", "if", "(", "!", "empty", "(", "$", "matchRule", ")", ")", "{", "return", "$", "this", "->", "httpPostJson", "(", "'cgi-bin/menu/addco...
Add menu. @param array $buttons @param array $matchRule @return mixed
[ "Add", "menu", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/Menu/Client.php#L51-L61
train
Create a menu
[ 30522, 2270, 3853, 3443, 1006, 9140, 1002, 11287, 1010, 9140, 1002, 2674, 6820, 2571, 1027, 1031, 1033, 1007, 1063, 2065, 1006, 999, 4064, 1006, 1002, 2674, 6820, 2571, 1007, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 8299, 19894, 22578, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Columns/Dimension.php
Dimension.configureSegments
protected function configureSegments() { if ($this->segmentName && $this->category && ($this->sqlSegment || ($this->columnName && $this->dbTableName)) && $this->nameSingular) { $segment = new Segment(); $this->addSegment($segment); } }
php
protected function configureSegments() { if ($this->segmentName && $this->category && ($this->sqlSegment || ($this->columnName && $this->dbTableName)) && $this->nameSingular) { $segment = new Segment(); $this->addSegment($segment); } }
[ "protected", "function", "configureSegments", "(", ")", "{", "if", "(", "$", "this", "->", "segmentName", "&&", "$", "this", "->", "category", "&&", "(", "$", "this", "->", "sqlSegment", "||", "(", "$", "this", "->", "columnName", "&&", "$", "this", "-...
Overwrite this method to configure segments. To do so just create an instance of a {@link \Piwik\Plugin\Segment} class, configure it and call the {@link addSegment()} method. You can add one or more segments for this dimension. Example: ``` $segment = new Segment(); $segment->setSegment('exitPageUrl'); $segment->setNa...
[ "Overwrite", "this", "method", "to", "configure", "segments", ".", "To", "do", "so", "just", "create", "an", "instance", "of", "a", "{", "@link", "\\", "Piwik", "\\", "Plugin", "\\", "Segment", "}", "class", "configure", "it", "and", "call", "the", "{", ...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Columns/Dimension.php#L474-L482
train
Configure the segments
[ 30522, 5123, 3853, 9530, 8873, 27390, 6810, 21693, 11187, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 6903, 18442, 1004, 1004, 1002, 2023, 1011, 1028, 4696, 1004, 1004, 1006, 1002, 2023, 1011, 1028, 29296, 3366, 21693, 4765, 1064,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Notifications/NotificationSender.php
NotificationSender.sendToNotifiable
protected function sendToNotifiable($notifiable, $id, $notification, $channel) { if (! $notification->id) { $notification->id = $id; } if (! $this->shouldSendNotification($notifiable, $notification, $channel)) { return; } $response = $this->manager->...
php
protected function sendToNotifiable($notifiable, $id, $notification, $channel) { if (! $notification->id) { $notification->id = $id; } if (! $this->shouldSendNotification($notifiable, $notification, $channel)) { return; } $response = $this->manager->...
[ "protected", "function", "sendToNotifiable", "(", "$", "notifiable", ",", "$", "id", ",", "$", "notification", ",", "$", "channel", ")", "{", "if", "(", "!", "$", "notification", "->", "id", ")", "{", "$", "notification", "->", "id", "=", "$", "id", ...
Send the given notification to the given notifiable via a channel. @param mixed $notifiable @param string $id @param mixed $notification @param string $channel @return void
[ "Send", "the", "given", "notification", "to", "the", "given", "notifiable", "via", "a", "channel", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Notifications/NotificationSender.php#L134-L149
train
Send a notification to a specific notifiable
[ 30522, 5123, 3853, 4604, 2669, 4140, 10128, 19210, 1006, 1002, 2025, 10128, 19210, 1010, 1002, 8909, 1010, 1002, 26828, 1010, 1002, 3149, 1007, 1063, 2065, 1006, 999, 1002, 26828, 1011, 1028, 8909, 1007, 1063, 1002, 26828, 1011, 1028, 8909,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/DependencyInjection/Compiler/Compiler.php
Compiler.compile
public function compile(ContainerBuilder $container) { try { foreach ($this->passConfig->getPasses() as $pass) { $pass->process($container); } } catch (\Exception $e) { $usedEnvs = []; $prev = $e; do { $msg ...
php
public function compile(ContainerBuilder $container) { try { foreach ($this->passConfig->getPasses() as $pass) { $pass->process($container); } } catch (\Exception $e) { $usedEnvs = []; $prev = $e; do { $msg ...
[ "public", "function", "compile", "(", "ContainerBuilder", "$", "container", ")", "{", "try", "{", "foreach", "(", "$", "this", "->", "passConfig", "->", "getPasses", "(", ")", "as", "$", "pass", ")", "{", "$", "pass", "->", "process", "(", "$", "contai...
Run the Compiler and process all Passes.
[ "Run", "the", "Compiler", "and", "process", "all", "Passes", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php#L91-L119
train
Compiles the message and returns the result of the process.
[ 30522, 2270, 3853, 4012, 22090, 1006, 11661, 8569, 23891, 2099, 1002, 11661, 1007, 1063, 3046, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 3413, 8663, 8873, 2290, 1011, 1028, 2131, 15194, 2229, 1006, 1007, 2004, 1002, 3413, 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...
symfony/symfony
src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php
TraceableEventDispatcher.addListener
public function addListener($eventName, $listener, $priority = 0) { $this->dispatcher->addListener($eventName, $listener, $priority); }
php
public function addListener($eventName, $listener, $priority = 0) { $this->dispatcher->addListener($eventName, $listener, $priority); }
[ "public", "function", "addListener", "(", "$", "eventName", ",", "$", "listener", ",", "$", "priority", "=", "0", ")", "{", "$", "this", "->", "dispatcher", "->", "addListener", "(", "$", "eventName", ",", "$", "listener", ",", "$", "priority", ")", ";...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php#L58-L61
train
Adds a listener to the event dispatcher
[ 30522, 2270, 3853, 5587, 9863, 24454, 1006, 1002, 2724, 18442, 1010, 1002, 19373, 1010, 1002, 9470, 1027, 1014, 1007, 1063, 1002, 2023, 1011, 1028, 18365, 2121, 1011, 1028, 5587, 9863, 24454, 1006, 1002, 2724, 18442, 1010, 1002, 19373, 1010...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php
PostgresGrammar.compileCreate
public function compileCreate(Blueprint $blueprint, Fluent $command) { return sprintf('%s table %s (%s)', $blueprint->temporary ? 'create temporary' : 'create', $this->wrapTable($blueprint), implode(', ', $this->getColumns($blueprint)) ); }
php
public function compileCreate(Blueprint $blueprint, Fluent $command) { return sprintf('%s table %s (%s)', $blueprint->temporary ? 'create temporary' : 'create', $this->wrapTable($blueprint), implode(', ', $this->getColumns($blueprint)) ); }
[ "public", "function", "compileCreate", "(", "Blueprint", "$", "blueprint", ",", "Fluent", "$", "command", ")", "{", "return", "sprintf", "(", "'%s table %s (%s)'", ",", "$", "blueprint", "->", "temporary", "?", "'create temporary'", ":", "'create'", ",", "$", ...
Compile a create table command. @param \Illuminate\Database\Schema\Blueprint $blueprint @param \Illuminate\Support\Fluent $command @return string
[ "Compile", "a", "create", "table", "command", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php#L65-L72
train
Compiles create statement
[ 30522, 2270, 3853, 4012, 22090, 16748, 3686, 1006, 2630, 16550, 1002, 2630, 16550, 1010, 19376, 1002, 3094, 1007, 1063, 2709, 9043, 2546, 1006, 1005, 1003, 1055, 2795, 1003, 1055, 1006, 1003, 1055, 1007, 1005, 1010, 1002, 2630, 16550, 1011,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Form/Tab.php
Tab.append
public function append($title, \Closure $content, $active = false) { $fields = $this->collectFields($content); $id = 'form-'.($this->tabs->count() + 1); $this->tabs->push(compact('id', 'title', 'fields', 'active')); return $this; }
php
public function append($title, \Closure $content, $active = false) { $fields = $this->collectFields($content); $id = 'form-'.($this->tabs->count() + 1); $this->tabs->push(compact('id', 'title', 'fields', 'active')); return $this; }
[ "public", "function", "append", "(", "$", "title", ",", "\\", "Closure", "$", "content", ",", "$", "active", "=", "false", ")", "{", "$", "fields", "=", "$", "this", "->", "collectFields", "(", "$", "content", ")", ";", "$", "id", "=", "'form-'", "...
Append a tab section. @param string $title @param \Closure $content @param bool $active @return $this
[ "Append", "a", "tab", "section", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Form/Tab.php#L46-L55
train
Append a new tab to the list of tabs
[ 30522, 2270, 3853, 10439, 10497, 1006, 1002, 2516, 1010, 1032, 8503, 1002, 4180, 1010, 1002, 3161, 1027, 6270, 1007, 1063, 1002, 4249, 1027, 1002, 2023, 1011, 1028, 8145, 15155, 1006, 1002, 4180, 1007, 1025, 1002, 8909, 1027, 1005, 2433, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/models/Parameter.php
Parameter.afterSave
public function afterSave() { Cache::forget(implode('-', [$this->table, $this->namespace, $this->group, $this->item])); }
php
public function afterSave() { Cache::forget(implode('-', [$this->table, $this->namespace, $this->group, $this->item])); }
[ "public", "function", "afterSave", "(", ")", "{", "Cache", "::", "forget", "(", "implode", "(", "'-'", ",", "[", "$", "this", "->", "table", ",", "$", "this", "->", "namespace", ",", "$", "this", "->", "group", ",", "$", "this", "->", "item", "]", ...
Clear the cache after saving.
[ "Clear", "the", "cache", "after", "saving", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/models/Parameter.php#L34-L37
train
After save callback
[ 30522, 2270, 3853, 2044, 3736, 3726, 1006, 1007, 1063, 17053, 1024, 1024, 5293, 1006, 17727, 4135, 3207, 1006, 1005, 1011, 1005, 1010, 1031, 1002, 2023, 1011, 1028, 2795, 1010, 1002, 2023, 1011, 1028, 3415, 15327, 1010, 1002, 2023, 1011, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
php-ai/php-ml
src/DimensionReduction/LDA.php
LDA.calculateVar
protected function calculateVar(array $row, array $means): Matrix { $x = new Matrix($row, false); $m = new Matrix($means, false); $diff = $x->subtract($m); return $diff->transpose()->multiply($diff); }
php
protected function calculateVar(array $row, array $means): Matrix { $x = new Matrix($row, false); $m = new Matrix($means, false); $diff = $x->subtract($m); return $diff->transpose()->multiply($diff); }
[ "protected", "function", "calculateVar", "(", "array", "$", "row", ",", "array", "$", "means", ")", ":", "Matrix", "{", "$", "x", "=", "new", "Matrix", "(", "$", "row", ",", "false", ")", ";", "$", "m", "=", "new", "Matrix", "(", "$", "means", ",...
Returns the result of the calculation (x - m)T.(x - m)
[ "Returns", "the", "result", "of", "the", "calculation", "(", "x", "-", "m", ")", "T", ".", "(", "x", "-", "m", ")" ]
f6aa1a59b0525b8fca3d2786d661ab3e70904016
https://github.com/php-ai/php-ml/blob/f6aa1a59b0525b8fca3d2786d661ab3e70904016/src/DimensionReduction/LDA.php#L215-L222
train
Calculates the formula for the given row and means.
[ 30522, 5123, 3853, 18422, 10755, 1006, 9140, 1002, 5216, 1010, 9140, 1002, 2965, 1007, 1024, 8185, 1063, 1002, 1060, 1027, 2047, 8185, 1006, 1002, 5216, 1010, 6270, 1007, 1025, 1002, 1049, 1027, 2047, 8185, 1006, 1002, 2965, 1010, 6270, 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...
overtrue/wechat
src/OfficialAccount/Broadcasting/Client.php
Client.send
public function send(array $message) { if (empty($message['filter']) && empty($message['touser'])) { throw new RuntimeException('The message reception object is not specified'); } $api = Arr::get($message, 'touser') ? 'cgi-bin/message/mass/send' : 'cgi-bin/message/mass/sendall';...
php
public function send(array $message) { if (empty($message['filter']) && empty($message['touser'])) { throw new RuntimeException('The message reception object is not specified'); } $api = Arr::get($message, 'touser') ? 'cgi-bin/message/mass/send' : 'cgi-bin/message/mass/sendall';...
[ "public", "function", "send", "(", "array", "$", "message", ")", "{", "if", "(", "empty", "(", "$", "message", "[", "'filter'", "]", ")", "&&", "empty", "(", "$", "message", "[", "'touser'", "]", ")", ")", "{", "throw", "new", "RuntimeException", "("...
Send a message. @param array $message @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\RuntimeException @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
[ "Send", "a", "message", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/Broadcasting/Client.php#L56-L65
train
Send mass message
[ 30522, 2270, 3853, 4604, 1006, 9140, 1002, 4471, 1007, 1063, 2065, 1006, 4064, 1006, 1002, 4471, 1031, 1005, 11307, 1005, 1033, 1007, 1004, 1004, 4064, 1006, 1002, 4471, 1031, 1005, 2000, 20330, 1005, 1033, 1007, 1007, 1063, 5466, 2047, 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...
laravel/framework
src/Illuminate/Container/Container.php
Container.resolved
public function resolved($abstract) { if ($this->isAlias($abstract)) { $abstract = $this->getAlias($abstract); } return isset($this->resolved[$abstract]) || isset($this->instances[$abstract]); }
php
public function resolved($abstract) { if ($this->isAlias($abstract)) { $abstract = $this->getAlias($abstract); } return isset($this->resolved[$abstract]) || isset($this->instances[$abstract]); }
[ "public", "function", "resolved", "(", "$", "abstract", ")", "{", "if", "(", "$", "this", "->", "isAlias", "(", "$", "abstract", ")", ")", "{", "$", "abstract", "=", "$", "this", "->", "getAlias", "(", "$", "abstract", ")", ";", "}", "return", "iss...
Determine if the given abstract type has been resolved. @param string $abstract @return bool
[ "Determine", "if", "the", "given", "abstract", "type", "has", "been", "resolved", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Container/Container.php#L180-L188
train
Check if an abstract has been resolved
[ 30522, 2270, 3853, 10395, 1006, 1002, 10061, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 18061, 6632, 2015, 1006, 1002, 10061, 1007, 1007, 1063, 1002, 10061, 1027, 1002, 2023, 1011, 1028, 2131, 22786, 2015, 1006, 1002, 10061, 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...
laravel/framework
src/Illuminate/Http/Concerns/InteractsWithFlashData.php
InteractsWithFlashData.old
public function old($key = null, $default = null) { return $this->hasSession() ? $this->session()->getOldInput($key, $default) : $default; }
php
public function old($key = null, $default = null) { return $this->hasSession() ? $this->session()->getOldInput($key, $default) : $default; }
[ "public", "function", "old", "(", "$", "key", "=", "null", ",", "$", "default", "=", "null", ")", "{", "return", "$", "this", "->", "hasSession", "(", ")", "?", "$", "this", "->", "session", "(", ")", "->", "getOldInput", "(", "$", "key", ",", "$...
Retrieve an old input item. @param string $key @param string|array|null $default @return string|array
[ "Retrieve", "an", "old", "input", "item", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Http/Concerns/InteractsWithFlashData.php#L14-L17
train
Get old input value
[ 30522, 2270, 3853, 2214, 1006, 1002, 3145, 1027, 19701, 1010, 1002, 12398, 1027, 19701, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 2038, 8583, 10992, 1006, 1007, 1029, 1002, 2023, 1011, 1028, 5219, 1006, 1007, 1011, 1028, 2131, 11614, 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...
overtrue/wechat
src/OfficialAccount/Card/Client.php
Client.update
public function update($cardId, $type, array $attributes = []) { $card = []; $card['card_id'] = $cardId; $card[strtolower($type)] = $attributes; return $this->httpPostJson('card/update', $card); }
php
public function update($cardId, $type, array $attributes = []) { $card = []; $card['card_id'] = $cardId; $card[strtolower($type)] = $attributes; return $this->httpPostJson('card/update', $card); }
[ "public", "function", "update", "(", "$", "cardId", ",", "$", "type", ",", "array", "$", "attributes", "=", "[", "]", ")", "{", "$", "card", "=", "[", "]", ";", "$", "card", "[", "'card_id'", "]", "=", "$", "cardId", ";", "$", "card", "[", "str...
更改卡券信息接口 and 设置跟随推荐接口. @param string $cardId @param string $type @param array $attributes @return mixed
[ "更改卡券信息接口", "and", "设置跟随推荐接口", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/Card/Client.php#L130-L137
train
Update a card
[ 30522, 2270, 3853, 10651, 1006, 1002, 4003, 3593, 1010, 1002, 2828, 1010, 9140, 1002, 12332, 1027, 1031, 1033, 1007, 1063, 1002, 4003, 1027, 1031, 1033, 1025, 1002, 4003, 1031, 1005, 4003, 1035, 8909, 1005, 1033, 1027, 1002, 4003, 3593, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/DataTable/Filter/ColumnCallbackDeleteRow.php
ColumnCallbackDeleteRow.filter
public function filter($table) { foreach ($table->getRows() as $key => $row) { $params = array(); foreach ($this->columnsToFilter as $column) { $params[] = $row->getColumn($column); } $params = array_merge($params, $this->functionParams); ...
php
public function filter($table) { foreach ($table->getRows() as $key => $row) { $params = array(); foreach ($this->columnsToFilter as $column) { $params[] = $row->getColumn($column); } $params = array_merge($params, $this->functionParams); ...
[ "public", "function", "filter", "(", "$", "table", ")", "{", "foreach", "(", "$", "table", "->", "getRows", "(", ")", "as", "$", "key", "=>", "$", "row", ")", "{", "$", "params", "=", "array", "(", ")", ";", "foreach", "(", "$", "this", "->", "...
Filters the given data table @param DataTable $table
[ "Filters", "the", "given", "data", "table" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataTable/Filter/ColumnCallbackDeleteRow.php#L64-L79
train
Filter the table rows and apply the filter function to all columns
[ 30522, 2270, 3853, 11307, 1006, 1002, 2795, 1007, 1063, 18921, 6776, 1006, 1002, 2795, 1011, 1028, 2131, 10524, 2015, 1006, 1007, 2004, 1002, 3145, 1027, 1028, 1002, 5216, 1007, 1063, 1002, 11498, 5244, 1027, 9140, 1006, 1007, 1025, 18921, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...