repo
stringclasses
21 values
path
stringlengths
10
105
func_name
stringlengths
6
64
original_string
stringlengths
105
15.6k
language
stringclasses
1 value
code
stringlengths
105
15.6k
code_tokens
listlengths
29
2.15k
docstring
stringlengths
11
2.85k
docstring_tokens
listlengths
1
290
sha
stringclasses
21 values
url
stringlengths
100
194
partition
stringclasses
1 value
summary
stringlengths
8
319
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
matomo-org/matomo
libs/HTML/QuickForm2/Element/Date.php
HTML_QuickForm2_Element_Date.createOptionList
protected function createOptionList($start, $end, $step = 1) { for ($i = $start, $options = array(); $start > $end? $i >= $end: $i <= $end; $i += $step) { $options[$i] = sprintf('%02d', $i); } return $options; }
php
protected function createOptionList($start, $end, $step = 1) { for ($i = $start, $options = array(); $start > $end? $i >= $end: $i <= $end; $i += $step) { $options[$i] = sprintf('%02d', $i); } return $options; }
[ "protected", "function", "createOptionList", "(", "$", "start", ",", "$", "end", ",", "$", "step", "=", "1", ")", "{", "for", "(", "$", "i", "=", "$", "start", ",", "$", "options", "=", "array", "(", ")", ";", "$", "start", ">", "$", "end", "?"...
Creates an option list containing the numbers from the start number to the end, inclusive @param int The start number @param int The end number @param int Increment by this value @return array An array of numeric options.
[ "Creates", "an", "option", "list", "containing", "the", "numbers", "from", "the", "start", "number", "to", "the", "end", "inclusive" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Element/Date.php#L242-L248
train
Create option list
[ 30522, 5123, 3853, 3443, 7361, 3508, 9863, 1006, 1002, 2707, 1010, 1002, 2203, 1010, 1002, 3357, 1027, 1015, 1007, 1063, 2005, 1006, 1002, 1045, 1027, 1002, 2707, 1010, 1002, 7047, 1027, 9140, 1006, 1007, 1025, 1002, 2707, 1028, 1002, 220...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Intl/DateFormatter/DateFormat/MonthTransformer.php
MonthTransformer.extractDateOptions
public function extractDateOptions(string $matched, int $length): array { if (!is_numeric($matched)) { if (3 === $length) { $matched = self::$flippedShortMonths[$matched] + 1; } elseif (4 === $length) { $matched = self::$flippedMonths[$matched] + 1; ...
php
public function extractDateOptions(string $matched, int $length): array { if (!is_numeric($matched)) { if (3 === $length) { $matched = self::$flippedShortMonths[$matched] + 1; } elseif (4 === $length) { $matched = self::$flippedMonths[$matched] + 1; ...
[ "public", "function", "extractDateOptions", "(", "string", "$", "matched", ",", "int", "$", "length", ")", ":", "array", "{", "if", "(", "!", "is_numeric", "(", "$", "matched", ")", ")", "{", "if", "(", "3", "===", "$", "length", ")", "{", "$", "ma...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Intl/DateFormatter/DateFormat/MonthTransformer.php#L117-L135
train
Extract date options from the month part of the string
[ 30522, 2270, 3853, 14817, 13701, 7361, 9285, 1006, 5164, 1002, 10349, 1010, 20014, 1002, 3091, 1007, 1024, 9140, 1063, 2065, 1006, 999, 2003, 1035, 16371, 25531, 1006, 1002, 10349, 1007, 1007, 1063, 2065, 1006, 1017, 1027, 1027, 1027, 1002,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Process/Process.php
Process.start
public function start(callable $callback = null, array $env = []) { if ($this->isRunning()) { throw new RuntimeException('Process is already running'); } $this->resetProcessData(); $this->starttime = $this->lastOutputTime = microtime(true); $this->callback = $thi...
php
public function start(callable $callback = null, array $env = []) { if ($this->isRunning()) { throw new RuntimeException('Process is already running'); } $this->resetProcessData(); $this->starttime = $this->lastOutputTime = microtime(true); $this->callback = $thi...
[ "public", "function", "start", "(", "callable", "$", "callback", "=", "null", ",", "array", "$", "env", "=", "[", "]", ")", "{", "if", "(", "$", "this", "->", "isRunning", "(", ")", ")", "{", "throw", "new", "RuntimeException", "(", "'Process is alread...
Starts the process and returns after writing the input to STDIN. This method blocks until all STDIN data is sent to the process then it returns while the process runs in the background. The termination of the process can be awaited with wait(). The callback receives the type of output (out or err) and some bytes fro...
[ "Starts", "the", "process", "and", "returns", "after", "writing", "the", "input", "to", "STDIN", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Process/Process.php#L282-L354
train
Starts the process
[ 30522, 2270, 3853, 2707, 1006, 2655, 3085, 1002, 2655, 5963, 1027, 19701, 1010, 9140, 1002, 4372, 2615, 1027, 1031, 1033, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 2003, 15532, 5582, 1006, 1007, 1007, 1063, 5466, 2047, 2448, 7292, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php
ProfilerController.openAction
public function openAction(Request $request) { if (null === $this->baseDir) { throw new NotFoundHttpException('The base dir should be set.'); } if ($this->profiler) { $this->profiler->disable(); } $file = $request->query->get('file'); $line =...
php
public function openAction(Request $request) { if (null === $this->baseDir) { throw new NotFoundHttpException('The base dir should be set.'); } if ($this->profiler) { $this->profiler->disable(); } $file = $request->query->get('file'); $line =...
[ "public", "function", "openAction", "(", "Request", "$", "request", ")", "{", "if", "(", "null", "===", "$", "this", "->", "baseDir", ")", "{", "throw", "new", "NotFoundHttpException", "(", "'The base dir should be set.'", ")", ";", "}", "if", "(", "$", "t...
Displays the source of a file. @return Response A Response instance @throws NotFoundHttpException
[ "Displays", "the", "source", "of", "a", "file", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php#L334-L358
train
Opens the profiler file
[ 30522, 2270, 3853, 2330, 18908, 3258, 1006, 5227, 1002, 5227, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 1027, 1002, 2023, 1011, 1028, 2241, 4313, 1007, 1063, 5466, 2047, 2025, 14876, 8630, 11039, 25856, 10288, 24422, 1006, 1005, 1996, 2918...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.passes
public function passes() { $this->messages = new MessageBag; $this->distinctValues = []; // We'll spin through each rule, validating the attributes attached to that // rule. Any error messages will be added to the containers with each of // the other error messages, returni...
php
public function passes() { $this->messages = new MessageBag; $this->distinctValues = []; // We'll spin through each rule, validating the attributes attached to that // rule. Any error messages will be added to the containers with each of // the other error messages, returni...
[ "public", "function", "passes", "(", ")", "{", "$", "this", "->", "messages", "=", "new", "MessageBag", ";", "$", "this", "->", "distinctValues", "=", "[", "]", ";", "// We'll spin through each rule, validating the attributes attached to that", "// rule. Any error messa...
Determine if the data passes the validation rules. @return bool
[ "Determine", "if", "the", "data", "passes", "the", "validation", "rules", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Validator.php#L264-L293
train
Returns true if all validation passes
[ 30522, 2270, 3853, 5235, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 7696, 1027, 2047, 4471, 16078, 1025, 1002, 2023, 1011, 1028, 5664, 10175, 15808, 1027, 1031, 1033, 1025, 1013, 1013, 2057, 1005, 2222, 6714, 2083, 2169, 3627, 1010, 9398, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/DatabaseUserProvider.php
DatabaseUserProvider.retrieveByCredentials
public function retrieveByCredentials(array $credentials) { if (empty($credentials) || (count($credentials) === 1 && array_key_exists('password', $credentials))) { return; } // First we will add each credential element to the query as a where clause. ...
php
public function retrieveByCredentials(array $credentials) { if (empty($credentials) || (count($credentials) === 1 && array_key_exists('password', $credentials))) { return; } // First we will add each credential element to the query as a where clause. ...
[ "public", "function", "retrieveByCredentials", "(", "array", "$", "credentials", ")", "{", "if", "(", "empty", "(", "$", "credentials", ")", "||", "(", "count", "(", "$", "credentials", ")", "===", "1", "&&", "array_key_exists", "(", "'password'", ",", "$"...
Retrieve a user by the given credentials. @param array $credentials @return \Illuminate\Contracts\Auth\Authenticatable|null
[ "Retrieve", "a", "user", "by", "the", "given", "credentials", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/DatabaseUserProvider.php#L100-L131
train
Retrieve a user by the given credentials
[ 30522, 2270, 3853, 12850, 3762, 16748, 16454, 26340, 1006, 9140, 1002, 22496, 1007, 1063, 2065, 1006, 4064, 1006, 1002, 22496, 1007, 1064, 1064, 1006, 4175, 1006, 1002, 22496, 1007, 1027, 1027, 1027, 1015, 1004, 1004, 9140, 1035, 3145, 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/Config/Definition/PrototypedArrayNode.php
PrototypedArrayNode.finalizeValue
protected function finalizeValue($value) { if (false === $value) { throw new UnsetKeyException(sprintf('Unsetting key for path "%s", value: %s', $this->getPath(), json_encode($value))); } foreach ($value as $k => $v) { $prototype = $this->getPrototypeForChild($k); ...
php
protected function finalizeValue($value) { if (false === $value) { throw new UnsetKeyException(sprintf('Unsetting key for path "%s", value: %s', $this->getPath(), json_encode($value))); } foreach ($value as $k => $v) { $prototype = $this->getPrototypeForChild($k); ...
[ "protected", "function", "finalizeValue", "(", "$", "value", ")", "{", "if", "(", "false", "===", "$", "value", ")", "{", "throw", "new", "UnsetKeyException", "(", "sprintf", "(", "'Unsetting key for path \"%s\", value: %s'", ",", "$", "this", "->", "getPath", ...
Finalizes the value of this node. @param mixed $value @return mixed The finalized value @throws UnsetKeyException @throws InvalidConfigurationException if the node doesn't have enough children
[ "Finalizes", "the", "value", "of", "this", "node", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php#L185-L208
train
Finalize value by setting all child elements to their final values
[ 30522, 5123, 3853, 2345, 4697, 10175, 5657, 1006, 1002, 3643, 1007, 1063, 2065, 1006, 6270, 1027, 1027, 1027, 1002, 3643, 1007, 1063, 5466, 2047, 4895, 13462, 14839, 10288, 24422, 1006, 9043, 2546, 1006, 1005, 4895, 21678, 2075, 3145, 2005,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/PluralizationRules.php
PluralizationRules.get
public static function get($number, $locale/*, bool $triggerDeprecation = true*/) { if (3 > \func_num_args() || \func_get_arg(2)) { @trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.2.', __CLASS__), E_USER_DEPRECATED); } if ('pt_BR' === $locale) { ...
php
public static function get($number, $locale/*, bool $triggerDeprecation = true*/) { if (3 > \func_num_args() || \func_get_arg(2)) { @trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.2.', __CLASS__), E_USER_DEPRECATED); } if ('pt_BR' === $locale) { ...
[ "public", "static", "function", "get", "(", "$", "number", ",", "$", "locale", "/*, bool $triggerDeprecation = true*/", ")", "{", "if", "(", "3", ">", "\\", "func_num_args", "(", ")", "||", "\\", "func_get_arg", "(", "2", ")", ")", "{", "@", "trigger_error...
Returns the plural position to use for the given locale and number. @param int $number The number @param string $locale The locale @return int The plural position
[ "Returns", "the", "plural", "position", "to", "use", "for", "the", "given", "locale", "and", "number", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Translation/PluralizationRules.php#L33-L195
train
Returns the plural rules for the given locale
[ 30522, 2270, 10763, 3853, 2131, 1006, 1002, 2193, 1010, 1002, 2334, 2063, 1013, 1008, 1010, 22017, 2140, 1002, 9495, 3207, 28139, 10719, 1027, 2995, 1008, 1013, 1007, 1063, 2065, 1006, 1017, 1028, 1032, 4569, 2278, 1035, 16371, 2213, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpFoundation/Response.php
Response.getExpires
public function getExpires(): ?\DateTimeInterface { try { return $this->headers->getDate('Expires'); } catch (\RuntimeException $e) { // according to RFC 2616 invalid date formats (e.g. "0" and "-1") must be treated as in the past return \DateTime::createFromForma...
php
public function getExpires(): ?\DateTimeInterface { try { return $this->headers->getDate('Expires'); } catch (\RuntimeException $e) { // according to RFC 2616 invalid date formats (e.g. "0" and "-1") must be treated as in the past return \DateTime::createFromForma...
[ "public", "function", "getExpires", "(", ")", ":", "?", "\\", "DateTimeInterface", "{", "try", "{", "return", "$", "this", "->", "headers", "->", "getDate", "(", "'Expires'", ")", ";", "}", "catch", "(", "\\", "RuntimeException", "$", "e", ")", "{", "/...
Returns the value of the Expires header as a DateTime instance. @final
[ "Returns", "the", "value", "of", "the", "Expires", "header", "as", "a", "DateTime", "instance", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Response.php#L710-L718
train
Get Expires - Date
[ 30522, 2270, 3853, 2131, 10288, 20781, 2015, 1006, 1007, 1024, 1029, 1032, 3058, 7292, 18447, 2121, 12172, 1063, 3046, 1063, 2709, 1002, 2023, 1011, 1028, 20346, 2015, 1011, 1028, 2131, 13701, 1006, 1005, 4654, 20781, 2015, 1005, 1007, 1025...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpClient/Response/CurlResponse.php
CurlResponse.parseHeaderLine
private static function parseHeaderLine($ch, string $data, array &$info, array &$headers, ?array $options, CurlClientState $multi, int $id, ?string &$location, ?callable $resolveRedirect, ?LoggerInterface $logger): int { if (!\in_array($waitFor = @curl_getinfo($ch, CURLINFO_PRIVATE), ['headers', 'destruct']...
php
private static function parseHeaderLine($ch, string $data, array &$info, array &$headers, ?array $options, CurlClientState $multi, int $id, ?string &$location, ?callable $resolveRedirect, ?LoggerInterface $logger): int { if (!\in_array($waitFor = @curl_getinfo($ch, CURLINFO_PRIVATE), ['headers', 'destruct']...
[ "private", "static", "function", "parseHeaderLine", "(", "$", "ch", ",", "string", "$", "data", ",", "array", "&", "$", "info", ",", "array", "&", "$", "headers", ",", "?", "array", "$", "options", ",", "CurlClientState", "$", "multi", ",", "int", "$",...
Parses header lines as curl yields them to us.
[ "Parses", "header", "lines", "as", "curl", "yields", "them", "to", "us", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpClient/Response/CurlResponse.php#L266-L328
train
Parse header line
[ 30522, 2797, 10763, 3853, 11968, 3366, 4974, 2121, 4179, 1006, 1002, 10381, 1010, 5164, 1002, 2951, 1010, 9140, 1004, 1002, 18558, 1010, 9140, 1004, 1002, 20346, 2015, 1010, 1029, 9140, 1002, 7047, 1010, 15390, 20464, 11638, 9153, 2618, 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/Plugin/Manager.php
Manager.uninstallPlugin
public function uninstallPlugin($pluginName) { if ($this->isPluginLoaded($pluginName)) { throw new \Exception("To uninstall the plugin $pluginName, first disable it in Matomo > Settings > Plugins"); } $this->loadAllPluginsAndGetTheirInfo(); SettingsStorage\Backend\Plugin...
php
public function uninstallPlugin($pluginName) { if ($this->isPluginLoaded($pluginName)) { throw new \Exception("To uninstall the plugin $pluginName, first disable it in Matomo > Settings > Plugins"); } $this->loadAllPluginsAndGetTheirInfo(); SettingsStorage\Backend\Plugin...
[ "public", "function", "uninstallPlugin", "(", "$", "pluginName", ")", "{", "if", "(", "$", "this", "->", "isPluginLoaded", "(", "$", "pluginName", ")", ")", "{", "throw", "new", "\\", "Exception", "(", "\"To uninstall the plugin $pluginName, first disable it in Mato...
Uninstalls a Plugin (deletes plugin files from the disk) Only deactivated plugins can be uninstalled @param $pluginName @throws \Exception @return bool
[ "Uninstalls", "a", "Plugin", "(", "deletes", "plugin", "files", "from", "the", "disk", ")", "Only", "deactivated", "plugins", "can", "be", "uninstalled" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Plugin/Manager.php#L560-L594
train
Uninstalls a plugin
[ 30522, 2270, 3853, 30524, 23111, 14074, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 2003, 24759, 15916, 2378, 17468, 1006, 1002, 13354, 23111, 14074, 1007, 1007, 1063, 5466, 2047, 1032, 6453, 1006, 1000, 2000, 4895, 7076, 9080, 2140, 19...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Serializer/Serializer.php
Serializer.getDenormalizer
private function getDenormalizer($data, string $class, ?string $format, array $context) { if ($this->cachedNormalizers !== $this->normalizers) { $this->cachedNormalizers = $this->normalizers; $this->denormalizerCache = $this->normalizerCache = []; } if (!isset($this->...
php
private function getDenormalizer($data, string $class, ?string $format, array $context) { if ($this->cachedNormalizers !== $this->normalizers) { $this->cachedNormalizers = $this->normalizers; $this->denormalizerCache = $this->normalizerCache = []; } if (!isset($this->...
[ "private", "function", "getDenormalizer", "(", "$", "data", ",", "string", "$", "class", ",", "?", "string", "$", "format", ",", "array", "$", "context", ")", "{", "if", "(", "$", "this", "->", "cachedNormalizers", "!==", "$", "this", "->", "normalizers"...
Returns a matching denormalizer. @param mixed $data Data to restore @param string $class The expected class to instantiate @param string $format Format name, present to give the option to normalizers to act differently based on formats @param array $context Options available to the denormalizer @return Denorm...
[ "Returns", "a", "matching", "denormalizer", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Serializer/Serializer.php#L265-L294
train
Get the denormalizer that supports the given data
[ 30522, 2797, 3853, 2131, 4181, 2953, 9067, 17629, 1006, 1002, 2951, 1010, 5164, 1002, 2465, 1010, 1029, 5164, 1002, 4289, 1010, 9140, 1002, 6123, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 17053, 2094, 12131, 9067, 17629, 2015, 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...
matomo-org/matomo
libs/Zend/Session/Exception.php
Zend_Session_Exception.handleSessionStartError
static public function handleSessionStartError($errno, $errstr, $errfile, $errline, $errcontext) { self::$sessionStartError = $errfile . '(Line:' . $errline . '): Error #' . $errno . ' ' . $errstr; }
php
static public function handleSessionStartError($errno, $errstr, $errfile, $errline, $errcontext) { self::$sessionStartError = $errfile . '(Line:' . $errline . '): Error #' . $errno . ' ' . $errstr; }
[ "static", "public", "function", "handleSessionStartError", "(", "$", "errno", ",", "$", "errstr", ",", "$", "errfile", ",", "$", "errline", ",", "$", "errcontext", ")", "{", "self", "::", "$", "sessionStartError", "=", "$", "errfile", ".", "'(Line:'", ".",...
handleSessionStartError() - interface for set_error_handler() @see http://framework.zend.com/issues/browse/ZF-1325 @param int $errno @param string $errstr @return void
[ "handleSessionStartError", "()", "-", "interface", "for", "set_error_handler", "()" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Session/Exception.php#L56-L59
train
Handle session start error
[ 30522, 10763, 2270, 3853, 16024, 7971, 8496, 7559, 3334, 29165, 1006, 1002, 9413, 19139, 1010, 1002, 9413, 12096, 2099, 1010, 1002, 9413, 12881, 9463, 1010, 1002, 9413, 19403, 2063, 1010, 1002, 9413, 30524, 12881, 9463, 1012, 1005, 1006, 22...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Db/Statement.php
Zend_Db_Statement.execute
public function execute(array $params = null) { /* * Simple case - no query profiler to manage. */ if ($this->_queryId === null) { return $this->_execute($params); } /* * Do the same thing, but with query profiler * management before a...
php
public function execute(array $params = null) { /* * Simple case - no query profiler to manage. */ if ($this->_queryId === null) { return $this->_execute($params); } /* * Do the same thing, but with query profiler * management before a...
[ "public", "function", "execute", "(", "array", "$", "params", "=", "null", ")", "{", "/*\n * Simple case - no query profiler to manage.\n */", "if", "(", "$", "this", "->", "_queryId", "===", "null", ")", "{", "return", "$", "this", "->", "_execute...
Executes a prepared statement. @param array $params OPTIONAL Values to bind to parameter placeholders. @return bool
[ "Executes", "a", "prepared", "statement", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Statement.php#L294-L325
train
Execute the query with the parameters
[ 30522, 2270, 3853, 15389, 1006, 9140, 1002, 11498, 5244, 1027, 19701, 1007, 30524, 1008, 2079, 1996, 2168, 2518, 1010, 2021, 2007, 23032, 6337, 2099, 1008, 2968, 2077, 1998, 2044, 1996, 15389, 1012, 1008, 1013, 1002, 11268, 1027, 1002, 2023...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/system/classes/MediaLibrary.php
MediaLibrary.validatePath
public static function validatePath($path, $normalizeOnly = false) { $path = str_replace('\\', '/', $path); $path = '/'.trim($path, '/'); if ($normalizeOnly) { return $path; } /* * Validate folder names */ $regexWhitelist = [ ...
php
public static function validatePath($path, $normalizeOnly = false) { $path = str_replace('\\', '/', $path); $path = '/'.trim($path, '/'); if ($normalizeOnly) { return $path; } /* * Validate folder names */ $regexWhitelist = [ ...
[ "public", "static", "function", "validatePath", "(", "$", "path", ",", "$", "normalizeOnly", "=", "false", ")", "{", "$", "path", "=", "str_replace", "(", "'\\\\'", ",", "'/'", ",", "$", "path", ")", ";", "$", "path", "=", "'/'", ".", "trim", "(", ...
Checks if file path doesn't contain any substrings that would pose a security threat. Throws an exception if the path is not valid. @param string $path Specifies the path. @param boolean $normalizeOnly Specifies if only the normalization, without validation should be performed. @return string Returns a normalized path.
[ "Checks", "if", "file", "path", "doesn", "t", "contain", "any", "substrings", "that", "would", "pose", "a", "security", "threat", ".", "Throws", "an", "exception", "if", "the", "path", "is", "not", "valid", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/classes/MediaLibrary.php#L463-L517
train
Validate path by removing all non - word characters and whitespace characters
[ 30522, 2270, 10763, 3853, 9398, 3686, 15069, 1006, 1002, 4130, 1010, 1002, 3671, 4697, 2239, 2135, 1027, 6270, 1007, 1063, 1002, 4130, 1027, 2358, 2099, 1035, 5672, 1006, 1005, 1032, 1032, 1005, 1010, 1005, 1013, 1005, 1010, 1002, 4130, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Utils.php
Utils.url
public static function url($input, $domain = false) { if (!trim((string)$input)) { $input = '/'; } if (Grav::instance()['config']->get('system.absolute_urls', false)) { $domain = true; } if (Grav::instance()['uri']->isExternal($input)) { ...
php
public static function url($input, $domain = false) { if (!trim((string)$input)) { $input = '/'; } if (Grav::instance()['config']->get('system.absolute_urls', false)) { $domain = true; } if (Grav::instance()['uri']->isExternal($input)) { ...
[ "public", "static", "function", "url", "(", "$", "input", ",", "$", "domain", "=", "false", ")", "{", "if", "(", "!", "trim", "(", "(", "string", ")", "$", "input", ")", ")", "{", "$", "input", "=", "'/'", ";", "}", "if", "(", "Grav", "::", "...
Simple helper method to make getting a Grav URL easier @param string $input @param bool $domain @return bool|null|string
[ "Simple", "helper", "method", "to", "make", "getting", "a", "Grav", "URL", "easier" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Utils.php#L34-L81
train
Returns a URL from a URL
[ 30522, 2270, 10763, 3853, 24471, 2140, 1006, 1002, 7953, 1010, 1002, 5884, 1027, 6270, 1007, 1063, 2065, 1006, 999, 12241, 1006, 1006, 5164, 1007, 1002, 7953, 1007, 1007, 1063, 1002, 7953, 1027, 1005, 1013, 1005, 1025, 1065, 2065, 1006, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Auth/Passwords/PasswordBroker.php
PasswordBroker.validatePasswordWithDefaults
protected function validatePasswordWithDefaults(array $credentials) { [$password, $confirm] = [ $credentials['password'], $credentials['password_confirmation'], ]; return $password === $confirm && mb_strlen($password) >= 8; }
php
protected function validatePasswordWithDefaults(array $credentials) { [$password, $confirm] = [ $credentials['password'], $credentials['password_confirmation'], ]; return $password === $confirm && mb_strlen($password) >= 8; }
[ "protected", "function", "validatePasswordWithDefaults", "(", "array", "$", "credentials", ")", "{", "[", "$", "password", ",", "$", "confirm", "]", "=", "[", "$", "credentials", "[", "'password'", "]", ",", "$", "credentials", "[", "'password_confirmation'", ...
Determine if the passwords are valid for the request. @param array $credentials @return bool
[ "Determine", "if", "the", "passwords", "are", "valid", "for", "the", "request", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/Passwords/PasswordBroker.php#L168-L176
train
Validate password with default values
[ 30522, 5123, 3853, 9398, 3686, 15194, 18351, 24415, 3207, 7011, 11314, 2015, 1006, 30524, 1005, 20786, 1005, 1033, 1010, 1002, 22496, 1031, 1005, 20786, 1035, 13964, 1005, 1033, 1010, 1033, 1025, 2709, 1002, 20786, 1027, 1027, 1027, 1002, 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/Foundation/Application.php
Application.register
public function register($provider, $force = false) { if (($registered = $this->getProvider($provider)) && ! $force) { return $registered; } // If the given "provider" is a string, we will resolve it, passing in the // application instance automatically for the developer...
php
public function register($provider, $force = false) { if (($registered = $this->getProvider($provider)) && ! $force) { return $registered; } // If the given "provider" is a string, we will resolve it, passing in the // application instance automatically for the developer...
[ "public", "function", "register", "(", "$", "provider", ",", "$", "force", "=", "false", ")", "{", "if", "(", "(", "$", "registered", "=", "$", "this", "->", "getProvider", "(", "$", "provider", ")", ")", "&&", "!", "$", "force", ")", "{", "return"...
Register a service provider with the application. @param \Illuminate\Support\ServiceProvider|string $provider @param bool $force @return \Illuminate\Support\ServiceProvider
[ "Register", "a", "service", "provider", "with", "the", "application", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Application.php#L584-L624
train
Registers a service provider
[ 30522, 2270, 3853, 4236, 1006, 1002, 10802, 1010, 1002, 2486, 1027, 6270, 1007, 1063, 2065, 1006, 1006, 1002, 5068, 1027, 1002, 2023, 1011, 1028, 2131, 21572, 17258, 2121, 1006, 1002, 10802, 1007, 1007, 1004, 1004, 999, 1002, 2486, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Updater/Migration/Db/Factory.php
Factory.insert
public function insert($table, $columnValuePairs) { $table = $this->prefixTable($table); return $this->container->make('Piwik\Updater\Migration\Db\Insert', array( 'table' => $table, 'columnValuePairs' => $columnValuePairs )); }
php
public function insert($table, $columnValuePairs) { $table = $this->prefixTable($table); return $this->container->make('Piwik\Updater\Migration\Db\Insert', array( 'table' => $table, 'columnValuePairs' => $columnValuePairs )); }
[ "public", "function", "insert", "(", "$", "table", ",", "$", "columnValuePairs", ")", "{", "$", "table", "=", "$", "this", "->", "prefixTable", "(", "$", "table", ")", ";", "return", "$", "this", "->", "container", "->", "make", "(", "'Piwik\\Updater\\Mi...
Inserts a new record / row into an existing database table. Make sure to specify all columns that need to be defined in order to insert a value successfully. There could be for example columns that are not nullable and therefore need a value. @param string $table Unprefixed database table name, eg 'log_visit'. @para...
[ "Inserts", "a", "new", "record", "/", "row", "into", "an", "existing", "database", "table", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Updater/Migration/Db/Factory.php#L360-L367
train
Inserts a new record into the database.
[ 30522, 2270, 3853, 19274, 1006, 1002, 2795, 1010, 1002, 5930, 10175, 5657, 4502, 18894, 1007, 1063, 1002, 2795, 1027, 1002, 2023, 1011, 1028, 17576, 10880, 1006, 1002, 2795, 1007, 1025, 2709, 1002, 2023, 1011, 1028, 11661, 1011, 1028, 2191,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dompdf/dompdf
src/FrameReflower/Block.php
Block._calculate_restricted_width
protected function _calculate_restricted_width() { $frame = $this->_frame; $style = $frame->get_style(); $cb = $frame->get_containing_block(); if ($style->position === "fixed") { $cb = $frame->get_root()->get_containing_block(); } //if ( $style->position...
php
protected function _calculate_restricted_width() { $frame = $this->_frame; $style = $frame->get_style(); $cb = $frame->get_containing_block(); if ($style->position === "fixed") { $cb = $frame->get_root()->get_containing_block(); } //if ( $style->position...
[ "protected", "function", "_calculate_restricted_width", "(", ")", "{", "$", "frame", "=", "$", "this", "->", "_frame", ";", "$", "style", "=", "$", "frame", "->", "get_style", "(", ")", ";", "$", "cb", "=", "$", "frame", "->", "get_containing_block", "("...
Call the above function, but resolve max/min widths @throws Exception @return array
[ "Call", "the", "above", "function", "but", "resolve", "max", "/", "min", "widths" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/FrameReflower/Block.php#L174-L227
train
Calculates the restricted width of the box
[ 30522, 5123, 3853, 1035, 18422, 1035, 7775, 1035, 9381, 1006, 1007, 1063, 1002, 4853, 1027, 1002, 2023, 1011, 1028, 1035, 4853, 1025, 1002, 2806, 1027, 1002, 4853, 1011, 1028, 2131, 1035, 2806, 1006, 1007, 1025, 1002, 17324, 1027, 1002, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php
HasRelationships.newHasMany
protected function newHasMany(Builder $query, Model $parent, $foreignKey, $localKey) { return new HasMany($query, $parent, $foreignKey, $localKey); }
php
protected function newHasMany(Builder $query, Model $parent, $foreignKey, $localKey) { return new HasMany($query, $parent, $foreignKey, $localKey); }
[ "protected", "function", "newHasMany", "(", "Builder", "$", "query", ",", "Model", "$", "parent", ",", "$", "foreignKey", ",", "$", "localKey", ")", "{", "return", "new", "HasMany", "(", "$", "query", ",", "$", "parent", ",", "$", "foreignKey", ",", "$...
Instantiate a new HasMany relationship. @param \Illuminate\Database\Eloquent\Builder $query @param \Illuminate\Database\Eloquent\Model $parent @param string $foreignKey @param string $localKey @return \Illuminate\Database\Eloquent\Relations\HasMany
[ "Instantiate", "a", "new", "HasMany", "relationship", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php#L347-L350
train
HasMany Model Factory
[ 30522, 5123, 3853, 2047, 14949, 2386, 2100, 1006, 12508, 1002, 23032, 1010, 2944, 1002, 6687, 1010, 1002, 3097, 14839, 1010, 1002, 2334, 14839, 1007, 1063, 2709, 2047, 2038, 2386, 2100, 1006, 1002, 23032, 1010, 1002, 6687, 1010, 1002, 3097,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/TimezoneType.php
TimezoneType.getTimezones
private static function getTimezones(int $regions, string $input): array { $timezones = []; foreach (\DateTimeZone::listIdentifiers($regions) as $timezone) { if ('intltimezone' === $input && 'Etc/Unknown' === \IntlTimeZone::createTimeZone($timezone)->getID()) { continue;...
php
private static function getTimezones(int $regions, string $input): array { $timezones = []; foreach (\DateTimeZone::listIdentifiers($regions) as $timezone) { if ('intltimezone' === $input && 'Etc/Unknown' === \IntlTimeZone::createTimeZone($timezone)->getID()) { continue;...
[ "private", "static", "function", "getTimezones", "(", "int", "$", "regions", ",", "string", "$", "input", ")", ":", "array", "{", "$", "timezones", "=", "[", "]", ";", "foreach", "(", "\\", "DateTimeZone", "::", "listIdentifiers", "(", "$", "regions", ")...
Returns a normalized array of timezone choices.
[ "Returns", "a", "normalized", "array", "of", "timezone", "choices", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php#L88-L101
train
Get all timezones
[ 30522, 2797, 10763, 3853, 2131, 7292, 15975, 2015, 1006, 20014, 1002, 4655, 1010, 5164, 1002, 7953, 1007, 1024, 9140, 1063, 1002, 2051, 15975, 2015, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1032, 3058, 7292, 15975, 1024, 1024, 2862, 5178,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php
MarkdownDescriptor.describeContainerAlias
protected function describeContainerAlias(Alias $alias, array $options = [], ContainerBuilder $builder = null) { $output = '- Service: `'.$alias.'`' ."\n".'- Public: '.($alias->isPublic() && !$alias->isPrivate() ? 'yes' : 'no'); if (!isset($options['id'])) { return $this->wr...
php
protected function describeContainerAlias(Alias $alias, array $options = [], ContainerBuilder $builder = null) { $output = '- Service: `'.$alias.'`' ."\n".'- Public: '.($alias->isPublic() && !$alias->isPrivate() ? 'yes' : 'no'); if (!isset($options['id'])) { return $this->wr...
[ "protected", "function", "describeContainerAlias", "(", "Alias", "$", "alias", ",", "array", "$", "options", "=", "[", "]", ",", "ContainerBuilder", "$", "builder", "=", "null", ")", "{", "$", "output", "=", "'- Service: `'", ".", "$", "alias", ".", "'`'",...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php#L250-L267
train
Describes a container alias
[ 30522, 5123, 3853, 6235, 8663, 18249, 21673, 7951, 1006, 14593, 1002, 14593, 1010, 9140, 1002, 7047, 1027, 1031, 1033, 1010, 11661, 8569, 23891, 2099, 1002, 12508, 1027, 19701, 1007, 1063, 1002, 6434, 1027, 1005, 1011, 2326, 1024, 1036, 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/Plugin/Menu.php
Menu.urlForActionWithDefaultUserParams
protected function urlForActionWithDefaultUserParams($controllerAction, $additionalParams = array()) { $module = $this->getModule(); return $this->urlForModuleActionWithDefaultUserParams($module, $controllerAction, $additionalParams); }
php
protected function urlForActionWithDefaultUserParams($controllerAction, $additionalParams = array()) { $module = $this->getModule(); return $this->urlForModuleActionWithDefaultUserParams($module, $controllerAction, $additionalParams); }
[ "protected", "function", "urlForActionWithDefaultUserParams", "(", "$", "controllerAction", ",", "$", "additionalParams", "=", "array", "(", ")", ")", "{", "$", "module", "=", "$", "this", "->", "getModule", "(", ")", ";", "return", "$", "this", "->", "urlFo...
Generates a URL to the given action of the current module, and it will also append some URL query parameters from the User preferences: idSite, period, date. If you do not need the parameters idSite, period and date to be generated use {@link urlForAction()} instead. @param string $controllerAction The name of the a...
[ "Generates", "a", "URL", "to", "the", "given", "action", "of", "the", "current", "module", "and", "it", "will", "also", "append", "some", "URL", "query", "parameters", "from", "the", "User", "preferences", ":", "idSite", "period", "date", ".", "If", "you",...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Plugin/Menu.php#L138-L143
train
Returns the URL for the controller action with default parameters
[ 30522, 5123, 3853, 24471, 10270, 6525, 7542, 24415, 3207, 7011, 11314, 20330, 28689, 5244, 1006, 1002, 11486, 18908, 3258, 1010, 1002, 3176, 28689, 5244, 1027, 9140, 1006, 1007, 1007, 1063, 1002, 11336, 1027, 1002, 2023, 1011, 1028, 2131, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/HTML/QuickForm2/Node.php
HTML_QuickForm2_Node.addFilter
public function addFilter($callback, array $options = null, $recursive = true) { if (!is_callable($callback, false, $callbackName)) { throw new HTML_QuickForm2_InvalidArgumentException( 'Callback Filter requires a valid callback, \'' . $callbackName . '\' was give...
php
public function addFilter($callback, array $options = null, $recursive = true) { if (!is_callable($callback, false, $callbackName)) { throw new HTML_QuickForm2_InvalidArgumentException( 'Callback Filter requires a valid callback, \'' . $callbackName . '\' was give...
[ "public", "function", "addFilter", "(", "$", "callback", ",", "array", "$", "options", "=", "null", ",", "$", "recursive", "=", "true", ")", "{", "if", "(", "!", "is_callable", "(", "$", "callback", ",", "false", ",", "$", "callbackName", ")", ")", "...
Adds a filter A filter is simply a PHP callback which will be applied to the element value when getValue() is called. A filter is by default applied recursively : if the value is an array, each elements it contains will also be filtered, unless the recursive flag is set to false. @param callback The PHP callbac...
[ "Adds", "a", "filter" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Node.php#L643-L653
train
Adds a filter to the list of filters that will be executed when the form is submitted
[ 30522, 2270, 3853, 5587, 8873, 21928, 1006, 1002, 2655, 5963, 1010, 9140, 1002, 7047, 1027, 19701, 1010, 1002, 28667, 9236, 3512, 1027, 2995, 1007, 1063, 2065, 1006, 999, 2003, 1035, 2655, 3085, 1006, 1002, 2655, 5963, 1010, 6270, 1010, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Widgets/Navbar.php
Navbar.render
public function render($part = 'right') { if (!isset($this->elements[$part]) || $this->elements[$part]->isEmpty()) { return ''; } return $this->elements[$part]->map(function ($element) { if ($element instanceof Htmlable) { return $element->toHtml(); ...
php
public function render($part = 'right') { if (!isset($this->elements[$part]) || $this->elements[$part]->isEmpty()) { return ''; } return $this->elements[$part]->map(function ($element) { if ($element instanceof Htmlable) { return $element->toHtml(); ...
[ "public", "function", "render", "(", "$", "part", "=", "'right'", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "elements", "[", "$", "part", "]", ")", "||", "$", "this", "->", "elements", "[", "$", "part", "]", "->", "isEmpty", "(",...
@param string $part @return mixed
[ "@param", "string", "$part" ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Widgets/Navbar.php#L67-L84
train
Render the right part of the tree
[ 30522, 2270, 3853, 17552, 1006, 1002, 2112, 1027, 1005, 2157, 1005, 1007, 1063, 2065, 1006, 999, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 3787, 1031, 1002, 2112, 1033, 1007, 1064, 1064, 1002, 2023, 1011, 1028, 3787, 1031, 1002, 2112, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/Actions/API.php
API.getPageUrls
public function getPageUrls($idSite, $period, $date, $segment = false, $expanded = false, $idSubtable = false, $depth = false, $flat = false) { Piwik::checkUserHasViewAccess($idSite); $dataTable = Archive::createDataTableFromArchive('Actions_actions_url', $idSite, $p...
php
public function getPageUrls($idSite, $period, $date, $segment = false, $expanded = false, $idSubtable = false, $depth = false, $flat = false) { Piwik::checkUserHasViewAccess($idSite); $dataTable = Archive::createDataTableFromArchive('Actions_actions_url', $idSite, $p...
[ "public", "function", "getPageUrls", "(", "$", "idSite", ",", "$", "period", ",", "$", "date", ",", "$", "segment", "=", "false", ",", "$", "expanded", "=", "false", ",", "$", "idSubtable", "=", "false", ",", "$", "depth", "=", "false", ",", "$", "...
@param int $idSite @param string $period @param Date $date @param bool $segment @param bool $expanded @param bool|int $idSubtable @param bool|int $depth @param bool|int $flat @return DataTable|DataTable\Map
[ "@param", "int", "$idSite", "@param", "string", "$period", "@param", "Date", "$date", "@param", "bool", "$segment", "@param", "bool", "$expanded", "@param", "bool|int", "$idSubtable", "@param", "bool|int", "$depth", "@param", "bool|int", "$flat" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Actions/API.php#L91-L112
train
Get the page URLs
[ 30522, 2270, 3853, 2131, 13704, 3126, 4877, 1006, 1002, 8909, 28032, 2063, 1010, 1002, 2558, 1010, 1002, 3058, 1010, 1002, 6903, 1027, 6270, 1010, 1002, 4423, 1027, 6270, 1010, 1002, 8909, 6342, 19279, 3085, 1027, 6270, 1010, 1002, 5995, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Console/Parser.php
Parser.parse
public static function parse($expression) { $name = static::name($expression); if (preg_match_all('/\{\s*(.*?)\s*\}/', $expression, $matches)) { if (count($matches[1])) { return array_merge([$name], static::parameters($matches[1])); } } retur...
php
public static function parse($expression) { $name = static::name($expression); if (preg_match_all('/\{\s*(.*?)\s*\}/', $expression, $matches)) { if (count($matches[1])) { return array_merge([$name], static::parameters($matches[1])); } } retur...
[ "public", "static", "function", "parse", "(", "$", "expression", ")", "{", "$", "name", "=", "static", "::", "name", "(", "$", "expression", ")", ";", "if", "(", "preg_match_all", "(", "'/\\{\\s*(.*?)\\s*\\}/'", ",", "$", "expression", ",", "$", "matches",...
Parse the given console command definition into an array. @param string $expression @return array @throws \InvalidArgumentException
[ "Parse", "the", "given", "console", "command", "definition", "into", "an", "array", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Console/Parser.php#L20-L31
train
Parse the given string into an array of parameters
[ 30522, 2270, 10763, 3853, 11968, 3366, 1006, 1002, 3670, 1007, 1063, 1002, 2171, 1027, 10763, 1024, 1024, 2171, 1006, 1002, 3670, 1007, 1025, 2065, 1006, 3653, 2290, 1035, 2674, 1035, 2035, 1006, 1005, 1013, 1032, 1063, 1032, 1055, 1008, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Process/Process.php
Process.getErrorOutput
public function getErrorOutput() { $this->readPipesForOutput(__FUNCTION__); if (false === $ret = stream_get_contents($this->stderr, -1, 0)) { return ''; } return $ret; }
php
public function getErrorOutput() { $this->readPipesForOutput(__FUNCTION__); if (false === $ret = stream_get_contents($this->stderr, -1, 0)) { return ''; } return $ret; }
[ "public", "function", "getErrorOutput", "(", ")", "{", "$", "this", "->", "readPipesForOutput", "(", "__FUNCTION__", ")", ";", "if", "(", "false", "===", "$", "ret", "=", "stream_get_contents", "(", "$", "this", "->", "stderr", ",", "-", "1", ",", "0", ...
Returns the current error output of the process (STDERR). @return string The process error output @throws LogicException in case the output has been disabled @throws LogicException In case the process is not started
[ "Returns", "the", "current", "error", "output", "of", "the", "process", "(", "STDERR", ")", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Process/Process.php#L678-L687
train
Get the error output from pipes
[ 30522, 2270, 3853, 2131, 2121, 29165, 5833, 18780, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 3191, 24548, 22747, 14604, 4904, 18780, 1006, 1035, 1035, 3853, 1035, 1035, 1007, 1025, 2065, 1006, 6270, 1027, 1027, 1027, 1002, 2128, 2102, 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/Database/Eloquent/Relations/BelongsToMany.php
BelongsToMany.getRelationExistenceQueryForSelfJoin
public function getRelationExistenceQueryForSelfJoin(Builder $query, Builder $parentQuery, $columns = ['*']) { $query->select($columns); $query->from($this->related->getTable().' as '.$hash = $this->getRelationCountHash()); $this->related->setTable($hash); $this->performJoin($quer...
php
public function getRelationExistenceQueryForSelfJoin(Builder $query, Builder $parentQuery, $columns = ['*']) { $query->select($columns); $query->from($this->related->getTable().' as '.$hash = $this->getRelationCountHash()); $this->related->setTable($hash); $this->performJoin($quer...
[ "public", "function", "getRelationExistenceQueryForSelfJoin", "(", "Builder", "$", "query", ",", "Builder", "$", "parentQuery", ",", "$", "columns", "=", "[", "'*'", "]", ")", "{", "$", "query", "->", "select", "(", "$", "columns", ")", ";", "$", "query", ...
Add the constraints for a relationship query on the same table. @param \Illuminate\Database\Eloquent\Builder $query @param \Illuminate\Database\Eloquent\Builder $parentQuery @param array|mixed $columns @return \Illuminate\Database\Eloquent\Builder
[ "Add", "the", "constraints", "for", "a", "relationship", "query", "on", "the", "same", "table", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php#L967-L978
train
This method is used to get the relationship query for the self join.
[ 30522, 2270, 3853, 2131, 16570, 3370, 10288, 27870, 5897, 4226, 2854, 29278, 11246, 2546, 5558, 2378, 1006, 12508, 1002, 23032, 1010, 12508, 1002, 6687, 4226, 2854, 1010, 1002, 7753, 1027, 1031, 1005, 1008, 1005, 1033, 1007, 1063, 1002, 230...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/DomCrawler/Crawler.php
Crawler.previousAll
public function previousAll() { if (!$this->nodes) { throw new \InvalidArgumentException('The current node list is empty.'); } return $this->createSubCrawler($this->sibling($this->getNode(0), 'previousSibling')); }
php
public function previousAll() { if (!$this->nodes) { throw new \InvalidArgumentException('The current node list is empty.'); } return $this->createSubCrawler($this->sibling($this->getNode(0), 'previousSibling')); }
[ "public", "function", "previousAll", "(", ")", "{", "if", "(", "!", "$", "this", "->", "nodes", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'The current node list is empty.'", ")", ";", "}", "return", "$", "this", "->", "createSubCrawler"...
Returns the previous sibling nodes of the current selection. @return self @throws \InvalidArgumentException
[ "Returns", "the", "previous", "sibling", "nodes", "of", "the", "current", "selection", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DomCrawler/Crawler.php#L458-L465
train
Returns the previous sibling nodes of the current node list.
[ 30522, 2270, 3853, 3025, 8095, 1006, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 14164, 1007, 1063, 5466, 2047, 1032, 19528, 2906, 22850, 15781, 2595, 24422, 1006, 1005, 1996, 2783, 13045, 2862, 2003, 4064, 1012, 1005, 1007, 1025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Queue/CallQueuedHandler.php
CallQueuedHandler.resolveHandler
protected function resolveHandler($job, $command) { $handler = $this->dispatcher->getCommandHandler($command) ?: null; if ($handler) { $this->setJobInstanceIfNecessary($job, $handler); } return $handler; }
php
protected function resolveHandler($job, $command) { $handler = $this->dispatcher->getCommandHandler($command) ?: null; if ($handler) { $this->setJobInstanceIfNecessary($job, $handler); } return $handler; }
[ "protected", "function", "resolveHandler", "(", "$", "job", ",", "$", "command", ")", "{", "$", "handler", "=", "$", "this", "->", "dispatcher", "->", "getCommandHandler", "(", "$", "command", ")", "?", ":", "null", ";", "if", "(", "$", "handler", ")",...
Resolve the handler for the given command. @param \Illuminate\Contracts\Queue\Job $job @param mixed $command @return mixed
[ "Resolve", "the", "handler", "for", "the", "given", "command", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Queue/CallQueuedHandler.php#L68-L77
train
Resolve handler for given job and command
[ 30522, 5123, 3853, 10663, 11774, 3917, 1006, 1002, 3105, 1010, 1002, 3094, 1007, 1063, 1002, 28213, 1027, 1002, 2023, 1011, 1028, 18365, 2121, 1011, 1028, 2131, 9006, 2386, 17516, 4859, 3917, 1006, 1002, 3094, 1007, 1029, 1024, 19701, 1025,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Framework/Flex/FlexObject.php
FlexObject.save
public function save() { $this->triggerEvent('onBeforeSave'); $result = $this->getFlexDirectory()->getStorage()->replaceRows([$this->getStorageKey() => $this->prepareStorage()]); $value = reset($result); $storageKey = key($result); if ($value && $storageKey) { $...
php
public function save() { $this->triggerEvent('onBeforeSave'); $result = $this->getFlexDirectory()->getStorage()->replaceRows([$this->getStorageKey() => $this->prepareStorage()]); $value = reset($result); $storageKey = key($result); if ($value && $storageKey) { $...
[ "public", "function", "save", "(", ")", "{", "$", "this", "->", "triggerEvent", "(", "'onBeforeSave'", ")", ";", "$", "result", "=", "$", "this", "->", "getFlexDirectory", "(", ")", "->", "getStorage", "(", ")", "->", "replaceRows", "(", "[", "$", "thi...
{@inheritdoc} @see FlexObjectInterface::save()
[ "{" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Framework/Flex/FlexObject.php#L537-L572
train
Save the object
[ 30522, 2270, 3853, 3828, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 9495, 18697, 3372, 1006, 1005, 2006, 4783, 29278, 22447, 3726, 1005, 1007, 1025, 1002, 2765, 1027, 1002, 2023, 1011, 1028, 2131, 21031, 2595, 4305, 2890, 16761, 2100, 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...
getgrav/grav
system/src/Grav/Common/GPM/GPM.php
GPM.checkNoOtherPackageNeedsThisDependencyInALowerVersion
public function checkNoOtherPackageNeedsThisDependencyInALowerVersion( $slug, $version_with_operator, $ignore_packages_list ) { // check if any of the currently installed package need this in a lower version than the one we need. In case, abort and tell which package $depend...
php
public function checkNoOtherPackageNeedsThisDependencyInALowerVersion( $slug, $version_with_operator, $ignore_packages_list ) { // check if any of the currently installed package need this in a lower version than the one we need. In case, abort and tell which package $depend...
[ "public", "function", "checkNoOtherPackageNeedsThisDependencyInALowerVersion", "(", "$", "slug", ",", "$", "version_with_operator", ",", "$", "ignore_packages_list", ")", "{", "// check if any of the currently installed package need this in a lower version than the one we need. In case, ...
Check the package identified by $slug can be updated to the version passed as argument. Thrown an exception if it cannot be updated because another package installed requires it to be at an older version. @param string $slug @param string $version_with_operator @param array $ignore_packages_list @return bool @throws ...
[ "Check", "the", "package", "identified", "by", "$slug", "can", "be", "updated", "to", "the", "version", "passed", "as", "argument", ".", "Thrown", "an", "exception", "if", "it", "cannot", "be", "updated", "because", "another", "package", "installed", "requires...
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/GPM/GPM.php#L775-L806
train
Check if any package that requires this dependency in a newer version
[ 30522, 2270, 3853, 4638, 3630, 14573, 2121, 23947, 4270, 24045, 5104, 15222, 16150, 13699, 10497, 11916, 13290, 25114, 27774, 1006, 1002, 23667, 1010, 1002, 2544, 1035, 2007, 1035, 6872, 1010, 1002, 8568, 1035, 14555, 1035, 2862, 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...
z-song/laravel-admin
src/Form/Field/MultipleFile.php
MultipleFile.destroy
public function destroy($key) { $files = $this->original ?: []; $file = Arr::get($files, $key); if ($this->storage->exists($file)) { $this->storage->delete($file); } unset($files[$key]); return $files; }
php
public function destroy($key) { $files = $this->original ?: []; $file = Arr::get($files, $key); if ($this->storage->exists($file)) { $this->storage->delete($file); } unset($files[$key]); return $files; }
[ "public", "function", "destroy", "(", "$", "key", ")", "{", "$", "files", "=", "$", "this", "->", "original", "?", ":", "[", "]", ";", "$", "file", "=", "Arr", "::", "get", "(", "$", "files", ",", "$", "key", ")", ";", "if", "(", "$", "this",...
Destroy original files. @return string.
[ "Destroy", "original", "files", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Form/Field/MultipleFile.php#L334-L347
train
Destroy a file from the cache
[ 30522, 2270, 3853, 6033, 1006, 1002, 3145, 1007, 1063, 1002, 6764, 1027, 1002, 2023, 1011, 1028, 2434, 1029, 1024, 1031, 1033, 1025, 1002, 5371, 1027, 12098, 2099, 1024, 1024, 2131, 1006, 1002, 6764, 1010, 1002, 3145, 1007, 1025, 2065, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Mail/Storage/Maildir.php
Zend_Mail_Storage_Maildir._isMaildir
protected function _isMaildir($dirname) { if (file_exists($dirname . '/new') && !is_dir($dirname . '/new')) { return false; } if (file_exists($dirname . '/tmp') && !is_dir($dirname . '/tmp')) { return false; } return is_dir($dirname . '/cur'); }
php
protected function _isMaildir($dirname) { if (file_exists($dirname . '/new') && !is_dir($dirname . '/new')) { return false; } if (file_exists($dirname . '/tmp') && !is_dir($dirname . '/tmp')) { return false; } return is_dir($dirname . '/cur'); }
[ "protected", "function", "_isMaildir", "(", "$", "dirname", ")", "{", "if", "(", "file_exists", "(", "$", "dirname", ".", "'/new'", ")", "&&", "!", "is_dir", "(", "$", "dirname", ".", "'/new'", ")", ")", "{", "return", "false", ";", "}", "if", "(", ...
check if a given dir is a valid maildir @param string $dirname name of dir @return bool dir is valid maildir
[ "check", "if", "a", "given", "dir", "is", "a", "valid", "maildir" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail/Storage/Maildir.php#L296-L305
train
Check if the current directory is a new or tmp directory
[ 30522, 5123, 3853, 1035, 19214, 4305, 2099, 1006, 1002, 16101, 18442, 1007, 1063, 2065, 1006, 5371, 1035, 6526, 1006, 1002, 16101, 18442, 1012, 1005, 1013, 2047, 1005, 1007, 1004, 1004, 999, 2003, 1035, 16101, 1006, 1002, 16101, 18442, 1012...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Validator/ConstraintViolationList.php
ConstraintViolationList.findByCodes
public function findByCodes($codes) { $codes = (array) $codes; $violations = []; foreach ($this as $violation) { if (\in_array($violation->getCode(), $codes, true)) { $violations[] = $violation; } } return new static($violations); ...
php
public function findByCodes($codes) { $codes = (array) $codes; $violations = []; foreach ($this as $violation) { if (\in_array($violation->getCode(), $codes, true)) { $violations[] = $violation; } } return new static($violations); ...
[ "public", "function", "findByCodes", "(", "$", "codes", ")", "{", "$", "codes", "=", "(", "array", ")", "$", "codes", ";", "$", "violations", "=", "[", "]", ";", "foreach", "(", "$", "this", "as", "$", "violation", ")", "{", "if", "(", "\\", "in_...
Creates iterator for errors with specific codes. @param string|string[] $codes The codes to find @return static new instance which contains only specific errors
[ "Creates", "iterator", "for", "errors", "with", "specific", "codes", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Validator/ConstraintViolationList.php#L169-L180
train
Find a violation by codes
[ 30522, 2270, 3853, 2424, 3762, 23237, 1006, 1002, 9537, 1007, 1063, 1002, 9537, 1027, 1006, 9140, 1007, 1002, 9537, 1025, 1002, 13302, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1002, 2023, 2004, 1002, 11371, 1007, 1063, 2065, 1006, 1032, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Intl/Data/Bundle/Writer/TextBundleWriter.php
TextBundleWriter.writeArray
private function writeArray($file, array $value, $indentation) { fwrite($file, "{\n"); foreach ($value as $entry) { fwrite($file, str_repeat(' ', $indentation + 1)); $this->writeResource($file, $entry, $indentation + 1, false); fwrite($file, ",\n"); ...
php
private function writeArray($file, array $value, $indentation) { fwrite($file, "{\n"); foreach ($value as $entry) { fwrite($file, str_repeat(' ', $indentation + 1)); $this->writeResource($file, $entry, $indentation + 1, false); fwrite($file, ",\n"); ...
[ "private", "function", "writeArray", "(", "$", "file", ",", "array", "$", "value", ",", "$", "indentation", ")", "{", "fwrite", "(", "$", "file", ",", "\"{\\n\"", ")", ";", "foreach", "(", "$", "value", "as", "$", "entry", ")", "{", "fwrite", "(", ...
Writes an "array" node. @param resource $file The file handle to write to @param array $value The value of the node @param int $indentation The number of levels to indent @see http://source.icu-project.org/repos/icu/icuhtml/trunk/design/bnf_rb.txt
[ "Writes", "an", "array", "node", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Intl/Data/Bundle/Writer/TextBundleWriter.php#L180-L193
train
Write array entry to file
[ 30522, 2797, 3853, 4339, 2906, 9447, 1006, 1002, 5371, 1010, 9140, 1002, 3643, 1010, 1002, 27427, 19304, 1007, 1063, 1042, 26373, 1006, 1002, 5371, 1010, 1000, 1063, 1032, 1050, 1000, 1007, 1025, 18921, 6776, 1006, 1002, 3643, 2004, 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/Console/Gpm/UpdateCommand.php
UpdateCommand.userInputPackages
private function userInputPackages($only_packages) { $found = ['total' => 0]; $ignore = []; if (!\count($only_packages)) { $this->output->writeln(''); } else { foreach ($only_packages as $only_package) { $find = $this->gpm->findPackage($only_p...
php
private function userInputPackages($only_packages) { $found = ['total' => 0]; $ignore = []; if (!\count($only_packages)) { $this->output->writeln(''); } else { foreach ($only_packages as $only_package) { $find = $this->gpm->findPackage($only_p...
[ "private", "function", "userInputPackages", "(", "$", "only_packages", ")", "{", "$", "found", "=", "[", "'total'", "=>", "0", "]", ";", "$", "ignore", "=", "[", "]", ";", "if", "(", "!", "\\", "count", "(", "$", "only_packages", ")", ")", "{", "$"...
@param array $only_packages @return array
[ "@param", "array", "$only_packages" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Console/Gpm/UpdateCommand.php#L224-L267
train
User input packages
[ 30522, 2797, 3853, 5310, 2378, 18780, 23947, 13923, 1006, 1002, 2069, 1035, 14555, 1007, 1063, 1002, 2179, 1027, 1031, 1005, 2561, 1005, 1027, 1028, 1014, 1033, 1025, 1002, 8568, 1027, 1031, 1033, 1025, 2065, 1006, 999, 1032, 4175, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/SitesManager/Controller.php
Controller.setGlobalSettings
public function setGlobalSettings() { $response = new ResponseBuilder(Common::getRequestVar('format')); try { $this->checkTokenInUrl(); $timezone = Common::getRequestVar('timezone', false); $excludedIps = Common::getRequestVar('excludedIps', false); $...
php
public function setGlobalSettings() { $response = new ResponseBuilder(Common::getRequestVar('format')); try { $this->checkTokenInUrl(); $timezone = Common::getRequestVar('timezone', false); $excludedIps = Common::getRequestVar('excludedIps', false); $...
[ "public", "function", "setGlobalSettings", "(", ")", "{", "$", "response", "=", "new", "ResponseBuilder", "(", "Common", "::", "getRequestVar", "(", "'format'", ")", ")", ";", "try", "{", "$", "this", "->", "checkTokenInUrl", "(", ")", ";", "$", "timezone"...
Records Global settings when user submit changes
[ "Records", "Global", "settings", "when", "user", "submit", "changes" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/SitesManager/Controller.php#L69-L101
train
Set Global Settings
[ 30522, 2270, 3853, 2275, 23296, 16429, 9777, 18319, 3070, 2015, 1006, 1007, 1063, 1002, 3433, 1027, 2047, 3433, 8569, 23891, 2099, 1006, 2691, 1024, 1024, 2131, 2890, 15500, 10755, 1006, 1005, 4289, 1005, 1007, 1007, 1025, 3046, 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/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php
TranslationDebugCommand.execute
protected function execute(InputInterface $input, OutputInterface $output) { $io = new SymfonyStyle($input, $output); $locale = $input->getArgument('locale'); $domain = $input->getOption('domain'); /** @var KernelInterface $kernel */ $kernel = $this->getApplication()->getKer...
php
protected function execute(InputInterface $input, OutputInterface $output) { $io = new SymfonyStyle($input, $output); $locale = $input->getArgument('locale'); $domain = $input->getOption('domain'); /** @var KernelInterface $kernel */ $kernel = $this->getApplication()->getKer...
[ "protected", "function", "execute", "(", "InputInterface", "$", "input", ",", "OutputInterface", "$", "output", ")", "{", "$", "io", "=", "new", "SymfonyStyle", "(", "$", "input", ",", "$", "output", ")", ";", "$", "locale", "=", "$", "input", "->", "g...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php#L127-L296
train
Execute the translation command
[ 30522, 5123, 3853, 15389, 1006, 7953, 18447, 2121, 12172, 1002, 7953, 1010, 6434, 18447, 2121, 12172, 1002, 6434, 1007, 1063, 1002, 22834, 1027, 2047, 25353, 2213, 14876, 4890, 21756, 2571, 1006, 1002, 7953, 1010, 1002, 6434, 1007, 1025, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Cache/Traits/MemcachedTrait.php
MemcachedTrait.doHave
protected function doHave($id) { return false !== $this->getClient()->get(rawurlencode($id)) || $this->checkResultCode(\Memcached::RES_SUCCESS === $this->client->getResultCode()); }
php
protected function doHave($id) { return false !== $this->getClient()->get(rawurlencode($id)) || $this->checkResultCode(\Memcached::RES_SUCCESS === $this->client->getResultCode()); }
[ "protected", "function", "doHave", "(", "$", "id", ")", "{", "return", "false", "!==", "$", "this", "->", "getClient", "(", ")", "->", "get", "(", "rawurlencode", "(", "$", "id", ")", ")", "||", "$", "this", "->", "checkResultCode", "(", "\\", "Memca...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Cache/Traits/MemcachedTrait.php#L269-L272
train
Do have request
[ 30522, 5123, 3853, 26528, 3726, 1006, 1002, 8909, 1007, 1063, 2709, 6270, 999, 1027, 1027, 1002, 2023, 1011, 1028, 2131, 20464, 11638, 1006, 1007, 1011, 1028, 2131, 1006, 6315, 3126, 7770, 16044, 1006, 1002, 8909, 1007, 1007, 1064, 1064, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Console/Scheduling/ManagesFrequencies.php
ManagesFrequencies.twiceDaily
public function twiceDaily($first = 1, $second = 13) { $hours = $first.','.$second; return $this->spliceIntoPosition(1, 0) ->spliceIntoPosition(2, $hours); }
php
public function twiceDaily($first = 1, $second = 13) { $hours = $first.','.$second; return $this->spliceIntoPosition(1, 0) ->spliceIntoPosition(2, $hours); }
[ "public", "function", "twiceDaily", "(", "$", "first", "=", "1", ",", "$", "second", "=", "13", ")", "{", "$", "hours", "=", "$", "first", ".", "','", ".", "$", "second", ";", "return", "$", "this", "->", "spliceIntoPosition", "(", "1", ",", "0", ...
Schedule the event to run twice daily. @param int $first @param int $second @return $this
[ "Schedule", "the", "event", "to", "run", "twice", "daily", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Console/Scheduling/ManagesFrequencies.php#L178-L184
train
This method is used to add the two times the same year.
[ 30522, 2270, 3853, 3807, 21351, 2135, 1006, 1002, 2034, 1027, 1015, 1010, 1002, 2117, 1027, 2410, 1007, 1063, 1002, 2847, 1027, 1002, 2034, 1012, 1005, 1010, 1005, 1012, 1002, 2117, 1025, 2709, 1002, 2023, 1011, 1028, 11867, 13231, 18447, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/DataTable.php
DataTable.getRowFromLabel
public function getRowFromLabel($label) { $rowId = $this->getRowIdFromLabel($label); if (is_int($rowId) && isset($this->rows[$rowId])) { return $this->rows[$rowId]; } if ($rowId == self::ID_SUMMARY_ROW && !empty($this->summaryRow) ) { retur...
php
public function getRowFromLabel($label) { $rowId = $this->getRowIdFromLabel($label); if (is_int($rowId) && isset($this->rows[$rowId])) { return $this->rows[$rowId]; } if ($rowId == self::ID_SUMMARY_ROW && !empty($this->summaryRow) ) { retur...
[ "public", "function", "getRowFromLabel", "(", "$", "label", ")", "{", "$", "rowId", "=", "$", "this", "->", "getRowIdFromLabel", "(", "$", "label", ")", ";", "if", "(", "is_int", "(", "$", "rowId", ")", "&&", "isset", "(", "$", "this", "->", "rows", ...
Returns the Row whose `'label'` column is equal to `$label`. This method executes in constant time except for the first call which caches row label => row ID mappings. @param string $label `'label'` column value to look for. @return Row|false The row if found, `false` if otherwise.
[ "Returns", "the", "Row", "whose", "label", "column", "is", "equal", "to", "$label", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataTable.php#L656-L671
train
Get Row from Label
[ 30522, 2270, 3853, 2131, 10524, 19699, 5358, 20470, 2884, 1006, 1002, 3830, 1007, 1063, 1002, 5216, 3593, 1027, 1002, 2023, 1011, 1028, 2131, 10524, 3593, 19699, 5358, 20470, 2884, 1006, 1002, 3830, 1007, 1025, 2065, 1006, 2003, 1035, 20014...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Http/Resources/ConditionallyLoadsAttributes.php
ConditionallyLoadsAttributes.mergeData
protected function mergeData($data, $index, $merge, $numericKeys) { if ($numericKeys) { return $this->removeMissingValues(array_merge( array_merge(array_slice($data, 0, $index, true), $merge), $this->filter(array_values(array_slice($data, $index + 1, null, true)))...
php
protected function mergeData($data, $index, $merge, $numericKeys) { if ($numericKeys) { return $this->removeMissingValues(array_merge( array_merge(array_slice($data, 0, $index, true), $merge), $this->filter(array_values(array_slice($data, $index + 1, null, true)))...
[ "protected", "function", "mergeData", "(", "$", "data", ",", "$", "index", ",", "$", "merge", ",", "$", "numericKeys", ")", "{", "if", "(", "$", "numericKeys", ")", "{", "return", "$", "this", "->", "removeMissingValues", "(", "array_merge", "(", "array_...
Merge the given data in at the given index. @param array $data @param int $index @param array $merge @param bool $numericKeys @return array
[ "Merge", "the", "given", "data", "in", "at", "the", "given", "index", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Http/Resources/ConditionallyLoadsAttributes.php#L52-L64
train
Merges data from the array with the array with the array with the keys specified
[ 30522, 5123, 3853, 5314, 6790, 1006, 1002, 2951, 1010, 1002, 5950, 1010, 1002, 13590, 1010, 1002, 16371, 25531, 14839, 2015, 1007, 1063, 2065, 1006, 1002, 16371, 25531, 14839, 2015, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 6366, 15630, 774...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.template
public function template($var = null) { if ($var !== null) { $this->template = $var; } if (empty($this->template)) { $this->template = ($this->modular() ? 'modular/' : '') . str_replace($this->extension(), '', $this->name()); } return $this->template;...
php
public function template($var = null) { if ($var !== null) { $this->template = $var; } if (empty($this->template)) { $this->template = ($this->modular() ? 'modular/' : '') . str_replace($this->extension(), '', $this->name()); } return $this->template;...
[ "public", "function", "template", "(", "$", "var", "=", "null", ")", "{", "if", "(", "$", "var", "!==", "null", ")", "{", "$", "this", "->", "template", "=", "$", "var", ";", "}", "if", "(", "empty", "(", "$", "this", "->", "template", ")", ")"...
Gets and sets the template field. This is used to find the correct Twig template file to render. If no field is set, it will return the name without the .md extension @param string $var the template name @return string the template name
[ "Gets", "and", "sets", "the", "template", "field", ".", "This", "is", "used", "to", "find", "the", "correct", "Twig", "template", "file", "to", "render", ".", "If", "no", "field", "is", "set", "it", "will", "return", "the", "name", "without", "the", "....
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Page/Page.php#L1353-L1363
train
Get the template path
[ 30522, 2270, 3853, 23561, 1006, 1002, 13075, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 13075, 999, 1027, 1027, 19701, 1007, 1063, 1002, 2023, 1011, 1028, 23561, 1027, 1002, 13075, 1025, 1065, 2065, 1006, 4064, 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...
laravel/framework
src/Illuminate/Foundation/Auth/ResetsPasswords.php
ResetsPasswords.sendResetFailedResponse
protected function sendResetFailedResponse(Request $request, $response) { return redirect()->back() ->withInput($request->only('email')) ->withErrors(['email' => trans($response)]); }
php
protected function sendResetFailedResponse(Request $request, $response) { return redirect()->back() ->withInput($request->only('email')) ->withErrors(['email' => trans($response)]); }
[ "protected", "function", "sendResetFailedResponse", "(", "Request", "$", "request", ",", "$", "response", ")", "{", "return", "redirect", "(", ")", "->", "back", "(", ")", "->", "withInput", "(", "$", "request", "->", "only", "(", "'email'", ")", ")", "-...
Get the response for a failed password reset. @param \Illuminate\Http\Request $request @param string $response @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\JsonResponse
[ "Get", "the", "response", "for", "a", "failed", "password", "reset", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Auth/ResetsPasswords.php#L136-L141
train
Send the reset failed response to the user
[ 30522, 5123, 3853, 4604, 6072, 3388, 7011, 18450, 6072, 26029, 3366, 1006, 5227, 1002, 5227, 1010, 1002, 3433, 1007, 1063, 2709, 2417, 7442, 6593, 1006, 1007, 1011, 1028, 2067, 1006, 1007, 1011, 1028, 2306, 18780, 1006, 1002, 5227, 1011, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Connectors/MySqlConnector.php
MySqlConnector.getDsn
protected function getDsn(array $config) { return $this->hasSocket($config) ? $this->getSocketDsn($config) : $this->getHostDsn($config); }
php
protected function getDsn(array $config) { return $this->hasSocket($config) ? $this->getSocketDsn($config) : $this->getHostDsn($config); }
[ "protected", "function", "getDsn", "(", "array", "$", "config", ")", "{", "return", "$", "this", "->", "hasSocket", "(", "$", "config", ")", "?", "$", "this", "->", "getSocketDsn", "(", "$", "config", ")", ":", "$", "this", "->", "getHostDsn", "(", "...
Create a DSN string from a configuration. Chooses socket or host/port based on the 'unix_socket' config value. @param array $config @return string
[ "Create", "a", "DSN", "string", "from", "a", "configuration", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Connectors/MySqlConnector.php#L93-L98
train
Get Dsn of the socket or host
[ 30522, 5123, 3853, 2131, 5104, 2078, 1006, 9140, 1002, 9530, 8873, 2290, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 2038, 6499, 19869, 2102, 1006, 1002, 9530, 8873, 2290, 1007, 1029, 1002, 2023, 1011, 1028, 4152, 7432, 3388, 5104, 2078, 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/Config/Definition/Builder/ArrayNodeDefinition.php
ArrayNodeDefinition.prototype
public function prototype($type) { return $this->prototype = $this->getNodeBuilder()->node(null, $type)->setParent($this); }
php
public function prototype($type) { return $this->prototype = $this->getNodeBuilder()->node(null, $type)->setParent($this); }
[ "public", "function", "prototype", "(", "$", "type", ")", "{", "return", "$", "this", "->", "prototype", "=", "$", "this", "->", "getNodeBuilder", "(", ")", "->", "node", "(", "null", ",", "$", "type", ")", "->", "setParent", "(", "$", "this", ")", ...
Sets a prototype for child nodes. @param string $type The type of node @return NodeDefinition
[ "Sets", "a", "prototype", "for", "child", "nodes", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php#L73-L76
train
Prototype of this node
[ 30522, 2270, 3853, 8773, 1006, 1002, 2828, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 8773, 1027, 1002, 2023, 1011, 1028, 2131, 3630, 3207, 8569, 23891, 2099, 1006, 1007, 1011, 1028, 13045, 1006, 19701, 1010, 1002, 2828, 1007, 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...
getgrav/grav
system/src/Grav/Framework/Flex/FlexObject.php
FlexObject.update
public function update(array $data, array $files = []) { if ($data) { $blueprint = $this->getBlueprint(); // Process updated data through the object filters. $this->filterElements($data); // Get currently stored data. $elements = $this->getElemen...
php
public function update(array $data, array $files = []) { if ($data) { $blueprint = $this->getBlueprint(); // Process updated data through the object filters. $this->filterElements($data); // Get currently stored data. $elements = $this->getElemen...
[ "public", "function", "update", "(", "array", "$", "data", ",", "array", "$", "files", "=", "[", "]", ")", "{", "if", "(", "$", "data", ")", "{", "$", "blueprint", "=", "$", "this", "->", "getBlueprint", "(", ")", ";", "// Process updated data through ...
{@inheritdoc} @see FlexObjectInterface::update()
[ "{" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Framework/Flex/FlexObject.php#L478-L514
train
Update the object with the new data
[ 30522, 2270, 3853, 10651, 1006, 9140, 1002, 2951, 1010, 9140, 1002, 6764, 1027, 1031, 1033, 1007, 1063, 2065, 1006, 1002, 2951, 1007, 1063, 1002, 2630, 16550, 1027, 1002, 2023, 1011, 1028, 2131, 16558, 5657, 16550, 1006, 1007, 1025, 1013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Validation/Validator.php
Validator.validated
public function validated() { if ($this->invalid()) { throw new ValidationException($this); } $results = []; $missingValue = Str::random(10); foreach (array_keys($this->getRules()) as $key) { $value = data_get($this->getData(), $key, $missingValue);...
php
public function validated() { if ($this->invalid()) { throw new ValidationException($this); } $results = []; $missingValue = Str::random(10); foreach (array_keys($this->getRules()) as $key) { $value = data_get($this->getData(), $key, $missingValue);...
[ "public", "function", "validated", "(", ")", "{", "if", "(", "$", "this", "->", "invalid", "(", ")", ")", "{", "throw", "new", "ValidationException", "(", "$", "this", ")", ";", "}", "$", "results", "=", "[", "]", ";", "$", "missingValue", "=", "St...
Get the attributes and values that were validated. @return array @throws \Illuminate\Validation\ValidationException
[ "Get", "the", "attributes", "and", "values", "that", "were", "validated", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Validator.php#L328-L347
train
Return array of all the rules that have been validated
[ 30522, 2270, 3853, 9398, 4383, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 19528, 1006, 1007, 1007, 1063, 5466, 2047, 27354, 10288, 24422, 1006, 1002, 2023, 1007, 1025, 1065, 1002, 3463, 1027, 1031, 1033, 1025, 1002, 4394, 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/HttpFoundation/Request.php
Request.getProtocolVersion
public function getProtocolVersion() { if ($this->isFromTrustedProxy()) { preg_match('~^(HTTP/)?([1-9]\.[0-9]) ~', $this->headers->get('Via'), $matches); if ($matches) { return 'HTTP/'.$matches[2]; } } return $this->server->get('SERVER_PR...
php
public function getProtocolVersion() { if ($this->isFromTrustedProxy()) { preg_match('~^(HTTP/)?([1-9]\.[0-9]) ~', $this->headers->get('Via'), $matches); if ($matches) { return 'HTTP/'.$matches[2]; } } return $this->server->get('SERVER_PR...
[ "public", "function", "getProtocolVersion", "(", ")", "{", "if", "(", "$", "this", "->", "isFromTrustedProxy", "(", ")", ")", "{", "preg_match", "(", "'~^(HTTP/)?([1-9]\\.[0-9]) ~'", ",", "$", "this", "->", "headers", "->", "get", "(", "'Via'", ")", ",", "...
Returns the protocol version. If the application is behind a proxy, the protocol version used in the requests between the client and the proxy and between the proxy and the server might be different. This returns the former (from the "Via" header) if the proxy is trusted (see "setTrustedProxies()"), otherwise it retur...
[ "Returns", "the", "protocol", "version", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Request.php#L1487-L1498
train
Get protocol version
[ 30522, 2270, 3853, 2131, 21572, 3406, 30524, 1063, 3653, 2290, 1035, 2674, 1006, 1005, 1066, 1034, 1006, 8299, 1013, 1007, 1029, 1006, 1031, 1015, 1011, 1023, 1033, 1032, 1012, 1031, 1014, 1011, 1023, 1033, 1007, 1066, 1005, 1010, 1002, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Filesystem/Filesystem.php
Filesystem.getSchemeAndHierarchy
private function getSchemeAndHierarchy(string $filename): array { $components = explode('://', $filename, 2); return 2 === \count($components) ? [$components[0], $components[1]] : [null, $components[0]]; }
php
private function getSchemeAndHierarchy(string $filename): array { $components = explode('://', $filename, 2); return 2 === \count($components) ? [$components[0], $components[1]] : [null, $components[0]]; }
[ "private", "function", "getSchemeAndHierarchy", "(", "string", "$", "filename", ")", ":", "array", "{", "$", "components", "=", "explode", "(", "'://'", ",", "$", "filename", ",", "2", ")", ";", "return", "2", "===", "\\", "count", "(", "$", "components"...
Gets a 2-tuple of scheme (may be null) and hierarchical part of a filename (e.g. file:///tmp -> [file, tmp]).
[ "Gets", "a", "2", "-", "tuple", "of", "scheme", "(", "may", "be", "null", ")", "and", "hierarchical", "part", "of", "a", "filename", "(", "e", ".", "g", ".", "file", ":", "///", "tmp", "-", ">", "[", "file", "tmp", "]", ")", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Filesystem/Filesystem.php#L737-L742
train
Get scheme and hierarchy of the file
[ 30522, 2797, 3853, 4152, 5403, 4168, 5685, 4048, 6906, 29389, 1006, 5164, 1002, 5371, 18442, 1007, 1024, 9140, 1063, 1002, 6177, 1027, 15044, 1006, 1005, 1024, 1013, 1013, 1005, 1010, 1002, 5371, 18442, 1010, 1016, 1007, 1025, 2709, 1016, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Config/CompiledBase.php
CompiledBase.checksum
public function checksum() { if (null === $this->checksum) { $this->checksum = md5(json_encode($this->files) . $this->version); } return $this->checksum; }
php
public function checksum() { if (null === $this->checksum) { $this->checksum = md5(json_encode($this->files) . $this->version); } return $this->checksum; }
[ "public", "function", "checksum", "(", ")", "{", "if", "(", "null", "===", "$", "this", "->", "checksum", ")", "{", "$", "this", "->", "checksum", "=", "md5", "(", "json_encode", "(", "$", "this", "->", "files", ")", ".", "$", "this", "->", "versio...
Returns checksum from the configuration files. You can set $this->checksum = false to disable this check. @return bool|string
[ "Returns", "checksum", "from", "the", "configuration", "files", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Config/CompiledBase.php#L130-L137
train
checksum - Returns the checksum of the files
[ 30522, 2270, 3853, 14148, 2819, 1006, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 1027, 1002, 2023, 1011, 1028, 14148, 2819, 1007, 1063, 1002, 2023, 1011, 1028, 14148, 2819, 1027, 9108, 2629, 1006, 1046, 3385, 1035, 4372, 16044, 1006, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Security/Core/Encoder/MessageDigestPasswordEncoder.php
MessageDigestPasswordEncoder.isPasswordValid
public function isPasswordValid($encoded, $raw, $salt) { return !$this->isPasswordTooLong($raw) && $this->comparePasswords($encoded, $this->encodePassword($raw, $salt)); }
php
public function isPasswordValid($encoded, $raw, $salt) { return !$this->isPasswordTooLong($raw) && $this->comparePasswords($encoded, $this->encodePassword($raw, $salt)); }
[ "public", "function", "isPasswordValid", "(", "$", "encoded", ",", "$", "raw", ",", "$", "salt", ")", "{", "return", "!", "$", "this", "->", "isPasswordTooLong", "(", "$", "raw", ")", "&&", "$", "this", "->", "comparePasswords", "(", "$", "encoded", ",...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Security/Core/Encoder/MessageDigestPasswordEncoder.php#L66-L69
train
Checks if the password is valid.
[ 30522, 2270, 3853, 2003, 15194, 18351, 10175, 3593, 1006, 1002, 12359, 1010, 1002, 6315, 1010, 1002, 5474, 1007, 1063, 2709, 999, 1002, 2023, 1011, 1028, 2003, 15194, 18351, 3406, 12898, 3070, 1006, 1002, 6315, 1007, 1004, 1004, 1002, 2023,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/Insights/API.php
API.getInsightsOverview
public function getInsightsOverview($idSite, $period, $date, $segment = false) { Piwik::checkUserHasViewAccess($idSite); $defaultParams = array( 'limitIncreaser' => 3, 'limitDecreaser' => 3, 'minImpactPercent' => 1, 'minGrowthPercent' => 25, )...
php
public function getInsightsOverview($idSite, $period, $date, $segment = false) { Piwik::checkUserHasViewAccess($idSite); $defaultParams = array( 'limitIncreaser' => 3, 'limitDecreaser' => 3, 'minImpactPercent' => 1, 'minGrowthPercent' => 25, )...
[ "public", "function", "getInsightsOverview", "(", "$", "idSite", ",", "$", "period", ",", "$", "date", ",", "$", "segment", "=", "false", ")", "{", "Piwik", "::", "checkUserHasViewAccess", "(", "$", "idSite", ")", ";", "$", "defaultParams", "=", "array", ...
Generates insights for a set of reports. Plugins can add their own reports to be included in the insights overview by listening to the {@hook Insights.addReportToOverview} event. @param int $idSite @param string $period @param string $date @param bool|string $segment @return DataTable\Map A map containing a dataTab...
[ "Generates", "insights", "for", "a", "set", "of", "reports", ".", "Plugins", "can", "add", "their", "own", "reports", "to", "be", "included", "in", "the", "insights", "overview", "by", "listening", "to", "the", "{", "@hook", "Insights", ".", "addReportToOver...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Insights/API.php#L108-L122
train
Generate an overview report for a particular site
[ 30522, 2270, 3853, 2131, 7076, 18743, 23230, 2121, 8584, 1006, 1002, 8909, 28032, 2063, 1010, 1002, 2558, 1010, 1002, 3058, 1010, 1002, 6903, 1027, 6270, 1007, 1063, 14255, 9148, 2243, 1024, 1024, 4638, 20330, 14949, 8584, 6305, 9623, 2015,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Mailer.php
Mailer.renderView
protected function renderView($view, $data) { return $view instanceof Htmlable ? $view->toHtml() : $this->views->make($view, $data)->render(); }
php
protected function renderView($view, $data) { return $view instanceof Htmlable ? $view->toHtml() : $this->views->make($view, $data)->render(); }
[ "protected", "function", "renderView", "(", "$", "view", ",", "$", "data", ")", "{", "return", "$", "view", "instanceof", "Htmlable", "?", "$", "view", "->", "toHtml", "(", ")", ":", "$", "this", "->", "views", "->", "make", "(", "$", "view", ",", ...
Render the given view. @param string $view @param array $data @return string
[ "Render", "the", "given", "view", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Mail/Mailer.php#L349-L354
train
Render a view
[ 30522, 5123, 3853, 17552, 8584, 1006, 1002, 3193, 1010, 1002, 2951, 1007, 1063, 2709, 1002, 3193, 6013, 11253, 16129, 3085, 1029, 1002, 3193, 1011, 1028, 2000, 11039, 19968, 1006, 1007, 1024, 1002, 2023, 1011, 1028, 5328, 1011, 1028, 2191, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/cms/classes/Controller.php
Controller.execPageCycle
protected function execPageCycle() { /** * @event cms.page.start * Fires before all of the page & layout lifecycle handlers are run * * Example usage: * * Event::listen('cms.page.start', function ((\Cms\Classes\Controller) $controller) { * ...
php
protected function execPageCycle() { /** * @event cms.page.start * Fires before all of the page & layout lifecycle handlers are run * * Example usage: * * Event::listen('cms.page.start', function ((\Cms\Classes\Controller) $controller) { * ...
[ "protected", "function", "execPageCycle", "(", ")", "{", "/**\n * @event cms.page.start\n * Fires before all of the page & layout lifecycle handlers are run\n *\n * Example usage:\n *\n * Event::listen('cms.page.start', function ((\\Cms\\Classes\\Contr...
Executes the page life cycle. Creates an object from the PHP sections of the page and it's layout, then executes their life cycle functions.
[ "Executes", "the", "page", "life", "cycle", ".", "Creates", "an", "object", "from", "the", "PHP", "sections", "of", "the", "page", "and", "it", "s", "layout", "then", "executes", "their", "life", "cycle", "functions", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/classes/Controller.php#L454-L540
train
Runs all page cycles
[ 30522, 5123, 3853, 4654, 8586, 13704, 23490, 1006, 1007, 1063, 1013, 1008, 1008, 1008, 1030, 2724, 4642, 2015, 1012, 3931, 1012, 2707, 1008, 8769, 2077, 2035, 1997, 1996, 3931, 1004, 9621, 2166, 23490, 28213, 2015, 2024, 2448, 1008, 1008, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/behaviors/ImportExportController.php
ImportExportController.getFormatOptionsFromPost
protected function getFormatOptionsFromPost() { $presetMode = post('format_preset'); $options = [ 'delimiter' => null, 'enclosure' => null, 'escape' => null, 'encoding' => null ]; if ($presetMode == 'custom') { $options['d...
php
protected function getFormatOptionsFromPost() { $presetMode = post('format_preset'); $options = [ 'delimiter' => null, 'enclosure' => null, 'escape' => null, 'encoding' => null ]; if ($presetMode == 'custom') { $options['d...
[ "protected", "function", "getFormatOptionsFromPost", "(", ")", "{", "$", "presetMode", "=", "post", "(", "'format_preset'", ")", ";", "$", "options", "=", "[", "'delimiter'", "=>", "null", ",", "'enclosure'", "=>", "null", ",", "'escape'", "=>", "null", ",",...
Returns the file format options from postback. This method can be used to define presets. @return array
[ "Returns", "the", "file", "format", "options", "from", "postback", ".", "This", "method", "can", "be", "used", "to", "define", "presets", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/behaviors/ImportExportController.php#L797-L816
train
Get format options from post
[ 30522, 5123, 3853, 2131, 14192, 10610, 16790, 22747, 21716, 19894, 1006, 1007, 1063, 1002, 3653, 13462, 5302, 3207, 1027, 2695, 1006, 1005, 4289, 1035, 3653, 13462, 1005, 1007, 1025, 1002, 7047, 1027, 1031, 1005, 3972, 27605, 3334, 1005, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/CoreAdminHome/API.php
API.invalidateArchivedReports
public function invalidateArchivedReports($idSites, $dates, $period = false, $segment = false, $cascadeDown = false) { $idSites = Site::getIdSitesFromIdSitesString($idSites); if (empty($idSites)) { throw new Exception("Specify a value for &idSites= as a comma separated list of website ID...
php
public function invalidateArchivedReports($idSites, $dates, $period = false, $segment = false, $cascadeDown = false) { $idSites = Site::getIdSitesFromIdSitesString($idSites); if (empty($idSites)) { throw new Exception("Specify a value for &idSites= as a comma separated list of website ID...
[ "public", "function", "invalidateArchivedReports", "(", "$", "idSites", ",", "$", "dates", ",", "$", "period", "=", "false", ",", "$", "segment", "=", "false", ",", "$", "cascadeDown", "=", "false", ")", "{", "$", "idSites", "=", "Site", "::", "getIdSite...
Invalidates report data, forcing it to be recomputed during the next archiving run. Note: This is done automatically when tracking or importing visits in the past. @param string $idSites Comma separated list of site IDs to invalidate reports for. @param string $dates Comma separated list of dates of periods to invali...
[ "Invalidates", "report", "data", "forcing", "it", "to", "be", "recomputed", "during", "the", "next", "archiving", "run", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/CoreAdminHome/API.php#L140-L168
train
Invalidates archived reports
[ 30522, 2270, 3853, 19528, 3686, 2906, 5428, 7178, 2890, 25378, 1006, 1002, 8909, 28032, 2229, 1010, 1002, 5246, 1010, 1002, 2558, 1027, 6270, 1010, 1002, 6903, 1027, 6270, 1010, 1002, 16690, 7698, 1027, 6270, 1007, 1063, 1002, 8909, 28032, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
php-ai/php-ml
src/Association/Apriori.php
Apriori.equals
private function equals(array $set1, array $set2): bool { return array_diff($set1, $set2) == array_diff($set2, $set1); }
php
private function equals(array $set1, array $set2): bool { return array_diff($set1, $set2) == array_diff($set2, $set1); }
[ "private", "function", "equals", "(", "array", "$", "set1", ",", "array", "$", "set2", ")", ":", "bool", "{", "return", "array_diff", "(", "$", "set1", ",", "$", "set2", ")", "==", "array_diff", "(", "$", "set2", ",", "$", "set1", ")", ";", "}" ]
Returns true if string representation of items does not differ. @param mixed[] $set1 @param mixed[] $set2
[ "Returns", "true", "if", "string", "representation", "of", "items", "does", "not", "differ", "." ]
f6aa1a59b0525b8fca3d2786d661ab3e70904016
https://github.com/php-ai/php-ml/blob/f6aa1a59b0525b8fca3d2786d661ab3e70904016/src/Association/Apriori.php#L328-L331
train
Compare two sets of values
[ 30522, 2797, 3853, 19635, 1006, 9140, 1002, 2275, 2487, 1010, 9140, 1002, 2275, 2475, 1007, 1024, 22017, 2140, 1063, 2709, 9140, 1035, 4487, 4246, 1006, 1002, 2275, 2487, 1010, 1002, 2275, 2475, 1007, 1027, 1027, 9140, 1035, 4487, 4246, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/models/ExportModel.php
ExportModel.getColumnHeaders
protected function getColumnHeaders($columns) { $headers = []; foreach ($columns as $column => $label) { $headers[] = Lang::get($label); } return $headers; }
php
protected function getColumnHeaders($columns) { $headers = []; foreach ($columns as $column => $label) { $headers[] = Lang::get($label); } return $headers; }
[ "protected", "function", "getColumnHeaders", "(", "$", "columns", ")", "{", "$", "headers", "=", "[", "]", ";", "foreach", "(", "$", "columns", "as", "$", "column", "=>", "$", "label", ")", "{", "$", "headers", "[", "]", "=", "Lang", "::", "get", "...
Extracts the headers from the column definitions.
[ "Extracts", "the", "headers", "from", "the", "column", "definitions", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/models/ExportModel.php#L160-L169
train
Get column headers
[ 30522, 5123, 3853, 2131, 25778, 2819, 25311, 13775, 2545, 1006, 1002, 7753, 1007, 1063, 1002, 20346, 2015, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1002, 7753, 2004, 1002, 5930, 1027, 1028, 1002, 3830, 1007, 1063, 1002, 20346, 2015, 1031,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/LanguagesManager/Model.php
Model.setLanguageForUser
public function setLanguageForUser($login, $languageCode) { $query = 'INSERT INTO ' . $this->table . ' (login, language) VALUES (?,?) ON DUPLICATE KEY UPDATE language=?'; $bind = array($login, $languageCode, $languageCode); Db::query($query, $bind); return true; ...
php
public function setLanguageForUser($login, $languageCode) { $query = 'INSERT INTO ' . $this->table . ' (login, language) VALUES (?,?) ON DUPLICATE KEY UPDATE language=?'; $bind = array($login, $languageCode, $languageCode); Db::query($query, $bind); return true; ...
[ "public", "function", "setLanguageForUser", "(", "$", "login", ",", "$", "languageCode", ")", "{", "$", "query", "=", "'INSERT INTO '", ".", "$", "this", "->", "table", ".", "' (login, language) VALUES (?,?) ON DUPLICATE KEY UPDATE language=?'", ";", "$", "bind", "=...
Sets the language for the user @param string $login @param string $languageCode @return bool
[ "Sets", "the", "language", "for", "the", "user" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/LanguagesManager/Model.php#L50-L58
train
Set language for user
[ 30522, 2270, 3853, 2275, 25023, 6692, 3351, 29278, 20330, 1006, 1002, 8833, 2378, 1010, 1002, 2653, 16044, 1007, 1063, 1002, 23032, 1027, 1005, 19274, 2046, 1005, 1012, 1002, 2023, 1011, 1028, 2795, 1012, 1005, 1006, 8833, 2378, 1010, 2653,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
overtrue/wechat
src/OpenPlatform/Authorizer/Aggregate/Account/Client.php
Client.unbindFrom
public function unbindFrom(string $openAppId) { $params = [ 'appid' => $this->app['config']['app_id'], 'open_appid' => $openAppId, ]; return $this->httpPostJson('cgi-bin/open/unbind', $params); }
php
public function unbindFrom(string $openAppId) { $params = [ 'appid' => $this->app['config']['app_id'], 'open_appid' => $openAppId, ]; return $this->httpPostJson('cgi-bin/open/unbind', $params); }
[ "public", "function", "unbindFrom", "(", "string", "$", "openAppId", ")", "{", "$", "params", "=", "[", "'appid'", "=>", "$", "this", "->", "app", "[", "'config'", "]", "[", "'app_id'", "]", ",", "'open_appid'", "=>", "$", "openAppId", ",", "]", ";", ...
将公众号/小程序从开放平台帐号下解绑. @param string $openAppId 开放平台帐号appid @return mixed @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
[ "将公众号", "/", "小程序从开放平台帐号下解绑", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OpenPlatform/Authorizer/Aggregate/Account/Client.php#L67-L75
train
Unbind from open app
[ 30522, 2270, 3853, 4895, 8428, 20952, 21716, 1006, 5164, 1002, 2330, 29098, 3593, 1007, 1063, 1002, 11498, 5244, 1027, 1031, 1005, 10439, 3593, 1005, 1027, 1028, 1002, 2023, 1011, 1028, 10439, 1031, 1005, 9530, 8873, 2290, 1005, 1033, 1031,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.setTransactionIsolationLevel
public function setTransactionIsolationLevel($level = null) { $this->_connect(); $sql = null; // Default transaction level in sql server if ($level === null) { $level = SQLSRV_TXN_READ_COMMITTED; } switch ($level) { case SQLSRV_TXN_RE...
php
public function setTransactionIsolationLevel($level = null) { $this->_connect(); $sql = null; // Default transaction level in sql server if ($level === null) { $level = SQLSRV_TXN_READ_COMMITTED; } switch ($level) { case SQLSRV_TXN_RE...
[ "public", "function", "setTransactionIsolationLevel", "(", "$", "level", "=", "null", ")", "{", "$", "this", "->", "_connect", "(", ")", ";", "$", "sql", "=", "null", ";", "// Default transaction level in sql server", "if", "(", "$", "level", "===", "null", ...
Set the transaction isoltion level. @param integer|null $level A fetch mode from SQLSRV_TXN_*. @return true @throws Zend_Db_Adapter_Sqlsrv_Exception
[ "Set", "the", "transaction", "isoltion", "level", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Adapter/Sqlsrv.php#L214-L252
train
Set the transaction isolation level
[ 30522, 2270, 3853, 2275, 6494, 3619, 18908, 3258, 19565, 13490, 20414, 2884, 1006, 1002, 2504, 1027, 19701, 1007, 1063, 1002, 2023, 1011, 1028, 1035, 7532, 1006, 1007, 1025, 1002, 29296, 1027, 19701, 1025, 1013, 1013, 12398, 12598, 2504, 19...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Console/Scheduling/CommandBuilder.php
CommandBuilder.buildCommand
public function buildCommand(Event $event) { if ($event->runInBackground) { return $this->buildBackgroundCommand($event); } return $this->buildForegroundCommand($event); }
php
public function buildCommand(Event $event) { if ($event->runInBackground) { return $this->buildBackgroundCommand($event); } return $this->buildForegroundCommand($event); }
[ "public", "function", "buildCommand", "(", "Event", "$", "event", ")", "{", "if", "(", "$", "event", "->", "runInBackground", ")", "{", "return", "$", "this", "->", "buildBackgroundCommand", "(", "$", "event", ")", ";", "}", "return", "$", "this", "->", ...
Build the command for the given event. @param \Illuminate\Console\Scheduling\Event $event @return string
[ "Build", "the", "command", "for", "the", "given", "event", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Console/Scheduling/CommandBuilder.php#L16-L23
train
Build the command for the given event
[ 30522, 2270, 3853, 3857, 9006, 2386, 2094, 1006, 2724, 1002, 2724, 1007, 1063, 2065, 1006, 1002, 2724, 1011, 1028, 2448, 2378, 5963, 16365, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 3857, 5963, 16365, 9006, 2386, 2094, 1006, 1002, 2724, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Routing/Router.php
Router.model
public function model($key, $class, Closure $callback = null) { $this->bind($key, RouteBinding::forModel($this->container, $class, $callback)); }
php
public function model($key, $class, Closure $callback = null) { $this->bind($key, RouteBinding::forModel($this->container, $class, $callback)); }
[ "public", "function", "model", "(", "$", "key", ",", "$", "class", ",", "Closure", "$", "callback", "=", "null", ")", "{", "$", "this", "->", "bind", "(", "$", "key", ",", "RouteBinding", "::", "forModel", "(", "$", "this", "->", "container", ",", ...
Register a model binder for a wildcard. @param string $key @param string $class @param \Closure|null $callback @return void
[ "Register", "a", "model", "binder", "for", "a", "wildcard", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/Router.php#L937-L940
train
Binds a model to the route.
[ 30522, 2270, 3853, 2944, 1006, 1002, 3145, 1010, 1002, 2465, 1010, 8503, 1002, 2655, 5963, 1027, 19701, 1007, 1063, 1002, 2023, 1011, 1028, 14187, 1006, 1002, 3145, 1010, 2799, 8428, 4667, 1024, 1024, 2433, 10244, 2140, 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...
google/flatbuffers
php/FlatbufferBuilder.php
FlatbufferBuilder.finish
public function finish($root_table, $identifier = null) { if ($identifier == null) { $this->prep($this->minalign, Constants::SIZEOF_INT); $this->addOffset($root_table); $this->bb->setPosition($this->space); } else { $this->prep($this->minalign, Constan...
php
public function finish($root_table, $identifier = null) { if ($identifier == null) { $this->prep($this->minalign, Constants::SIZEOF_INT); $this->addOffset($root_table); $this->bb->setPosition($this->space); } else { $this->prep($this->minalign, Constan...
[ "public", "function", "finish", "(", "$", "root_table", ",", "$", "identifier", "=", "null", ")", "{", "if", "(", "$", "identifier", "==", "null", ")", "{", "$", "this", "->", "prep", "(", "$", "this", "->", "minalign", ",", "Constants", "::", "SIZEO...
Finalize a buffer, pointing to the given `$root_table`. @param $root_table An offest to be added to the buffer. @param $file_identifier A FlatBuffer file identifier to be added to the buffer before `$root_table`. This defaults to `null`. @throws InvalidArgumentException Thrown if an invalid `$identifier` is given, wher...
[ "Finalize", "a", "buffer", "pointing", "to", "the", "given", "$root_table", "." ]
af74f87ccd6ea9bcf9e325427dca7c7faf1d79c1
https://github.com/google/flatbuffers/blob/af74f87ccd6ea9bcf9e325427dca7c7faf1d79c1/php/FlatbufferBuilder.php#L906-L926
train
Finishes the buffer
[ 30522, 2270, 3853, 3926, 1006, 1002, 7117, 1035, 2795, 1010, 1002, 8909, 4765, 18095, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 8909, 4765, 18095, 1027, 1027, 19701, 1007, 1063, 1002, 2023, 1011, 1028, 17463, 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...
symfony/symfony
src/Symfony/Component/Translation/Formatter/MessageFormatter.php
MessageFormatter.choiceFormat
public function choiceFormat($message, $number, $locale, array $parameters = []) { @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the format() one instead with a %%count%% parameter.', __METHOD__), E_USER_DEPRECATED); $parameters = ['%count%' => $number] + $parameter...
php
public function choiceFormat($message, $number, $locale, array $parameters = []) { @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the format() one instead with a %%count%% parameter.', __METHOD__), E_USER_DEPRECATED); $parameters = ['%count%' => $number] + $parameter...
[ "public", "function", "choiceFormat", "(", "$", "message", ",", "$", "number", ",", "$", "locale", ",", "array", "$", "parameters", "=", "[", "]", ")", "{", "@", "trigger_error", "(", "sprintf", "(", "'The \"%s()\" method is deprecated since Symfony 4.2, use the f...
{@inheritdoc} @deprecated since Symfony 4.2, use format() with a %count% parameter instead
[ "{", "@inheritdoc", "}" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Translation/Formatter/MessageFormatter.php#L67-L78
train
Formats a message with the given number in the given locale.
[ 30522, 2270, 3853, 3601, 14192, 4017, 1006, 1002, 4471, 1010, 1002, 2193, 1010, 1002, 2334, 2063, 1010, 9140, 1002, 11709, 1027, 1031, 1033, 1007, 1063, 1030, 9495, 1035, 7561, 1006, 9043, 2546, 1006, 1005, 1996, 1000, 1003, 1055, 1006, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Cache/Backend/TwoLevels.php
Zend_Cache_Backend_TwoLevels.___expire
public function ___expire($id) { $this->_fastBackend->remove($id); $this->_slowBackend->___expire($id); }
php
public function ___expire($id) { $this->_fastBackend->remove($id); $this->_slowBackend->___expire($id); }
[ "public", "function", "___expire", "(", "$", "id", ")", "{", "$", "this", "->", "_fastBackend", "->", "remove", "(", "$", "id", ")", ";", "$", "this", "->", "_slowBackend", "->", "___expire", "(", "$", "id", ")", ";", "}" ]
PUBLIC METHOD FOR UNIT TESTING ONLY ! Force a cache record to expire @param string $id cache id
[ "PUBLIC", "METHOD", "FOR", "UNIT", "TESTING", "ONLY", "!" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Cache/Backend/TwoLevels.php#L506-L510
train
Remove the cache entry and remove the cache entry
[ 30522, 2270, 3853, 1035, 1035, 1035, 4654, 20781, 1006, 1002, 8909, 1007, 1063, 1002, 2023, 1011, 1028, 1035, 3435, 5963, 10497, 1011, 1028, 6366, 1006, 1002, 8909, 1007, 1025, 1002, 2023, 1011, 1028, 1035, 4030, 5963, 10497, 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
libs/Zend/Db/Adapter/Abstract.php
Zend_Db_Adapter_Abstract.beginTransaction
public function beginTransaction() { $this->_connect(); $q = $this->_profiler->queryStart('begin', Zend_Db_Profiler::TRANSACTION); $this->_beginTransaction(); $this->_profiler->queryEnd($q); return $this; }
php
public function beginTransaction() { $this->_connect(); $q = $this->_profiler->queryStart('begin', Zend_Db_Profiler::TRANSACTION); $this->_beginTransaction(); $this->_profiler->queryEnd($q); return $this; }
[ "public", "function", "beginTransaction", "(", ")", "{", "$", "this", "->", "_connect", "(", ")", ";", "$", "q", "=", "$", "this", "->", "_profiler", "->", "queryStart", "(", "'begin'", ",", "Zend_Db_Profiler", "::", "TRANSACTION", ")", ";", "$", "this",...
Leave autocommit mode and begin a transaction. @return Zend_Db_Adapter_Abstract
[ "Leave", "autocommit", "mode", "and", "begin", "a", "transaction", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Adapter/Abstract.php#L491-L498
train
Begin a transaction
[ 30522, 2270, 3853, 4088, 6494, 3619, 18908, 3258, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 1035, 7532, 1006, 1007, 1025, 1002, 1053, 1027, 1002, 2023, 1011, 1028, 1035, 6337, 2099, 1011, 1028, 23032, 14117, 2102, 1006, 1005, 4088, 1005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
php-ai/php-ml
src/Classification/NaiveBayes.php
NaiveBayes.sampleProbability
private function sampleProbability(array $sample, int $feature, string $label): float { if (!isset($sample[$feature])) { throw new InvalidArgumentException('Missing feature. All samples must have equal number of features'); } $value = $sample[$feature]; if ($this->dataTy...
php
private function sampleProbability(array $sample, int $feature, string $label): float { if (!isset($sample[$feature])) { throw new InvalidArgumentException('Missing feature. All samples must have equal number of features'); } $value = $sample[$feature]; if ($this->dataTy...
[ "private", "function", "sampleProbability", "(", "array", "$", "sample", ",", "int", "$", "feature", ",", "string", "$", "label", ")", ":", "float", "{", "if", "(", "!", "isset", "(", "$", "sample", "[", "$", "feature", "]", ")", ")", "{", "throw", ...
Calculates the probability P(label|sample_n)
[ "Calculates", "the", "probability", "P", "(", "label|sample_n", ")" ]
f6aa1a59b0525b8fca3d2786d661ab3e70904016
https://github.com/php-ai/php-ml/blob/f6aa1a59b0525b8fca3d2786d661ab3e70904016/src/Classification/NaiveBayes.php#L139-L168
train
Calculates the probability density of a feature
[ 30522, 2797, 3853, 7099, 21572, 3676, 8553, 1006, 9140, 1002, 7099, 1010, 20014, 1002, 3444, 1010, 5164, 1002, 3830, 1007, 1024, 14257, 1063, 2065, 1006, 999, 26354, 3388, 1006, 1002, 7099, 1031, 1002, 3444, 1033, 1007, 1007, 1063, 5466, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/MergeExtensionConfigurationPass.php
MergeExtensionConfigurationContainerBuilder.addCompilerPass
public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION, int $priority = 0) { throw new LogicException(sprintf('You cannot add compiler pass "%s" from extension "%s". Compiler passes must be registered before the container is compiled.', \get_class($pass), $...
php
public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION, int $priority = 0) { throw new LogicException(sprintf('You cannot add compiler pass "%s" from extension "%s". Compiler passes must be registered before the container is compiled.', \get_class($pass), $...
[ "public", "function", "addCompilerPass", "(", "CompilerPassInterface", "$", "pass", ",", "$", "type", "=", "PassConfig", "::", "TYPE_BEFORE_OPTIMIZATION", ",", "int", "$", "priority", "=", "0", ")", "{", "throw", "new", "LogicException", "(", "sprintf", "(", "...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php#L170-L173
train
Adds compiler pass to the container
[ 30522, 2270, 3853, 5587, 9006, 22090, 14536, 12054, 1006, 21624, 15194, 18447, 2121, 12172, 1002, 3413, 1010, 1002, 2828, 1027, 3413, 8663, 8873, 2290, 1024, 1024, 2828, 1035, 2077, 1035, 20600, 1010, 20014, 1002, 9470, 1027, 1014, 1007, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Plugin/Manager.php
Manager.executePluginInstall
private function executePluginInstall(Plugin $plugin) { try { $plugin->install(); } catch (\Exception $e) { throw new \Piwik\Plugin\PluginException($plugin->getPluginName(), $e->getMessage()); } }
php
private function executePluginInstall(Plugin $plugin) { try { $plugin->install(); } catch (\Exception $e) { throw new \Piwik\Plugin\PluginException($plugin->getPluginName(), $e->getMessage()); } }
[ "private", "function", "executePluginInstall", "(", "Plugin", "$", "plugin", ")", "{", "try", "{", "$", "plugin", "->", "install", "(", ")", ";", "}", "catch", "(", "\\", "Exception", "$", "e", ")", "{", "throw", "new", "\\", "Piwik", "\\", "Plugin", ...
Install a specific plugin @param Plugin $plugin @throws \Piwik\Plugin\PluginException if installation fails
[ "Install", "a", "specific", "plugin" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Plugin/Manager.php#L1243-L1250
train
Execute the plugin install
[ 30522, 2797, 3853, 15389, 24759, 15916, 5498, 23808, 8095, 1006, 13354, 2378, 1002, 13354, 2378, 1007, 1063, 3046, 1063, 1002, 13354, 2378, 1011, 1028, 16500, 1006, 1007, 1025, 1065, 4608, 1006, 1032, 6453, 1002, 1041, 1007, 1063, 5466, 204...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.arrayFlatten
public static function arrayFlatten($array) { $flatten = array(); foreach ($array as $key => $inner) { if (is_array($inner)) { foreach ($inner as $inner_key => $value) { $flatten[$inner_key] = $value; } } else { ...
php
public static function arrayFlatten($array) { $flatten = array(); foreach ($array as $key => $inner) { if (is_array($inner)) { foreach ($inner as $inner_key => $value) { $flatten[$inner_key] = $value; } } else { ...
[ "public", "static", "function", "arrayFlatten", "(", "$", "array", ")", "{", "$", "flatten", "=", "array", "(", ")", ";", "foreach", "(", "$", "array", "as", "$", "key", "=>", "$", "inner", ")", "{", "if", "(", "is_array", "(", "$", "inner", ")", ...
Flatten an array @param array $array @return array
[ "Flatten", "an", "array" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Utils.php#L906-L920
train
Flatten an array into a flat array
[ 30522, 2270, 10763, 3853, 9140, 10258, 19321, 2368, 1006, 1002, 9140, 1007, 1063, 1002, 4257, 6528, 1027, 9140, 1006, 1007, 1025, 18921, 6776, 1006, 1002, 9140, 2004, 1002, 3145, 1027, 1028, 1002, 5110, 1007, 1063, 2065, 1006, 2003, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Schema/Blueprint.php
Blueprint.dropColumn
public function dropColumn($columns) { $columns = is_array($columns) ? $columns : func_get_args(); return $this->addCommand('dropColumn', compact('columns')); }
php
public function dropColumn($columns) { $columns = is_array($columns) ? $columns : func_get_args(); return $this->addCommand('dropColumn', compact('columns')); }
[ "public", "function", "dropColumn", "(", "$", "columns", ")", "{", "$", "columns", "=", "is_array", "(", "$", "columns", ")", "?", "$", "columns", ":", "func_get_args", "(", ")", ";", "return", "$", "this", "->", "addCommand", "(", "'dropColumn'", ",", ...
Indicate that the given columns should be dropped. @param array|mixed $columns @return \Illuminate\Support\Fluent
[ "Indicate", "that", "the", "given", "columns", "should", "be", "dropped", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Blueprint.php#L304-L309
train
Drops one or more columns
[ 30522, 2270, 3853, 4530, 25778, 2819, 2078, 1006, 1002, 7753, 1007, 1063, 1002, 7753, 1027, 2003, 1035, 9140, 1006, 1002, 7753, 1007, 1029, 1002, 7753, 1024, 4569, 2278, 1035, 2131, 1035, 12098, 5620, 1006, 1007, 1025, 2709, 1002, 2023, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Concerns/ManagesTransactions.php
ManagesTransactions.rollBack
public function rollBack($toLevel = null) { // We allow developers to rollback to a certain transaction level. We will verify // that this given transaction level is valid before attempting to rollback to // that level. If it's not we will just return out and not attempt anything. $t...
php
public function rollBack($toLevel = null) { // We allow developers to rollback to a certain transaction level. We will verify // that this given transaction level is valid before attempting to rollback to // that level. If it's not we will just return out and not attempt anything. $t...
[ "public", "function", "rollBack", "(", "$", "toLevel", "=", "null", ")", "{", "// We allow developers to rollback to a certain transaction level. We will verify", "// that this given transaction level is valid before attempting to rollback to", "// that level. If it's not we will just return...
Rollback the active database transaction. @param int|null $toLevel @return void @throws \Exception
[ "Rollback", "the", "active", "database", "transaction", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Concerns/ManagesTransactions.php#L173-L198
train
Rollbacks the current transaction to a specific level.
[ 30522, 2270, 3853, 4897, 5963, 1006, 1002, 2000, 20414, 2884, 1027, 19701, 1007, 1063, 1013, 1013, 2057, 3499, 9797, 2000, 4897, 5963, 2000, 1037, 3056, 12598, 2504, 1012, 2057, 2097, 20410, 1013, 1013, 2008, 2023, 2445, 12598, 2504, 2003, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/FormBuilder.php
FormBuilder.remove
public function remove($name) { if ($this->locked) { throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); } unset($this->unresolvedChildren[$name], $this->children[$name]); re...
php
public function remove($name) { if ($this->locked) { throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); } unset($this->unresolvedChildren[$name], $this->children[$name]); re...
[ "public", "function", "remove", "(", "$", "name", ")", "{", "if", "(", "$", "this", "->", "locked", ")", "{", "throw", "new", "BadMethodCallException", "(", "'FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'", "...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/FormBuilder.php#L123-L132
train
Removes a child form element by name
[ 30522, 2270, 3853, 6366, 1006, 1002, 2171, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 5299, 1007, 1063, 5466, 2047, 2919, 11368, 6806, 16409, 24164, 2595, 24422, 1006, 1005, 2433, 8569, 23891, 2099, 4725, 3685, 2022, 11570, 4902, 2320,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/MarkupManager.php
MarkupManager.makeTwigFilters
public function makeTwigFilters($filters = []) { if (!is_array($filters)) { $filters = []; } foreach ($this->listFilters() as $name => $callable) { /* * Handle a wildcard function */ if (strpos($name, '*') !== false && $this->is...
php
public function makeTwigFilters($filters = []) { if (!is_array($filters)) { $filters = []; } foreach ($this->listFilters() as $name => $callable) { /* * Handle a wildcard function */ if (strpos($name, '*') !== false && $this->is...
[ "public", "function", "makeTwigFilters", "(", "$", "filters", "=", "[", "]", ")", "{", "if", "(", "!", "is_array", "(", "$", "filters", ")", ")", "{", "$", "filters", "=", "[", "]", ";", "}", "foreach", "(", "$", "this", "->", "listFilters", "(", ...
Makes a set of Twig filters for use in a twig extension. @param array $filters Current collection @return array
[ "Makes", "a", "set", "of", "Twig", "filters", "for", "use", "in", "a", "twig", "extension", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/classes/MarkupManager.php#L257-L284
train
Makes Twig filters
[ 30522, 2270, 3853, 2191, 2102, 16279, 8873, 21928, 2015, 1006, 1002, 17736, 1027, 1031, 1033, 1007, 1063, 2065, 1006, 999, 2003, 1035, 9140, 1006, 1002, 17736, 1007, 1007, 1063, 1002, 17736, 1027, 1031, 1033, 1025, 1065, 18921, 6776, 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...
getgrav/grav
system/src/Grav/Common/Filesystem/Folder.php
Folder.getRelativePath
public static function getRelativePath($path, $base = GRAV_ROOT) { if ($base) { $base = preg_replace('![\\\/]+!', '/', $base); $path = preg_replace('![\\\/]+!', '/', $path); if (strpos($path, $base) === 0) { $path = ltrim(substr($path, strlen($base)), '/')...
php
public static function getRelativePath($path, $base = GRAV_ROOT) { if ($base) { $base = preg_replace('![\\\/]+!', '/', $base); $path = preg_replace('![\\\/]+!', '/', $path); if (strpos($path, $base) === 0) { $path = ltrim(substr($path, strlen($base)), '/')...
[ "public", "static", "function", "getRelativePath", "(", "$", "path", ",", "$", "base", "=", "GRAV_ROOT", ")", "{", "if", "(", "$", "base", ")", "{", "$", "base", "=", "preg_replace", "(", "'![\\\\\\/]+!'", ",", "'/'", ",", "$", "base", ")", ";", "$",...
Get relative path between target and base path. If path isn't relative, return full path. @param string $path @param mixed|string $base @return string
[ "Get", "relative", "path", "between", "target", "and", "base", "path", ".", "If", "path", "isn", "t", "relative", "return", "full", "path", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Filesystem/Folder.php#L123-L134
train
Get relative path
[ 30522, 2270, 10763, 3853, 2131, 16570, 8082, 15069, 1006, 1002, 4130, 1010, 1002, 2918, 1027, 24665, 11431, 1035, 7117, 1007, 1063, 2065, 1006, 1002, 2918, 1007, 1063, 1002, 2918, 1027, 3653, 2290, 1035, 5672, 1006, 1005, 999, 1031, 1032, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/WorkflowGuardListenerPass.php
WorkflowGuardListenerPass.process
public function process(ContainerBuilder $container) { if (!$container->hasParameter('workflow.has_guard_listeners')) { return; } $container->getParameterBag()->remove('workflow.has_guard_listeners'); $servicesNeeded = [ 'security.token_storage', ...
php
public function process(ContainerBuilder $container) { if (!$container->hasParameter('workflow.has_guard_listeners')) { return; } $container->getParameterBag()->remove('workflow.has_guard_listeners'); $servicesNeeded = [ 'security.token_storage', ...
[ "public", "function", "process", "(", "ContainerBuilder", "$", "container", ")", "{", "if", "(", "!", "$", "container", "->", "hasParameter", "(", "'workflow.has_guard_listeners'", ")", ")", "{", "return", ";", "}", "$", "container", "->", "getParameterBag", "...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/WorkflowGuardListenerPass.php#L27-L47
train
Remove the workflow guard listeners from the container
[ 30522, 2270, 3853, 2832, 1006, 11661, 8569, 23891, 2099, 1002, 11661, 1007, 1063, 2065, 1006, 999, 1002, 11661, 1011, 1028, 2038, 28689, 22828, 1006, 1005, 2147, 12314, 1012, 2038, 1035, 3457, 1035, 13810, 1005, 1007, 1007, 1063, 2709, 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/HttpFoundation/Session/Storage/Handler/MigratingSessionHandler.php
MigratingSessionHandler.write
public function write($sessionId, $sessionData) { $result = $this->currentHandler->write($sessionId, $sessionData); $this->writeOnlyHandler->write($sessionId, $sessionData); return $result; }
php
public function write($sessionId, $sessionData) { $result = $this->currentHandler->write($sessionId, $sessionData); $this->writeOnlyHandler->write($sessionId, $sessionData); return $result; }
[ "public", "function", "write", "(", "$", "sessionId", ",", "$", "sessionData", ")", "{", "$", "result", "=", "$", "this", "->", "currentHandler", "->", "write", "(", "$", "sessionId", ",", "$", "sessionData", ")", ";", "$", "this", "->", "writeOnlyHandle...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MigratingSessionHandler.php#L97-L103
train
Write session data to the current and write only session
[ 30522, 2270, 3853, 4339, 1006, 1002, 5219, 3593, 1010, 1002, 5219, 2850, 2696, 1007, 1063, 1002, 2765, 1027, 1002, 2023, 1011, 1028, 2783, 11774, 3917, 1011, 1028, 4339, 1006, 1002, 5219, 3593, 1010, 1002, 5219, 2850, 2696, 1007, 1025, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Mail/Storage/Maildir.php
Zend_Mail_Storage_Maildir.getUniqueId
public function getUniqueId($id = null) { if ($id) { return $this->_getFileData($id, 'uniq'); } $ids = array(); foreach ($this->_files as $num => $file) { $ids[$num + 1] = $file['uniq']; } return $ids; }
php
public function getUniqueId($id = null) { if ($id) { return $this->_getFileData($id, 'uniq'); } $ids = array(); foreach ($this->_files as $num => $file) { $ids[$num + 1] = $file['uniq']; } return $ids; }
[ "public", "function", "getUniqueId", "(", "$", "id", "=", "null", ")", "{", "if", "(", "$", "id", ")", "{", "return", "$", "this", "->", "_getFileData", "(", "$", "id", ",", "'uniq'", ")", ";", "}", "$", "ids", "=", "array", "(", ")", ";", "for...
get unique id for one or all messages if storage does not support unique ids it's the same as the message number @param int|null $id message number @return array|string message number for given message or all messages as array @throws Zend_Mail_Storage_Exception
[ "get", "unique", "id", "for", "one", "or", "all", "messages" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail/Storage/Maildir.php#L438-L449
train
Get Unique ID of all files
[ 30522, 2270, 3853, 2131, 19496, 4226, 3593, 1006, 1002, 8909, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 8909, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 1035, 2131, 8873, 3709, 6790, 1006, 1002, 8909, 1010, 1005, 4895, 18515, 1005, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Form/FormFactory.php
FormFactory.createNamed
public function createNamed($name, $type = 'Symfony\Component\Form\Extension\Core\Type\FormType', $data = null, array $options = []) { return $this->createNamedBuilder($name, $type, $data, $options)->getForm(); }
php
public function createNamed($name, $type = 'Symfony\Component\Form\Extension\Core\Type\FormType', $data = null, array $options = []) { return $this->createNamedBuilder($name, $type, $data, $options)->getForm(); }
[ "public", "function", "createNamed", "(", "$", "name", ",", "$", "type", "=", "'Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType'", ",", "$", "data", "=", "null", ",", "array", "$", "options", "=", "[", "]", ")", "{", "return", "$", "this", "->", "c...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/FormFactory.php#L36-L39
train
Create Form with named builder
[ 30522, 2270, 3853, 3443, 18442, 2094, 1006, 1002, 2171, 1010, 1002, 2828, 1027, 1005, 25353, 2213, 14876, 4890, 1032, 6922, 1032, 2433, 1032, 5331, 1032, 4563, 1032, 2828, 1032, 2433, 13874, 1005, 1010, 1002, 2951, 1027, 19701, 1010, 9140, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Settings/Storage/Factory.php
Factory.getSitesTable
public function getSitesTable($idSite) { $id = 'sitesTable#' . $idSite; if (empty($idSite)) { return $this->getNonPersistentStorage($id . '#nonpersistent'); } if (!isset($this->cache[$id])) { $backend = new Backend\SitesTable($idSite); $this->cac...
php
public function getSitesTable($idSite) { $id = 'sitesTable#' . $idSite; if (empty($idSite)) { return $this->getNonPersistentStorage($id . '#nonpersistent'); } if (!isset($this->cache[$id])) { $backend = new Backend\SitesTable($idSite); $this->cac...
[ "public", "function", "getSitesTable", "(", "$", "idSite", ")", "{", "$", "id", "=", "'sitesTable#'", ".", "$", "idSite", ";", "if", "(", "empty", "(", "$", "idSite", ")", ")", "{", "return", "$", "this", "->", "getNonPersistentStorage", "(", "$", "id"...
Get a storage instance for settings that will be saved in the "site" table. The storage will hold values that belong to the given idSite. Be aware that a storage instance for a specific site will be cached during one request for better performance. @param int $idSite If idSite is empty it will use a backend that ne...
[ "Get", "a", "storage", "instance", "for", "settings", "that", "will", "be", "saved", "in", "the", "site", "table", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Settings/Storage/Factory.php#L101-L115
train
Get Site s storage
[ 30522, 2270, 3853, 4152, 7616, 10880, 1006, 1002, 8909, 28032, 2063, 1007, 1063, 1002, 8909, 1027, 1005, 4573, 10880, 1001, 1005, 1012, 1002, 8909, 28032, 2063, 1025, 2065, 1006, 4064, 1006, 1002, 8909, 28032, 2063, 1007, 1007, 1063, 2709, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Mail/Protocol/Abstract.php
Zend_Mail_Protocol_Abstract._receive
protected function _receive($timeout = null) { if (!is_resource($this->_socket)) { /** * @see Zend_Mail_Protocol_Exception */ // require_once 'Zend/Mail/Protocol/Exception.php'; throw new Zend_Mail_Protocol_Exception('No connection has been estab...
php
protected function _receive($timeout = null) { if (!is_resource($this->_socket)) { /** * @see Zend_Mail_Protocol_Exception */ // require_once 'Zend/Mail/Protocol/Exception.php'; throw new Zend_Mail_Protocol_Exception('No connection has been estab...
[ "protected", "function", "_receive", "(", "$", "timeout", "=", "null", ")", "{", "if", "(", "!", "is_resource", "(", "$", "this", "->", "_socket", ")", ")", "{", "/**\n * @see Zend_Mail_Protocol_Exception\n */", "// require_once 'Zend/Mail/Protoc...
Get a line from the stream. @var integer $timeout Per-request timeout value if applicable @throws Zend_Mail_Protocol_Exception @return string
[ "Get", "a", "line", "from", "the", "stream", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail/Protocol/Abstract.php#L348-L389
train
Receive response from the server
[ 30522, 5123, 3853, 1035, 4374, 1006, 1002, 2051, 5833, 1027, 19701, 1007, 1063, 2065, 1006, 999, 2003, 1035, 7692, 1006, 1002, 2023, 1011, 1028, 1035, 22278, 1007, 1007, 1063, 1013, 1008, 1008, 1008, 1030, 2156, 16729, 2094, 1035, 5653, 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/Http/UploadedFile.php
UploadedFile.store
public function store($path, $options = []) { return $this->storeAs($path, $this->hashName(), $this->parseOptions($options)); }
php
public function store($path, $options = []) { return $this->storeAs($path, $this->hashName(), $this->parseOptions($options)); }
[ "public", "function", "store", "(", "$", "path", ",", "$", "options", "=", "[", "]", ")", "{", "return", "$", "this", "->", "storeAs", "(", "$", "path", ",", "$", "this", "->", "hashName", "(", ")", ",", "$", "this", "->", "parseOptions", "(", "$...
Store the uploaded file on a filesystem disk. @param string $path @param array|string $options @return string|false
[ "Store", "the", "uploaded", "file", "on", "a", "filesystem", "disk", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Http/UploadedFile.php#L33-L36
train
Store the current cache as a file.
[ 30522, 2270, 3853, 3573, 1006, 1002, 4130, 1010, 1002, 7047, 1027, 1031, 1033, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 3573, 3022, 1006, 1002, 4130, 1010, 1002, 2023, 1011, 1028, 23325, 18442, 1006, 1007, 1010, 1002, 2023, 1011, 1028, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/cms/models/MaintenanceSetting.php
MaintenanceSetting.afterFetch
public function afterFetch() { if ( ($theme = Theme::getEditTheme()) && ($themeMap = array_get($this->attributes, 'theme_map')) && ($cmsPage = array_get($themeMap, $theme->getDirName())) ) { $this->cms_page = $cmsPage; } else { ...
php
public function afterFetch() { if ( ($theme = Theme::getEditTheme()) && ($themeMap = array_get($this->attributes, 'theme_map')) && ($cmsPage = array_get($themeMap, $theme->getDirName())) ) { $this->cms_page = $cmsPage; } else { ...
[ "public", "function", "afterFetch", "(", ")", "{", "if", "(", "(", "$", "theme", "=", "Theme", "::", "getEditTheme", "(", ")", ")", "&&", "(", "$", "themeMap", "=", "array_get", "(", "$", "this", "->", "attributes", ",", "'theme_map'", ")", ")", "&&"...
Restore the CMS page found in the mapping array, or disable the maintenance mode. @return void
[ "Restore", "the", "CMS", "page", "found", "in", "the", "mapping", "array", "or", "disable", "the", "maintenance", "mode", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/models/MaintenanceSetting.php#L79-L91
train
AfterFetch callback - Sets the CMS page object to the current theme
[ 30522, 2270, 3853, 2044, 7959, 10649, 1006, 1007, 1063, 2065, 1006, 1006, 1002, 4323, 1027, 4323, 1024, 1024, 2131, 2098, 12474, 29122, 2063, 1006, 1007, 1007, 1004, 1004, 1006, 1002, 4323, 2863, 2361, 1027, 9140, 1035, 2131, 1006, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Messenger/DependencyInjection/MessengerPass.php
MessengerPass.process
public function process(ContainerBuilder $container) { $busIds = []; foreach ($container->findTaggedServiceIds($this->busTag) as $busId => $tags) { $busIds[] = $busId; if ($container->hasParameter($busMiddlewareParameter = $busId.'.middleware')) { $this->regis...
php
public function process(ContainerBuilder $container) { $busIds = []; foreach ($container->findTaggedServiceIds($this->busTag) as $busId => $tags) { $busIds[] = $busId; if ($container->hasParameter($busMiddlewareParameter = $busId.'.middleware')) { $this->regis...
[ "public", "function", "process", "(", "ContainerBuilder", "$", "container", ")", "{", "$", "busIds", "=", "[", "]", ";", "foreach", "(", "$", "container", "->", "findTaggedServiceIds", "(", "$", "this", "->", "busTag", ")", "as", "$", "busId", "=>", "$",...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Messenger/DependencyInjection/MessengerPass.php#L49-L69
train
Registers all registered Buss and Handlers
[ 30522, 2270, 3853, 2832, 1006, 11661, 8569, 23891, 2099, 1002, 11661, 1007, 1063, 1002, 3902, 9821, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1002, 11661, 1011, 1028, 2424, 15900, 5999, 8043, 7903, 7416, 5104, 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...
matomo-org/matomo
plugins/UsersManager/UserPreferences.php
UserPreferences.getDefaultWebsiteId
public function getDefaultWebsiteId() { $defaultReport = $this->getDefaultReport(); if (is_numeric($defaultReport) && Piwik::isUserHasViewAccess($defaultReport)) { return $defaultReport; } $sitesId = APISitesManager::getInstance()->getSitesIdWithAtLeastViewAccess(); ...
php
public function getDefaultWebsiteId() { $defaultReport = $this->getDefaultReport(); if (is_numeric($defaultReport) && Piwik::isUserHasViewAccess($defaultReport)) { return $defaultReport; } $sitesId = APISitesManager::getInstance()->getSitesIdWithAtLeastViewAccess(); ...
[ "public", "function", "getDefaultWebsiteId", "(", ")", "{", "$", "defaultReport", "=", "$", "this", "->", "getDefaultReport", "(", ")", ";", "if", "(", "is_numeric", "(", "$", "defaultReport", ")", "&&", "Piwik", "::", "isUserHasViewAccess", "(", "$", "defau...
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#L37-L52
train
Returns the default website ID
[ 30522, 2270, 3853, 2131, 3207, 7011, 11314, 8545, 5910, 4221, 3593, 1006, 1007, 1063, 1002, 12398, 2890, 6442, 1027, 1002, 2023, 1011, 1028, 2131, 3207, 7011, 11314, 2890, 6442, 1006, 1007, 1025, 2065, 1006, 2003, 1035, 16371, 25531, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Eloquent/Relations/BelongsTo.php
BelongsTo.getRelationExistenceQueryForSelfRelation
public function getRelationExistenceQueryForSelfRelation(Builder $query, Builder $parentQuery, $columns = ['*']) { $query->select($columns)->from( $query->getModel()->getTable().' as '.$hash = $this->getRelationCountHash() ); $query->getModel()->setTable($hash); return ...
php
public function getRelationExistenceQueryForSelfRelation(Builder $query, Builder $parentQuery, $columns = ['*']) { $query->select($columns)->from( $query->getModel()->getTable().' as '.$hash = $this->getRelationCountHash() ); $query->getModel()->setTable($hash); return ...
[ "public", "function", "getRelationExistenceQueryForSelfRelation", "(", "Builder", "$", "query", ",", "Builder", "$", "parentQuery", ",", "$", "columns", "=", "[", "'*'", "]", ")", "{", "$", "query", "->", "select", "(", "$", "columns", ")", "->", "from", "...
Add the constraints for a relationship query on the same table. @param \Illuminate\Database\Eloquent\Builder $query @param \Illuminate\Database\Eloquent\Builder $parentQuery @param array|mixed $columns @return \Illuminate\Database\Eloquent\Builder
[ "Add", "the", "constraints", "for", "a", "relationship", "query", "on", "the", "same", "table", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php#L267-L278
train
Get Query for relation existence for self relation
[ 30522, 2270, 3853, 2131, 16570, 3370, 10288, 27870, 5897, 4226, 2854, 29278, 11246, 19699, 10581, 3508, 1006, 12508, 1002, 23032, 1010, 12508, 1002, 6687, 4226, 2854, 1010, 1002, 7753, 1027, 1031, 1005, 1008, 1005, 1033, 1007, 1063, 1002, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Support/Collection.php
Collection.countBy
public function countBy($callback = null) { if (is_null($callback)) { $callback = function ($value) { return $value; }; } return new static($this->groupBy($callback)->map(function ($value) { return $value->count(); })); }
php
public function countBy($callback = null) { if (is_null($callback)) { $callback = function ($value) { return $value; }; } return new static($this->groupBy($callback)->map(function ($value) { return $value->count(); })); }
[ "public", "function", "countBy", "(", "$", "callback", "=", "null", ")", "{", "if", "(", "is_null", "(", "$", "callback", ")", ")", "{", "$", "callback", "=", "function", "(", "$", "value", ")", "{", "return", "$", "value", ";", "}", ";", "}", "r...
Count the number of items in the collection using a given truth test. @param callable|null $callback @return static
[ "Count", "the", "number", "of", "items", "in", "the", "collection", "using", "a", "given", "truth", "test", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Support/Collection.php#L1985-L1996
train
Count the number of records in the collection
[ 30522, 2270, 3853, 4175, 3762, 1006, 1002, 2655, 5963, 1027, 19701, 1007, 1063, 2065, 1006, 2003, 1035, 19701, 1006, 1002, 2655, 5963, 1007, 1007, 1063, 1002, 2655, 5963, 1027, 3853, 1006, 1002, 3643, 1007, 1063, 2709, 1002, 3643, 1025, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/BaseFactory.php
BaseFactory.factory
public static function factory($classId) { $className = static::getClassNameFromClassId($classId); if (!class_exists($className)) { self::sendPlainHeader(); throw new Exception(static::getInvalidClassIdExceptionMessage($classId)); } return new $className; ...
php
public static function factory($classId) { $className = static::getClassNameFromClassId($classId); if (!class_exists($className)) { self::sendPlainHeader(); throw new Exception(static::getInvalidClassIdExceptionMessage($classId)); } return new $className; ...
[ "public", "static", "function", "factory", "(", "$", "classId", ")", "{", "$", "className", "=", "static", "::", "getClassNameFromClassId", "(", "$", "classId", ")", ";", "if", "(", "!", "class_exists", "(", "$", "className", ")", ")", "{", "self", "::",...
Creates a new instance of a class using a string ID. @param string $classId The ID of the class. @return \Piwik\DataTable\Renderer @throws Exception if $classId is invalid.
[ "Creates", "a", "new", "instance", "of", "a", "class", "using", "a", "string", "ID", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/BaseFactory.php#L32-L42
train
Factory method to create a new instance of the class
[ 30522, 2270, 10763, 3853, 4713, 1006, 1002, 2465, 3593, 1007, 1063, 1002, 2465, 18442, 1027, 10763, 1024, 1024, 2131, 26266, 18442, 19699, 5358, 26266, 3593, 1006, 1002, 2465, 3593, 1007, 1025, 2065, 1006, 999, 2465, 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...
barryvdh/laravel-debugbar
src/Controllers/OpenHandlerController.php
OpenHandlerController.clockwork
public function clockwork($id) { $request = [ 'op' => 'get', 'id' => $id, ]; $openHandler = new OpenHandler($this->debugbar); $data = $openHandler->handle($request, false, false); // Convert to Clockwork $converter = new Converter(); ...
php
public function clockwork($id) { $request = [ 'op' => 'get', 'id' => $id, ]; $openHandler = new OpenHandler($this->debugbar); $data = $openHandler->handle($request, false, false); // Convert to Clockwork $converter = new Converter(); ...
[ "public", "function", "clockwork", "(", "$", "id", ")", "{", "$", "request", "=", "[", "'op'", "=>", "'get'", ",", "'id'", "=>", "$", "id", ",", "]", ";", "$", "openHandler", "=", "new", "OpenHandler", "(", "$", "this", "->", "debugbar", ")", ";", ...
Return Clockwork output @param $id @return mixed @throws \DebugBar\DebugBarException
[ "Return", "Clockwork", "output" ]
2d195779ea4f809f69764a795e2ec371dbb76a96
https://github.com/barryvdh/laravel-debugbar/blob/2d195779ea4f809f69764a795e2ec371dbb76a96/src/Controllers/OpenHandlerController.php#L29-L44
train
Clockwork the user
[ 30522, 2270, 3853, 5119, 6198, 1006, 1002, 8909, 1007, 1063, 1002, 5227, 1027, 1031, 1005, 6728, 1005, 1027, 1028, 1005, 2131, 1005, 1010, 1005, 8909, 1005, 1027, 1028, 1002, 8909, 1010, 1033, 1025, 1002, 2330, 11774, 3917, 1027, 2047, 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...
symfony/symfony
src/Symfony/Component/Console/Descriptor/JsonDescriptor.php
JsonDescriptor.describeInputOption
protected function describeInputOption(InputOption $option, array $options = []) { $this->writeData($this->getInputOptionData($option), $options); }
php
protected function describeInputOption(InputOption $option, array $options = []) { $this->writeData($this->getInputOptionData($option), $options); }
[ "protected", "function", "describeInputOption", "(", "InputOption", "$", "option", ",", "array", "$", "options", "=", "[", "]", ")", "{", "$", "this", "->", "writeData", "(", "$", "this", "->", "getInputOptionData", "(", "$", "option", ")", ",", "$", "op...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Descriptor/JsonDescriptor.php#L40-L43
train
Describes an input option
[ 30522, 5123, 3853, 6235, 2378, 18780, 7361, 3508, 1006, 7953, 7361, 3508, 1002, 5724, 1010, 9140, 1002, 7047, 1027, 1031, 1033, 1007, 1063, 1002, 2023, 1011, 1028, 4339, 2850, 2696, 1006, 1002, 2023, 1011, 1028, 2131, 2378, 18780, 7361, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php
PostgresGrammar.modifyIncrement
protected function modifyIncrement(Blueprint $blueprint, Fluent $column) { if ((in_array($column->type, $this->serials) || ($column->generatedAs !== null)) && $column->autoIncrement) { return ' primary key'; } }
php
protected function modifyIncrement(Blueprint $blueprint, Fluent $column) { if ((in_array($column->type, $this->serials) || ($column->generatedAs !== null)) && $column->autoIncrement) { return ' primary key'; } }
[ "protected", "function", "modifyIncrement", "(", "Blueprint", "$", "blueprint", ",", "Fluent", "$", "column", ")", "{", "if", "(", "(", "in_array", "(", "$", "column", "->", "type", ",", "$", "this", "->", "serials", ")", "||", "(", "$", "column", "->"...
Get the SQL for an auto-increment column modifier. @param \Illuminate\Database\Schema\Blueprint $blueprint @param \Illuminate\Support\Fluent $column @return string|null
[ "Get", "the", "SQL", "for", "an", "auto", "-", "increment", "column", "modifier", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php#L894-L899
train
Protected modify increment
[ 30522, 5123, 3853, 19933, 2378, 16748, 3672, 1006, 2630, 16550, 1002, 2630, 16550, 1010, 19376, 1002, 5930, 1007, 1063, 2065, 1006, 1006, 1999, 1035, 9140, 1006, 1002, 5930, 1011, 1028, 2828, 1010, 1002, 2023, 1011, 1028, 28172, 1007, 1064,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Menu/MenuAbstract.php
MenuAbstract.getMenu
public function getMenu() { $this->buildMenu(); $this->applyEdits(); $this->applyRemoves(); $this->applyRenames(); $this->applyOrdering(); return $this->menu; }
php
public function getMenu() { $this->buildMenu(); $this->applyEdits(); $this->applyRemoves(); $this->applyRenames(); $this->applyOrdering(); return $this->menu; }
[ "public", "function", "getMenu", "(", ")", "{", "$", "this", "->", "buildMenu", "(", ")", ";", "$", "this", "->", "applyEdits", "(", ")", ";", "$", "this", "->", "applyRemoves", "(", ")", ";", "$", "this", "->", "applyRenames", "(", ")", ";", "$", ...
Builds the menu, applies edits, renames and orders the entries. @return Array
[ "Builds", "the", "menu", "applies", "edits", "renames", "and", "orders", "the", "entries", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Menu/MenuAbstract.php#L43-L51
train
Returns the menu
[ 30522, 2270, 3853, 2131, 3549, 2226, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 3857, 3549, 2226, 1006, 1007, 1025, 1002, 2023, 1011, 1028, 6611, 2098, 12762, 1006, 1007, 1025, 1002, 2023, 1011, 1028, 6611, 28578, 21818, 2015, 1006, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Mail/Markdown.php
Markdown.render
public function render($view, array $data = [], $inliner = null) { $this->view->flushFinderCache(); $contents = $this->view->replaceNamespace( 'mail', $this->htmlComponentPaths() )->make($view, $data)->render(); return new HtmlString(($inliner ?: new CssToInlineStyles)-...
php
public function render($view, array $data = [], $inliner = null) { $this->view->flushFinderCache(); $contents = $this->view->replaceNamespace( 'mail', $this->htmlComponentPaths() )->make($view, $data)->render(); return new HtmlString(($inliner ?: new CssToInlineStyles)-...
[ "public", "function", "render", "(", "$", "view", ",", "array", "$", "data", "=", "[", "]", ",", "$", "inliner", "=", "null", ")", "{", "$", "this", "->", "view", "->", "flushFinderCache", "(", ")", ";", "$", "contents", "=", "$", "this", "->", "...
Render the Markdown template into HTML. @param string $view @param array $data @param \TijsVerkoyen\CssToInlineStyles\CssToInlineStyles|null $inliner @return \Illuminate\Support\HtmlString
[ "Render", "the", "Markdown", "template", "into", "HTML", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Mail/Markdown.php#L55-L66
train
Render the mail
[ 30522, 2270, 3853, 17552, 1006, 1002, 3193, 1010, 9140, 1002, 2951, 1027, 1031, 1033, 1010, 1002, 23881, 2099, 1027, 19701, 1007, 1063, 1002, 2023, 1011, 1028, 3193, 1011, 1028, 13862, 23695, 3540, 5403, 1006, 1007, 1025, 1002, 8417, 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/Database/Query/Grammars/Grammar.php
Grammar.wrapJsonFieldAndPath
protected function wrapJsonFieldAndPath($column) { $parts = explode('->', $column, 2); $field = $this->wrap($parts[0]); $path = count($parts) > 1 ? ', '.$this->wrapJsonPath($parts[1], '->') : ''; return [$field, $path]; }
php
protected function wrapJsonFieldAndPath($column) { $parts = explode('->', $column, 2); $field = $this->wrap($parts[0]); $path = count($parts) > 1 ? ', '.$this->wrapJsonPath($parts[1], '->') : ''; return [$field, $path]; }
[ "protected", "function", "wrapJsonFieldAndPath", "(", "$", "column", ")", "{", "$", "parts", "=", "explode", "(", "'->'", ",", "$", "column", ",", "2", ")", ";", "$", "field", "=", "$", "this", "->", "wrap", "(", "$", "parts", "[", "0", "]", ")", ...
Split the given JSON selector into the field and the optional path and wrap them separately. @param string $column @return array
[ "Split", "the", "given", "JSON", "selector", "into", "the", "field", "and", "the", "optional", "path", "and", "wrap", "them", "separately", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Grammars/Grammar.php#L1100-L1109
train
Wrap JSON field and path in a comma separated list
[ 30522, 5123, 3853, 10236, 22578, 2239, 3790, 5685, 15069, 1006, 1002, 5930, 1007, 1063, 1002, 3033, 1027, 15044, 1006, 1005, 1011, 1028, 1005, 1010, 1002, 5930, 1010, 1016, 1007, 1025, 1002, 2492, 1027, 1002, 2023, 1011, 1028, 10236, 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...
walkor/Workerman
Connection/TcpConnection.php
TcpConnection.doSslHandshake
public function doSslHandshake($socket){ if (feof($socket)) { $this->destroy(); return false; } $async = $this instanceof AsyncTcpConnection; /** * We disabled ssl3 because https://blog.qualys.com/ssllabs/2014/10/15/ssl-3-is-dead-killed-by-the-...
php
public function doSslHandshake($socket){ if (feof($socket)) { $this->destroy(); return false; } $async = $this instanceof AsyncTcpConnection; /** * We disabled ssl3 because https://blog.qualys.com/ssllabs/2014/10/15/ssl-3-is-dead-killed-by-the-...
[ "public", "function", "doSslHandshake", "(", "$", "socket", ")", "{", "if", "(", "feof", "(", "$", "socket", ")", ")", "{", "$", "this", "->", "destroy", "(", ")", ";", "return", "false", ";", "}", "$", "async", "=", "$", "this", "instanceof", "Asy...
SSL handshake. @param $socket @return bool
[ "SSL", "handshake", "." ]
13649907f05014fcfffcfccaef01e63ad3339351
https://github.com/walkor/Workerman/blob/13649907f05014fcfffcfccaef01e63ad3339351/Connection/TcpConnection.php#L743-L794
train
SSL handshake.
[ 30522, 2270, 3853, 9998, 14540, 11774, 7377, 3489, 1006, 1002, 22278, 1007, 1063, 2065, 1006, 10768, 11253, 1006, 1002, 22278, 1007, 1007, 1063, 1002, 2023, 1011, 1028, 6033, 1006, 1007, 1025, 2709, 6270, 1025, 1065, 1002, 2004, 6038, 2278,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...