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/Support/Str.php
Str.limit
public static function limit($value, $limit = 100, $end = '...') { if (mb_strwidth($value, 'UTF-8') <= $limit) { return $value; } return rtrim(mb_strimwidth($value, 0, $limit, '', 'UTF-8')).$end; }
php
public static function limit($value, $limit = 100, $end = '...') { if (mb_strwidth($value, 'UTF-8') <= $limit) { return $value; } return rtrim(mb_strimwidth($value, 0, $limit, '', 'UTF-8')).$end; }
[ "public", "static", "function", "limit", "(", "$", "value", ",", "$", "limit", "=", "100", ",", "$", "end", "=", "'...'", ")", "{", "if", "(", "mb_strwidth", "(", "$", "value", ",", "'UTF-8'", ")", "<=", "$", "limit", ")", "{", "return", "$", "va...
Limit the number of characters in a string. @param string $value @param int $limit @param string $end @return string
[ "Limit", "the", "number", "of", "characters", "in", "a", "string", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Support/Str.php#L220-L227
train
Limit the length of a string to a maximum length
[ 30522, 2270, 10763, 3853, 5787, 1006, 1002, 3643, 1010, 1002, 5787, 1027, 2531, 1010, 1002, 2203, 1027, 1005, 1012, 1012, 1012, 1005, 1007, 1063, 2065, 1006, 16914, 1035, 2358, 2099, 9148, 11927, 2232, 1006, 1002, 3643, 1010, 1005, 21183, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
walkor/Workerman
Protocols/Websocket.php
Websocket.decode
public static function decode($buffer, ConnectionInterface $connection) { $masks = $data = $decoded = ''; $len = ord($buffer[1]) & 127; if ($len === 126) { $masks = substr($buffer, 4, 4); $data = substr($buffer, 8); } else { if ($len === 127) { ...
php
public static function decode($buffer, ConnectionInterface $connection) { $masks = $data = $decoded = ''; $len = ord($buffer[1]) & 127; if ($len === 126) { $masks = substr($buffer, 4, 4); $data = substr($buffer, 8); } else { if ($len === 127) { ...
[ "public", "static", "function", "decode", "(", "$", "buffer", ",", "ConnectionInterface", "$", "connection", ")", "{", "$", "masks", "=", "$", "data", "=", "$", "decoded", "=", "''", ";", "$", "len", "=", "ord", "(", "$", "buffer", "[", "1", "]", "...
Websocket decode. @param string $buffer @param ConnectionInterface $connection @return string
[ "Websocket", "decode", "." ]
13649907f05014fcfffcfccaef01e63ad3339351
https://github.com/walkor/Workerman/blob/13649907f05014fcfffcfccaef01e63ad3339351/Protocols/Websocket.php#L305-L334
train
Decodes the data received from the server into a string
[ 30522, 2270, 10763, 3853, 21933, 3207, 1006, 1002, 17698, 1010, 4434, 18447, 2121, 12172, 1002, 4434, 1007, 1063, 1002, 15806, 1027, 1002, 2951, 1027, 1002, 21933, 5732, 1027, 1005, 1005, 1025, 1002, 18798, 1027, 2030, 2094, 1006, 1002, 176...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Process/PhpExecutableFinder.php
PhpExecutableFinder.find
public function find($includeArgs = true) { if ($php = getenv('PHP_BINARY')) { if (!is_executable($php)) { $command = '\\' === \DIRECTORY_SEPARATOR ? 'where' : 'command -v'; if ($php = strtok(exec($command.' '.escapeshellarg($php)), PHP_EOL)) { ...
php
public function find($includeArgs = true) { if ($php = getenv('PHP_BINARY')) { if (!is_executable($php)) { $command = '\\' === \DIRECTORY_SEPARATOR ? 'where' : 'command -v'; if ($php = strtok(exec($command.' '.escapeshellarg($php)), PHP_EOL)) { ...
[ "public", "function", "find", "(", "$", "includeArgs", "=", "true", ")", "{", "if", "(", "$", "php", "=", "getenv", "(", "'PHP_BINARY'", ")", ")", "{", "if", "(", "!", "is_executable", "(", "$", "php", ")", ")", "{", "$", "command", "=", "'\\\\'", ...
Finds The PHP executable. @param bool $includeArgs Whether or not include command arguments @return string|false The PHP executable path or false if it cannot be found
[ "Finds", "The", "PHP", "executable", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Process/PhpExecutableFinder.php#L36-L85
train
Find the current executable
[ 30522, 2270, 3853, 2424, 1006, 1002, 2421, 2906, 5620, 1027, 2995, 1007, 1063, 2065, 1006, 1002, 25718, 1027, 2131, 2368, 2615, 1006, 1005, 25718, 1035, 12441, 1005, 1007, 1007, 1063, 2065, 1006, 999, 2003, 1035, 4654, 8586, 23056, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Eloquent/Builder.php
Builder.groupWhereSliceForScope
protected function groupWhereSliceForScope(QueryBuilder $query, $whereSlice) { $whereBooleans = collect($whereSlice)->pluck('boolean'); // Here we'll check if the given subset of where clauses contains any "or" // booleans and in this case create a nested where expression. That way ...
php
protected function groupWhereSliceForScope(QueryBuilder $query, $whereSlice) { $whereBooleans = collect($whereSlice)->pluck('boolean'); // Here we'll check if the given subset of where clauses contains any "or" // booleans and in this case create a nested where expression. That way ...
[ "protected", "function", "groupWhereSliceForScope", "(", "QueryBuilder", "$", "query", ",", "$", "whereSlice", ")", "{", "$", "whereBooleans", "=", "collect", "(", "$", "whereSlice", ")", "->", "pluck", "(", "'boolean'", ")", ";", "// Here we'll check if the given...
Slice where conditions at the given offset and add them to the query as a nested condition. @param \Illuminate\Database\Query\Builder $query @param array $whereSlice @return void
[ "Slice", "where", "conditions", "at", "the", "given", "offset", "and", "add", "them", "to", "the", "query", "as", "a", "nested", "condition", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Builder.php#L1043-L1057
train
Group where clauses by scope
[ 30522, 5123, 3853, 2177, 2860, 5886, 2229, 13231, 29278, 26127, 1006, 23032, 8569, 23891, 2099, 1002, 23032, 1010, 1002, 2073, 14540, 6610, 1007, 1063, 1002, 2073, 5092, 9890, 6962, 1027, 8145, 1006, 1002, 2073, 14540, 6610, 1007, 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...
laravel/framework
src/Illuminate/Mail/PendingMail.php
PendingMail.later
public function later($delay, MailableContract $mailable) { return $this->mailer->later($delay, $this->fill($mailable)); }
php
public function later($delay, MailableContract $mailable) { return $this->mailer->later($delay, $this->fill($mailable)); }
[ "public", "function", "later", "(", "$", "delay", ",", "MailableContract", "$", "mailable", ")", "{", "return", "$", "this", "->", "mailer", "->", "later", "(", "$", "delay", ",", "$", "this", "->", "fill", "(", "$", "mailable", ")", ")", ";", "}" ]
Deliver the queued message after the given delay. @param \DateTimeInterface|\DateInterval|int $delay @param \Illuminate\Contracts\Mail\Mailable $mailable; @return mixed
[ "Deliver", "the", "queued", "message", "after", "the", "given", "delay", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Mail/PendingMail.php#L165-L168
train
Create a new message in the future with the given delay.
[ 30522, 2270, 3853, 2101, 1006, 1002, 8536, 1010, 5653, 3085, 8663, 6494, 6593, 1002, 5653, 3085, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 5653, 2121, 1011, 1028, 2101, 1006, 1002, 8536, 1010, 1002, 2023, 1011, 1028, 6039, 1006, 1002, 565...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Mail.php
Zend_Mail.setType
public function setType($type) { $allowed = array( Zend_Mime::MULTIPART_ALTERNATIVE, Zend_Mime::MULTIPART_MIXED, Zend_Mime::MULTIPART_RELATED, ); if (!in_array($type, $allowed)) { /** * @see Zend_Mail_Exception */ ...
php
public function setType($type) { $allowed = array( Zend_Mime::MULTIPART_ALTERNATIVE, Zend_Mime::MULTIPART_MIXED, Zend_Mime::MULTIPART_RELATED, ); if (!in_array($type, $allowed)) { /** * @see Zend_Mail_Exception */ ...
[ "public", "function", "setType", "(", "$", "type", ")", "{", "$", "allowed", "=", "array", "(", "Zend_Mime", "::", "MULTIPART_ALTERNATIVE", ",", "Zend_Mime", "::", "MULTIPART_MIXED", ",", "Zend_Mime", "::", "MULTIPART_RELATED", ",", ")", ";", "if", "(", "!",...
Set content type Should only be used for manually setting multipart content types. @param string $type Content type @return Zend_Mail Implements fluent interface @throws Zend_Mail_Exception for types not supported by Zend_Mime
[ "Set", "content", "type" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail.php#L240-L257
train
Set content type
[ 30522, 2270, 3853, 2275, 13874, 1006, 1002, 2828, 1007, 1063, 1002, 3039, 1027, 9140, 1006, 16729, 2094, 1035, 2771, 4168, 1024, 1024, 4800, 19362, 2102, 1035, 4522, 1010, 16729, 2094, 1035, 2771, 4168, 1024, 1024, 4800, 19362, 2102, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Framework/Collection/AbstractIndexCollection.php
AbstractIndexCollection.last
public function last() { $value = end($this->entries); $key = key($this->entries); return $this->loadElement($key, $value); }
php
public function last() { $value = end($this->entries); $key = key($this->entries); return $this->loadElement($key, $value); }
[ "public", "function", "last", "(", ")", "{", "$", "value", "=", "end", "(", "$", "this", "->", "entries", ")", ";", "$", "key", "=", "key", "(", "$", "this", "->", "entries", ")", ";", "return", "$", "this", "->", "loadElement", "(", "$", "key", ...
{@inheritDoc}
[ "{" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Framework/Collection/AbstractIndexCollection.php#L55-L61
train
Return the last element in the list
[ 30522, 2270, 3853, 2197, 1006, 1007, 1063, 1002, 3643, 1027, 2203, 1006, 1002, 2023, 1011, 1028, 10445, 1007, 1025, 1002, 3145, 1027, 3145, 1006, 1002, 2023, 1011, 1028, 10445, 1007, 1025, 2709, 1002, 2023, 1011, 1028, 7170, 12260, 3672, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.retryMiddleware
protected function retryMiddleware() { return Middleware::retry(function ( $retries, RequestInterface $request, ResponseInterface $response = null ) { // Limit the number of retries to 2 if ($retries < $this->app->config->get('http.max_retr...
php
protected function retryMiddleware() { return Middleware::retry(function ( $retries, RequestInterface $request, ResponseInterface $response = null ) { // Limit the number of retries to 2 if ($retries < $this->app->config->get('http.max_retr...
[ "protected", "function", "retryMiddleware", "(", ")", "{", "return", "Middleware", "::", "retry", "(", "function", "(", "$", "retries", ",", "RequestInterface", "$", "request", ",", "ResponseInterface", "$", "response", "=", "null", ")", "{", "// Limit the numbe...
Return retry middleware. @return \Closure
[ "Return", "retry", "middleware", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Kernel/BaseClient.php#L237-L261
train
Retry middleware for HTTP requests
[ 30522, 5123, 3853, 2128, 11129, 4328, 20338, 8059, 1006, 1007, 1063, 2709, 2690, 8059, 1024, 1024, 2128, 11129, 1006, 3853, 1006, 1002, 2128, 21011, 1010, 5227, 18447, 2121, 12172, 1002, 5227, 1010, 3433, 18447, 2121, 12172, 1002, 3433, 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/Cache/Simple/PhpArrayCache.php
PhpArrayCache.setMultiple
public function setMultiple($values, $ttl = null) { if (!\is_array($values) && !$values instanceof \Traversable) { throw new InvalidArgumentException(sprintf('Cache values must be array or Traversable, "%s" given', \is_object($values) ? \get_class($values) : \gettype($values))); } ...
php
public function setMultiple($values, $ttl = null) { if (!\is_array($values) && !$values instanceof \Traversable) { throw new InvalidArgumentException(sprintf('Cache values must be array or Traversable, "%s" given', \is_object($values) ? \get_class($values) : \gettype($values))); } ...
[ "public", "function", "setMultiple", "(", "$", "values", ",", "$", "ttl", "=", "null", ")", "{", "if", "(", "!", "\\", "is_array", "(", "$", "values", ")", "&&", "!", "$", "values", "instanceof", "\\", "Traversable", ")", "{", "throw", "new", "Invali...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Cache/Simple/PhpArrayCache.php#L192-L218
train
Set multiple cache values
[ 30522, 2270, 3853, 2275, 12274, 7096, 11514, 2571, 1006, 1002, 5300, 1010, 1002, 23746, 2140, 1027, 19701, 1007, 1063, 2065, 1006, 999, 1032, 2003, 1035, 9140, 1006, 1002, 5300, 1007, 1004, 1004, 999, 1002, 5300, 6013, 11253, 1032, 29053, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Lock/Store/ZookeeperStore.php
ZookeeperStore.exists
public function exists(Key $key): bool { $resource = $this->getKeyResource($key); try { return $this->zookeeper->get($resource) === $this->getUniqueToken($key); } catch (\ZookeeperException $ex) { return false; } }
php
public function exists(Key $key): bool { $resource = $this->getKeyResource($key); try { return $this->zookeeper->get($resource) === $this->getUniqueToken($key); } catch (\ZookeeperException $ex) { return false; } }
[ "public", "function", "exists", "(", "Key", "$", "key", ")", ":", "bool", "{", "$", "resource", "=", "$", "this", "->", "getKeyResource", "(", "$", "key", ")", ";", "try", "{", "return", "$", "this", "->", "zookeeper", "->", "get", "(", "$", "resou...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Lock/Store/ZookeeperStore.php#L71-L79
train
Checks if a key exists in the zookeeper.
[ 30522, 2270, 3853, 6526, 1006, 3145, 1002, 3145, 1007, 1024, 22017, 2140, 1063, 1002, 7692, 1027, 1002, 2023, 1011, 1028, 2131, 14839, 6072, 8162, 3401, 1006, 1002, 3145, 1007, 1025, 3046, 1063, 2709, 1002, 2023, 1011, 1028, 9201, 13106, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.php
HTML_QuickForm2_Renderer.getJavascriptBuilder
public function getJavascriptBuilder() { if (empty($this->jsBuilder)) { if (!class_exists('HTML_QuickForm2_JavascriptBuilder')) { HTML_QuickForm2_Loader::loadClass('HTML_QuickForm2_JavascriptBuilder'); } $this->jsBuilder = new HTML_QuickForm2_JavascriptBui...
php
public function getJavascriptBuilder() { if (empty($this->jsBuilder)) { if (!class_exists('HTML_QuickForm2_JavascriptBuilder')) { HTML_QuickForm2_Loader::loadClass('HTML_QuickForm2_JavascriptBuilder'); } $this->jsBuilder = new HTML_QuickForm2_JavascriptBui...
[ "public", "function", "getJavascriptBuilder", "(", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "jsBuilder", ")", ")", "{", "if", "(", "!", "class_exists", "(", "'HTML_QuickForm2_JavascriptBuilder'", ")", ")", "{", "HTML_QuickForm2_Loader", "::", "loa...
Returns the javascript builder object @return HTML_QuickForm2_JavascriptBuilder
[ "Returns", "the", "javascript", "builder", "object" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Renderer.php#L285-L294
train
Get the javascript builder
[ 30522, 2270, 3853, 2131, 3900, 12044, 23235, 8569, 23891, 2099, 1006, 1007, 1063, 2065, 1006, 4064, 1006, 1002, 2023, 1011, 1028, 1046, 19022, 19231, 4063, 1007, 1007, 1063, 2065, 1006, 999, 2465, 1035, 6526, 1006, 1005, 16129, 1035, 4248, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/App.php
App.subRequest
public function subRequest( $method, $path, $query = '', array $headers = [], array $cookies = [], $bodyContent = '', ResponseInterface $response = null ) { $env = $this->container->get('environment'); $uri = Uri::createFromEnvironment($env)->w...
php
public function subRequest( $method, $path, $query = '', array $headers = [], array $cookies = [], $bodyContent = '', ResponseInterface $response = null ) { $env = $this->container->get('environment'); $uri = Uri::createFromEnvironment($env)->w...
[ "public", "function", "subRequest", "(", "$", "method", ",", "$", "path", ",", "$", "query", "=", "''", ",", "array", "$", "headers", "=", "[", "]", ",", "array", "$", "cookies", "=", "[", "]", ",", "$", "bodyContent", "=", "''", ",", "ResponseInte...
Perform a sub-request from within an application route This method allows you to prepare and initiate a sub-request, run within the context of the current request. This WILL NOT issue a remote HTTP request. Instead, it will route the provided URL, method, headers, cookies, body, and server variables against the set of...
[ "Perform", "a", "sub", "-", "request", "from", "within", "an", "application", "route" ]
ccef5f7d8bcd469d59cbe64f6210d83764f91543
https://github.com/slimphp/Slim/blob/ccef5f7d8bcd469d59cbe64f6210d83764f91543/Slim/App.php#L543-L566
train
SubRequest - Request to the application
[ 30522, 2270, 3853, 4942, 2890, 15500, 1006, 1002, 4118, 1010, 1002, 4130, 1010, 1002, 23032, 1027, 1005, 1005, 1010, 9140, 1002, 20346, 2015, 1027, 1031, 1033, 1010, 9140, 1002, 16324, 1027, 1031, 1033, 1010, 1002, 2303, 8663, 6528, 2102, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
walkor/Workerman
Connection/TcpConnection.php
TcpConnection.getLocalIp
public function getLocalIp() { $address = $this->getLocalAddress(); $pos = strrpos($address, ':'); if (!$pos) { return ''; } return substr($address, 0, $pos); }
php
public function getLocalIp() { $address = $this->getLocalAddress(); $pos = strrpos($address, ':'); if (!$pos) { return ''; } return substr($address, 0, $pos); }
[ "public", "function", "getLocalIp", "(", ")", "{", "$", "address", "=", "$", "this", "->", "getLocalAddress", "(", ")", ";", "$", "pos", "=", "strrpos", "(", "$", "address", ",", "':'", ")", ";", "if", "(", "!", "$", "pos", ")", "{", "return", "'...
Get local IP. @return string
[ "Get", "local", "IP", "." ]
13649907f05014fcfffcfccaef01e63ad3339351
https://github.com/walkor/Workerman/blob/13649907f05014fcfffcfccaef01e63ad3339351/Connection/TcpConnection.php#L462-L470
train
Get local ip
[ 30522, 2270, 3853, 2131, 4135, 9289, 11514, 1006, 1007, 1063, 1002, 4769, 1027, 1002, 2023, 1011, 1028, 2131, 30524, 2709, 4942, 3367, 2099, 1006, 1002, 4769, 1010, 1014, 1010, 1002, 13433, 2015, 1007, 1025, 1065, 102, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/widgets/Lists.php
Lists.getSortableColumns
protected function getSortableColumns() { if ($this->sortableColumns !== null) { return $this->sortableColumns; } $columns = $this->getColumns(); $sortable = array_filter($columns, function ($column) { return $column->sortable; }); return $th...
php
protected function getSortableColumns() { if ($this->sortableColumns !== null) { return $this->sortableColumns; } $columns = $this->getColumns(); $sortable = array_filter($columns, function ($column) { return $column->sortable; }); return $th...
[ "protected", "function", "getSortableColumns", "(", ")", "{", "if", "(", "$", "this", "->", "sortableColumns", "!==", "null", ")", "{", "return", "$", "this", "->", "sortableColumns", ";", "}", "$", "columns", "=", "$", "this", "->", "getColumns", "(", "...
Returns a collection of columns which are sortable.
[ "Returns", "a", "collection", "of", "columns", "which", "are", "sortable", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/widgets/Lists.php#L1553-L1565
train
Get the columns sortable
[ 30522, 5123, 3853, 4152, 11589, 3085, 25778, 2819, 3619, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 4066, 3085, 25778, 2819, 3619, 999, 1027, 1027, 19701, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 4066, 3085, 25778, 2819, 3619, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Console/Helper/Table.php
Table.render
public function render() { $rows = array_merge($this->headers, [$divider = new TableSeparator()], $this->rows); $this->calculateNumberOfColumns($rows); $rows = $this->buildTableRows($rows); $this->calculateColumnsWidth($rows); $isHeader = true; $isFirstRow = false; ...
php
public function render() { $rows = array_merge($this->headers, [$divider = new TableSeparator()], $this->rows); $this->calculateNumberOfColumns($rows); $rows = $this->buildTableRows($rows); $this->calculateColumnsWidth($rows); $isHeader = true; $isFirstRow = false; ...
[ "public", "function", "render", "(", ")", "{", "$", "rows", "=", "array_merge", "(", "$", "this", "->", "headers", ",", "[", "$", "divider", "=", "new", "TableSeparator", "(", ")", "]", ",", "$", "this", "->", "rows", ")", ";", "$", "this", "->", ...
Renders table to output. Example: +---------------+-----------------------+------------------+ | ISBN | Title | Author | +---------------+-----------------------+------------------+ | 99921-58-10-7 | Divine Comedy | Dante Alighieri | | 9971-5-0210-0 | A Tale of Two Cities ...
[ "Renders", "table", "to", "output", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Helper/Table.php#L341-L382
train
Render the table
[ 30522, 2270, 3853, 17552, 1006, 1007, 1063, 1002, 10281, 1027, 9140, 1035, 13590, 1006, 1002, 2023, 1011, 1028, 20346, 2015, 1010, 1031, 1002, 11443, 2099, 1027, 2047, 7251, 13699, 25879, 2953, 1006, 1007, 1033, 1010, 1002, 2023, 1011, 1028...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Security/Core/Encoder/EncoderFactory.php
EncoderFactory.createEncoder
private function createEncoder(array $config) { if (isset($config['algorithm'])) { $config = $this->getEncoderConfigFromAlgorithm($config); } if (!isset($config['class'])) { throw new \InvalidArgumentException(sprintf('"class" must be set in %s.', json_encode($config)...
php
private function createEncoder(array $config) { if (isset($config['algorithm'])) { $config = $this->getEncoderConfigFromAlgorithm($config); } if (!isset($config['class'])) { throw new \InvalidArgumentException(sprintf('"class" must be set in %s.', json_encode($config)...
[ "private", "function", "createEncoder", "(", "array", "$", "config", ")", "{", "if", "(", "isset", "(", "$", "config", "[", "'algorithm'", "]", ")", ")", "{", "$", "config", "=", "$", "this", "->", "getEncoderConfigFromAlgorithm", "(", "$", "config", ")"...
Creates the actual encoder instance. @return PasswordEncoderInterface @throws \InvalidArgumentException
[ "Creates", "the", "actual", "encoder", "instance", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Security/Core/Encoder/EncoderFactory.php#L68-L83
train
Creates an encoder from the given configuration
[ 30522, 2797, 3853, 3443, 2368, 16044, 2099, 1006, 9140, 1002, 9530, 8873, 2290, 1007, 1063, 2065, 1006, 26354, 3388, 1006, 1002, 9530, 8873, 2290, 1031, 1005, 9896, 1005, 1033, 1007, 1007, 1063, 1002, 9530, 8873, 2290, 30524, 1007, 1063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/system/models/MailTemplate.php
MailTemplate.listAllTemplates
public static function listAllTemplates() { $fileTemplates = (array) MailManager::instance()->listRegisteredTemplates(); $dbTemplates = (array) self::lists('code', 'code'); $templates = $fileTemplates + $dbTemplates; ksort($templates); return $templates; }
php
public static function listAllTemplates() { $fileTemplates = (array) MailManager::instance()->listRegisteredTemplates(); $dbTemplates = (array) self::lists('code', 'code'); $templates = $fileTemplates + $dbTemplates; ksort($templates); return $templates; }
[ "public", "static", "function", "listAllTemplates", "(", ")", "{", "$", "fileTemplates", "=", "(", "array", ")", "MailManager", "::", "instance", "(", ")", "->", "listRegisteredTemplates", "(", ")", ";", "$", "dbTemplates", "=", "(", "array", ")", "self", ...
Returns an array of template codes and descriptions. @return array
[ "Returns", "an", "array", "of", "template", "codes", "and", "descriptions", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/models/MailTemplate.php#L52-L59
train
Get all the templates that are registered in the system
[ 30522, 2270, 10763, 3853, 2862, 8095, 18532, 15725, 2015, 1006, 1007, 1063, 1002, 5371, 18532, 15725, 2015, 1027, 1006, 9140, 1007, 5653, 24805, 4590, 1024, 1024, 6013, 1006, 1007, 1011, 1028, 2862, 2890, 24063, 6850, 18532, 15725, 2015, 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/Foundation/Validation/ValidatesRequests.php
ValidatesRequests.validate
public function validate(Request $request, array $rules, array $messages = [], array $customAttributes = []) { return $this->getValidationFactory()->make( $request->all(), $rules, $messages, $customAttributes )->validate(); }
php
public function validate(Request $request, array $rules, array $messages = [], array $customAttributes = []) { return $this->getValidationFactory()->make( $request->all(), $rules, $messages, $customAttributes )->validate(); }
[ "public", "function", "validate", "(", "Request", "$", "request", ",", "array", "$", "rules", ",", "array", "$", "messages", "=", "[", "]", ",", "array", "$", "customAttributes", "=", "[", "]", ")", "{", "return", "$", "this", "->", "getValidationFactory...
Validate the given request with the given rules. @param \Illuminate\Http\Request $request @param array $rules @param array $messages @param array $customAttributes @return array @throws \Illuminate\Validation\ValidationException
[ "Validate", "the", "given", "request", "with", "the", "given", "rules", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Validation/ValidatesRequests.php#L42-L48
train
Validate the request using the validation factory
[ 30522, 2270, 3853, 9398, 3686, 1006, 5227, 1002, 5227, 1010, 9140, 1002, 3513, 1010, 9140, 1002, 7696, 1027, 1031, 1033, 1010, 9140, 1002, 7661, 19321, 3089, 8569, 4570, 1027, 1031, 1033, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 2131, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Http.php
Http.parseHeaderLine
private static function parseHeaderLine(&$headers, $line) { $parts = explode(':', $line, 2); if (count($parts) == 1) { return; } list($name, $value) = $parts; $headers[trim($name)] = trim($value); }
php
private static function parseHeaderLine(&$headers, $line) { $parts = explode(':', $line, 2); if (count($parts) == 1) { return; } list($name, $value) = $parts; $headers[trim($name)] = trim($value); }
[ "private", "static", "function", "parseHeaderLine", "(", "&", "$", "headers", ",", "$", "line", ")", "{", "$", "parts", "=", "explode", "(", "':'", ",", "$", "line", ",", "2", ")", ";", "if", "(", "count", "(", "$", "parts", ")", "==", "1", ")", ...
Utility function, parses an HTTP header line into key/value & sets header array with them. @param array $headers @param string $line
[ "Utility", "function", "parses", "an", "HTTP", "header", "line", "into", "key", "/", "value", "&", "sets", "header", "array", "with", "them", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Http.php#L841-L850
train
Parse header line
[ 30522, 2797, 10763, 3853, 11968, 3366, 4974, 2121, 4179, 1006, 1004, 1002, 20346, 2015, 1010, 30524, 3033, 1027, 15044, 1006, 1005, 1024, 1005, 1010, 1002, 2240, 1010, 1016, 1007, 1025, 2065, 1006, 4175, 1006, 1002, 3033, 1007, 1027, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Routing/Matcher/UrlMatcher.php
UrlMatcher.matchCollection
protected function matchCollection($pathinfo, RouteCollection $routes) { // HEAD and GET are equivalent as per RFC if ('HEAD' === $method = $this->context->getMethod()) { $method = 'GET'; } $supportsTrailingSlash = 'GET' === $method && $this instanceof RedirectableUrlMatc...
php
protected function matchCollection($pathinfo, RouteCollection $routes) { // HEAD and GET are equivalent as per RFC if ('HEAD' === $method = $this->context->getMethod()) { $method = 'GET'; } $supportsTrailingSlash = 'GET' === $method && $this instanceof RedirectableUrlMatc...
[ "protected", "function", "matchCollection", "(", "$", "pathinfo", ",", "RouteCollection", "$", "routes", ")", "{", "// HEAD and GET are equivalent as per RFC", "if", "(", "'HEAD'", "===", "$", "method", "=", "$", "this", "->", "context", "->", "getMethod", "(", ...
Tries to match a URL with a set of routes. @param string $pathinfo The path info to be parsed @param RouteCollection $routes The set of routes @return array An array of parameters @throws NoConfigurationException If no routing configuration could be found @throws ResourceNotFoundException If the resource...
[ "Tries", "to", "match", "a", "URL", "with", "a", "set", "of", "routes", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Routing/Matcher/UrlMatcher.php#L132-L210
train
Matches the given pathinfo with the routes
[ 30522, 5123, 3853, 2674, 26895, 18491, 1006, 1002, 4130, 2378, 14876, 1010, 2799, 26895, 18491, 1002, 5847, 1007, 1063, 1013, 1013, 2132, 1998, 2131, 2024, 5662, 2004, 2566, 14645, 2065, 1006, 1005, 2132, 1005, 1027, 1027, 1027, 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...
symfony/symfony
src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php
AutowirePass.populateAvailableTypes
private function populateAvailableTypes(ContainerBuilder $container) { $this->types = []; $this->ambiguousServiceTypes = []; foreach ($container->getDefinitions() as $id => $definition) { $this->populateAvailableType($container, $id, $definition); } }
php
private function populateAvailableTypes(ContainerBuilder $container) { $this->types = []; $this->ambiguousServiceTypes = []; foreach ($container->getDefinitions() as $id => $definition) { $this->populateAvailableType($container, $id, $definition); } }
[ "private", "function", "populateAvailableTypes", "(", "ContainerBuilder", "$", "container", ")", "{", "$", "this", "->", "types", "=", "[", "]", ";", "$", "this", "->", "ambiguousServiceTypes", "=", "[", "]", ";", "foreach", "(", "$", "container", "->", "g...
Populates the list of available types.
[ "Populates", "the", "list", "of", "available", "types", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php#L316-L324
train
Populates available types from the container
[ 30522, 2797, 3853, 3769, 9869, 12462, 11733, 3468, 13874, 2015, 1006, 11661, 8569, 23891, 2099, 1002, 11661, 1007, 1063, 1002, 2023, 1011, 1028, 4127, 1027, 1031, 1033, 1025, 1002, 2023, 1011, 1028, 20080, 8043, 7903, 27405, 10374, 1027, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Routing/RouteCollection.php
RouteCollection.addOptions
public function addOptions(array $options) { if ($options) { foreach ($this->routes as $route) { $route->addOptions($options); } } }
php
public function addOptions(array $options) { if ($options) { foreach ($this->routes as $route) { $route->addOptions($options); } } }
[ "public", "function", "addOptions", "(", "array", "$", "options", ")", "{", "if", "(", "$", "options", ")", "{", "foreach", "(", "$", "this", "->", "routes", "as", "$", "route", ")", "{", "$", "route", "->", "addOptions", "(", "$", "options", ")", ...
Adds options to all routes. An existing option value under the same name in a route will be overridden. @param array $options An array of options
[ "Adds", "options", "to", "all", "routes", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Routing/RouteCollection.php#L242-L249
train
Add options to all routes
[ 30522, 2270, 3853, 5587, 7361, 9285, 1006, 9140, 1002, 7047, 1007, 1063, 2065, 1006, 1002, 7047, 1007, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 5847, 2004, 1002, 2799, 1007, 1063, 1002, 2799, 1011, 1028, 5587, 7361, 9285, 1006, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dompdf/dompdf
src/Helpers.php
Helpers.imagecreatefrombmp
public static function imagecreatefrombmp($filename, $context = null) { if (!function_exists("imagecreatetruecolor")) { trigger_error("The PHP GD extension is required, but is not installed.", E_ERROR); return false; } // version 1.00 if (!($fh = fopen($filen...
php
public static function imagecreatefrombmp($filename, $context = null) { if (!function_exists("imagecreatetruecolor")) { trigger_error("The PHP GD extension is required, but is not installed.", E_ERROR); return false; } // version 1.00 if (!($fh = fopen($filen...
[ "public", "static", "function", "imagecreatefrombmp", "(", "$", "filename", ",", "$", "context", "=", "null", ")", "{", "if", "(", "!", "function_exists", "(", "\"imagecreatetruecolor\"", ")", ")", "{", "trigger_error", "(", "\"The PHP GD extension is required, but ...
Credit goes to mgutt http://www.programmierer-forum.de/function-imagecreatefrombmp-welche-variante-laeuft-t143137.htm Modified by Fabien Menager to support RGB555 BMP format
[ "Credit", "goes", "to", "mgutt", "http", ":", "//", "www", ".", "programmierer", "-", "forum", ".", "de", "/", "function", "-", "imagecreatefrombmp", "-", "welche", "-", "variante", "-", "laeuft", "-", "t143137", ".", "htm", "Modified", "by", "Fabien", "...
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/Helpers.php#L638-L809
train
Load an image from bmp
[ 30522, 2270, 10763, 3853, 3746, 16748, 3686, 19699, 5358, 25526, 2361, 1006, 1002, 5371, 18442, 1010, 1002, 6123, 1027, 19701, 1007, 1063, 2065, 1006, 999, 3853, 1035, 6526, 1006, 1000, 3746, 16748, 3686, 16344, 5657, 18717, 1000, 1007, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Framework/Uri/UriPartsFilter.php
UriPartsFilter.filterQueryOrFragment
public static function filterQueryOrFragment($query) { if (!\is_string($query)) { throw new \InvalidArgumentException('Uri query string and fragment must be a string'); } return preg_replace_callback( '/(?:[^a-zA-Z0-9_\-\.~!\$&\'\(\)\*\+,;=%:@\/\?]+|%(?![A-Fa-f0-9]{2...
php
public static function filterQueryOrFragment($query) { if (!\is_string($query)) { throw new \InvalidArgumentException('Uri query string and fragment must be a string'); } return preg_replace_callback( '/(?:[^a-zA-Z0-9_\-\.~!\$&\'\(\)\*\+,;=%:@\/\?]+|%(?![A-Fa-f0-9]{2...
[ "public", "static", "function", "filterQueryOrFragment", "(", "$", "query", ")", "{", "if", "(", "!", "\\", "is_string", "(", "$", "query", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'Uri query string and fragment must be a string'", ")...
Filters the query string or fragment of a URI. @param string $query The raw uri query string. @return string The percent-encoded query string. @throws \InvalidArgumentException If the query is invalid.
[ "Filters", "the", "query", "string", "or", "fragment", "of", "a", "URI", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Framework/Uri/UriPartsFilter.php#L127-L140
train
Filters a URI query string or fragment
[ 30522, 2270, 10763, 3853, 11307, 4226, 2854, 16347, 29181, 3672, 1006, 1002, 23032, 1007, 1063, 2065, 1006, 999, 1032, 2003, 1035, 5164, 1006, 1002, 23032, 1007, 1007, 1063, 5466, 2047, 1032, 19528, 2906, 22850, 15781, 2595, 24422, 1006, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Translation/MessageCatalogue.php
MessageCatalogue.has
public function has($id, $domain = 'messages') { if (isset($this->messages[$domain][$id]) || isset($this->messages[$domain.self::INTL_DOMAIN_SUFFIX][$id])) { return true; } if (null !== $this->fallbackCatalogue) { return $this->fallbackCatalogue->has($id, $domain); ...
php
public function has($id, $domain = 'messages') { if (isset($this->messages[$domain][$id]) || isset($this->messages[$domain.self::INTL_DOMAIN_SUFFIX][$id])) { return true; } if (null !== $this->fallbackCatalogue) { return $this->fallbackCatalogue->has($id, $domain); ...
[ "public", "function", "has", "(", "$", "id", ",", "$", "domain", "=", "'messages'", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "messages", "[", "$", "domain", "]", "[", "$", "id", "]", ")", "||", "isset", "(", "$", "this", "->", "mes...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Translation/MessageCatalogue.php#L100-L111
train
Has the message with the given ID?
[ 30522, 2270, 3853, 2038, 1006, 1002, 8909, 1010, 1002, 5884, 1027, 1005, 7696, 1005, 1007, 1063, 2065, 1006, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 7696, 1031, 1002, 5884, 1033, 1031, 1002, 8909, 1033, 1007, 1064, 1064, 26354, 3388, 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...
dompdf/dompdf
src/Css/AttributeTranslator.php
AttributeTranslator._set_input_width
static protected function _set_input_width(\DOMElement $node, $value) { if (empty($value)) { return null; } if ($node->hasAttribute("type") && in_array(strtolower($node->getAttribute("type")), array("text","password"))) { return sprintf("width: %Fem", (((int)$value * .65)+2)); }...
php
static protected function _set_input_width(\DOMElement $node, $value) { if (empty($value)) { return null; } if ($node->hasAttribute("type") && in_array(strtolower($node->getAttribute("type")), array("text","password"))) { return sprintf("width: %Fem", (((int)$value * .65)+2)); }...
[ "static", "protected", "function", "_set_input_width", "(", "\\", "DOMElement", "$", "node", ",", "$", "value", ")", "{", "if", "(", "empty", "(", "$", "value", ")", ")", "{", "return", "null", ";", "}", "if", "(", "$", "node", "->", "hasAttribute", ...
@param \DOMElement $node @param string $value @return null|string
[ "@param", "\\", "DOMElement", "$node", "@param", "string", "$value" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/Css/AttributeTranslator.php#L521-L530
train
_set_input_width - Set width of input element
[ 30522, 10763, 5123, 3853, 1035, 2275, 1035, 7953, 1035, 9381, 1006, 1032, 8514, 16930, 4765, 1002, 13045, 1010, 1002, 3643, 1007, 1063, 2065, 1006, 4064, 1006, 1002, 3643, 1007, 1007, 1063, 2709, 19701, 1025, 1065, 2065, 1006, 1002, 13045, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Http.php
Http.getModifiedSinceHeader
public static function getModifiedSinceHeader() { $modifiedSince = ''; if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) { $modifiedSince = $_SERVER['HTTP_IF_MODIFIED_SINCE']; // strip any trailing data appended to header if (false !== ($semicolonPos = strpos($modif...
php
public static function getModifiedSinceHeader() { $modifiedSince = ''; if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) { $modifiedSince = $_SERVER['HTTP_IF_MODIFIED_SINCE']; // strip any trailing data appended to header if (false !== ($semicolonPos = strpos($modif...
[ "public", "static", "function", "getModifiedSinceHeader", "(", ")", "{", "$", "modifiedSince", "=", "''", ";", "if", "(", "isset", "(", "$", "_SERVER", "[", "'HTTP_IF_MODIFIED_SINCE'", "]", ")", ")", "{", "$", "modifiedSince", "=", "$", "_SERVER", "[", "'H...
Returns the If-Modified-Since HTTP header if it can be found. If it cannot be found, an empty string is returned. @return string
[ "Returns", "the", "If", "-", "Modified", "-", "Since", "HTTP", "header", "if", "it", "can", "be", "found", ".", "If", "it", "cannot", "be", "found", "an", "empty", "string", "is", "returned", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Http.php#L873-L885
train
Get the Modified Since header
[ 30522, 2270, 10763, 3853, 2131, 5302, 4305, 10451, 11493, 3401, 4974, 2121, 1006, 1007, 1063, 1002, 6310, 11493, 3401, 1027, 1005, 1005, 1025, 2065, 1006, 26354, 3388, 1006, 1002, 1035, 8241, 1031, 1005, 8299, 1035, 2065, 1035, 6310, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Yaml/Yaml.php
Yaml.parse
public static function parse(string $input, int $flags = 0) { $yaml = new Parser(); return $yaml->parse($input, $flags); }
php
public static function parse(string $input, int $flags = 0) { $yaml = new Parser(); return $yaml->parse($input, $flags); }
[ "public", "static", "function", "parse", "(", "string", "$", "input", ",", "int", "$", "flags", "=", "0", ")", "{", "$", "yaml", "=", "new", "Parser", "(", ")", ";", "return", "$", "yaml", "->", "parse", "(", "$", "input", ",", "$", "flags", ")",...
Parses YAML into a PHP value. Usage: <code> $array = Yaml::parse(file_get_contents('config.yml')); print_r($array); </code> @param string $input A string containing YAML @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior @return mixed The YAML converted to a PHP value @throw...
[ "Parses", "YAML", "into", "a", "PHP", "value", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Yaml/Yaml.php#L75-L80
train
Parse YAML input
[ 30522, 2270, 10763, 3853, 11968, 3366, 1006, 5164, 1002, 7953, 1010, 20014, 1002, 9245, 1027, 1014, 1007, 1063, 1002, 8038, 19968, 1027, 2047, 11968, 8043, 1006, 1007, 1025, 2709, 1002, 8038, 19968, 1011, 1028, 11968, 3366, 1006, 1002, 7953...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Traits/Observable.php
Observable.makeClosure
protected function makeClosure($handler) { if (is_callable($handler)) { return $handler; } if (is_string($handler)) { if (!class_exists($handler)) { throw new InvalidArgumentException(sprintf('Class "%s" not exists.', $handler)); } ...
php
protected function makeClosure($handler) { if (is_callable($handler)) { return $handler; } if (is_string($handler)) { if (!class_exists($handler)) { throw new InvalidArgumentException(sprintf('Class "%s" not exists.', $handler)); } ...
[ "protected", "function", "makeClosure", "(", "$", "handler", ")", "{", "if", "(", "is_callable", "(", "$", "handler", ")", ")", "{", "return", "$", "handler", ";", "}", "if", "(", "is_string", "(", "$", "handler", ")", ")", "{", "if", "(", "!", "cl...
@param $handler @return \Closure @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException @throws \ReflectionException
[ "@param", "$handler" ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Kernel/Traits/Observable.php#L204-L231
train
Makes a closure that will handle the request
[ 30522, 5123, 3853, 2191, 20464, 2891, 5397, 1006, 1002, 28213, 1007, 1063, 2065, 1006, 2003, 1035, 2655, 3085, 1006, 1002, 28213, 1007, 1007, 1063, 2709, 1002, 28213, 1025, 1065, 2065, 1006, 2003, 1035, 5164, 1006, 1002, 28213, 1007, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
overtrue/wechat
src/Payment/Coupon/Client.php
Client.send
public function send(array $params) { $params['appid'] = $this->app['config']->app_id; $params['openid_count'] = 1; return $this->safeRequest('mmpaymkttransfers/send_coupon', $params); }
php
public function send(array $params) { $params['appid'] = $this->app['config']->app_id; $params['openid_count'] = 1; return $this->safeRequest('mmpaymkttransfers/send_coupon', $params); }
[ "public", "function", "send", "(", "array", "$", "params", ")", "{", "$", "params", "[", "'appid'", "]", "=", "$", "this", "->", "app", "[", "'config'", "]", "->", "app_id", ";", "$", "params", "[", "'openid_count'", "]", "=", "1", ";", "return", "...
send a cash coupon. @param array $params @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
[ "send", "a", "cash", "coupon", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Payment/Coupon/Client.php#L32-L38
train
Send a coupon to the MmpaymktTransfers API.
[ 30522, 2270, 3853, 4604, 1006, 9140, 1002, 11498, 5244, 1007, 1063, 1002, 11498, 5244, 1031, 1005, 10439, 3593, 1005, 1033, 1027, 1002, 2023, 1011, 1028, 10439, 1031, 1005, 9530, 8873, 2290, 1005, 1033, 1011, 1028, 10439, 1035, 8909, 1025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/widgets/Table.php
Table.init
public function init() { $this->columns = $this->getConfig('columns', []); $this->fieldName = $this->getConfig('fieldName', $this->alias); $this->recordsKeyFrom = $this->getConfig('keyFrom', 'id'); $dataSourceClass = $this->getConfig('dataSource'); if (!strlen($dataSourceC...
php
public function init() { $this->columns = $this->getConfig('columns', []); $this->fieldName = $this->getConfig('fieldName', $this->alias); $this->recordsKeyFrom = $this->getConfig('keyFrom', 'id'); $dataSourceClass = $this->getConfig('dataSource'); if (!strlen($dataSourceC...
[ "public", "function", "init", "(", ")", "{", "$", "this", "->", "columns", "=", "$", "this", "->", "getConfig", "(", "'columns'", ",", "[", "]", ")", ";", "$", "this", "->", "fieldName", "=", "$", "this", "->", "getConfig", "(", "'fieldName'", ",", ...
Initialize the widget, called by the constructor and free from its parameters.
[ "Initialize", "the", "widget", "called", "by", "the", "constructor", "and", "free", "from", "its", "parameters", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/widgets/Table.php#L57-L94
train
Initializes the table widget
[ 30522, 2270, 3853, 1999, 4183, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 7753, 1027, 1002, 2023, 1011, 1028, 2131, 8663, 8873, 2290, 1006, 1005, 7753, 1005, 1010, 1031, 1033, 1007, 1025, 1002, 2023, 1011, 1028, 2492, 18442, 1027, 1002, 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/Form/FormConfigBuilder.php
FormConfigBuilder.setDataLocked
public function setDataLocked($locked) { if ($this->locked) { throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); } $this->dataLocked = (bool) $locked; return $this; ...
php
public function setDataLocked($locked) { if ($this->locked) { throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); } $this->dataLocked = (bool) $locked; return $this; ...
[ "public", "function", "setDataLocked", "(", "$", "locked", ")", "{", "if", "(", "$", "this", "->", "locked", ")", "{", "throw", "new", "BadMethodCallException", "(", "'FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface i...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/FormConfigBuilder.php#L670-L679
train
Set whether or not the data is locked
[ 30522, 2270, 3853, 2275, 2850, 9080, 7432, 2098, 1006, 1002, 5299, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 5299, 1007, 1063, 5466, 2047, 2919, 11368, 6806, 16409, 24164, 2595, 24422, 1006, 1005, 2433, 8663, 8873, 18259, 19231, 4063,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/UsersManager/API.php
API.getUserByEmail
public function getUserByEmail($userEmail) { Piwik::checkUserHasSuperUserAccess(); $this->checkUserEmailExists($userEmail); $user = $this->model->getUserByEmail($userEmail); $user = $this->userFilter->filterUser($user); $user = $this->enrichUser($user); return $use...
php
public function getUserByEmail($userEmail) { Piwik::checkUserHasSuperUserAccess(); $this->checkUserEmailExists($userEmail); $user = $this->model->getUserByEmail($userEmail); $user = $this->userFilter->filterUser($user); $user = $this->enrichUser($user); return $use...
[ "public", "function", "getUserByEmail", "(", "$", "userEmail", ")", "{", "Piwik", "::", "checkUserHasSuperUserAccess", "(", ")", ";", "$", "this", "->", "checkUserEmailExists", "(", "$", "userEmail", ")", ";", "$", "user", "=", "$", "this", "->", "model", ...
Returns the user information (login, password hash, alias, email, date_registered, etc.) @param string $userEmail the user email @return array the user information
[ "Returns", "the", "user", "information", "(", "login", "password", "hash", "alias", "email", "date_registered", "etc", ".", ")" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/UsersManager/API.php#L593-L604
train
Returns the user object for the given email.
[ 30522, 2270, 3853, 2131, 20330, 3762, 14545, 4014, 1006, 1002, 5310, 14545, 4014, 1007, 1063, 14255, 9148, 2243, 1024, 1024, 4638, 20330, 14949, 6342, 4842, 20330, 6305, 9623, 2015, 1006, 1007, 1025, 1002, 2023, 1011, 1028, 4638, 20330, 145...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.copyPackage
public static function copyPackage($package_file, $tmp) { $package_file = realpath($package_file); if (file_exists($package_file)) { $filename = basename($package_file); Folder::create($tmp); copy(realpath($package_file), $tmp . DS . $filename); retur...
php
public static function copyPackage($package_file, $tmp) { $package_file = realpath($package_file); if (file_exists($package_file)) { $filename = basename($package_file); Folder::create($tmp); copy(realpath($package_file), $tmp . DS . $filename); retur...
[ "public", "static", "function", "copyPackage", "(", "$", "package_file", ",", "$", "tmp", ")", "{", "$", "package_file", "=", "realpath", "(", "$", "package_file", ")", ";", "if", "(", "file_exists", "(", "$", "package_file", ")", ")", "{", "$", "filenam...
Copy the local zip package to tmp @param string $package_file @param string $tmp @return null|string
[ "Copy", "the", "local", "zip", "package", "to", "tmp" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/GPM/GPM.php#L539-L551
train
Copy package file to tmp directory
[ 30522, 2270, 10763, 3853, 6100, 23947, 4270, 1006, 1002, 7427, 1035, 5371, 1010, 1002, 1056, 8737, 1007, 1063, 1002, 7427, 1035, 5371, 1027, 2613, 15069, 1006, 1002, 7427, 1035, 5371, 1007, 1025, 2065, 1006, 5371, 1035, 6526, 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...
getgrav/grav
system/src/Grav/Common/GPM/GPM.php
GPM.getInstalledPackage
public function getInstalledPackage($slug) { if (isset($this->installed['plugins'][$slug])) { return $this->installed['plugins'][$slug]; } if (isset($this->installed['themes'][$slug])) { return $this->installed['themes'][$slug]; } return null; }
php
public function getInstalledPackage($slug) { if (isset($this->installed['plugins'][$slug])) { return $this->installed['plugins'][$slug]; } if (isset($this->installed['themes'][$slug])) { return $this->installed['themes'][$slug]; } return null; }
[ "public", "function", "getInstalledPackage", "(", "$", "slug", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "installed", "[", "'plugins'", "]", "[", "$", "slug", "]", ")", ")", "{", "return", "$", "this", "->", "installed", "[", "'plugins'", ...
Return the instance of a specific Package @param string $slug The slug of the Package @return Local\Package The instance of the Package
[ "Return", "the", "instance", "of", "a", "specific", "Package" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/GPM/GPM.php#L115-L126
train
Get the installed package
[ 30522, 2270, 3853, 2131, 7076, 9080, 3709, 23947, 4270, 1006, 1002, 23667, 1007, 1063, 2065, 1006, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 5361, 1031, 1005, 13354, 7076, 1005, 1033, 1031, 1002, 23667, 1033, 1007, 1007, 1063, 2709, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Routing/Router.php
Router.matchRequest
public function matchRequest(Request $request) { $matcher = $this->getMatcher(); if (!$matcher instanceof RequestMatcherInterface) { // fallback to the default UrlMatcherInterface return $matcher->match($request->getPathInfo()); } return $matcher->matchReques...
php
public function matchRequest(Request $request) { $matcher = $this->getMatcher(); if (!$matcher instanceof RequestMatcherInterface) { // fallback to the default UrlMatcherInterface return $matcher->match($request->getPathInfo()); } return $matcher->matchReques...
[ "public", "function", "matchRequest", "(", "Request", "$", "request", ")", "{", "$", "matcher", "=", "$", "this", "->", "getMatcher", "(", ")", ";", "if", "(", "!", "$", "matcher", "instanceof", "RequestMatcherInterface", ")", "{", "// fallback to the default ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Routing/Router.php#L268-L277
train
Match the request against the url
[ 30522, 2270, 3853, 2674, 2890, 15500, 1006, 5227, 1002, 5227, 1007, 1063, 1002, 2674, 2121, 1027, 1002, 2023, 1011, 1028, 2131, 18900, 7474, 1006, 1007, 1025, 30524, 2121, 1011, 1028, 2674, 1006, 1002, 5227, 1011, 1028, 2131, 15069, 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...
z-song/laravel-admin
src/Form/Builder.php
Builder.hasFile
public function hasFile() { foreach ($this->fields() as $field) { if ($field instanceof Field\File) { return true; } } return false; }
php
public function hasFile() { foreach ($this->fields() as $field) { if ($field instanceof Field\File) { return true; } } return false; }
[ "public", "function", "hasFile", "(", ")", "{", "foreach", "(", "$", "this", "->", "fields", "(", ")", "as", "$", "field", ")", "{", "if", "(", "$", "field", "instanceof", "Field", "\\", "File", ")", "{", "return", "true", ";", "}", "}", "return", ...
Determine if form fields has files. @return bool
[ "Determine", "if", "form", "fields", "has", "files", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Form/Builder.php#L440-L449
train
Has File Field
[ 30522, 2270, 3853, 2038, 8873, 2571, 1006, 1007, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 4249, 1006, 1007, 2004, 1002, 2492, 1007, 1063, 2065, 1006, 1002, 2492, 6013, 11253, 2492, 1032, 5371, 1007, 1063, 2709, 2995, 1025, 1065, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Support/NamespacedItemResolver.php
NamespacedItemResolver.parseKey
public function parseKey($key) { // If we've already parsed the given key, we'll return the cached version we // already have, as this will save us some processing. We cache off every // key we parse so we can quickly return it on all subsequent requests. if (isset($this->parsed[$key...
php
public function parseKey($key) { // If we've already parsed the given key, we'll return the cached version we // already have, as this will save us some processing. We cache off every // key we parse so we can quickly return it on all subsequent requests. if (isset($this->parsed[$key...
[ "public", "function", "parseKey", "(", "$", "key", ")", "{", "// If we've already parsed the given key, we'll return the cached version we", "// already have, as this will save us some processing. We cache off every", "// key we parse so we can quickly return it on all subsequent requests.", "...
Parse a key into namespace, group, and item. @param string $key @return array
[ "Parse", "a", "key", "into", "namespace", "group", "and", "item", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Support/NamespacedItemResolver.php#L20-L44
train
Parse the given key into an array of elements
[ 30522, 2270, 3853, 11968, 3366, 14839, 1006, 1002, 3145, 1007, 1063, 1013, 1013, 2065, 2057, 1005, 2310, 2525, 11968, 6924, 1996, 2445, 3145, 1010, 2057, 1005, 2222, 2709, 1996, 17053, 2094, 2544, 2057, 1013, 1013, 2525, 2031, 1010, 2004, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Archive/ArchivePurger.php
ArchivePurger.purgeInvalidatedArchivesFrom
public function purgeInvalidatedArchivesFrom(Date $date) { $numericTable = ArchiveTableCreator::getNumericTable($date); // we don't want to do an INNER JOIN on every row in a archive table that can potentially have tens to hundreds of thousands of rows, // so we first look for sites w/ inva...
php
public function purgeInvalidatedArchivesFrom(Date $date) { $numericTable = ArchiveTableCreator::getNumericTable($date); // we don't want to do an INNER JOIN on every row in a archive table that can potentially have tens to hundreds of thousands of rows, // so we first look for sites w/ inva...
[ "public", "function", "purgeInvalidatedArchivesFrom", "(", "Date", "$", "date", ")", "{", "$", "numericTable", "=", "ArchiveTableCreator", "::", "getNumericTable", "(", "$", "date", ")", ";", "// we don't want to do an INNER JOIN on every row in a archive table that can poten...
Purge all invalidate archives for whom there are newer, valid archives from the archive table that stores data for `$date`. @param Date $date The date identifying the archive table. @return int The total number of archive rows deleted (from both the blog & numeric tables).
[ "Purge", "all", "invalidate", "archives", "for", "whom", "there", "are", "newer", "valid", "archives", "from", "the", "archive", "table", "that", "stores", "data", "for", "$date", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Archive/ArchivePurger.php#L94-L124
train
Purges invalidated archives from the given date
[ 30522, 2270, 3853, 24694, 2378, 10175, 8524, 3064, 2906, 5428, 6961, 19699, 5358, 1006, 3058, 1002, 3058, 1007, 1063, 1002, 16371, 25531, 10880, 1027, 8756, 10880, 16748, 8844, 1024, 1024, 2131, 19172, 22420, 10880, 1006, 1002, 3058, 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...
guzzle/guzzle
build/Burgomaster.php
Burgomaster.createZip
public function createZip($dest) { $this->startSection('zip'); $this->debug("Creating a zip file at $dest"); $this->createDirIfNeeded(dirname($dest)); chdir($this->stageDir); $this->exec("zip -r $dest ./"); $this->debug(" > Created at $dest"); chdir(__DIR__);...
php
public function createZip($dest) { $this->startSection('zip'); $this->debug("Creating a zip file at $dest"); $this->createDirIfNeeded(dirname($dest)); chdir($this->stageDir); $this->exec("zip -r $dest ./"); $this->debug(" > Created at $dest"); chdir(__DIR__);...
[ "public", "function", "createZip", "(", "$", "dest", ")", "{", "$", "this", "->", "startSection", "(", "'zip'", ")", ";", "$", "this", "->", "debug", "(", "\"Creating a zip file at $dest\"", ")", ";", "$", "this", "->", "createDirIfNeeded", "(", "dirname", ...
Creates a zip file containing the staged files of your project. Call this only after your staging directory is built. @param string $dest Where to save the zip file
[ "Creates", "a", "zip", "file", "containing", "the", "staged", "files", "of", "your", "project", "." ]
bf595424e4d442a190582e088985dc835a789071
https://github.com/guzzle/guzzle/blob/bf595424e4d442a190582e088985dc835a789071/build/Burgomaster.php#L367-L377
train
Creates a zip file at the stage directory
[ 30522, 2270, 3853, 3443, 5831, 2361, 1006, 1002, 4078, 2102, 1007, 1063, 1002, 2023, 1011, 1028, 4627, 18491, 1006, 1005, 14101, 1005, 1007, 1025, 1002, 2023, 1011, 1028, 2139, 8569, 2290, 1006, 1000, 4526, 1037, 14101, 5371, 2012, 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/Menu/MenuAbstract.php
MenuAbstract.rename
public function rename($mainMenuOriginal, $subMenuOriginal, $mainMenuRenamed, $subMenuRenamed) { $this->renames[] = array($mainMenuOriginal, $subMenuOriginal, $mainMenuRenamed, $subMenuRenamed); }
php
public function rename($mainMenuOriginal, $subMenuOriginal, $mainMenuRenamed, $subMenuRenamed) { $this->renames[] = array($mainMenuOriginal, $subMenuOriginal, $mainMenuRenamed, $subMenuRenamed); }
[ "public", "function", "rename", "(", "$", "mainMenuOriginal", ",", "$", "subMenuOriginal", ",", "$", "mainMenuRenamed", ",", "$", "subMenuRenamed", ")", "{", "$", "this", "->", "renames", "[", "]", "=", "array", "(", "$", "mainMenuOriginal", ",", "$", "sub...
Renames a single menu entry. @param $mainMenuOriginal @param $subMenuOriginal @param $mainMenuRenamed @param $subMenuRenamed @api
[ "Renames", "a", "single", "menu", "entry", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Menu/MenuAbstract.php#L206-L210
train
Renames the main menu and the sub menu
[ 30522, 2270, 3853, 14916, 14074, 1006, 1002, 2364, 3549, 19098, 3089, 24965, 1010, 1002, 4942, 3549, 19098, 3089, 24965, 1010, 1002, 2364, 3549, 5397, 18442, 2094, 1010, 1002, 4942, 3549, 5397, 18442, 2094, 1007, 1063, 1002, 2023, 1011, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Console/Input/InputDefinition.php
InputDefinition.shortcutToName
public function shortcutToName($shortcut) { if (!isset($this->shortcuts[$shortcut])) { throw new InvalidArgumentException(sprintf('The "-%s" option does not exist.', $shortcut)); } return $this->shortcuts[$shortcut]; }
php
public function shortcutToName($shortcut) { if (!isset($this->shortcuts[$shortcut])) { throw new InvalidArgumentException(sprintf('The "-%s" option does not exist.', $shortcut)); } return $this->shortcuts[$shortcut]; }
[ "public", "function", "shortcutToName", "(", "$", "shortcut", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "shortcuts", "[", "$", "shortcut", "]", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", "sprintf", "(", "'The \"-%s\" o...
Returns the InputOption name given a shortcut. @param string $shortcut The shortcut @return string The InputOption name @throws InvalidArgumentException When option given does not exist @internal
[ "Returns", "the", "InputOption", "name", "given", "a", "shortcut", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Input/InputDefinition.php#L344-L351
train
Returns the name of the shortcut
[ 30522, 2270, 3853, 2460, 12690, 2669, 14074, 1006, 1002, 2460, 12690, 1007, 1063, 2065, 1006, 999, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 2460, 12690, 2015, 1031, 1002, 2460, 12690, 1033, 1007, 1007, 1063, 5466, 2047, 19528, 2906, 22850...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php
ProxyCacheWarmer.warmUp
public function warmUp($cacheDir) { foreach ($this->registry->getManagers() as $em) { // we need the directory no matter the proxy cache generation strategy if (!is_dir($proxyCacheDir = $em->getConfiguration()->getProxyDir())) { if (false === @mkdir($proxyCacheDir, 07...
php
public function warmUp($cacheDir) { foreach ($this->registry->getManagers() as $em) { // we need the directory no matter the proxy cache generation strategy if (!is_dir($proxyCacheDir = $em->getConfiguration()->getProxyDir())) { if (false === @mkdir($proxyCacheDir, 07...
[ "public", "function", "warmUp", "(", "$", "cacheDir", ")", "{", "foreach", "(", "$", "this", "->", "registry", "->", "getManagers", "(", ")", "as", "$", "em", ")", "{", "// we need the directory no matter the proxy cache generation strategy", "if", "(", "!", "is...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php#L47-L68
train
Warms up the Doctrine Proxy classes
[ 30522, 2270, 3853, 4010, 6279, 1006, 1002, 17053, 4305, 2099, 1007, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 15584, 1011, 1028, 2131, 24805, 15776, 1006, 1007, 2004, 1002, 7861, 1007, 1063, 1013, 1013, 2057, 2342, 1996, 14176, 2053,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/TimezoneDataGenerator.php
TimezoneDataGenerator.generateDataForMeta
protected function generateDataForMeta(BundleReaderInterface $reader, $tempDir) { $rootBundle = $reader->read($tempDir, 'root'); $this->zoneIds = array_unique($this->zoneIds); sort($this->zoneIds); $data = [ 'Version' => $rootBundle['Version'], 'Zones' => $...
php
protected function generateDataForMeta(BundleReaderInterface $reader, $tempDir) { $rootBundle = $reader->read($tempDir, 'root'); $this->zoneIds = array_unique($this->zoneIds); sort($this->zoneIds); $data = [ 'Version' => $rootBundle['Version'], 'Zones' => $...
[ "protected", "function", "generateDataForMeta", "(", "BundleReaderInterface", "$", "reader", ",", "$", "tempDir", ")", "{", "$", "rootBundle", "=", "$", "reader", "->", "read", "(", "$", "tempDir", ",", "'root'", ")", ";", "$", "this", "->", "zoneIds", "="...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Intl/Data/Generator/TimezoneDataGenerator.php#L124-L141
train
Generate data for meta data
[ 30522, 5123, 3853, 7013, 6790, 14192, 12928, 1006, 14012, 16416, 4063, 18447, 2121, 12172, 1002, 8068, 1010, 1002, 8915, 8737, 4305, 2099, 1007, 1063, 1002, 7117, 27265, 2571, 1027, 1002, 8068, 1011, 1028, 3191, 1006, 1002, 8915, 8737, 4305...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/system/traits/EventEmitter.php
EventEmitter.fireViewEvent
public function fireViewEvent($event, $params = []) { // Add the local object to the first parameter always array_unshift($params, $this); if ($result = Event::fire($event, $params)) { return implode(PHP_EOL.PHP_EOL, (array) $result); } return ''; }
php
public function fireViewEvent($event, $params = []) { // Add the local object to the first parameter always array_unshift($params, $this); if ($result = Event::fire($event, $params)) { return implode(PHP_EOL.PHP_EOL, (array) $result); } return ''; }
[ "public", "function", "fireViewEvent", "(", "$", "event", ",", "$", "params", "=", "[", "]", ")", "{", "// Add the local object to the first parameter always", "array_unshift", "(", "$", "params", ",", "$", "this", ")", ";", "if", "(", "$", "result", "=", "E...
Special event function used for extending within view files, allowing HTML to be injected multiple times. For example: <?= $this->fireViewEvent('backend.auth.extendSigninView') ?> @param string $event Event name @param array $params Event parameters @return string
[ "Special", "event", "function", "used", "for", "extending", "within", "view", "files", "allowing", "HTML", "to", "be", "injected", "multiple", "times", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/traits/EventEmitter.php#L81-L91
train
Fire an event and return the result of the event
[ 30522, 2270, 3853, 2543, 8584, 18697, 3372, 1006, 1002, 2724, 1010, 1002, 11498, 5244, 1027, 1031, 1033, 1007, 1063, 1013, 1013, 5587, 1996, 2334, 4874, 2000, 1996, 2034, 16381, 2467, 9140, 1035, 4895, 6182, 6199, 1006, 1002, 11498, 5244, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Cache/Backend/File.php
Zend_Cache_Backend_File.getFillingPercentage
public function getFillingPercentage() { $free = disk_free_space($this->_options['cache_dir']); $total = disk_total_space($this->_options['cache_dir']); if ($total == 0) { Zend_Cache::throwException('can\'t get disk_total_space'); } else { if ($free >= $total)...
php
public function getFillingPercentage() { $free = disk_free_space($this->_options['cache_dir']); $total = disk_total_space($this->_options['cache_dir']); if ($total == 0) { Zend_Cache::throwException('can\'t get disk_total_space'); } else { if ($free >= $total)...
[ "public", "function", "getFillingPercentage", "(", ")", "{", "$", "free", "=", "disk_free_space", "(", "$", "this", "->", "_options", "[", "'cache_dir'", "]", ")", ";", "$", "total", "=", "disk_total_space", "(", "$", "this", "->", "_options", "[", "'cache...
Return the filling percentage of the backend storage @throws Zend_Cache_Exception @return int integer between 0 and 100
[ "Return", "the", "filling", "percentage", "of", "the", "backend", "storage" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Cache/Backend/File.php#L357-L369
train
Get the percentage of free space
[ 30522, 2270, 3853, 2131, 8873, 13112, 4842, 13013, 4270, 1006, 1007, 1063, 1002, 2489, 1027, 9785, 1035, 2489, 1035, 2686, 1006, 1002, 2023, 1011, 1028, 1035, 7047, 1031, 1005, 17053, 1035, 16101, 1005, 1033, 1007, 1025, 1002, 2561, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Columns/Dimension.php
Dimension.hasImplementedEvent
public function hasImplementedEvent($method) { $method = new \ReflectionMethod($this, $method); $declaringClass = $method->getDeclaringClass(); return 0 === strpos($declaringClass->name, 'Piwik\Plugins'); }
php
public function hasImplementedEvent($method) { $method = new \ReflectionMethod($this, $method); $declaringClass = $method->getDeclaringClass(); return 0 === strpos($declaringClass->name, 'Piwik\Plugins'); }
[ "public", "function", "hasImplementedEvent", "(", "$", "method", ")", "{", "$", "method", "=", "new", "\\", "ReflectionMethod", "(", "$", "this", ",", "$", "method", ")", ";", "$", "declaringClass", "=", "$", "method", "->", "getDeclaringClass", "(", ")", ...
Check whether a dimension has overwritten a specific method. @param $method @return bool @ignore
[ "Check", "whether", "a", "dimension", "has", "overwritten", "a", "specific", "method", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Columns/Dimension.php#L520-L526
train
Has implemented event
[ 30522, 2270, 3853, 2038, 5714, 10814, 3672, 14728, 15338, 1006, 1002, 4118, 1007, 1063, 1002, 4118, 1027, 2047, 1032, 9185, 11368, 6806, 2094, 1006, 1002, 2023, 1010, 1002, 4118, 1007, 1025, 1002, 13752, 26266, 1027, 1002, 4118, 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...
laravel/framework
src/Illuminate/Database/Query/Grammars/Grammar.php
Grammar.wrap
public function wrap($value, $prefixAlias = false) { if ($this->isExpression($value)) { return $this->getValue($value); } // If the value being wrapped has a column alias we will need to separate out // the pieces so we can wrap each of the segments of the expression on ...
php
public function wrap($value, $prefixAlias = false) { if ($this->isExpression($value)) { return $this->getValue($value); } // If the value being wrapped has a column alias we will need to separate out // the pieces so we can wrap each of the segments of the expression on ...
[ "public", "function", "wrap", "(", "$", "value", ",", "$", "prefixAlias", "=", "false", ")", "{", "if", "(", "$", "this", "->", "isExpression", "(", "$", "value", ")", ")", "{", "return", "$", "this", "->", "getValue", "(", "$", "value", ")", ";", ...
Wrap a value in keyword identifiers. @param \Illuminate\Database\Query\Expression|string $value @param bool $prefixAlias @return string
[ "Wrap", "a", "value", "in", "keyword", "identifiers", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Grammars/Grammar.php#L1038-L1059
train
Wrap the given value in the language part of the value being wrapped.
[ 30522, 2270, 3853, 10236, 1006, 1002, 3643, 1010, 1002, 17576, 22786, 2015, 1027, 6270, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 2003, 10288, 20110, 3258, 1006, 1002, 3643, 1007, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 2131, 10175,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/CheckboxType.php
CheckboxType.buildForm
public function buildForm(FormBuilderInterface $builder, array $options) { // Unlike in other types, where the data is NULL by default, it // needs to be a Boolean here. setData(null) is not acceptable // for checkboxes and radio buttons (unless a custom model // transformer handles ...
php
public function buildForm(FormBuilderInterface $builder, array $options) { // Unlike in other types, where the data is NULL by default, it // needs to be a Boolean here. setData(null) is not acceptable // for checkboxes and radio buttons (unless a custom model // transformer handles ...
[ "public", "function", "buildForm", "(", "FormBuilderInterface", "$", "builder", ",", "array", "$", "options", ")", "{", "// Unlike in other types, where the data is NULL by default, it", "// needs to be a Boolean here. setData(null) is not acceptable", "// for checkboxes and radio butt...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/Extension/Core/Type/CheckboxType.php#L26-L36
train
Adds the data and view transformers to the form builder
[ 30522, 2270, 3853, 3857, 14192, 1006, 2433, 8569, 23891, 6657, 3334, 12172, 1002, 12508, 1010, 9140, 1002, 7047, 1007, 1063, 1013, 1013, 4406, 1999, 2060, 4127, 1010, 2073, 1996, 2951, 2003, 19701, 2011, 12398, 1010, 2009, 1013, 1013, 3791,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/formwidgets/RichEditor.php
RichEditor.evalToolbarButtons
protected function evalToolbarButtons() { $buttons = $this->toolbarButtons; if (is_string($buttons)) { $buttons = array_map(function ($button) { return strlen($button) ? $button : '|'; }, explode('|', $buttons)); } return $buttons; }
php
protected function evalToolbarButtons() { $buttons = $this->toolbarButtons; if (is_string($buttons)) { $buttons = array_map(function ($button) { return strlen($button) ? $button : '|'; }, explode('|', $buttons)); } return $buttons; }
[ "protected", "function", "evalToolbarButtons", "(", ")", "{", "$", "buttons", "=", "$", "this", "->", "toolbarButtons", ";", "if", "(", "is_string", "(", "$", "buttons", ")", ")", "{", "$", "buttons", "=", "array_map", "(", "function", "(", "$", "button"...
Determine the toolbar buttons to use based on config. @return string
[ "Determine", "the", "toolbar", "buttons", "to", "use", "based", "on", "config", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/formwidgets/RichEditor.php#L106-L117
train
Evaluate the toolbar buttons
[ 30522, 5123, 3853, 9345, 23223, 4747, 8237, 30524, 3853, 1006, 1002, 6462, 1007, 1063, 2709, 2358, 20927, 2078, 1006, 1002, 6462, 1007, 1029, 1002, 6462, 1024, 1005, 1064, 1005, 1025, 1065, 1010, 15044, 1006, 1005, 1064, 1005, 1010, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Extension.php
Extension.getInstance
protected static function getInstance() { $class = get_called_class(); if (!isset(self::$instance[$class]) || !self::$instance[$class] instanceof $class) { self::$instance[$class] = new static(); } return static::$instance[$class]; }
php
protected static function getInstance() { $class = get_called_class(); if (!isset(self::$instance[$class]) || !self::$instance[$class] instanceof $class) { self::$instance[$class] = new static(); } return static::$instance[$class]; }
[ "protected", "static", "function", "getInstance", "(", ")", "{", "$", "class", "=", "get_called_class", "(", ")", ";", "if", "(", "!", "isset", "(", "self", "::", "$", "instance", "[", "$", "class", "]", ")", "||", "!", "self", "::", "$", "instance",...
Returns the singleton instance. @return self
[ "Returns", "the", "singleton", "instance", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Extension.php#L85-L94
train
Get the current instance of this class
[ 30522, 5123, 10763, 3853, 2131, 7076, 26897, 1006, 1007, 1063, 1002, 2465, 1027, 2131, 1035, 2170, 1035, 2465, 1006, 1007, 1025, 2065, 1006, 999, 26354, 3388, 1006, 2969, 1024, 1024, 1002, 6013, 1031, 1002, 2465, 1033, 1007, 1064, 1064, 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/OfficialAccount/ShakeAround/GroupClient.php
GroupClient.get
public function get(int $groupId, int $begin, int $count) { $params = [ 'group_id' => $groupId, 'begin' => $begin, 'count' => $count, ]; return $this->httpPostJson('shakearound/device/group/getdetail', $params); }
php
public function get(int $groupId, int $begin, int $count) { $params = [ 'group_id' => $groupId, 'begin' => $begin, 'count' => $count, ]; return $this->httpPostJson('shakearound/device/group/getdetail', $params); }
[ "public", "function", "get", "(", "int", "$", "groupId", ",", "int", "$", "begin", ",", "int", "$", "count", ")", "{", "$", "params", "=", "[", "'group_id'", "=>", "$", "groupId", ",", "'begin'", "=>", "$", "begin", ",", "'count'", "=>", "$", "coun...
Get detail of a device group. @param int $groupId @param int $begin @param int $count @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
[ "Get", "detail", "of", "a", "device", "group", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/ShakeAround/GroupClient.php#L100-L109
train
Get detail of a device group
[ 30522, 2270, 3853, 2131, 1006, 20014, 1002, 2177, 3593, 1010, 20014, 1002, 4088, 1010, 20014, 1002, 4175, 1007, 1063, 1002, 11498, 5244, 1027, 1031, 1005, 2177, 1035, 8909, 1005, 1027, 1028, 1002, 2177, 3593, 1010, 1005, 4088, 30524, 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...
symfony/symfony
src/Symfony/Component/Filesystem/Filesystem.php
Filesystem.hardlink
public function hardlink($originFile, $targetFiles) { if (!$this->exists($originFile)) { throw new FileNotFoundException(null, 0, null, $originFile); } if (!is_file($originFile)) { throw new FileNotFoundException(sprintf('Origin file "%s" is not a file', $originFile)...
php
public function hardlink($originFile, $targetFiles) { if (!$this->exists($originFile)) { throw new FileNotFoundException(null, 0, null, $originFile); } if (!is_file($originFile)) { throw new FileNotFoundException(sprintf('Origin file "%s" is not a file', $originFile)...
[ "public", "function", "hardlink", "(", "$", "originFile", ",", "$", "targetFiles", ")", "{", "if", "(", "!", "$", "this", "->", "exists", "(", "$", "originFile", ")", ")", "{", "throw", "new", "FileNotFoundException", "(", "null", ",", "0", ",", "null"...
Creates a hard link, or several hard links to a file. @param string $originFile The original file @param string|string[] $targetFiles The target file(s) @throws FileNotFoundException When original file is missing or not a file @throws IOException When link fails, including if link already exists
[ "Creates", "a", "hard", "link", "or", "several", "hard", "links", "to", "a", "file", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Filesystem/Filesystem.php#L359-L381
train
Hard link a file to another file
[ 30522, 2270, 3853, 2524, 13767, 1006, 1002, 4761, 8873, 2571, 1010, 1002, 4539, 8873, 4244, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 6526, 1006, 1002, 4761, 8873, 2571, 1007, 1007, 1063, 5466, 2047, 5371, 17048, 14876, 8630, 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/Cookie.php
Cookie.generateContentString
public function generateContentString() { $cookieStr = ''; foreach ($this->value as $name => $value) { if (!is_numeric($value)) { $value = base64_encode(safe_serialize($value)); } $cookieStr .= "$name=$value" . self::VALUE_SEPARATOR; } ...
php
public function generateContentString() { $cookieStr = ''; foreach ($this->value as $name => $value) { if (!is_numeric($value)) { $value = base64_encode(safe_serialize($value)); } $cookieStr .= "$name=$value" . self::VALUE_SEPARATOR; } ...
[ "public", "function", "generateContentString", "(", ")", "{", "$", "cookieStr", "=", "''", ";", "foreach", "(", "$", "this", "->", "value", "as", "$", "name", "=>", "$", "value", ")", "{", "if", "(", "!", "is_numeric", "(", "$", "value", ")", ")", ...
Returns the string to save in the cookie from the $this->value array of values. It goes through the array and generates the cookie content string. @return string Cookie content
[ "Returns", "the", "string", "to", "save", "in", "the", "cookie", "from", "the", "$this", "-", ">", "value", "array", "of", "values", ".", "It", "goes", "through", "the", "array", "and", "generates", "the", "cookie", "content", "string", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Cookie.php#L260-L281
train
Generate content string for cookie
[ 30522, 2270, 3853, 9699, 8663, 6528, 3215, 18886, 3070, 1006, 1007, 1063, 1002, 16324, 16344, 1027, 1005, 1005, 1025, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 3643, 2004, 1002, 2171, 1027, 1028, 1002, 3643, 1007, 1063, 2065, 1006, 999, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Pipeline/Pipeline.php
Pipeline.then
public function then(Closure $destination) { $pipeline = array_reduce( array_reverse($this->pipes), $this->carry(), $this->prepareDestination($destination) ); return $pipeline($this->passable); }
php
public function then(Closure $destination) { $pipeline = array_reduce( array_reverse($this->pipes), $this->carry(), $this->prepareDestination($destination) ); return $pipeline($this->passable); }
[ "public", "function", "then", "(", "Closure", "$", "destination", ")", "{", "$", "pipeline", "=", "array_reduce", "(", "array_reverse", "(", "$", "this", "->", "pipes", ")", ",", "$", "this", "->", "carry", "(", ")", ",", "$", "this", "->", "prepareDes...
Run the pipeline with a final destination callback. @param \Closure $destination @return mixed
[ "Run", "the", "pipeline", "with", "a", "final", "destination", "callback", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Pipeline/Pipeline.php#L98-L105
train
Passes the pipeline to the destination and passes the result to the next pipeline.
[ 30522, 2270, 3853, 2059, 1006, 8503, 1002, 7688, 1007, 1063, 1002, 13117, 1027, 9140, 1035, 5547, 1006, 9140, 1035, 7901, 1006, 30524, 1002, 13117, 1006, 1002, 2023, 1011, 1028, 3413, 3085, 1007, 1025, 1065, 102, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Auth/SessionGuard.php
SessionGuard.queueRecallerCookie
protected function queueRecallerCookie(AuthenticatableContract $user) { $this->getCookieJar()->queue($this->createRecaller( $user->getAuthIdentifier().'|'.$user->getRememberToken().'|'.$user->getAuthPassword() )); }
php
protected function queueRecallerCookie(AuthenticatableContract $user) { $this->getCookieJar()->queue($this->createRecaller( $user->getAuthIdentifier().'|'.$user->getRememberToken().'|'.$user->getAuthPassword() )); }
[ "protected", "function", "queueRecallerCookie", "(", "AuthenticatableContract", "$", "user", ")", "{", "$", "this", "->", "getCookieJar", "(", ")", "->", "queue", "(", "$", "this", "->", "createRecaller", "(", "$", "user", "->", "getAuthIdentifier", "(", ")", ...
Queue the recaller cookie into the cookie jar. @param \Illuminate\Contracts\Auth\Authenticatable $user @return void
[ "Queue", "the", "recaller", "cookie", "into", "the", "cookie", "jar", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/SessionGuard.php#L458-L463
train
Queue Recaller cookie
[ 30522, 5123, 3853, 24240, 2890, 9289, 3917, 3597, 23212, 2063, 1006, 14469, 27892, 8663, 6494, 6593, 1002, 5310, 1007, 1063, 1002, 2023, 1011, 1028, 2131, 3597, 23212, 20518, 2906, 1006, 1007, 1011, 1028, 24240, 1006, 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...
overtrue/wechat
src/MiniProgram/ActivityMessage/Client.php
Client.updateMessage
public function updateMessage(string $activityId, int $state = 0, array $params = []) { if (!in_array($state, [0, 1], true)) { throw new InvalidArgumentException('"state" should be "0" or "1".'); } $params = $this->formatParameters($params); $params = [ 'act...
php
public function updateMessage(string $activityId, int $state = 0, array $params = []) { if (!in_array($state, [0, 1], true)) { throw new InvalidArgumentException('"state" should be "0" or "1".'); } $params = $this->formatParameters($params); $params = [ 'act...
[ "public", "function", "updateMessage", "(", "string", "$", "activityId", ",", "int", "$", "state", "=", "0", ",", "array", "$", "params", "=", "[", "]", ")", "{", "if", "(", "!", "in_array", "(", "$", "state", ",", "[", "0", ",", "1", "]", ",", ...
@param string $activityId @param int $state @param array $params @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws InvalidArgumentException
[ "@param", "string", "$activityId", "@param", "int", "$state", "@param", "array", "$params" ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/MiniProgram/ActivityMessage/Client.php#L36-L51
train
Update a message
[ 30522, 2270, 3853, 10651, 7834, 3736, 3351, 1006, 5164, 1002, 4023, 3593, 1010, 20014, 1002, 2110, 1027, 1014, 1010, 9140, 1002, 11498, 5244, 1027, 1031, 1033, 1007, 1063, 2065, 1006, 999, 1999, 1035, 9140, 1006, 1002, 2110, 1010, 1031, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Messenger/Handler/HandlersLocator.php
HandlersLocator.getHandlers
public function getHandlers(Envelope $envelope): iterable { $seen = []; foreach (self::listTypes($envelope) as $type) { foreach ($this->handlers[$type] ?? [] as $handlerDescriptor) { if (\is_callable($handlerDescriptor)) { $handlerDescriptor = new Han...
php
public function getHandlers(Envelope $envelope): iterable { $seen = []; foreach (self::listTypes($envelope) as $type) { foreach ($this->handlers[$type] ?? [] as $handlerDescriptor) { if (\is_callable($handlerDescriptor)) { $handlerDescriptor = new Han...
[ "public", "function", "getHandlers", "(", "Envelope", "$", "envelope", ")", ":", "iterable", "{", "$", "seen", "=", "[", "]", ";", "foreach", "(", "self", "::", "listTypes", "(", "$", "envelope", ")", "as", "$", "type", ")", "{", "foreach", "(", "$",...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Messenger/Handler/HandlersLocator.php#L40-L64
train
Returns the handlers that should be handled by the given envelope.
[ 30522, 2270, 3853, 2131, 11774, 12910, 1006, 11255, 1002, 11255, 1007, 1024, 2009, 6906, 3468, 1063, 1002, 2464, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 2969, 1024, 1024, 2862, 13874, 2015, 1006, 1002, 11255, 1007, 2004, 1002, 2828, 1007...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php
SQLiteGrammar.compileAdd
public function compileAdd(Blueprint $blueprint, Fluent $command) { $columns = $this->prefixArray('add column', $this->getColumns($blueprint)); return collect($columns)->map(function ($column) use ($blueprint) { return 'alter table '.$this->wrapTable($blueprint).' '.$column; })-...
php
public function compileAdd(Blueprint $blueprint, Fluent $command) { $columns = $this->prefixArray('add column', $this->getColumns($blueprint)); return collect($columns)->map(function ($column) use ($blueprint) { return 'alter table '.$this->wrapTable($blueprint).' '.$column; })-...
[ "public", "function", "compileAdd", "(", "Blueprint", "$", "blueprint", ",", "Fluent", "$", "command", ")", "{", "$", "columns", "=", "$", "this", "->", "prefixArray", "(", "'add column'", ",", "$", "this", "->", "getColumns", "(", "$", "blueprint", ")", ...
Compile alter table commands for adding columns. @param \Illuminate\Database\Schema\Blueprint $blueprint @param \Illuminate\Support\Fluent $command @return array
[ "Compile", "alter", "table", "commands", "for", "adding", "columns", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php#L136-L143
train
Compiles add column statements into a single string
[ 30522, 2270, 3853, 4012, 22090, 4215, 2094, 1006, 2630, 16550, 1002, 2630, 16550, 1010, 19376, 1002, 3094, 1007, 1063, 1002, 7753, 1027, 1002, 2023, 1011, 1028, 17576, 2906, 9447, 1006, 1005, 5587, 5930, 1005, 30524, 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/Common.php
Common.safe_unserialize
public static function safe_unserialize($string, $allowedClasses = [], $rethrow = false) { if (PHP_MAJOR_VERSION >= 7) { try { return unserialize($string, ['allowed_classes' => empty($allowedClasses) ? false : $allowedClasses]); } catch (\Throwable $e) { ...
php
public static function safe_unserialize($string, $allowedClasses = [], $rethrow = false) { if (PHP_MAJOR_VERSION >= 7) { try { return unserialize($string, ['allowed_classes' => empty($allowedClasses) ? false : $allowedClasses]); } catch (\Throwable $e) { ...
[ "public", "static", "function", "safe_unserialize", "(", "$", "string", ",", "$", "allowedClasses", "=", "[", "]", ",", "$", "rethrow", "=", "false", ")", "{", "if", "(", "PHP_MAJOR_VERSION", ">=", "7", ")", "{", "try", "{", "return", "unserialize", "(",...
Secure wrapper for unserialize, which by default disallows unserializing classes @param string $string String to unserialize @param array $allowedClasses Class names that should be allowed to unserialize @param bool $rethrow Whether to rethrow exceptions or not. @return mixed
[ "Secure", "wrapper", "for", "unserialize", "which", "by", "default", "disallows", "unserializing", "classes" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Common.php#L267-L288
train
Unserializes a string
[ 30522, 2270, 10763, 3853, 3647, 1035, 4895, 8043, 4818, 4697, 1006, 1002, 5164, 1010, 1002, 3039, 26266, 2229, 1027, 1031, 1033, 1010, 1002, 2128, 2705, 10524, 1027, 6270, 1007, 1063, 2065, 1006, 25718, 1035, 2350, 1035, 2544, 1028, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Foundation/Console/Kernel.php
Kernel.call
public function call($command, array $parameters = [], $outputBuffer = null) { $this->bootstrap(); return $this->getArtisan()->call($command, $parameters, $outputBuffer); }
php
public function call($command, array $parameters = [], $outputBuffer = null) { $this->bootstrap(); return $this->getArtisan()->call($command, $parameters, $outputBuffer); }
[ "public", "function", "call", "(", "$", "command", ",", "array", "$", "parameters", "=", "[", "]", ",", "$", "outputBuffer", "=", "null", ")", "{", "$", "this", "->", "bootstrap", "(", ")", ";", "return", "$", "this", "->", "getArtisan", "(", ")", ...
Run an Artisan console command by name. @param string $command @param array $parameters @param \Symfony\Component\Console\Output\OutputInterface $outputBuffer @return int @throws \Symfony\Component\Console\Exception\CommandNotFoundException
[ "Run", "an", "Artisan", "console", "command", "by", "name", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Console/Kernel.php#L260-L265
train
Call a command on the current environment
[ 30522, 2270, 3853, 2655, 1006, 1002, 3094, 1010, 9140, 1002, 11709, 1027, 1031, 1033, 1010, 1002, 6434, 8569, 12494, 1027, 19701, 1007, 1063, 1002, 2023, 1011, 1028, 6879, 6494, 2361, 1006, 1007, 1025, 2709, 1002, 2023, 30524, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Device/Client.php
Client.authorize
public function authorize(array $devices, string $productId, int $opType = 0) { $params = [ 'device_num' => count($devices), 'device_list' => $devices, 'op_type' => $opType, 'product_id' => $productId, ]; return $this->httpPostJson('device/aut...
php
public function authorize(array $devices, string $productId, int $opType = 0) { $params = [ 'device_num' => count($devices), 'device_list' => $devices, 'op_type' => $opType, 'product_id' => $productId, ]; return $this->httpPostJson('device/aut...
[ "public", "function", "authorize", "(", "array", "$", "devices", ",", "string", "$", "productId", ",", "int", "$", "opType", "=", "0", ")", "{", "$", "params", "=", "[", "'device_num'", "=>", "count", "(", "$", "devices", ")", ",", "'device_list'", "=>...
@param array $devices @param string $productId @param int $opType @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
[ "@param", "array", "$devices", "@param", "string", "$productId", "@param", "int", "$opType" ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/Device/Client.php#L68-L78
train
Authorize a device
[ 30522, 2270, 3853, 3166, 4697, 1006, 9140, 1002, 5733, 1010, 5164, 1002, 4031, 3593, 1010, 20014, 1002, 23569, 18863, 1027, 1014, 1007, 1063, 1002, 11498, 5244, 1027, 1031, 1005, 5080, 1035, 16371, 2213, 1005, 1027, 1028, 4175, 1006, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Page/Page.php
Page.content
public function content($var = null) { if ($var !== null) { $this->raw_content = $var; // Update file object. $file = $this->file(); if ($file) { $file->markdown($var); } // Force re-processing. $this->id(t...
php
public function content($var = null) { if ($var !== null) { $this->raw_content = $var; // Update file object. $file = $this->file(); if ($file) { $file->markdown($var); } // Force re-processing. $this->id(t...
[ "public", "function", "content", "(", "$", "var", "=", "null", ")", "{", "if", "(", "$", "var", "!==", "null", ")", "{", "$", "this", "->", "raw_content", "=", "$", "var", ";", "// Update file object.", "$", "file", "=", "$", "this", "->", "file", ...
Gets and Sets the content based on content portion of the .md file @param string $var Content @return string Content
[ "Gets", "and", "Sets", "the", "content", "based", "on", "content", "portion", "of", "the", ".", "md", "file" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Page/Page.php#L636-L755
train
Load the content of the page
[ 30522, 2270, 3853, 4180, 1006, 1002, 13075, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 13075, 999, 1027, 1027, 19701, 1007, 1063, 1002, 2023, 1011, 1028, 6315, 1035, 4180, 1027, 1002, 13075, 1025, 1013, 1013, 10651, 5371, 4874, 1012, 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/Translation/Loader/PoFileLoader.php
PoFileLoader.addMessage
private function addMessage(array &$messages, array $item) { if (\is_array($item['translated'])) { $messages[stripcslashes($item['ids']['singular'])] = stripcslashes($item['translated'][0]); if (isset($item['ids']['plural'])) { $plurals = $item['translated']; ...
php
private function addMessage(array &$messages, array $item) { if (\is_array($item['translated'])) { $messages[stripcslashes($item['ids']['singular'])] = stripcslashes($item['translated'][0]); if (isset($item['ids']['plural'])) { $plurals = $item['translated']; ...
[ "private", "function", "addMessage", "(", "array", "&", "$", "messages", ",", "array", "$", "item", ")", "{", "if", "(", "\\", "is_array", "(", "$", "item", "[", "'translated'", "]", ")", ")", "{", "$", "messages", "[", "stripcslashes", "(", "$", "it...
Save a translation item to the messages. A .po file could contain by error missing plural indexes. We need to fix these before saving them.
[ "Save", "a", "translation", "item", "to", "the", "messages", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Translation/Loader/PoFileLoader.php#L127-L147
train
Adds an item to the messages array
[ 30522, 2797, 3853, 5587, 7834, 3736, 3351, 1006, 9140, 1004, 1002, 7696, 1010, 9140, 1002, 8875, 1007, 1063, 2065, 1006, 1032, 2003, 1035, 9140, 1006, 1002, 8875, 1031, 1005, 5421, 1005, 1033, 1007, 1007, 1063, 1002, 7696, 1031, 6167, 616...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
slimphp/Slim
Slim/Http/Message.php
Message.withAddedHeader
public function withAddedHeader($name, $value) { $clone = clone $this; $clone->headers->add($name, $value); if ($this instanceof Response && $this->body instanceof NonBufferedBody) { header(sprintf('%s: %s', $name, $clone->getHeaderLine($name))); } return $clone...
php
public function withAddedHeader($name, $value) { $clone = clone $this; $clone->headers->add($name, $value); if ($this instanceof Response && $this->body instanceof NonBufferedBody) { header(sprintf('%s: %s', $name, $clone->getHeaderLine($name))); } return $clone...
[ "public", "function", "withAddedHeader", "(", "$", "name", ",", "$", "value", ")", "{", "$", "clone", "=", "clone", "$", "this", ";", "$", "clone", "->", "headers", "->", "add", "(", "$", "name", ",", "$", "value", ")", ";", "if", "(", "$", "this...
Return an instance with the specified header appended with the given value. Existing values for the specified header will be maintained. The new value(s) will be appended to the existing list. If the header did not exist previously, it will be added. This method MUST be implemented in such a way as to retain the immu...
[ "Return", "an", "instance", "with", "the", "specified", "header", "appended", "with", "the", "given", "value", "." ]
ccef5f7d8bcd469d59cbe64f6210d83764f91543
https://github.com/slimphp/Slim/blob/ccef5f7d8bcd469d59cbe64f6210d83764f91543/Slim/Http/Message.php#L228-L238
train
Add a header to the response
[ 30522, 2270, 3853, 2007, 4215, 5732, 4974, 2121, 1006, 1002, 2171, 1010, 1002, 3643, 1007, 1063, 1002, 17598, 1027, 17598, 1002, 2023, 1025, 1002, 17598, 1011, 1028, 20346, 2015, 1011, 1028, 5587, 1006, 1002, 2171, 1010, 1002, 3643, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Intl/Data/Generator/RegionDataGenerator.php
RegionDataGenerator.generateDataForMeta
protected function generateDataForMeta(BundleReaderInterface $reader, $tempDir) { $rootBundle = $reader->read($tempDir, 'root'); $this->regionCodes = array_unique($this->regionCodes); sort($this->regionCodes); return [ 'Version' => $rootBundle['Version'], '...
php
protected function generateDataForMeta(BundleReaderInterface $reader, $tempDir) { $rootBundle = $reader->read($tempDir, 'root'); $this->regionCodes = array_unique($this->regionCodes); sort($this->regionCodes); return [ 'Version' => $rootBundle['Version'], '...
[ "protected", "function", "generateDataForMeta", "(", "BundleReaderInterface", "$", "reader", ",", "$", "tempDir", ")", "{", "$", "rootBundle", "=", "$", "reader", "->", "read", "(", "$", "tempDir", ",", "'root'", ")", ";", "$", "this", "->", "regionCodes", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Intl/Data/Generator/RegionDataGenerator.php#L119-L131
train
Generate data for Meta
[ 30522, 5123, 3853, 7013, 6790, 14192, 12928, 1006, 14012, 16416, 4063, 18447, 2121, 12172, 1002, 8068, 1010, 1002, 8915, 8737, 4305, 2099, 1007, 1063, 1002, 7117, 27265, 2571, 1027, 1002, 8068, 1011, 1028, 3191, 1006, 1002, 8915, 8737, 4305...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/SettingsServer.php
SettingsServer.raiseMemoryLimitIfNecessary
public static function raiseMemoryLimitIfNecessary() { $memoryLimit = self::getMemoryLimitValue(); if ($memoryLimit === false) { return false; } $minimumMemoryLimit = Config::getInstance()->General['minimum_memory_limit']; if (self::isArchivePhpTriggered()) { ...
php
public static function raiseMemoryLimitIfNecessary() { $memoryLimit = self::getMemoryLimitValue(); if ($memoryLimit === false) { return false; } $minimumMemoryLimit = Config::getInstance()->General['minimum_memory_limit']; if (self::isArchivePhpTriggered()) { ...
[ "public", "static", "function", "raiseMemoryLimitIfNecessary", "(", ")", "{", "$", "memoryLimit", "=", "self", "::", "getMemoryLimitValue", "(", ")", ";", "if", "(", "$", "memoryLimit", "===", "false", ")", "{", "return", "false", ";", "}", "$", "minimumMemo...
Raise PHP memory limit if below the minimum required @return bool true if set; false otherwise
[ "Raise", "PHP", "memory", "limit", "if", "below", "the", "minimum", "required" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/SettingsServer.php#L132-L153
train
Raise memory limit if memory limit is not met
[ 30522, 2270, 10763, 3853, 5333, 4168, 5302, 23320, 27605, 3775, 2546, 2638, 9623, 10286, 2100, 1006, 1007, 1063, 1002, 3638, 17960, 4183, 1027, 2969, 1024, 1024, 2131, 4168, 5302, 23320, 27605, 9189, 2389, 5657, 1006, 1007, 1025, 2065, 1006...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/widgets/MediaManager.php
MediaManager.onGoToFolder
public function onGoToFolder() { $path = Input::get('path'); if (Input::get('clearCache')) { MediaLibrary::instance()->resetCache(); } if (Input::get('resetSearch')) { $this->setSearchTerm(null); } $this->setCurrentFolder($path); $th...
php
public function onGoToFolder() { $path = Input::get('path'); if (Input::get('clearCache')) { MediaLibrary::instance()->resetCache(); } if (Input::get('resetSearch')) { $this->setSearchTerm(null); } $this->setCurrentFolder($path); $th...
[ "public", "function", "onGoToFolder", "(", ")", "{", "$", "path", "=", "Input", "::", "get", "(", "'path'", ")", ";", "if", "(", "Input", "::", "get", "(", "'clearCache'", ")", ")", "{", "MediaLibrary", "::", "instance", "(", ")", "->", "resetCache", ...
Change view AJAX handler @return array
[ "Change", "view", "AJAX", "handler" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/widgets/MediaManager.php#L131-L150
train
onGoToFolder callback.
[ 30522, 2270, 3853, 2006, 3995, 3406, 10371, 2121, 1006, 1007, 1063, 1002, 4130, 1027, 7953, 1024, 1024, 2131, 1006, 1005, 4130, 1005, 1007, 1025, 2065, 1006, 7953, 1024, 1024, 2131, 1006, 1005, 3154, 3540, 5403, 1005, 1007, 1007, 1063, 23...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Framework/File/AbstractFile.php
AbstractFile.getExtension
public function getExtension(bool $withDot = false): string { if (null === $this->extension) { $this->setPathInfo(); } return ($withDot ? '.' : '') . $this->extension; }
php
public function getExtension(bool $withDot = false): string { if (null === $this->extension) { $this->setPathInfo(); } return ($withDot ? '.' : '') . $this->extension; }
[ "public", "function", "getExtension", "(", "bool", "$", "withDot", "=", "false", ")", ":", "string", "{", "if", "(", "null", "===", "$", "this", "->", "extension", ")", "{", "$", "this", "->", "setPathInfo", "(", ")", ";", "}", "return", "(", "$", ...
{@inheritdoc} @see FileInterface::getExtension()
[ "{" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Framework/File/AbstractFile.php#L137-L144
train
Get the file extension
[ 30522, 2270, 3853, 2131, 10288, 29048, 1006, 22017, 2140, 1002, 2007, 27364, 1027, 6270, 1007, 1024, 5164, 1063, 2065, 1006, 19701, 1027, 1027, 1027, 1002, 2023, 1011, 1028, 5331, 1007, 1063, 1002, 2023, 1011, 1028, 2275, 15069, 2378, 14876...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/BasicService/Jssdk/Client.php
Client.buildConfig
public function buildConfig(array $jsApiList, bool $debug = false, bool $beta = false, bool $json = true) { $config = array_merge(compact('debug', 'beta', 'jsApiList'), $this->configSignature()); return $json ? json_encode($config) : $config; }
php
public function buildConfig(array $jsApiList, bool $debug = false, bool $beta = false, bool $json = true) { $config = array_merge(compact('debug', 'beta', 'jsApiList'), $this->configSignature()); return $json ? json_encode($config) : $config; }
[ "public", "function", "buildConfig", "(", "array", "$", "jsApiList", ",", "bool", "$", "debug", "=", "false", ",", "bool", "$", "beta", "=", "false", ",", "bool", "$", "json", "=", "true", ")", "{", "$", "config", "=", "array_merge", "(", "compact", ...
Get config json for jsapi. @param array $jsApiList @param bool $debug @param bool $beta @param bool $json @return array|string @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException @throws \Psr\SimpleCache\InvalidArgumentException @throws \EasyWeChat\Kernel\Exceptions\RuntimeException
[ "Get", "config", "json", "for", "jsapi", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/BasicService/Jssdk/Client.php#L54-L59
train
Build the config array
[ 30522, 2270, 3853, 3857, 8663, 8873, 2290, 1006, 9140, 1002, 1046, 3736, 8197, 9863, 1010, 22017, 2140, 1002, 2139, 8569, 2290, 1027, 6270, 1010, 22017, 2140, 1002, 8247, 1027, 6270, 1010, 22017, 2140, 1002, 1046, 3385, 1027, 2995, 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...
slimphp/Slim
Slim/Router.php
Router.createRoute
protected function createRoute($methods, $pattern, $callable) { $route = new Route($methods, $pattern, $callable, $this->routeGroups, $this->routeCounter); if (!empty($this->container)) { $route->setContainer($this->container); } return $route; }
php
protected function createRoute($methods, $pattern, $callable) { $route = new Route($methods, $pattern, $callable, $this->routeGroups, $this->routeCounter); if (!empty($this->container)) { $route->setContainer($this->container); } return $route; }
[ "protected", "function", "createRoute", "(", "$", "methods", ",", "$", "pattern", ",", "$", "callable", ")", "{", "$", "route", "=", "new", "Route", "(", "$", "methods", ",", "$", "pattern", ",", "$", "callable", ",", "$", "this", "->", "routeGroups", ...
Create a new Route object @param string[] $methods Array of HTTP methods @param string $pattern The route pattern @param callable $callable The route callable @return RouteInterface
[ "Create", "a", "new", "Route", "object" ]
ccef5f7d8bcd469d59cbe64f6210d83764f91543
https://github.com/slimphp/Slim/blob/ccef5f7d8bcd469d59cbe64f6210d83764f91543/Slim/Router.php#L208-L216
train
Create Route object
[ 30522, 5123, 3853, 3443, 22494, 2618, 1006, 1002, 4725, 1010, 1002, 5418, 1010, 1002, 2655, 3085, 1007, 1063, 1002, 2799, 1027, 2047, 2799, 1006, 1002, 4725, 1010, 1002, 5418, 1010, 1002, 2655, 3085, 1010, 1002, 2023, 1011, 1028, 2799, 17...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Db/Adapter/Sqlsrv.php
Zend_Db_Adapter_Sqlsrv._checkRequiredOptions
protected function _checkRequiredOptions(array $config) { // we need at least a dbname if (! array_key_exists('dbname', $config)) { /** @see Zend_Db_Adapter_Exception */ // require_once 'Zend/Db/Adapter/Exception.php'; throw new Zend_Db_Adapter_Exception("Configur...
php
protected function _checkRequiredOptions(array $config) { // we need at least a dbname if (! array_key_exists('dbname', $config)) { /** @see Zend_Db_Adapter_Exception */ // require_once 'Zend/Db/Adapter/Exception.php'; throw new Zend_Db_Adapter_Exception("Configur...
[ "protected", "function", "_checkRequiredOptions", "(", "array", "$", "config", ")", "{", "// we need at least a dbname", "if", "(", "!", "array_key_exists", "(", "'dbname'", ",", "$", "config", ")", ")", "{", "/** @see Zend_Db_Adapter_Exception */", "// require_once 'Ze...
Check for config options that are mandatory. Throw exceptions if any are missing. @param array $config @throws Zend_Db_Adapter_Exception
[ "Check", "for", "config", "options", "that", "are", "mandatory", ".", "Throw", "exceptions", "if", "any", "are", "missing", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Adapter/Sqlsrv.php#L179-L205
train
Check required options
[ 30522, 5123, 3853, 1035, 4638, 2890, 15549, 23417, 16790, 2015, 1006, 9140, 1002, 9530, 8873, 2290, 1007, 1063, 1013, 1013, 2057, 2342, 2012, 2560, 1037, 16962, 18442, 2065, 1006, 999, 9140, 1035, 3145, 1035, 6526, 1006, 1005, 16962, 18442,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Twig/Twig.php
Twig.processSite
public function processSite($format = null, array $vars = []) { // set the page now its been processed $this->grav->fireEvent('onTwigSiteVariables'); $pages = $this->grav['pages']; $page = $this->grav['page']; $content = $page->content(); $twig_vars = $this->twig_var...
php
public function processSite($format = null, array $vars = []) { // set the page now its been processed $this->grav->fireEvent('onTwigSiteVariables'); $pages = $this->grav['pages']; $page = $this->grav['page']; $content = $page->content(); $twig_vars = $this->twig_var...
[ "public", "function", "processSite", "(", "$", "format", "=", "null", ",", "array", "$", "vars", "=", "[", "]", ")", "{", "// set the page now its been processed", "$", "this", "->", "grav", "->", "fireEvent", "(", "'onTwigSiteVariables'", ")", ";", "$", "pa...
Twig process that renders the site layout. This is the main twig process that renders the overall page and handles all the layout for the site display. @param string $format Output format (defaults to HTML). @return string the rendered output @throws \RuntimeException
[ "Twig", "process", "that", "renders", "the", "site", "layout", ".", "This", "is", "the", "main", "twig", "process", "that", "renders", "the", "overall", "page", "and", "handles", "all", "the", "layout", "for", "the", "site", "display", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Twig/Twig.php#L360-L405
train
Process site content
[ 30522, 2270, 3853, 2832, 28032, 2063, 1006, 1002, 4289, 1027, 19701, 1010, 9140, 1002, 13075, 2015, 1027, 1031, 1033, 1007, 1063, 1013, 1013, 2275, 1996, 3931, 2085, 2049, 2042, 13995, 1002, 2023, 1011, 1028, 24665, 11431, 1011, 1028, 2543,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php
AbstractObjectNormalizer.setMaxDepthHandler
public function setMaxDepthHandler(?callable $handler): void { @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the "max_depth_handler" key of the context instead.', __METHOD__), E_USER_DEPRECATED); $this->maxDepthHandler = $handler; }
php
public function setMaxDepthHandler(?callable $handler): void { @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the "max_depth_handler" key of the context instead.', __METHOD__), E_USER_DEPRECATED); $this->maxDepthHandler = $handler; }
[ "public", "function", "setMaxDepthHandler", "(", "?", "callable", "$", "handler", ")", ":", "void", "{", "@", "trigger_error", "(", "sprintf", "(", "'The \"%s()\" method is deprecated since Symfony 4.2, use the \"max_depth_handler\" key of the context instead.'", ",", "__METHOD...
Sets a handler function that will be called when the max depth is reached. @deprecated since Symfony 4.2
[ "Sets", "a", "handler", "function", "that", "will", "be", "called", "when", "the", "max", "depth", "is", "reached", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php#L303-L308
train
Sets the maximum depth handler for the context.
[ 30522, 2270, 3853, 2275, 17848, 3207, 13876, 23644, 5685, 3917, 1006, 1029, 2655, 3085, 1002, 28213, 1007, 1024, 11675, 1063, 1030, 9495, 1035, 7561, 1006, 9043, 2546, 1006, 1005, 1996, 1000, 1003, 1055, 1006, 1007, 1000, 4118, 2003, 2139, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/system/classes/CombineAssets.php
CombineAssets.setHashOnCombinerFilters
protected function setHashOnCombinerFilters($hash) { $allFilters = call_user_func_array('array_merge', $this->getFilters()); foreach ($allFilters as $filter) { if (method_exists($filter, 'setHash')) { $filter->setHash($hash); } } }
php
protected function setHashOnCombinerFilters($hash) { $allFilters = call_user_func_array('array_merge', $this->getFilters()); foreach ($allFilters as $filter) { if (method_exists($filter, 'setHash')) { $filter->setHash($hash); } } }
[ "protected", "function", "setHashOnCombinerFilters", "(", "$", "hash", ")", "{", "$", "allFilters", "=", "call_user_func_array", "(", "'array_merge'", ",", "$", "this", "->", "getFilters", "(", ")", ")", ";", "foreach", "(", "$", "allFilters", "as", "$", "fi...
Busts the cache based on a different cache key. @return void
[ "Busts", "the", "cache", "based", "on", "a", "different", "cache", "key", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/classes/CombineAssets.php#L453-L462
train
Set Hash on combiner filters
[ 30522, 5123, 3853, 6662, 11823, 2239, 18274, 26455, 8873, 21928, 2015, 1006, 1002, 23325, 1007, 1063, 1002, 2035, 8873, 21928, 2015, 1027, 2655, 1035, 5310, 1035, 4569, 2278, 1035, 9140, 1006, 1005, 9140, 1035, 13590, 1005, 1010, 1002, 2023...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Validator/Constraints/NotNullValidator.php
NotNullValidator.validate
public function validate($value, Constraint $constraint) { if (!$constraint instanceof NotNull) { throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\NotNull'); } if (null === $value) { $this->context->buildViolation($constraint->message) -...
php
public function validate($value, Constraint $constraint) { if (!$constraint instanceof NotNull) { throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\NotNull'); } if (null === $value) { $this->context->buildViolation($constraint->message) -...
[ "public", "function", "validate", "(", "$", "value", ",", "Constraint", "$", "constraint", ")", "{", "if", "(", "!", "$", "constraint", "instanceof", "NotNull", ")", "{", "throw", "new", "UnexpectedTypeException", "(", "$", "constraint", ",", "__NAMESPACE__", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Validator/Constraints/NotNullValidator.php#L26-L38
train
Checks if the value is not null
[ 30522, 2270, 3853, 9398, 3686, 1006, 1002, 3643, 1010, 27142, 1002, 27142, 1007, 1063, 2065, 1006, 999, 1002, 27142, 6013, 11253, 2025, 11231, 3363, 1007, 1063, 5466, 2047, 9223, 13874, 10288, 24422, 1006, 1002, 27142, 1010, 1035, 1035, 341...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Bridge/Twig/Extension/RoutingExtension.php
RoutingExtension.getUrl
public function getUrl($name, $parameters = [], $schemeRelative = false) { return $this->generator->generate($name, $parameters, $schemeRelative ? UrlGeneratorInterface::NETWORK_PATH : UrlGeneratorInterface::ABSOLUTE_URL); }
php
public function getUrl($name, $parameters = [], $schemeRelative = false) { return $this->generator->generate($name, $parameters, $schemeRelative ? UrlGeneratorInterface::NETWORK_PATH : UrlGeneratorInterface::ABSOLUTE_URL); }
[ "public", "function", "getUrl", "(", "$", "name", ",", "$", "parameters", "=", "[", "]", ",", "$", "schemeRelative", "=", "false", ")", "{", "return", "$", "this", "->", "generator", "->", "generate", "(", "$", "name", ",", "$", "parameters", ",", "$...
@param string $name @param array $parameters @param bool $schemeRelative @return string
[ "@param", "string", "$name", "@param", "array", "$parameters", "@param", "bool", "$schemeRelative" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bridge/Twig/Extension/RoutingExtension.php#L67-L70
train
Returns a URL for the specified name.
[ 30522, 2270, 3853, 2131, 3126, 2140, 1006, 1002, 2171, 1010, 1002, 11709, 1027, 1031, 1033, 1010, 1002, 5679, 16570, 8082, 1027, 6270, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 13103, 1011, 1028, 9699, 1006, 1002, 2171, 1010, 1002, 11709, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php
AbstractObjectNormalizer.updateData
private function updateData(array $data, string $attribute, $attributeValue, string $class, ?string $format, array $context): array { if (null === $attributeValue && ($context[self::SKIP_NULL_VALUES] ?? $this->defaultContext[self::SKIP_NULL_VALUES] ?? false)) { return $data; } i...
php
private function updateData(array $data, string $attribute, $attributeValue, string $class, ?string $format, array $context): array { if (null === $attributeValue && ($context[self::SKIP_NULL_VALUES] ?? $this->defaultContext[self::SKIP_NULL_VALUES] ?? false)) { return $data; } i...
[ "private", "function", "updateData", "(", "array", "$", "data", ",", "string", "$", "attribute", ",", "$", "attributeValue", ",", "string", "$", "class", ",", "?", "string", "$", "format", ",", "array", "$", "context", ")", ":", "array", "{", "if", "("...
Sets an attribute and apply the name converter if necessary. @param mixed $attributeValue
[ "Sets", "an", "attribute", "and", "apply", "the", "name", "converter", "if", "necessary", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php#L509-L522
train
Update data for the attribute
[ 30522, 2797, 3853, 7172, 6790, 1006, 9140, 1002, 2951, 1010, 5164, 1002, 17961, 1010, 1002, 17961, 10175, 5657, 1010, 5164, 1002, 2465, 1010, 1029, 5164, 1002, 4289, 1010, 9140, 1002, 6123, 1007, 1024, 9140, 1063, 2065, 1006, 19701, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/Goals/DataTable/Filter/AppendNameToColumnNames.php
AppendNameToColumnNames.filter
public function filter($table) { if (!isset($this->nameToAppend) || '' === $this->nameToAppend || false === $this->nameToAppend) { return; } foreach ($table->getRows() as $row) { $columns = $row->getColumns(); foreach ($columns as $column => $value) { ...
php
public function filter($table) { if (!isset($this->nameToAppend) || '' === $this->nameToAppend || false === $this->nameToAppend) { return; } foreach ($table->getRows() as $row) { $columns = $row->getColumns(); foreach ($columns as $column => $value) { ...
[ "public", "function", "filter", "(", "$", "table", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "nameToAppend", ")", "||", "''", "===", "$", "this", "->", "nameToAppend", "||", "false", "===", "$", "this", "->", "nameToAppend", ")", "{"...
See {@link ReplaceColumnNames}. @param DataTable $table
[ "See", "{", "@link", "ReplaceColumnNames", "}", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Goals/DataTable/Filter/AppendNameToColumnNames.php#L40-L56
train
Filter the table and append the nameToAppend property to all columns of the table
[ 30522, 2270, 3853, 11307, 1006, 1002, 2795, 1007, 1063, 2065, 1006, 999, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 2171, 3406, 29098, 10497, 1007, 1064, 1064, 1005, 1005, 1027, 1027, 1027, 1002, 2023, 1011, 1028, 2171, 3406, 29098, 10497, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/UsersManager/UserPreferences.php
UserPreferences.getDefaultReport
public function getDefaultReport() { // User preference: default website ID to load $defaultReport = $this->api->getUserPreference(Piwik::getCurrentUserLogin(), APIUsersManager::PREFERENCE_DEFAULT_REPORT); if (!is_numeric($defaultReport)) { return $defaultReport; } ...
php
public function getDefaultReport() { // User preference: default website ID to load $defaultReport = $this->api->getUserPreference(Piwik::getCurrentUserLogin(), APIUsersManager::PREFERENCE_DEFAULT_REPORT); if (!is_numeric($defaultReport)) { return $defaultReport; } ...
[ "public", "function", "getDefaultReport", "(", ")", "{", "// User preference: default website ID to load", "$", "defaultReport", "=", "$", "this", "->", "api", "->", "getUserPreference", "(", "Piwik", "::", "getCurrentUserLogin", "(", ")", ",", "APIUsersManager", "::"...
Returns default site ID that Piwik should load. _Note: This value is a Piwik setting set by each user._ @return bool|int @api
[ "Returns", "default", "site", "ID", "that", "Piwik", "should", "load", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/UsersManager/UserPreferences.php#L62-L76
train
Returns the default website ID to use for the user
[ 30522, 2270, 3853, 2131, 3207, 7011, 11314, 2890, 6442, 1006, 1007, 1063, 1013, 1013, 5310, 12157, 1024, 12398, 4037, 8909, 2000, 7170, 1002, 12398, 2890, 6442, 1027, 1002, 2023, 1011, 1028, 17928, 1011, 1028, 2131, 20330, 28139, 25523, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Container/IniConfigDefinitionSource.php
IniConfigDefinitionSource.getDefinition
public function getDefinition($name) { if (strpos($name, $this->prefix) !== 0) { return null; } list($sectionName, $configKey) = $this->parseEntryName($name); $section = $this->getSection($sectionName); if ($configKey === null) { return new ValueDef...
php
public function getDefinition($name) { if (strpos($name, $this->prefix) !== 0) { return null; } list($sectionName, $configKey) = $this->parseEntryName($name); $section = $this->getSection($sectionName); if ($configKey === null) { return new ValueDef...
[ "public", "function", "getDefinition", "(", "$", "name", ")", "{", "if", "(", "strpos", "(", "$", "name", ",", "$", "this", "->", "prefix", ")", "!==", "0", ")", "{", "return", "null", ";", "}", "list", "(", "$", "sectionName", ",", "$", "configKey...
{@inheritdoc}
[ "{" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Container/IniConfigDefinitionSource.php#L48-L67
train
Get the definition of the value
[ 30522, 2270, 3853, 2131, 3207, 16294, 22753, 1006, 1002, 2171, 1007, 1063, 2065, 1006, 2358, 14536, 2891, 1006, 1002, 2171, 1010, 1002, 2023, 1011, 1028, 17576, 1007, 999, 1027, 1027, 1014, 1007, 1063, 2709, 19701, 1025, 1065, 2862, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Validation/Validator.php
Validator.validateUsingCustomRule
protected function validateUsingCustomRule($attribute, $value, $rule) { if (! $rule->passes($attribute, $value)) { $this->failedRules[$attribute][get_class($rule)] = []; $messages = (array) $rule->message(); foreach ($messages as $message) { $this->messa...
php
protected function validateUsingCustomRule($attribute, $value, $rule) { if (! $rule->passes($attribute, $value)) { $this->failedRules[$attribute][get_class($rule)] = []; $messages = (array) $rule->message(); foreach ($messages as $message) { $this->messa...
[ "protected", "function", "validateUsingCustomRule", "(", "$", "attribute", ",", "$", "value", ",", "$", "rule", ")", "{", "if", "(", "!", "$", "rule", "->", "passes", "(", "$", "attribute", ",", "$", "value", ")", ")", "{", "$", "this", "->", "failed...
Validate an attribute using a custom rule object. @param string $attribute @param mixed $value @param \Illuminate\Contracts\Validation\Rule $rule @return void
[ "Validate", "an", "attribute", "using", "a", "custom", "rule", "object", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Validator.php#L570-L583
train
Validate using custom rule
[ 30522, 5123, 3853, 9398, 3686, 18161, 7874, 20389, 6820, 2571, 1006, 1002, 17961, 1010, 1002, 3643, 1010, 1002, 3627, 1007, 1063, 2065, 1006, 999, 1002, 3627, 1011, 1028, 5235, 1006, 1002, 17961, 1010, 1002, 3643, 1007, 1007, 1063, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Routing/Matcher/RedirectableUrlMatcher.php
RedirectableUrlMatcher.match
public function match($pathinfo) { try { return parent::match($pathinfo); } catch (ResourceNotFoundException $e) { if (!\in_array($this->context->getMethod(), ['HEAD', 'GET'], true)) { throw $e; } if ($this->allowSchemes) { ...
php
public function match($pathinfo) { try { return parent::match($pathinfo); } catch (ResourceNotFoundException $e) { if (!\in_array($this->context->getMethod(), ['HEAD', 'GET'], true)) { throw $e; } if ($this->allowSchemes) { ...
[ "public", "function", "match", "(", "$", "pathinfo", ")", "{", "try", "{", "return", "parent", "::", "match", "(", "$", "pathinfo", ")", ";", "}", "catch", "(", "ResourceNotFoundException", "$", "e", ")", "{", "if", "(", "!", "\\", "in_array", "(", "...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Routing/Matcher/RedirectableUrlMatcher.php#L25-L63
train
Matches a path and returns the result
[ 30522, 2270, 3853, 2674, 1006, 1002, 4130, 2378, 14876, 1007, 1063, 3046, 1063, 2709, 6687, 1024, 1024, 2674, 1006, 1002, 4130, 2378, 14876, 1007, 1025, 1065, 4608, 1006, 7692, 17048, 14876, 8630, 10288, 24422, 1002, 1041, 1007, 1063, 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...
getgrav/grav
system/src/Grav/Common/Utils.php
Utils.checkFilename
public static function checkFilename($filename) { $dangerous_extensions = Grav::instance()['config']->get('security.uploads_dangerous_extensions', []); array_walk($dangerous_extensions, function(&$val) { $val = '.' . $val; }); $extension = '.' . pathinfo($filename, PATHI...
php
public static function checkFilename($filename) { $dangerous_extensions = Grav::instance()['config']->get('security.uploads_dangerous_extensions', []); array_walk($dangerous_extensions, function(&$val) { $val = '.' . $val; }); $extension = '.' . pathinfo($filename, PATHI...
[ "public", "static", "function", "checkFilename", "(", "$", "filename", ")", "{", "$", "dangerous_extensions", "=", "Grav", "::", "instance", "(", ")", "[", "'config'", "]", "->", "get", "(", "'security.uploads_dangerous_extensions'", ",", "[", "]", ")", ";", ...
Returns true if filename is considered safe. @param string $filename @return bool
[ "Returns", "true", "if", "filename", "is", "considered", "safe", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Utils.php#L759-L778
train
Check if filename is in the list of dangerous file extensions
[ 30522, 2270, 10763, 3853, 4638, 8873, 20844, 4168, 1006, 1002, 5371, 18442, 1007, 1063, 1002, 4795, 1035, 14305, 1027, 24665, 11431, 1024, 1024, 6013, 1006, 1007, 1031, 1005, 9530, 8873, 2290, 1005, 1033, 1011, 1028, 2131, 1006, 1005, 3036,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/UserCountry/LocationProvider/GeoIp/Php.php
Php.getSupportedLocationInfo
public function getSupportedLocationInfo() { $result = array(); // country & continent info always available $result[self::CONTINENT_CODE_KEY] = true; $result[self::CONTINENT_NAME_KEY] = true; $result[self::COUNTRY_CODE_KEY] = true; $result[self::COUNTRY_NAME_KEY] = ...
php
public function getSupportedLocationInfo() { $result = array(); // country & continent info always available $result[self::CONTINENT_CODE_KEY] = true; $result[self::CONTINENT_NAME_KEY] = true; $result[self::COUNTRY_CODE_KEY] = true; $result[self::COUNTRY_NAME_KEY] = ...
[ "public", "function", "getSupportedLocationInfo", "(", ")", "{", "$", "result", "=", "array", "(", ")", ";", "// country & continent info always available", "$", "result", "[", "self", "::", "CONTINENT_CODE_KEY", "]", "=", "true", ";", "$", "result", "[", "self"...
Returns an array describing the types of location information this provider will return. The location info this provider supports depends on what GeoIP databases it can find. This provider will always support country & continent information. If a region database is found, then region code & name information will be ...
[ "Returns", "an", "array", "describing", "the", "types", "of", "location", "information", "this", "provider", "will", "return", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/UserCountry/LocationProvider/GeoIp/Php.php#L264-L309
train
Returns the list of location info
[ 30522, 2270, 3853, 4152, 6279, 6442, 2098, 4135, 10719, 2378, 14876, 1006, 1007, 1063, 1002, 2765, 1027, 9140, 1006, 1007, 1025, 1013, 1013, 2406, 1004, 9983, 18558, 2467, 2800, 1002, 2765, 1031, 2969, 1024, 1024, 9983, 1035, 3642, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/DependencyInjection/ContainerBuilder.php
ContainerBuilder.findDefinition
public function findDefinition($id) { $id = (string) $id; $seen = []; while (isset($this->aliasDefinitions[$id])) { $id = (string) $this->aliasDefinitions[$id]; if (isset($seen[$id])) { $seen = array_values($seen); $seen = \array_slic...
php
public function findDefinition($id) { $id = (string) $id; $seen = []; while (isset($this->aliasDefinitions[$id])) { $id = (string) $this->aliasDefinitions[$id]; if (isset($seen[$id])) { $seen = array_values($seen); $seen = \array_slic...
[ "public", "function", "findDefinition", "(", "$", "id", ")", "{", "$", "id", "=", "(", "string", ")", "$", "id", ";", "$", "seen", "=", "[", "]", ";", "while", "(", "isset", "(", "$", "this", "->", "aliasDefinitions", "[", "$", "id", "]", ")", ...
Gets a service definition by id or alias. The method "unaliases" recursively to return a Definition instance. @param string $id The service identifier or alias @return Definition A Definition instance @throws ServiceNotFoundException if the service definition does not exist
[ "Gets", "a", "service", "definition", "by", "id", "or", "alias", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/ContainerBuilder.php#L1046-L1066
train
Find alias definition by id
[ 30522, 2270, 3853, 2424, 3207, 16294, 22753, 1006, 1002, 8909, 1007, 1063, 1002, 8909, 1027, 1006, 5164, 1007, 1002, 8909, 1025, 1002, 2464, 1027, 1031, 1033, 1025, 2096, 1006, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 14593, 3207, 16294, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/API/DocumentationGenerator.php
DocumentationGenerator.getExampleUrl
public function getExampleUrl($class, $methodName, $parametersToSet = array()) { $knowExampleDefaultParametersValues = array( 'access' => 'view', 'userLogin' => 'test', 'passwordMd5ied' => 'passwordExample', 'email' => 'test@example.org',...
php
public function getExampleUrl($class, $methodName, $parametersToSet = array()) { $knowExampleDefaultParametersValues = array( 'access' => 'view', 'userLogin' => 'test', 'passwordMd5ied' => 'passwordExample', 'email' => 'test@example.org',...
[ "public", "function", "getExampleUrl", "(", "$", "class", ",", "$", "methodName", ",", "$", "parametersToSet", "=", "array", "(", ")", ")", "{", "$", "knowExampleDefaultParametersValues", "=", "array", "(", "'access'", "=>", "'view'", ",", "'userLogin'", "=>",...
Returns a string containing links to examples on how to call a given method on a given API It will export links to XML, CSV, HTML, JSON, PHP, etc. It will not export links for methods such as deleteSite or deleteUser @param string $class the class @param string $methodName the method @param array $parametersToSet para...
[ "Returns", "a", "string", "containing", "links", "to", "examples", "on", "how", "to", "call", "a", "given", "method", "on", "a", "given", "API", "It", "will", "export", "links", "to", "XML", "CSV", "HTML", "JSON", "PHP", "etc", ".", "It", "will", "not"...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/API/DocumentationGenerator.php#L206-L310
train
Returns the URL for the given class method name
[ 30522, 2270, 3853, 2131, 10288, 16613, 2571, 3126, 2140, 1006, 1002, 2465, 1010, 1002, 4118, 18442, 1010, 1002, 11709, 22282, 2102, 1027, 9140, 1006, 1007, 1007, 1063, 1002, 2113, 10288, 16613, 3709, 12879, 23505, 28689, 22828, 2015, 10175, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Messages/Message.php
Message.transformForJsonRequest
public function transformForJsonRequest(array $appends = [], $withType = true): array { if (!$withType) { return $this->propertiesToArray([], $this->jsonAliases); } $messageType = $this->getType(); $data = array_merge(['msgtype' => $messageType], $appends); $data...
php
public function transformForJsonRequest(array $appends = [], $withType = true): array { if (!$withType) { return $this->propertiesToArray([], $this->jsonAliases); } $messageType = $this->getType(); $data = array_merge(['msgtype' => $messageType], $appends); $data...
[ "public", "function", "transformForJsonRequest", "(", "array", "$", "appends", "=", "[", "]", ",", "$", "withType", "=", "true", ")", ":", "array", "{", "if", "(", "!", "$", "withType", ")", "{", "return", "$", "this", "->", "propertiesToArray", "(", "...
@param array $appends @param bool $withType @return array
[ "@param", "array", "$appends", "@param", "bool", "$withType" ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Kernel/Messages/Message.php#L152-L163
train
Transform the properties for the JSON request
[ 30522, 2270, 3853, 10938, 29278, 22578, 2239, 2890, 15500, 1006, 9140, 1002, 10439, 10497, 2015, 1027, 1031, 1033, 1010, 1002, 2007, 13874, 1027, 2995, 1007, 1024, 9140, 1063, 2065, 1006, 999, 1002, 2007, 13874, 1007, 1063, 2709, 1002, 2023...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Query/JsonExpression.php
JsonExpression.getJsonBindingParameter
protected function getJsonBindingParameter($value) { if ($value instanceof Expression) { return $value->getValue(); } switch ($type = gettype($value)) { case 'boolean': return $value ? 'true' : 'false'; case 'NULL': case 'integ...
php
protected function getJsonBindingParameter($value) { if ($value instanceof Expression) { return $value->getValue(); } switch ($type = gettype($value)) { case 'boolean': return $value ? 'true' : 'false'; case 'NULL': case 'integ...
[ "protected", "function", "getJsonBindingParameter", "(", "$", "value", ")", "{", "if", "(", "$", "value", "instanceof", "Expression", ")", "{", "return", "$", "value", "->", "getValue", "(", ")", ";", "}", "switch", "(", "$", "type", "=", "gettype", "(",...
Translate the given value into the appropriate JSON binding parameter. @param mixed $value @return string @throws \InvalidArgumentException
[ "Translate", "the", "given", "value", "into", "the", "appropriate", "JSON", "binding", "parameter", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/JsonExpression.php#L30-L50
train
Returns the JSON binding parameter value
[ 30522, 5123, 3853, 2131, 22578, 2239, 8428, 4667, 28689, 22828, 1006, 1002, 3643, 1007, 1063, 2065, 1006, 1002, 3643, 6013, 11253, 3670, 1007, 1063, 30524, 1002, 3643, 1007, 1007, 1063, 2553, 1005, 22017, 20898, 1005, 1024, 2709, 1002, 3643...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Config.php
Zend_Config.setReadOnly
public function setReadOnly() { $this->_allowModifications = false; foreach ($this->_data as $key => $value) { if ($value instanceof Zend_Config) { $value->setReadOnly(); } } }
php
public function setReadOnly() { $this->_allowModifications = false; foreach ($this->_data as $key => $value) { if ($value instanceof Zend_Config) { $value->setReadOnly(); } } }
[ "public", "function", "setReadOnly", "(", ")", "{", "$", "this", "->", "_allowModifications", "=", "false", ";", "foreach", "(", "$", "this", "->", "_data", "as", "$", "key", "=>", "$", "value", ")", "{", "if", "(", "$", "value", "instanceof", "Zend_Co...
Prevent any more modifications being made to this instance. Useful after merge() has been used to merge multiple Zend_Config objects into one object which should then not be modified again.
[ "Prevent", "any", "more", "modifications", "being", "made", "to", "this", "instance", ".", "Useful", "after", "merge", "()", "has", "been", "used", "to", "merge", "multiple", "Zend_Config", "objects", "into", "one", "object", "which", "should", "then", "not", ...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Config.php#L368-L376
train
Set all Zend_Config objects to read only
[ 30522, 2270, 3853, 2275, 16416, 5280, 2135, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 1035, 3499, 5302, 4305, 10803, 2015, 1027, 6270, 1025, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 1035, 2951, 2004, 1002, 3145, 1027, 1028, 1002, 3643, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Eloquent/Model.php
Model.newPivot
public function newPivot(self $parent, array $attributes, $table, $exists, $using = null) { return $using ? $using::fromRawAttributes($parent, $attributes, $table, $exists) : Pivot::fromAttributes($parent, $attributes, $table, $exists); }
php
public function newPivot(self $parent, array $attributes, $table, $exists, $using = null) { return $using ? $using::fromRawAttributes($parent, $attributes, $table, $exists) : Pivot::fromAttributes($parent, $attributes, $table, $exists); }
[ "public", "function", "newPivot", "(", "self", "$", "parent", ",", "array", "$", "attributes", ",", "$", "table", ",", "$", "exists", ",", "$", "using", "=", "null", ")", "{", "return", "$", "using", "?", "$", "using", "::", "fromRawAttributes", "(", ...
Create a new pivot model instance. @param \Illuminate\Database\Eloquent\Model $parent @param array $attributes @param string $table @param bool $exists @param string|null $using @return \Illuminate\Database\Eloquent\Relations\Pivot
[ "Create", "a", "new", "pivot", "model", "instance", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Model.php#L1071-L1075
train
Create a new pivot record
[ 30522, 2270, 3853, 2047, 8197, 22994, 1006, 2969, 1002, 6687, 1010, 9140, 1002, 12332, 1010, 1002, 2795, 1010, 1002, 6526, 1010, 1002, 2478, 1027, 19701, 1007, 1063, 2709, 1002, 2478, 1029, 1002, 2478, 1024, 1024, 2013, 2527, 24281, 18886, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php
Broadcaster.retrieveUser
protected function retrieveUser($request, $channel) { $options = $this->retrieveChannelOptions($channel); $guards = $options['guards'] ?? null; if (is_null($guards)) { return $request->user(); } foreach (Arr::wrap($guards) as $guard) { if ($user = $...
php
protected function retrieveUser($request, $channel) { $options = $this->retrieveChannelOptions($channel); $guards = $options['guards'] ?? null; if (is_null($guards)) { return $request->user(); } foreach (Arr::wrap($guards) as $guard) { if ($user = $...
[ "protected", "function", "retrieveUser", "(", "$", "request", ",", "$", "channel", ")", "{", "$", "options", "=", "$", "this", "->", "retrieveChannelOptions", "(", "$", "channel", ")", ";", "$", "guards", "=", "$", "options", "[", "'guards'", "]", "??", ...
Retrieve the authenticated user using the configured guard (if any). @param \Illuminate\Http\Request $request @param string $channel @return mixed
[ "Retrieve", "the", "authenticated", "user", "using", "the", "configured", "guard", "(", "if", "any", ")", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php#L282-L297
train
Retrieve the user from the request.
[ 30522, 5123, 3853, 12850, 20330, 1006, 1002, 5227, 1010, 1002, 3149, 1007, 1063, 1002, 7047, 1027, 1002, 2023, 1011, 1028, 12850, 26058, 7361, 9285, 1006, 1002, 3149, 1007, 1025, 1002, 4932, 1027, 1002, 7047, 1031, 1005, 4932, 1005, 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...
symfony/symfony
src/Symfony/Bridge/Monolog/Handler/ConsoleHandler.php
ConsoleHandler.onCommand
public function onCommand(ConsoleCommandEvent $event) { $output = $event->getOutput(); if ($output instanceof ConsoleOutputInterface) { $output = $output->getErrorOutput(); } $this->setOutput($output); }
php
public function onCommand(ConsoleCommandEvent $event) { $output = $event->getOutput(); if ($output instanceof ConsoleOutputInterface) { $output = $output->getErrorOutput(); } $this->setOutput($output); }
[ "public", "function", "onCommand", "(", "ConsoleCommandEvent", "$", "event", ")", "{", "$", "output", "=", "$", "event", "->", "getOutput", "(", ")", ";", "if", "(", "$", "output", "instanceof", "ConsoleOutputInterface", ")", "{", "$", "output", "=", "$", ...
Before a command is executed, the handler gets activated and the console output is set in order to know where to write the logs.
[ "Before", "a", "command", "is", "executed", "the", "handler", "gets", "activated", "and", "the", "console", "output", "is", "set", "in", "order", "to", "know", "where", "to", "write", "the", "logs", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bridge/Monolog/Handler/ConsoleHandler.php#L114-L122
train
Called when a command is executed
[ 30522, 2270, 3853, 2006, 9006, 2386, 2094, 1006, 10122, 9006, 2386, 24844, 4765, 1002, 2724, 1007, 1063, 1002, 6434, 1027, 1002, 2724, 1011, 1028, 2131, 5833, 18780, 1006, 1007, 1025, 2065, 1006, 1002, 6434, 6013, 11253, 10122, 5833, 18780,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/DebugExtension.php
DebugExtension.runDump
public function runDump(Twig_Environment $env, $context) { if (!$env->isDebug()) { return; } $result = ''; $count = func_num_args(); if ($count == 2) { $this->variablePrefix = true; $vars = []; foreach ($context as $key => $v...
php
public function runDump(Twig_Environment $env, $context) { if (!$env->isDebug()) { return; } $result = ''; $count = func_num_args(); if ($count == 2) { $this->variablePrefix = true; $vars = []; foreach ($context as $key => $v...
[ "public", "function", "runDump", "(", "Twig_Environment", "$", "env", ",", "$", "context", ")", "{", "if", "(", "!", "$", "env", "->", "isDebug", "(", ")", ")", "{", "return", ";", "}", "$", "result", "=", "''", ";", "$", "count", "=", "func_num_ar...
Processes the dump variables, if none is supplied, all the twig template variables are used @param Twig_Environment $env @param array $context @return string
[ "Processes", "the", "dump", "variables", "if", "none", "is", "supplied", "all", "the", "twig", "template", "variables", "are", "used" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/twig/DebugExtension.php#L86-L134
train
Dump the twig template
[ 30522, 2270, 3853, 2448, 8566, 8737, 1006, 1056, 16279, 1035, 4044, 1002, 4372, 2615, 1010, 1002, 6123, 1007, 1063, 2065, 1006, 999, 1002, 4372, 2615, 1011, 1028, 2003, 3207, 8569, 2290, 1006, 1007, 1007, 1063, 2709, 1025, 1065, 1002, 276...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php
InteractsWithPivotTable.extractAttachIdAndAttributes
protected function extractAttachIdAndAttributes($key, $value, array $attributes) { return is_array($value) ? [$key, array_merge($value, $attributes)] : [$value, $attributes]; }
php
protected function extractAttachIdAndAttributes($key, $value, array $attributes) { return is_array($value) ? [$key, array_merge($value, $attributes)] : [$value, $attributes]; }
[ "protected", "function", "extractAttachIdAndAttributes", "(", "$", "key", ",", "$", "value", ",", "array", "$", "attributes", ")", "{", "return", "is_array", "(", "$", "value", ")", "?", "[", "$", "key", ",", "array_merge", "(", "$", "value", ",", "$", ...
Get the attach record ID and extra attributes. @param mixed $key @param mixed $value @param array $attributes @return array
[ "Get", "the", "attach", "record", "ID", "and", "extra", "attributes", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php#L324-L329
train
Extract attach id and attributes from array
[ 30522, 5123, 3853, 14817, 19321, 21046, 7847, 2850, 4779, 3089, 8569, 4570, 1006, 1002, 3145, 1010, 1002, 3643, 1010, 9140, 1002, 12332, 1007, 1063, 2709, 2003, 1035, 9140, 1006, 1002, 3643, 1007, 1029, 1031, 1002, 3145, 1010, 9140, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Application/Environment.php
Environment.init
public function init() { $this->invokeBeforeContainerCreatedHook(); $this->container = $this->createContainer(); StaticContainer::push($this->container); $this->validateEnvironment(); $this->invokeEnvironmentBootstrappedHook(); Piwik::postEvent('Environment.boots...
php
public function init() { $this->invokeBeforeContainerCreatedHook(); $this->container = $this->createContainer(); StaticContainer::push($this->container); $this->validateEnvironment(); $this->invokeEnvironmentBootstrappedHook(); Piwik::postEvent('Environment.boots...
[ "public", "function", "init", "(", ")", "{", "$", "this", "->", "invokeBeforeContainerCreatedHook", "(", ")", ";", "$", "this", "->", "container", "=", "$", "this", "->", "createContainer", "(", ")", ";", "StaticContainer", "::", "push", "(", "$", "this", ...
Initializes the kernel globals and DI container.
[ "Initializes", "the", "kernel", "globals", "and", "DI", "container", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Application/Environment.php#L86-L99
train
Initializes the environment
[ 30522, 2270, 3853, 1999, 4183, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 1999, 6767, 3489, 4783, 29278, 8586, 12162, 18175, 11890, 29313, 16425, 14659, 1006, 1007, 1025, 1002, 2023, 1011, 1028, 11661, 1027, 1002, 2023, 1011, 1028, 3443, 866...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Cache/Simple/ChainCache.php
ChainCache.setMultiple
public function setMultiple($values, $ttl = null) { if ($values instanceof \Traversable) { $valuesIterator = $values; $values = function () use ($valuesIterator, &$values) { $generatedValues = []; foreach ($valuesIterator as $key => $value) { ...
php
public function setMultiple($values, $ttl = null) { if ($values instanceof \Traversable) { $valuesIterator = $values; $values = function () use ($valuesIterator, &$values) { $generatedValues = []; foreach ($valuesIterator as $key => $value) { ...
[ "public", "function", "setMultiple", "(", "$", "values", ",", "$", "ttl", "=", "null", ")", "{", "if", "(", "$", "values", "instanceof", "\\", "Traversable", ")", "{", "$", "valuesIterator", "=", "$", "values", ";", "$", "values", "=", "function", "(",...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Cache/Simple/ChainCache.php#L204-L228
train
Set Multiple Values
[ 30522, 2270, 3853, 2275, 12274, 7096, 11514, 2571, 1006, 1002, 5300, 1010, 1002, 23746, 2140, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 5300, 6013, 11253, 1032, 29053, 3085, 1007, 1063, 1002, 5300, 21646, 8844, 1027, 1002, 5300, 1025, 1002...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Bundle/TwigBundle/TemplateIterator.php
TemplateIterator.getIterator
public function getIterator() { if (null !== $this->templates) { return $this->templates; } $this->templates = array_merge( $this->findTemplatesInDirectory($this->rootDir.'/Resources/views'), $this->findTemplatesInDirectory($this->defaultPath, null, ['bun...
php
public function getIterator() { if (null !== $this->templates) { return $this->templates; } $this->templates = array_merge( $this->findTemplatesInDirectory($this->rootDir.'/Resources/views'), $this->findTemplatesInDirectory($this->defaultPath, null, ['bun...
[ "public", "function", "getIterator", "(", ")", "{", "if", "(", "null", "!==", "$", "this", "->", "templates", ")", "{", "return", "$", "this", "->", "templates", ";", "}", "$", "this", "->", "templates", "=", "array_merge", "(", "$", "this", "->", "f...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/TwigBundle/TemplateIterator.php#L47-L76
train
Get the iterator for all templates in the bundles
[ 30522, 2270, 3853, 2131, 21646, 8844, 1006, 1007, 1063, 2065, 1006, 19701, 999, 1027, 1027, 1002, 2023, 1011, 1028, 23561, 2015, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 23561, 2015, 1025, 1065, 1002, 2023, 1011, 1028, 23561, 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...
walkor/Workerman
Connection/TcpConnection.php
TcpConnection.resumeRecv
public function resumeRecv() { if ($this->_isPaused === true) { Worker::$globalEvent->add($this->_socket, EventInterface::EV_READ, array($this, 'baseRead')); $this->_isPaused = false; $this->baseRead($this->_socket, false); } }
php
public function resumeRecv() { if ($this->_isPaused === true) { Worker::$globalEvent->add($this->_socket, EventInterface::EV_READ, array($this, 'baseRead')); $this->_isPaused = false; $this->baseRead($this->_socket, false); } }
[ "public", "function", "resumeRecv", "(", ")", "{", "if", "(", "$", "this", "->", "_isPaused", "===", "true", ")", "{", "Worker", "::", "$", "globalEvent", "->", "add", "(", "$", "this", "->", "_socket", ",", "EventInterface", "::", "EV_READ", ",", "arr...
Resumes reading after a call to pauseRecv. @return void
[ "Resumes", "reading", "after", "a", "call", "to", "pauseRecv", "." ]
13649907f05014fcfffcfccaef01e63ad3339351
https://github.com/walkor/Workerman/blob/13649907f05014fcfffcfccaef01e63ad3339351/Connection/TcpConnection.php#L559-L566
train
Resumes reading from the socket.
[ 30522, 2270, 3853, 13746, 2890, 2278, 2615, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 1035, 2003, 4502, 13901, 1027, 1027, 1027, 2995, 1007, 1063, 7309, 1024, 1024, 1002, 3795, 18697, 3372, 1011, 1028, 5587, 1006, 1002, 2023, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Routing/Route.php
Route.whereArray
protected function whereArray(array $wheres) { foreach ($wheres as $name => $expression) { $this->where($name, $expression); } return $this; }
php
protected function whereArray(array $wheres) { foreach ($wheres as $name => $expression) { $this->where($name, $expression); } return $this; }
[ "protected", "function", "whereArray", "(", "array", "$", "wheres", ")", "{", "foreach", "(", "$", "wheres", "as", "$", "name", "=>", "$", "expression", ")", "{", "$", "this", "->", "where", "(", "$", "name", ",", "$", "expression", ")", ";", "}", ...
Set a list of regular expression requirements on the route. @param array $wheres @return $this
[ "Set", "a", "list", "of", "regular", "expression", "requirements", "on", "the", "route", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/Route.php#L522-L529
train
Adds where clauses to the current where array
[ 30522, 5123, 3853, 2073, 2906, 9447, 1006, 9140, 1002, 2073, 2015, 1007, 1063, 18921, 6776, 1006, 1002, 2073, 2015, 2004, 1002, 2171, 1027, 1028, 1002, 3670, 1007, 1063, 1002, 2023, 30524, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...