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
symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Command/DebugAutowiringCommand.php
DebugAutowiringCommand.execute
protected function execute(InputInterface $input, OutputInterface $output) { $io = new SymfonyStyle($input, $output); $errorIo = $io->getErrorStyle(); $builder = $this->getContainerBuilder(); $serviceIds = $builder->getServiceIds(); $serviceIds = array_filter($serviceIds, [$...
php
protected function execute(InputInterface $input, OutputInterface $output) { $io = new SymfonyStyle($input, $output); $errorIo = $io->getErrorStyle(); $builder = $this->getContainerBuilder(); $serviceIds = $builder->getServiceIds(); $serviceIds = array_filter($serviceIds, [$...
[ "protected", "function", "execute", "(", "InputInterface", "$", "input", ",", "OutputInterface", "$", "output", ")", "{", "$", "io", "=", "new", "SymfonyStyle", "(", "$", "input", ",", "$", "output", ")", ";", "$", "errorIo", "=", "$", "io", "->", "get...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/FrameworkBundle/Command/DebugAutowiringCommand.php#L72-L148
train
Executes the type - hint 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, 30524, 2023, 1011, 1028, 2131, 8663, 18249, 2121, 8569, 23891, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/LanguagesManager/API.php
API.getPluginTranslationsForLanguage
public function getPluginTranslationsForLanguage($pluginName, $languageCode) { if (!$this->isLanguageAvailable($languageCode)) { return false; } $languageFile = Manager::getPluginDirectory($pluginName) . "/lang/$languageCode.json"; if (!file_exists($languageFile)) { ...
php
public function getPluginTranslationsForLanguage($pluginName, $languageCode) { if (!$this->isLanguageAvailable($languageCode)) { return false; } $languageFile = Manager::getPluginDirectory($pluginName) . "/lang/$languageCode.json"; if (!file_exists($languageFile)) { ...
[ "public", "function", "getPluginTranslationsForLanguage", "(", "$", "pluginName", ",", "$", "languageCode", ")", "{", "if", "(", "!", "$", "this", "->", "isLanguageAvailable", "(", "$", "languageCode", ")", ")", "{", "return", "false", ";", "}", "$", "langua...
Returns translation strings by language for given plugin @param string $pluginName name of plugin @param string $languageCode ISO language code @return array|false Array of arrays, each containing 'label' (translation index) and 'value' (translated string); false if language unavailable @ignore
[ "Returns", "translation", "strings", "by", "language", "for", "given", "plugin" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/LanguagesManager/API.php#L241-L265
train
Get the translations for a specific language
[ 30522, 2270, 3853, 2131, 24759, 15916, 18447, 5521, 14540, 10708, 29278, 25023, 6692, 3351, 1006, 1002, 13354, 23111, 14074, 1010, 1002, 2653, 16044, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 25340, 3070, 6692, 3351, 12462, 11733, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Psr7/Traits/MessageDecoratorTrait.php
MessageDecoratorTrait.withBody
public function withBody(StreamInterface $body): self { $new = clone $this; $new->message = $this->message->withBody($body); return $new; }
php
public function withBody(StreamInterface $body): self { $new = clone $this; $new->message = $this->message->withBody($body); return $new; }
[ "public", "function", "withBody", "(", "StreamInterface", "$", "body", ")", ":", "self", "{", "$", "new", "=", "clone", "$", "this", ";", "$", "new", "->", "message", "=", "$", "this", "->", "message", "->", "withBody", "(", "$", "body", ")", ";", ...
{@inheritdoc}
[ "{" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Framework/Psr7/Traits/MessageDecoratorTrait.php#L133-L139
train
Create a new instance with the specified body.
[ 30522, 2270, 3853, 2007, 23684, 1006, 5460, 18447, 2121, 12172, 1002, 2303, 1007, 1024, 2969, 1063, 1002, 2047, 1027, 17598, 1002, 2023, 1025, 1002, 2047, 1011, 1028, 4471, 1027, 1002, 2023, 1011, 1028, 4471, 1011, 1028, 2007, 23684, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Filesystem/Filesystem.php
Filesystem.chgrp
public function chgrp($files, $group, $recursive = false) { foreach ($this->toIterable($files) as $file) { if ($recursive && is_dir($file) && !is_link($file)) { $this->chgrp(new \FilesystemIterator($file), $group, true); } if (is_link($file) && \function_e...
php
public function chgrp($files, $group, $recursive = false) { foreach ($this->toIterable($files) as $file) { if ($recursive && is_dir($file) && !is_link($file)) { $this->chgrp(new \FilesystemIterator($file), $group, true); } if (is_link($file) && \function_e...
[ "public", "function", "chgrp", "(", "$", "files", ",", "$", "group", ",", "$", "recursive", "=", "false", ")", "{", "foreach", "(", "$", "this", "->", "toIterable", "(", "$", "files", ")", "as", "$", "file", ")", "{", "if", "(", "$", "recursive", ...
Change the group of an array of files or directories. @param string|iterable $files A filename, an array of files, or a \Traversable instance to change group @param string $group The group name @param bool $recursive Whether change the group recursively or not @throws IOException When the ...
[ "Change", "the", "group", "of", "an", "array", "of", "files", "or", "directories", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Filesystem/Filesystem.php#L247-L263
train
Change group ownership of files or directories
[ 30522, 2270, 3853, 10381, 16523, 2361, 1006, 1002, 6764, 1010, 1002, 2177, 1010, 1002, 28667, 9236, 3512, 1027, 6270, 1007, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 2000, 21646, 3085, 1006, 1002, 6764, 1007, 2004, 1002, 5371, 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/Broadcasting/Broadcasters/Broadcaster.php
Broadcaster.resolveExplicitBindingIfPossible
protected function resolveExplicitBindingIfPossible($key, $value) { $binder = $this->binder(); if ($binder && $binder->getBindingCallback($key)) { return call_user_func($binder->getBindingCallback($key), $value); } return $value; }
php
protected function resolveExplicitBindingIfPossible($key, $value) { $binder = $this->binder(); if ($binder && $binder->getBindingCallback($key)) { return call_user_func($binder->getBindingCallback($key), $value); } return $value; }
[ "protected", "function", "resolveExplicitBindingIfPossible", "(", "$", "key", ",", "$", "value", ")", "{", "$", "binder", "=", "$", "this", "->", "binder", "(", ")", ";", "if", "(", "$", "binder", "&&", "$", "binder", "->", "getBindingCallback", "(", "$"...
Resolve an explicit parameter binding if applicable. @param string $key @param mixed $value @return mixed
[ "Resolve", "an", "explicit", "parameter", "binding", "if", "applicable", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php#L179-L188
train
Resolve an explicit binding if possible
[ 30522, 5123, 3853, 10663, 10288, 24759, 28775, 2102, 8428, 4667, 10128, 6873, 18719, 3468, 1006, 1002, 3145, 1010, 1002, 3643, 1007, 1063, 1002, 14187, 2121, 1027, 1002, 2023, 1011, 1028, 14187, 2121, 1006, 1007, 1025, 2065, 1006, 1002, 141...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Page.php
Page.url
public static function url($page, array $params = []) { /* * Reuse existing controller or create a new one, * assuming that the method is called not during the front-end * request processing. */ $controller = Controller::getController() ?: new Controller; ...
php
public static function url($page, array $params = []) { /* * Reuse existing controller or create a new one, * assuming that the method is called not during the front-end * request processing. */ $controller = Controller::getController() ?: new Controller; ...
[ "public", "static", "function", "url", "(", "$", "page", ",", "array", "$", "params", "=", "[", "]", ")", "{", "/*\n * Reuse existing controller or create a new one,\n * assuming that the method is called not during the front-end\n * request processing.\n ...
Helper that makes a URL for a page in the active theme. @param mixed $page Specifies the Cms Page file name. @param array $params Route parameters to consider in the URL. @return string
[ "Helper", "that", "makes", "a", "URL", "for", "a", "page", "in", "the", "active", "theme", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/classes/Page.php#L121-L131
train
Get the url for a page
[ 30522, 2270, 10763, 3853, 24471, 2140, 1006, 1002, 3931, 1010, 9140, 1002, 11498, 5244, 1027, 1031, 1033, 1007, 1063, 1013, 1008, 1008, 2128, 8557, 4493, 11486, 2030, 3443, 1037, 2047, 2028, 1010, 1008, 10262, 2008, 1996, 4118, 2003, 2170, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Translation/Loader/JsonFileLoader.php
JsonFileLoader.loadResource
protected function loadResource($resource) { $messages = []; if ($data = file_get_contents($resource)) { $messages = json_decode($data, true); if (0 < $errorCode = json_last_error()) { throw new InvalidResourceException(sprintf('Error parsing JSON - %s', $thi...
php
protected function loadResource($resource) { $messages = []; if ($data = file_get_contents($resource)) { $messages = json_decode($data, true); if (0 < $errorCode = json_last_error()) { throw new InvalidResourceException(sprintf('Error parsing JSON - %s', $thi...
[ "protected", "function", "loadResource", "(", "$", "resource", ")", "{", "$", "messages", "=", "[", "]", ";", "if", "(", "$", "data", "=", "file_get_contents", "(", "$", "resource", ")", ")", "{", "$", "messages", "=", "json_decode", "(", "$", "data", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Translation/Loader/JsonFileLoader.php#L26-L38
train
Load the messages from a JSON resource
[ 30522, 5123, 3853, 7170, 6072, 8162, 3401, 1006, 1002, 7692, 1007, 1063, 1002, 7696, 1027, 1031, 1033, 1025, 2065, 1006, 1002, 2951, 1027, 5371, 1035, 2131, 1035, 8417, 1006, 1002, 7692, 1007, 1007, 1063, 1002, 7696, 1027, 1046, 3385, 103...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/Referrers/Controller.php
Controller.addEvolutionPropertiesToView
private function addEvolutionPropertiesToView($date, $currentValues, $lastPeriodDate, $previousValues) { foreach ($previousValues as $name => $pastValue) { $currentValue = $currentValues[$name]; $evolutionName = $name . 'Evolution'; $currentValueFormatted = NumberFormatt...
php
private function addEvolutionPropertiesToView($date, $currentValues, $lastPeriodDate, $previousValues) { foreach ($previousValues as $name => $pastValue) { $currentValue = $currentValues[$name]; $evolutionName = $name . 'Evolution'; $currentValueFormatted = NumberFormatt...
[ "private", "function", "addEvolutionPropertiesToView", "(", "$", "date", ",", "$", "currentValues", ",", "$", "lastPeriodDate", ",", "$", "previousValues", ")", "{", "foreach", "(", "$", "previousValues", "as", "$", "name", "=>", "$", "pastValue", ")", "{", ...
Utility method that calculates evolution values for a set of current & past values and sets properties on a View w/ HTML that displays the evolution percents. @param string $date The date of the current values. @param array $currentValues Array mapping view property names w/ present values. @param string $lastPeriodDa...
[ "Utility", "method", "that", "calculates", "evolution", "values", "for", "a", "set", "of", "current", "&", "past", "values", "and", "sets", "properties", "on", "a", "View", "w", "/", "HTML", "that", "displays", "the", "evolution", "percents", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Referrers/Controller.php#L428-L451
train
Add evolution properties to view
[ 30522, 2797, 3853, 5587, 6777, 4747, 13700, 21572, 4842, 7368, 26525, 2666, 2860, 1006, 1002, 3058, 1010, 1002, 2783, 10175, 15808, 1010, 1002, 2197, 4842, 3695, 25062, 2618, 1010, 1002, 3025, 10175, 15808, 1007, 1063, 18921, 6776, 1006, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/behaviors/RelationController.php
RelationController.applyExtraConfig
protected function applyExtraConfig($config, $field = null) { if (!$field) { $field = $this->field; } if (!$config || !isset($this->originalConfig->{$field})) { return; } if ( !is_array($config) && (!$config = @json_decode(@ba...
php
protected function applyExtraConfig($config, $field = null) { if (!$field) { $field = $this->field; } if (!$config || !isset($this->originalConfig->{$field})) { return; } if ( !is_array($config) && (!$config = @json_decode(@ba...
[ "protected", "function", "applyExtraConfig", "(", "$", "config", ",", "$", "field", "=", "null", ")", "{", "if", "(", "!", "$", "field", ")", "{", "$", "field", "=", "$", "this", "->", "field", ";", "}", "if", "(", "!", "$", "config", "||", "!", ...
Apply extra configuration
[ "Apply", "extra", "configuration" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/behaviors/RelationController.php#L1537-L1561
train
Apply extra config
[ 30522, 5123, 3853, 6611, 10288, 6494, 8663, 8873, 2290, 1006, 1002, 9530, 8873, 2290, 1010, 1002, 2492, 1027, 19701, 1007, 1063, 2065, 1006, 999, 1002, 2492, 1007, 1063, 1002, 2492, 1027, 1002, 2023, 1011, 1028, 2492, 1025, 1065, 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/Db/Statement/Oracle.php
Zend_Db_Statement_Oracle._execute
public function _execute(array $params = null) { $connection = $this->_adapter->getConnection(); if (!$this->_stmt) { return false; } if ($params !== null) { if (!is_array($params)) { $params = array($params); } $error...
php
public function _execute(array $params = null) { $connection = $this->_adapter->getConnection(); if (!$this->_stmt) { return false; } if ($params !== null) { if (!is_array($params)) { $params = array($params); } $error...
[ "public", "function", "_execute", "(", "array", "$", "params", "=", "null", ")", "{", "$", "connection", "=", "$", "this", "->", "_adapter", "->", "getConnection", "(", ")", ";", "if", "(", "!", "$", "this", "->", "_stmt", ")", "{", "return", "false"...
Executes a prepared statement. @param array $params OPTIONAL Values to bind to parameter placeholders. @return bool @throws Zend_Db_Statement_Exception
[ "Executes", "a", "prepared", "statement", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Statement/Oracle.php#L229-L280
train
Execute the statement and return the result
[ 30522, 2270, 3853, 1035, 15389, 1006, 9140, 1002, 11498, 5244, 1027, 19701, 1007, 1063, 1002, 4434, 1027, 1002, 2023, 1011, 1028, 1035, 15581, 2121, 1011, 1028, 2131, 8663, 2638, 7542, 1006, 1007, 1025, 2065, 1006, 999, 1002, 2023, 1011, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Events/Dispatcher.php
Dispatcher.push
public function push($event, $payload = []) { $this->listen($event.'_pushed', function () use ($event, $payload) { $this->dispatch($event, $payload); }); }
php
public function push($event, $payload = []) { $this->listen($event.'_pushed', function () use ($event, $payload) { $this->dispatch($event, $payload); }); }
[ "public", "function", "push", "(", "$", "event", ",", "$", "payload", "=", "[", "]", ")", "{", "$", "this", "->", "listen", "(", "$", "event", ".", "'_pushed'", ",", "function", "(", ")", "use", "(", "$", "event", ",", "$", "payload", ")", "{", ...
Register an event and payload to be fired later. @param string $event @param array $payload @return void
[ "Register", "an", "event", "and", "payload", "to", "be", "fired", "later", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Events/Dispatcher.php#L114-L119
train
Pushes an event to the main event loop
[ 30522, 2270, 3853, 5245, 1006, 1002, 2724, 1010, 1002, 18093, 1027, 1031, 1033, 1007, 1063, 1002, 2023, 1011, 1028, 4952, 1006, 1002, 2724, 1012, 1005, 1035, 3724, 1005, 1010, 3853, 1006, 1007, 2224, 1006, 1002, 2724, 1010, 1002, 18093, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Routing/Router.php
Router.getGenerator
public function getGenerator() { if (null !== $this->generator) { return $this->generator; } $compiled = is_a($this->options['generator_class'], CompiledUrlGenerator::class, true) && UrlGenerator::class === $this->options['generator_base_class']; if (null === $this->opt...
php
public function getGenerator() { if (null !== $this->generator) { return $this->generator; } $compiled = is_a($this->options['generator_class'], CompiledUrlGenerator::class, true) && UrlGenerator::class === $this->options['generator_base_class']; if (null === $this->opt...
[ "public", "function", "getGenerator", "(", ")", "{", "if", "(", "null", "!==", "$", "this", "->", "generator", ")", "{", "return", "$", "this", "->", "generator", ";", "}", "$", "compiled", "=", "is_a", "(", "$", "this", "->", "options", "[", "'gener...
Gets the UrlGenerator instance associated with this Router. @return UrlGeneratorInterface A UrlGeneratorInterface instance
[ "Gets", "the", "UrlGenerator", "instance", "associated", "with", "this", "Router", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Routing/Router.php#L341-L385
train
Get UrlGeneratorInterface - Object
[ 30522, 2270, 3853, 2131, 6914, 6906, 4263, 1006, 1007, 1063, 2065, 1006, 19701, 999, 1027, 1027, 1002, 2023, 1011, 1028, 13103, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 13103, 1025, 1065, 1002, 9227, 1027, 2003, 1035, 1037, 1006, 1002, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Grid/Concerns/HasFilter.php
HasFilter.processFilter
public function processFilter($toArray = true) { if ($this->builder) { call_user_func($this->builder, $this); } return $this->filter->execute($toArray); }
php
public function processFilter($toArray = true) { if ($this->builder) { call_user_func($this->builder, $this); } return $this->filter->execute($toArray); }
[ "public", "function", "processFilter", "(", "$", "toArray", "=", "true", ")", "{", "if", "(", "$", "this", "->", "builder", ")", "{", "call_user_func", "(", "$", "this", "->", "builder", ",", "$", "this", ")", ";", "}", "return", "$", "this", "->", ...
Process the grid filter. @param bool $toArray @return array|Collection|mixed
[ "Process", "the", "grid", "filter", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Grid/Concerns/HasFilter.php#L57-L64
train
Process the filter and return the result
[ 30522, 2270, 3853, 2832, 8873, 21928, 1006, 1002, 2000, 2906, 9447, 1027, 2995, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 12508, 1007, 1063, 2655, 1035, 5310, 1035, 4569, 2278, 1006, 1002, 2023, 1011, 1028, 12508, 1010, 1002, 2023, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/thrift
lib/php/lib/Protocol/TProtocolDecorator.php
TProtocolDecorator.readMessageBegin
public function readMessageBegin(&$name, &$type, &$seqid) { return $this->concreteProtocol_->readMessageBegin($name, $type, $seqid); }
php
public function readMessageBegin(&$name, &$type, &$seqid) { return $this->concreteProtocol_->readMessageBegin($name, $type, $seqid); }
[ "public", "function", "readMessageBegin", "(", "&", "$", "name", ",", "&", "$", "type", ",", "&", "$", "seqid", ")", "{", "return", "$", "this", "->", "concreteProtocol_", "->", "readMessageBegin", "(", "$", "name", ",", "$", "type", ",", "$", "seqid",...
Reads the message header @param string $name Function name @param int $type message type TMessageType::CALL or TMessageType::REPLY @param int $seqid The sequence id of this message
[ "Reads", "the", "message", "header" ]
acdd4226c210336e9e15eb812e5932a645fcd5ce
https://github.com/apache/thrift/blob/acdd4226c210336e9e15eb812e5932a645fcd5ce/lib/php/lib/Protocol/TProtocolDecorator.php#L188-L191
train
readMessageBegin - Read message begin
[ 30522, 2270, 3853, 3191, 7834, 3736, 3351, 4783, 11528, 1006, 1004, 1002, 2171, 1010, 1004, 1002, 2828, 1010, 1004, 1002, 7367, 14702, 2094, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 5509, 21572, 3406, 25778, 1035, 1011, 1028, 3191, 7834, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Model.php
Model.getSitesAccessFromUser
public function getSitesAccessFromUser($userLogin) { $accessTable = Common::prefixTable('access'); $siteTable = Common::prefixTable('site'); $sql = sprintf("SELECT access.idsite, access.access FROM %s access LEFT JOIN %s site ON access.idsite=site.idsite WHERE access.log...
php
public function getSitesAccessFromUser($userLogin) { $accessTable = Common::prefixTable('access'); $siteTable = Common::prefixTable('site'); $sql = sprintf("SELECT access.idsite, access.access FROM %s access LEFT JOIN %s site ON access.idsite=site.idsite WHERE access.log...
[ "public", "function", "getSitesAccessFromUser", "(", "$", "userLogin", ")", "{", "$", "accessTable", "=", "Common", "::", "prefixTable", "(", "'access'", ")", ";", "$", "siteTable", "=", "Common", "::", "prefixTable", "(", "'site'", ")", ";", "$", "sql", "...
For each website ID, returns the access level of the given $userLogin. If the user doesn't have any access to a website ('noaccess'), this website will not be in the returned array. If the user doesn't have any access, the returned array will be an empty array. @param string $userLogin User that has to be valid @retu...
[ "For", "each", "website", "ID", "returns", "the", "access", "level", "of", "the", "given", "$userLogin", ".", "If", "the", "user", "doesn", "t", "have", "any", "access", "to", "a", "website", "(", "noaccess", ")", "this", "website", "will", "not", "be", ...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/UsersManager/Model.php#L149-L169
train
Returns the list of siteAccesses for a user
[ 30522, 2270, 3853, 4152, 7616, 6305, 9623, 22747, 21716, 20330, 1006, 1002, 5310, 21197, 2378, 1007, 1063, 1002, 3229, 10880, 1027, 2691, 1024, 1024, 17576, 10880, 1006, 1005, 3229, 1005, 1007, 1025, 1002, 2609, 10880, 1027, 2691, 1024, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Foundation/Auth/ThrottlesLogins.php
ThrottlesLogins.throttleKey
protected function throttleKey(Request $request) { return Str::lower($request->input($this->username())).'|'.$request->ip(); }
php
protected function throttleKey(Request $request) { return Str::lower($request->input($this->username())).'|'.$request->ip(); }
[ "protected", "function", "throttleKey", "(", "Request", "$", "request", ")", "{", "return", "Str", "::", "lower", "(", "$", "request", "->", "input", "(", "$", "this", "->", "username", "(", ")", ")", ")", ".", "'|'", ".", "$", "request", "->", "ip",...
Get the throttle key for the given request. @param \Illuminate\Http\Request $request @return string
[ "Get", "the", "throttle", "key", "for", "the", "given", "request", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Auth/ThrottlesLogins.php#L87-L90
train
Get the throttle key for the request
[ 30522, 5123, 3853, 24420, 14839, 1006, 5227, 1002, 5227, 1007, 1063, 2709, 2358, 2099, 1024, 1024, 2896, 1006, 1002, 5227, 1011, 1028, 7953, 1006, 1002, 2023, 1011, 1028, 5310, 18442, 1006, 1007, 1007, 1007, 1012, 1005, 1064, 1005, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Query/Grammars/PostgresGrammar.php
PostgresGrammar.compileJsonLength
protected function compileJsonLength($column, $operator, $value) { $column = str_replace('->>', '->', $this->wrap($column)); return 'json_array_length(('.$column.')::json) '.$operator.' '.$value; }
php
protected function compileJsonLength($column, $operator, $value) { $column = str_replace('->>', '->', $this->wrap($column)); return 'json_array_length(('.$column.')::json) '.$operator.' '.$value; }
[ "protected", "function", "compileJsonLength", "(", "$", "column", ",", "$", "operator", ",", "$", "value", ")", "{", "$", "column", "=", "str_replace", "(", "'->>'", ",", "'->'", ",", "$", "this", "->", "wrap", "(", "$", "column", ")", ")", ";", "ret...
Compile a "JSON length" statement into SQL. @param string $column @param string $operator @param string $value @return string
[ "Compile", "a", "JSON", "length", "statement", "into", "SQL", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Grammars/PostgresGrammar.php#L163-L168
train
Compiles JSON length
[ 30522, 5123, 3853, 4012, 22090, 22578, 2239, 7770, 13512, 2232, 1006, 1002, 5930, 1010, 1002, 6872, 1010, 1002, 3643, 1007, 1063, 1002, 5930, 1027, 2358, 2099, 1035, 5672, 1006, 1005, 1011, 1028, 1028, 1005, 1010, 1005, 1011, 1028, 1005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dompdf/dompdf
src/Css/Style.php
Style.set_color
function set_color($color) { $col = $this->munge_color($color); if (is_null($col) || !isset($col["hex"])) { $color = "inherit"; } else { $color = $col["hex"]; } //see __set and __get, on all assignments clear cache, not needed on direct set through _...
php
function set_color($color) { $col = $this->munge_color($color); if (is_null($col) || !isset($col["hex"])) { $color = "inherit"; } else { $color = $col["hex"]; } //see __set and __get, on all assignments clear cache, not needed on direct set through _...
[ "function", "set_color", "(", "$", "color", ")", "{", "$", "col", "=", "$", "this", "->", "munge_color", "(", "$", "color", ")", ";", "if", "(", "is_null", "(", "$", "col", ")", "||", "!", "isset", "(", "$", "col", "[", "\"hex\"", "]", ")", ")"...
Sets color The color parameter can be any valid CSS color value @link http://www.w3.org/TR/CSS21/colors.html#propdef-color @param string $color
[ "Sets", "color" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/Css/Style.php#L1804-L1817
train
set the color of the node
[ 30522, 3853, 2275, 1035, 3609, 1006, 1002, 3609, 1007, 1063, 1002, 8902, 1027, 1002, 2023, 1011, 1028, 14163, 15465, 1035, 3609, 1006, 1002, 3609, 1007, 1025, 2065, 1006, 2003, 1035, 19701, 1006, 1002, 8902, 1007, 1064, 1064, 999, 26354, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/ApcuTrait.php
ApcuTrait.doFetch
protected function doFetch(array $ids) { $unserializeCallbackHandler = ini_set('unserialize_callback_func', __CLASS__.'::handleUnserializeCallback'); try { $values = []; foreach (apcu_fetch($ids, $ok) ?: [] as $k => $v) { if (null !== $v || $ok) { ...
php
protected function doFetch(array $ids) { $unserializeCallbackHandler = ini_set('unserialize_callback_func', __CLASS__.'::handleUnserializeCallback'); try { $values = []; foreach (apcu_fetch($ids, $ok) ?: [] as $k => $v) { if (null !== $v || $ok) { ...
[ "protected", "function", "doFetch", "(", "array", "$", "ids", ")", "{", "$", "unserializeCallbackHandler", "=", "ini_set", "(", "'unserialize_callback_func'", ",", "__CLASS__", ".", "'::handleUnserializeCallback'", ")", ";", "try", "{", "$", "values", "=", "[", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Cache/Traits/ApcuTrait.php#L52-L69
train
Fetch the array of values from the cache
[ 30522, 5123, 3853, 2079, 7959, 10649, 1006, 9140, 1002, 8909, 2015, 1007, 1063, 1002, 4895, 8043, 4818, 4697, 9289, 20850, 8684, 11774, 3917, 1027, 1999, 2072, 1035, 2275, 1006, 1005, 4895, 8043, 4818, 4697, 1035, 2655, 5963, 1035, 4569, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Reader/PhpBundleReader.php
PhpBundleReader.read
public function read($path, $locale) { $fileName = $path.'/'.$locale.'.php'; // prevent directory traversal attacks if (\dirname($fileName) !== $path) { throw new ResourceBundleNotFoundException(sprintf('The resource bundle "%s" does not exist.', $fileName)); } ...
php
public function read($path, $locale) { $fileName = $path.'/'.$locale.'.php'; // prevent directory traversal attacks if (\dirname($fileName) !== $path) { throw new ResourceBundleNotFoundException(sprintf('The resource bundle "%s" does not exist.', $fileName)); } ...
[ "public", "function", "read", "(", "$", "path", ",", "$", "locale", ")", "{", "$", "fileName", "=", "$", "path", ".", "'/'", ".", "$", "locale", ".", "'.php'", ";", "// prevent directory traversal attacks", "if", "(", "\\", "dirname", "(", "$", "fileName...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Intl/Data/Bundle/Reader/PhpBundleReader.php#L29-L47
train
Reads the resource bundle
[ 30522, 2270, 3853, 3191, 1006, 1002, 4130, 1010, 1002, 2334, 2063, 1007, 1063, 1002, 5371, 18442, 1027, 1002, 4130, 1012, 1005, 1013, 1005, 1012, 1002, 2334, 2063, 1012, 1005, 1012, 25718, 1005, 1025, 1013, 1013, 4652, 14176, 29053, 2389, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Adapter/CPDF.php
CPDF.add_link
public function add_link($url, $x, $y, $width, $height) { $y = $this->y($y) - $height; if (strpos($url, '#') === 0) { // Local link $name = substr($url, 1); if ($name) { $this->_pdf->addInternalLink($name, $x, $y, $x + $width, $y + $height); ...
php
public function add_link($url, $x, $y, $width, $height) { $y = $this->y($y) - $height; if (strpos($url, '#') === 0) { // Local link $name = substr($url, 1); if ($name) { $this->_pdf->addInternalLink($name, $x, $y, $x + $width, $y + $height); ...
[ "public", "function", "add_link", "(", "$", "url", ",", "$", "x", ",", "$", "y", ",", "$", "width", ",", "$", "height", ")", "{", "$", "y", "=", "$", "this", "->", "y", "(", "$", "y", ")", "-", "$", "height", ";", "if", "(", "strpos", "(", ...
Add a link to the pdf @param string $url The url to link to @param float $x The x position of the link @param float $y The y position of the link @param float $width The width of the link @param float $height The height of the link
[ "Add", "a", "link", "to", "the", "pdf" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/Adapter/CPDF.php#L961-L974
train
Add link to the page
[ 30522, 2270, 3853, 5587, 1035, 4957, 1006, 1002, 24471, 2140, 1010, 1002, 1060, 1010, 1002, 1061, 1010, 1002, 9381, 1010, 1002, 4578, 1007, 1063, 1002, 1061, 1027, 1002, 2023, 1011, 1028, 1061, 1006, 1002, 1061, 1007, 30524, 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...
symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php
ControllerTrait.isGranted
protected function isGranted($attributes, $subject = null): bool { if (!$this->container->has('security.authorization_checker')) { throw new \LogicException('The SecurityBundle is not registered in your application. Try running "composer require symfony/security-bundle".'); } re...
php
protected function isGranted($attributes, $subject = null): bool { if (!$this->container->has('security.authorization_checker')) { throw new \LogicException('The SecurityBundle is not registered in your application. Try running "composer require symfony/security-bundle".'); } re...
[ "protected", "function", "isGranted", "(", "$", "attributes", ",", "$", "subject", "=", "null", ")", ":", "bool", "{", "if", "(", "!", "$", "this", "->", "container", "->", "has", "(", "'security.authorization_checker'", ")", ")", "{", "throw", "new", "\...
Checks if the attributes are granted against the current authentication token and optionally supplied subject. @throws \LogicException @final
[ "Checks", "if", "the", "attributes", "are", "granted", "against", "the", "current", "authentication", "token", "and", "optionally", "supplied", "subject", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php#L173-L180
train
Checks if the attributes are granted
[ 30522, 5123, 3853, 2003, 18980, 2098, 1006, 1002, 12332, 1010, 1002, 3395, 1027, 19701, 1007, 1024, 22017, 2140, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 11661, 1011, 1028, 2038, 1006, 1005, 3036, 1012, 20104, 1035, 4638, 2121, 1005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Routing/Loader/Configurator/Traits/AddTrait.php
AddTrait.add
final public function add(string $name, $path): RouteConfigurator { $paths = []; $parentConfigurator = $this instanceof CollectionConfigurator ? $this : ($this instanceof RouteConfigurator ? $this->parentConfigurator : null); if (\is_array($path)) { if (null === $this->prefixes)...
php
final public function add(string $name, $path): RouteConfigurator { $paths = []; $parentConfigurator = $this instanceof CollectionConfigurator ? $this : ($this instanceof RouteConfigurator ? $this->parentConfigurator : null); if (\is_array($path)) { if (null === $this->prefixes)...
[ "final", "public", "function", "add", "(", "string", "$", "name", ",", "$", "path", ")", ":", "RouteConfigurator", "{", "$", "paths", "=", "[", "]", ";", "$", "parentConfigurator", "=", "$", "this", "instanceof", "CollectionConfigurator", "?", "$", "this",...
Adds a route. @param string|array $path the path, or the localized paths of the route
[ "Adds", "a", "route", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Routing/Loader/Configurator/Traits/AddTrait.php#L35-L74
train
Adds a route to the routing system
[ 30522, 2345, 2270, 3853, 5587, 1006, 5164, 1002, 2171, 1010, 1002, 4130, 1007, 1024, 2799, 8663, 8873, 27390, 8844, 1063, 1002, 10425, 1027, 1031, 1033, 1025, 1002, 6687, 8663, 8873, 27390, 8844, 1027, 1002, 2023, 6013, 11253, 3074, 8663, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Stopwatch/Section.php
Section.get
public function get($id) { foreach ($this->children as $child) { if ($id === $child->getId()) { return $child; } } }
php
public function get($id) { foreach ($this->children as $child) { if ($id === $child->getId()) { return $child; } } }
[ "public", "function", "get", "(", "$", "id", ")", "{", "foreach", "(", "$", "this", "->", "children", "as", "$", "child", ")", "{", "if", "(", "$", "id", "===", "$", "child", "->", "getId", "(", ")", ")", "{", "return", "$", "child", ";", "}", ...
Returns the child section. @param string $id The child section identifier @return self|null The child section or null when none found
[ "Returns", "the", "child", "section", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Stopwatch/Section.php#L63-L70
train
Get the child with the given id
[ 30522, 2270, 3853, 2131, 1006, 1002, 8909, 1007, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 2336, 2004, 1002, 2775, 1007, 1063, 2065, 1006, 1002, 8909, 1027, 1027, 1027, 1002, 2775, 1011, 1028, 2131, 3593, 1006, 1007, 1007, 1063, 27...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/Installation/Controller.php
Controller.trackingCode
public function trackingCode() { $this->checkPiwikIsNotInstalled(); $view = new View( '@Installation/trackingCode', $this->getInstallationSteps(), __FUNCTION__ ); $siteName = Common::unsanitizeInputValue($this->getParam('site_name')); $id...
php
public function trackingCode() { $this->checkPiwikIsNotInstalled(); $view = new View( '@Installation/trackingCode', $this->getInstallationSteps(), __FUNCTION__ ); $siteName = Common::unsanitizeInputValue($this->getParam('site_name')); $id...
[ "public", "function", "trackingCode", "(", ")", "{", "$", "this", "->", "checkPiwikIsNotInstalled", "(", ")", ";", "$", "view", "=", "new", "View", "(", "'@Installation/trackingCode'", ",", "$", "this", "->", "getInstallationSteps", "(", ")", ",", "__FUNCTION_...
Installation Step 7: Display JavaScript tracking code
[ "Installation", "Step", "7", ":", "Display", "JavaScript", "tracking", "code" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Installation/Controller.php#L357-L386
train
Displays the tracking code and help text
[ 30522, 2270, 3853, 9651, 16044, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 4638, 8197, 9148, 14270, 17048, 7076, 9080, 3709, 1006, 1007, 1025, 1002, 3193, 1027, 2047, 3193, 1006, 1005, 1030, 8272, 1013, 9651, 16044, 1005, 1010, 1002, 2023, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Mail/Transport/SparkPostTransport.php
SparkPostTransport.send
public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null) { $this->beforeSendPerformed($message); $recipients = $this->getRecipients($message); $message->setBcc([]); $response = $this->client->request('POST', $this->getEndpoint(), [ 'headers' =...
php
public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null) { $this->beforeSendPerformed($message); $recipients = $this->getRecipients($message); $message->setBcc([]); $response = $this->client->request('POST', $this->getEndpoint(), [ 'headers' =...
[ "public", "function", "send", "(", "Swift_Mime_SimpleMessage", "$", "message", ",", "&", "$", "failedRecipients", "=", "null", ")", "{", "$", "this", "->", "beforeSendPerformed", "(", "$", "message", ")", ";", "$", "recipients", "=", "$", "this", "->", "ge...
{@inheritdoc}
[ "{" ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Mail/Transport/SparkPostTransport.php#L49-L76
train
Sends a Swift_Mime_SimpleMessage to the SparkPost.
[ 30522, 2270, 3853, 4604, 1006, 9170, 1035, 2771, 4168, 1035, 3722, 7834, 3736, 3351, 1002, 4471, 1010, 1004, 1002, 3478, 2890, 6895, 14756, 7666, 1027, 19701, 1007, 1063, 1002, 2023, 1011, 1028, 2077, 5054, 18927, 2121, 29021, 1006, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Filesystem.php
Filesystem.copyRecursive
public static function copyRecursive($source, $target, $excludePhp = false) { if (is_dir($source)) { self::mkdir($target); $d = dir($source); while (false !== ($entry = $d->read())) { if ($entry == '.' || $entry == '..') { continue; ...
php
public static function copyRecursive($source, $target, $excludePhp = false) { if (is_dir($source)) { self::mkdir($target); $d = dir($source); while (false !== ($entry = $d->read())) { if ($entry == '.' || $entry == '..') { continue; ...
[ "public", "static", "function", "copyRecursive", "(", "$", "source", ",", "$", "target", ",", "$", "excludePhp", "=", "false", ")", "{", "if", "(", "is_dir", "(", "$", "source", ")", ")", "{", "self", "::", "mkdir", "(", "$", "target", ")", ";", "$...
Copies the contents of a directory recursively from `$source` to `$target`. @param string $source A directory or file to copy, eg. './tmp/latest'. @param string $target A directory to copy to, eg. '.'. @param bool $excludePhp Whether to avoid copying files if the file is related to PHP (includes .php, .tpl, .twig file...
[ "Copies", "the", "contents", "of", "a", "directory", "recursively", "from", "$source", "to", "$target", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Filesystem.php#L362-L384
train
Copy all files and folders recursively
[ 30522, 2270, 10763, 3853, 6100, 2890, 10841, 2869, 3512, 1006, 1002, 3120, 1010, 1002, 4539, 1010, 1002, 23329, 8458, 2361, 1027, 6270, 1007, 1063, 2065, 1006, 2003, 1035, 16101, 1006, 1002, 3120, 1007, 1007, 1063, 2969, 1024, 1024, 12395, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpKernel/Kernel.php
Kernel.prepareContainer
protected function prepareContainer(ContainerBuilder $container) { $extensions = []; foreach ($this->bundles as $bundle) { if ($extension = $bundle->getContainerExtension()) { $container->registerExtension($extension); } if ($this->debug) { ...
php
protected function prepareContainer(ContainerBuilder $container) { $extensions = []; foreach ($this->bundles as $bundle) { if ($extension = $bundle->getContainerExtension()) { $container->registerExtension($extension); } if ($this->debug) { ...
[ "protected", "function", "prepareContainer", "(", "ContainerBuilder", "$", "container", ")", "{", "$", "extensions", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "bundles", "as", "$", "bundle", ")", "{", "if", "(", "$", "extension", "=", "$", ...
Prepares the ContainerBuilder before it is compiled.
[ "Prepares", "the", "ContainerBuilder", "before", "it", "is", "compiled", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpKernel/Kernel.php#L672-L697
train
Prepares the container
[ 30522, 5123, 3853, 7374, 8663, 18249, 2121, 1006, 11661, 8569, 23891, 2099, 1002, 11661, 1007, 1063, 1002, 14305, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 26825, 2004, 1002, 14012, 1007, 1063, 2065, 1006, 1002, 533...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spatie/laravel-permission
src/Models/Role.php
Role.findByName
public static function findByName(string $name, $guardName = null): RoleContract { $guardName = $guardName ?? Guard::getDefaultName(static::class); $role = static::where('name', $name)->where('guard_name', $guardName)->first(); if (! $role) { throw RoleDoesNotExist::named($name...
php
public static function findByName(string $name, $guardName = null): RoleContract { $guardName = $guardName ?? Guard::getDefaultName(static::class); $role = static::where('name', $name)->where('guard_name', $guardName)->first(); if (! $role) { throw RoleDoesNotExist::named($name...
[ "public", "static", "function", "findByName", "(", "string", "$", "name", ",", "$", "guardName", "=", "null", ")", ":", "RoleContract", "{", "$", "guardName", "=", "$", "guardName", "??", "Guard", "::", "getDefaultName", "(", "static", "::", "class", ")", ...
Find a role by its name and guard name. @param string $name @param string|null $guardName @return \Spatie\Permission\Contracts\Role|\Spatie\Permission\Models\Role @throws \Spatie\Permission\Exceptions\RoleDoesNotExist
[ "Find", "a", "role", "by", "its", "name", "and", "guard", "name", "." ]
81dbe9d372d70c255b66a2727a235076509f8d45
https://github.com/spatie/laravel-permission/blob/81dbe9d372d70c255b66a2727a235076509f8d45/src/Models/Role.php#L84-L95
train
Find a role by its name and guard name
[ 30522, 2270, 10763, 3853, 2424, 3762, 18442, 1006, 5164, 1002, 2171, 1010, 1002, 3457, 18442, 1027, 19701, 1007, 1024, 2535, 8663, 6494, 6593, 1063, 1002, 3457, 18442, 1027, 1002, 3457, 18442, 1029, 1029, 3457, 1024, 1024, 2131, 30524, 1002...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Db.php
Db.releaseDbLock
public static function releaseDbLock($lockName) { $sql = 'SELECT RELEASE_LOCK(?)'; $db = self::get(); return $db->fetchOne($sql, array($lockName)) == '1'; }
php
public static function releaseDbLock($lockName) { $sql = 'SELECT RELEASE_LOCK(?)'; $db = self::get(); return $db->fetchOne($sql, array($lockName)) == '1'; }
[ "public", "static", "function", "releaseDbLock", "(", "$", "lockName", ")", "{", "$", "sql", "=", "'SELECT RELEASE_LOCK(?)'", ";", "$", "db", "=", "self", "::", "get", "(", ")", ";", "return", "$", "db", "->", "fetchOne", "(", "$", "sql", ",", "array",...
Releases a named lock. @param string $lockName The lock name. @return bool `true` if the lock was released, `false` if otherwise.
[ "Releases", "a", "named", "lock", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Db.php#L684-L690
train
Release a lock on the database
[ 30522, 2270, 10763, 3853, 2207, 23467, 1006, 1002, 5843, 18442, 1007, 1063, 1002, 29296, 1027, 1005, 7276, 2713, 1035, 5843, 1006, 1029, 1007, 1005, 1025, 1002, 16962, 1027, 2969, 1024, 1024, 2131, 1006, 1007, 1025, 2709, 1002, 16962, 1011,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Settings/Storage/Backend/Config.php
Config.save
public function save($values) { $section = $this->load(); foreach ($values as $key => $value) { $section[$key] = $value; } $config = $this->getConfig(); $config->{$this->section} = $section; $config->forceSave(); }
php
public function save($values) { $section = $this->load(); foreach ($values as $key => $value) { $section[$key] = $value; } $config = $this->getConfig(); $config->{$this->section} = $section; $config->forceSave(); }
[ "public", "function", "save", "(", "$", "values", ")", "{", "$", "section", "=", "$", "this", "->", "load", "(", ")", ";", "foreach", "(", "$", "values", "as", "$", "key", "=>", "$", "value", ")", "{", "$", "section", "[", "$", "key", "]", "=",...
Saves (persists) the current setting values in the database.
[ "Saves", "(", "persists", ")", "the", "current", "setting", "values", "in", "the", "database", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Settings/Storage/Backend/Config.php#L44-L55
train
Save the values of the section
[ 30522, 2270, 3853, 3828, 1006, 1002, 5300, 1007, 1063, 1002, 2930, 1027, 1002, 2023, 1011, 1028, 7170, 1006, 1007, 1025, 18921, 6776, 1006, 1002, 5300, 2004, 1002, 3145, 1027, 1028, 1002, 3643, 1007, 1063, 1002, 2930, 1031, 1002, 3145, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Security/Core/Encoder/Argon2iPasswordEncoder.php
Argon2iPasswordEncoder.encodePassword
public function encodePassword($raw, $salt) { if ($this->isPasswordTooLong($raw)) { throw new BadCredentialsException('Invalid password.'); } if (\PHP_VERSION_ID >= 70200 && \defined('PASSWORD_ARGON2I')) { return $this->encodePasswordNative($raw); } i...
php
public function encodePassword($raw, $salt) { if ($this->isPasswordTooLong($raw)) { throw new BadCredentialsException('Invalid password.'); } if (\PHP_VERSION_ID >= 70200 && \defined('PASSWORD_ARGON2I')) { return $this->encodePasswordNative($raw); } i...
[ "public", "function", "encodePassword", "(", "$", "raw", ",", "$", "salt", ")", "{", "if", "(", "$", "this", "->", "isPasswordTooLong", "(", "$", "raw", ")", ")", "{", "throw", "new", "BadCredentialsException", "(", "'Invalid password.'", ")", ";", "}", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Security/Core/Encoder/Argon2iPasswordEncoder.php#L64-L81
train
Encode a password using the Argon2i algorithm
[ 30522, 2270, 3853, 4372, 16044, 15194, 18351, 1006, 1002, 6315, 1010, 1002, 5474, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 2003, 15194, 18351, 3406, 12898, 3070, 1006, 1002, 6315, 1007, 1007, 1063, 5466, 2047, 2919, 16748, 16454, 263...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/FormController.php
FormController.getLang
protected function getLang($name, $default = null, $extras = []) { $name = $this->getConfig($name, $default); $vars = [ 'name' => Lang::get($this->getConfig('name', 'backend::lang.model.name')) ]; $vars = array_merge($vars, $extras); return Lang::get($name, $vars)...
php
protected function getLang($name, $default = null, $extras = []) { $name = $this->getConfig($name, $default); $vars = [ 'name' => Lang::get($this->getConfig('name', 'backend::lang.model.name')) ]; $vars = array_merge($vars, $extras); return Lang::get($name, $vars)...
[ "protected", "function", "getLang", "(", "$", "name", ",", "$", "default", "=", "null", ",", "$", "extras", "=", "[", "]", ")", "{", "$", "name", "=", "$", "this", "->", "getConfig", "(", "$", "name", ",", "$", "default", ")", ";", "$", "vars", ...
Parses in some default variables to a language string defined in config. @param string $name Configuration property containing the language string @param string $default A default language string to use if the config is not found @param array $extras Any extra params to include in the language string variables @return...
[ "Parses", "in", "some", "default", "variables", "to", "a", "language", "string", "defined", "in", "config", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/behaviors/FormController.php#L519-L527
train
Get lang from config
[ 30522, 5123, 3853, 2131, 30524, 1028, 11374, 1024, 1024, 2131, 1006, 1002, 2023, 1011, 1028, 2131, 8663, 8873, 2290, 1006, 1005, 2171, 1005, 1010, 1005, 2067, 10497, 1024, 1024, 11374, 1012, 2944, 1012, 2171, 1005, 1007, 1007, 1033, 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/Routing/Route.php
Route.controllerMiddleware
public function controllerMiddleware() { if (! $this->isControllerAction()) { return []; } return $this->controllerDispatcher()->getMiddleware( $this->getController(), $this->getControllerMethod() ); }
php
public function controllerMiddleware() { if (! $this->isControllerAction()) { return []; } return $this->controllerDispatcher()->getMiddleware( $this->getController(), $this->getControllerMethod() ); }
[ "public", "function", "controllerMiddleware", "(", ")", "{", "if", "(", "!", "$", "this", "->", "isControllerAction", "(", ")", ")", "{", "return", "[", "]", ";", "}", "return", "$", "this", "->", "controllerDispatcher", "(", ")", "->", "getMiddleware", ...
Get the middleware for the route's controller. @return array
[ "Get", "the", "middleware", "for", "the", "route", "s", "controller", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/Route.php#L826-L835
train
Return the middleware for the controller action
[ 30522, 2270, 3853, 11486, 4328, 20338, 8059, 1006, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 2003, 8663, 13181, 10820, 18908, 3258, 1006, 1007, 1007, 1063, 2709, 1031, 1033, 1025, 1065, 2709, 1002, 2023, 1011, 1028, 11486, 10521,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/API/DataTableManipulator/LabelFilter.php
LabelFilter.getLabelVariations
private function getLabelVariations($originalLabel) { static $pageTitleReports = array('getPageTitles', 'getEntryPageTitles', 'getExitPageTitles'); $originalLabel = trim($originalLabel); $isTerminal = substr($originalLabel, 0, 1) == self::TERMINAL_OPERATOR; if ($isTerminal) { ...
php
private function getLabelVariations($originalLabel) { static $pageTitleReports = array('getPageTitles', 'getEntryPageTitles', 'getExitPageTitles'); $originalLabel = trim($originalLabel); $isTerminal = substr($originalLabel, 0, 1) == self::TERMINAL_OPERATOR; if ($isTerminal) { ...
[ "private", "function", "getLabelVariations", "(", "$", "originalLabel", ")", "{", "static", "$", "pageTitleReports", "=", "array", "(", "'getPageTitles'", ",", "'getEntryPageTitles'", ",", "'getExitPageTitles'", ")", ";", "$", "originalLabel", "=", "trim", "(", "$...
Use variations of the label to make it easier to specify the desired label Note: The HTML Encoded version must be tried first, since in ResponseBuilder the $label is unsanitized via Common::unsanitizeLabelParameter. @param string $originalLabel @return array
[ "Use", "variations", "of", "the", "label", "to", "make", "it", "easier", "to", "specify", "the", "desired", "label" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/API/DataTableManipulator/LabelFilter.php#L125-L160
train
Returns the variations of the label
[ 30522, 2797, 3853, 2131, 20470, 2884, 10755, 18963, 2015, 1006, 1002, 2434, 20470, 2884, 1007, 30524, 12241, 1006, 1002, 2434, 20470, 2884, 1007, 1025, 1002, 21541, 2121, 22311, 2140, 1027, 4942, 3367, 2099, 1006, 1002, 2434, 20470, 2884, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/Dashboard/Controller.php
Controller.getLayout
protected function getLayout($idDashboard) { if (Piwik::isUserIsAnonymous()) { $session = new SessionNamespace("Dashboard"); if (!isset($session->dashboardLayout)) { return $this->dashboard->getDefaultLayout(); } $layout = $session->dashboar...
php
protected function getLayout($idDashboard) { if (Piwik::isUserIsAnonymous()) { $session = new SessionNamespace("Dashboard"); if (!isset($session->dashboardLayout)) { return $this->dashboard->getDefaultLayout(); } $layout = $session->dashboar...
[ "protected", "function", "getLayout", "(", "$", "idDashboard", ")", "{", "if", "(", "Piwik", "::", "isUserIsAnonymous", "(", ")", ")", "{", "$", "session", "=", "new", "SessionNamespace", "(", "\"Dashboard\"", ")", ";", "if", "(", "!", "isset", "(", "$",...
Get the dashboard layout for the current user (anonymous or logged user) @param int $idDashboard @return string $layout
[ "Get", "the", "dashboard", "layout", "for", "the", "current", "user", "(", "anonymous", "or", "logged", "user", ")" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Dashboard/Controller.php#L171-L195
train
Returns the dashboard layout
[ 30522, 5123, 3853, 2131, 8485, 5833, 1006, 1002, 8909, 8883, 2232, 6277, 1007, 1063, 2065, 1006, 14255, 9148, 2243, 1024, 1024, 2003, 20330, 29196, 16585, 27711, 1006, 1007, 1007, 1063, 1002, 5219, 1027, 2047, 5219, 18442, 23058, 1006, 1000...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Intl/Data/Bundle/Writer/TextBundleWriter.php
TextBundleWriter.write
public function write($path, $locale, $data, $fallback = true) { $file = fopen($path.'/'.$locale.'.txt', 'w'); $this->writeResourceBundle($file, $locale, $data, $fallback); fclose($file); }
php
public function write($path, $locale, $data, $fallback = true) { $file = fopen($path.'/'.$locale.'.txt', 'w'); $this->writeResourceBundle($file, $locale, $data, $fallback); fclose($file); }
[ "public", "function", "write", "(", "$", "path", ",", "$", "locale", ",", "$", "data", ",", "$", "fallback", "=", "true", ")", "{", "$", "file", "=", "fopen", "(", "$", "path", ".", "'/'", ".", "$", "locale", ".", "'.txt'", ",", "'w'", ")", ";"...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Intl/Data/Bundle/Writer/TextBundleWriter.php#L34-L41
train
Write a resource bundle
[ 30522, 2270, 3853, 4339, 1006, 1002, 4130, 1010, 1002, 2334, 2063, 1010, 1002, 2951, 1010, 1002, 2991, 5963, 1027, 2995, 1007, 1063, 1002, 5371, 1027, 1042, 26915, 1006, 1002, 4130, 1012, 1005, 1013, 1005, 1012, 1002, 2334, 2063, 1012, 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...
octobercms/october
modules/cms/twig/DebugExtension.php
DebugExtension.evalDocBlock
protected function evalDocBlock($reflectionObj) { $comment = $reflectionObj->getDocComment(); $comment = substr($comment, 3, -2); $parts = explode('@', $comment); $comment = array_shift($parts); $comment = trim(trim($comment), '*'); $comment = implode(' ', array_map(...
php
protected function evalDocBlock($reflectionObj) { $comment = $reflectionObj->getDocComment(); $comment = substr($comment, 3, -2); $parts = explode('@', $comment); $comment = array_shift($parts); $comment = trim(trim($comment), '*'); $comment = implode(' ', array_map(...
[ "protected", "function", "evalDocBlock", "(", "$", "reflectionObj", ")", "{", "$", "comment", "=", "$", "reflectionObj", "->", "getDocComment", "(", ")", ";", "$", "comment", "=", "substr", "(", "$", "comment", ",", "3", ",", "-", "2", ")", ";", "$", ...
Extracts the comment from a DocBlock @param ReflectionClass $reflectionObj @return string
[ "Extracts", "the", "comment", "from", "a", "DocBlock" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/twig/DebugExtension.php#L510-L521
train
Evaluate the docblock of the class
[ 30522, 5123, 3853, 9345, 6392, 10085, 23467, 1006, 1002, 9185, 16429, 3501, 1007, 1063, 1002, 7615, 1027, 1002, 9185, 16429, 3501, 1011, 1028, 2131, 3527, 21408, 20058, 3372, 1006, 1007, 1025, 1002, 7615, 1027, 4942, 3367, 2099, 1006, 1002,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Mail/Storage/Imap.php
Zend_Mail_Storage_Imap.getUniqueId
public function getUniqueId($id = null) { if ($id) { return $this->_protocol->fetch('UID', $id); } return $this->_protocol->fetch('UID', 1, INF); }
php
public function getUniqueId($id = null) { if ($id) { return $this->_protocol->fetch('UID', $id); } return $this->_protocol->fetch('UID', 1, INF); }
[ "public", "function", "getUniqueId", "(", "$", "id", "=", "null", ")", "{", "if", "(", "$", "id", ")", "{", "return", "$", "this", "->", "_protocol", "->", "fetch", "(", "'UID'", ",", "$", "id", ")", ";", "}", "return", "$", "this", "->", "_proto...
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/Imap.php#L350-L357
train
Get Unique ID
[ 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, 8778, 1011, 1028, 18584, 1006, 1005, 21318, 2094, 1005, 1010, 1002, 8909, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Db/Adapter/Abstract.php
Zend_Db_Adapter_Abstract.setProfiler
public function setProfiler($profiler) { $enabled = null; $profilerClass = $this->_defaultProfilerClass; $profilerInstance = null; if ($profilerIsObject = is_object($profiler)) { if ($profiler instanceof Zend_Db_Profiler) { $profilerInstance =...
php
public function setProfiler($profiler) { $enabled = null; $profilerClass = $this->_defaultProfilerClass; $profilerInstance = null; if ($profilerIsObject = is_object($profiler)) { if ($profiler instanceof Zend_Db_Profiler) { $profilerInstance =...
[ "public", "function", "setProfiler", "(", "$", "profiler", ")", "{", "$", "enabled", "=", "null", ";", "$", "profilerClass", "=", "$", "this", "->", "_defaultProfilerClass", ";", "$", "profilerInstance", "=", "null", ";", "if", "(", "$", "profilerIsObject", ...
Set the adapter's profiler object. The argument may be a boolean, an associative array, an instance of Zend_Db_Profiler, or an instance of Zend_Config. A boolean argument sets the profiler to enabled if true, or disabled if false. The profiler class is the adapter's default profiler class, Zend_Db_Profiler. An inst...
[ "Set", "the", "adapter", "s", "profiler", "object", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Adapter/Abstract.php#L357-L414
train
Set the database profiler
[ 30522, 2270, 3853, 2275, 21572, 8873, 3917, 1006, 1002, 6337, 2099, 1007, 1063, 1002, 9124, 1027, 19701, 1025, 1002, 6337, 11890, 27102, 1027, 1002, 2023, 1011, 1028, 1035, 12398, 21572, 8873, 3917, 26266, 1025, 1002, 6337, 6657, 12693, 340...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Eloquent/Builder.php
Builder.findOrNew
public function findOrNew($id, $columns = ['*']) { if (! is_null($model = $this->find($id, $columns))) { return $model; } return $this->newModelInstance(); }
php
public function findOrNew($id, $columns = ['*']) { if (! is_null($model = $this->find($id, $columns))) { return $model; } return $this->newModelInstance(); }
[ "public", "function", "findOrNew", "(", "$", "id", ",", "$", "columns", "=", "[", "'*'", "]", ")", "{", "if", "(", "!", "is_null", "(", "$", "model", "=", "$", "this", "->", "find", "(", "$", "id", ",", "$", "columns", ")", ")", ")", "{", "re...
Find a model by its primary key or return fresh model instance. @param mixed $id @param array $columns @return \Illuminate\Database\Eloquent\Model|static
[ "Find", "a", "model", "by", "its", "primary", "key", "or", "return", "fresh", "model", "instance", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Builder.php#L381-L388
train
Find a model by id or new if not found
[ 30522, 2270, 3853, 2424, 23846, 2860, 1006, 1002, 8909, 1010, 1002, 7753, 1027, 1031, 1005, 1008, 1005, 1033, 1007, 1063, 2065, 1006, 999, 2003, 1035, 19701, 1006, 1002, 2944, 1027, 1002, 2023, 1011, 1028, 2424, 1006, 1002, 8909, 1010, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
php-ai/php-ml
src/Math/Matrix.php
Matrix.getDeterminant
public function getDeterminant() { if ($this->determinant !== null) { return $this->determinant; } if (!$this->isSquare()) { throw new MatrixException('Matrix is not square matrix'); } $lu = new LUDecomposition($this); return $this->determin...
php
public function getDeterminant() { if ($this->determinant !== null) { return $this->determinant; } if (!$this->isSquare()) { throw new MatrixException('Matrix is not square matrix'); } $lu = new LUDecomposition($this); return $this->determin...
[ "public", "function", "getDeterminant", "(", ")", "{", "if", "(", "$", "this", "->", "determinant", "!==", "null", ")", "{", "return", "$", "this", "->", "determinant", ";", "}", "if", "(", "!", "$", "this", "->", "isSquare", "(", ")", ")", "{", "t...
@return float|int @throws MatrixException
[ "@return", "float|int" ]
f6aa1a59b0525b8fca3d2786d661ab3e70904016
https://github.com/php-ai/php-ml/blob/f6aa1a59b0525b8fca3d2786d661ab3e70904016/src/Math/Matrix.php#L106-L119
train
Returns the determinant of this matrix
[ 30522, 2270, 3853, 2131, 3207, 3334, 22311, 3372, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 28283, 22311, 3372, 999, 1027, 1027, 19701, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 28283, 22311, 3372, 1025, 1065, 2065, 1006, 999, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Validator/Constraints/IsFalseValidator.php
IsFalseValidator.validate
public function validate($value, Constraint $constraint) { if (!$constraint instanceof IsFalse) { throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\IsFalse'); } if (null === $value || false === $value || 0 === $value || '0' === $value) { return; ...
php
public function validate($value, Constraint $constraint) { if (!$constraint instanceof IsFalse) { throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\IsFalse'); } if (null === $value || false === $value || 0 === $value || '0' === $value) { return; ...
[ "public", "function", "validate", "(", "$", "value", ",", "Constraint", "$", "constraint", ")", "{", "if", "(", "!", "$", "constraint", "instanceof", "IsFalse", ")", "{", "throw", "new", "UnexpectedTypeException", "(", "$", "constraint", ",", "__NAMESPACE__", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Validator/Constraints/IsFalseValidator.php#L26-L40
train
Validate the value of the IsFalse constraint
[ 30522, 2270, 3853, 9398, 3686, 1006, 1002, 3643, 1010, 27142, 1002, 27142, 1007, 1063, 2065, 1006, 999, 1002, 27142, 6013, 11253, 2003, 7011, 4877, 2063, 1007, 1063, 5466, 2047, 9223, 13874, 10288, 24422, 1006, 1002, 27142, 1010, 1035, 1035...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/Intl/DateTimeFormatProvider.php
DateTimeFormatProvider.getRangeFormatPattern
public function getRangeFormatPattern($short=false, $maxDifference='Y') { return $this->translator->translate( sprintf( 'Intl_Format_Interval_%s_%s', $short ? 'Short' : 'Long', $maxDifference )); }
php
public function getRangeFormatPattern($short=false, $maxDifference='Y') { return $this->translator->translate( sprintf( 'Intl_Format_Interval_%s_%s', $short ? 'Short' : 'Long', $maxDifference )); }
[ "public", "function", "getRangeFormatPattern", "(", "$", "short", "=", "false", ",", "$", "maxDifference", "=", "'Y'", ")", "{", "return", "$", "this", "->", "translator", "->", "translate", "(", "sprintf", "(", "'Intl_Format_Interval_%s_%s'", ",", "$", "short...
Returns interval format pattern for the given format type @param bool $short whether to return short or long format pattern @param string $maxDifference maximal difference in interval dates (Y, M or D) @return string
[ "Returns", "interval", "format", "pattern", "for", "the", "given", "format", "type" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Intl/DateTimeFormatProvider.php#L97-L105
train
Returns the interval format pattern
[ 30522, 2270, 3853, 2131, 24388, 12879, 2953, 18900, 4502, 12079, 2078, 1006, 1002, 2460, 1027, 6270, 1010, 1002, 4098, 4305, 12494, 10127, 1027, 1005, 1061, 1005, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 11403, 1011, 1028, 17637, 1006, 904...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/Annotations/API.php
API.add
public function add($idSite, $date, $note, $starred = 0) { $this->checkUserCanAddNotesFor($idSite); $this->checkSingleIdSite($idSite, $extraMessage = "Note: Cannot add one note to multiple sites."); $this->checkDateIsValid($date); // add, save & return a new annotation $anno...
php
public function add($idSite, $date, $note, $starred = 0) { $this->checkUserCanAddNotesFor($idSite); $this->checkSingleIdSite($idSite, $extraMessage = "Note: Cannot add one note to multiple sites."); $this->checkDateIsValid($date); // add, save & return a new annotation $anno...
[ "public", "function", "add", "(", "$", "idSite", ",", "$", "date", ",", "$", "note", ",", "$", "starred", "=", "0", ")", "{", "$", "this", "->", "checkUserCanAddNotesFor", "(", "$", "idSite", ")", ";", "$", "this", "->", "checkSingleIdSite", "(", "$"...
Create a new annotation for a site. @param string $idSite The site ID to add the annotation to. @param string $date The date the annotation is attached to. @param string $note The text of the annotation. @param int $starred Either 0 or 1. Whether the annotation should be starred. @return array Returns an array of two ...
[ "Create", "a", "new", "annotation", "for", "a", "site", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Annotations/API.php#L42-L55
train
Add a new annotation to a site
[ 30522, 2270, 3853, 5587, 1006, 1002, 8909, 28032, 2063, 1010, 1002, 3058, 1010, 1002, 3602, 1010, 1002, 5652, 1027, 1014, 1007, 1063, 1002, 2023, 1011, 1028, 4638, 20330, 28621, 14141, 20564, 29278, 1006, 1002, 8909, 28032, 2063, 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...
overtrue/wechat
src/Payment/Jssdk/Client.php
Client.bridgeConfig
public function bridgeConfig(string $prepayId, bool $json = true) { $params = [ 'appId' => $this->app['config']->sub_appid ?: $this->app['config']->app_id, 'timeStamp' => strval(time()), 'nonceStr' => uniqid(), 'package' => "prepay_id=$prepayId", '...
php
public function bridgeConfig(string $prepayId, bool $json = true) { $params = [ 'appId' => $this->app['config']->sub_appid ?: $this->app['config']->app_id, 'timeStamp' => strval(time()), 'nonceStr' => uniqid(), 'package' => "prepay_id=$prepayId", '...
[ "public", "function", "bridgeConfig", "(", "string", "$", "prepayId", ",", "bool", "$", "json", "=", "true", ")", "{", "$", "params", "=", "[", "'appId'", "=>", "$", "this", "->", "app", "[", "'config'", "]", "->", "sub_appid", "?", ":", "$", "this",...
[WeixinJSBridge] Generate js config for payment. <pre> WeixinJSBridge.invoke( 'getBrandWCPayRequest', ... ); </pre> @param string $prepayId @param bool $json @return string|array
[ "[", "WeixinJSBridge", "]", "Generate", "js", "config", "for", "payment", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Payment/Jssdk/Client.php#L40-L53
train
Bridge Config.
[ 30522, 2270, 3853, 2958, 8663, 8873, 2290, 1006, 5164, 1002, 17463, 4710, 3593, 1010, 22017, 2140, 1002, 1046, 3385, 1027, 2995, 1007, 1063, 1002, 11498, 5244, 1027, 1031, 1005, 10439, 3593, 1005, 1027, 1028, 1002, 2023, 1011, 1028, 10439, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/classes/AuthManager.php
AuthManager.listPermissions
public function listPermissions() { if ($this->permissionCache !== false) { return $this->permissionCache; } /* * Load module items */ foreach ($this->callbacks as $callback) { $callback($this); } /* * Load plugin i...
php
public function listPermissions() { if ($this->permissionCache !== false) { return $this->permissionCache; } /* * Load module items */ foreach ($this->callbacks as $callback) { $callback($this); } /* * Load plugin i...
[ "public", "function", "listPermissions", "(", ")", "{", "if", "(", "$", "this", "->", "permissionCache", "!==", "false", ")", "{", "return", "$", "this", "->", "permissionCache", ";", "}", "/*\n * Load module items\n */", "foreach", "(", "$", "th...
Returns a list of the registered permissions items. @return array
[ "Returns", "a", "list", "of", "the", "registered", "permissions", "items", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/classes/AuthManager.php#L103-L142
train
Return all permission items
[ 30522, 2270, 3853, 2862, 4842, 25481, 2015, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 6656, 3540, 5403, 999, 1027, 1027, 6270, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 6656, 3540, 5403, 1025, 1065, 1013, 1008, 1008, 7170, 113...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Twig/Twig.php
Twig.processTemplate
public function processTemplate($template, $vars = []) { // override the twig header vars for local resolution $this->grav->fireEvent('onTwigTemplateVariables'); $vars += $this->twig_vars; try { $output = $this->twig->render($template, $vars); } catch (\Twig_Erro...
php
public function processTemplate($template, $vars = []) { // override the twig header vars for local resolution $this->grav->fireEvent('onTwigTemplateVariables'); $vars += $this->twig_vars; try { $output = $this->twig->render($template, $vars); } catch (\Twig_Erro...
[ "public", "function", "processTemplate", "(", "$", "template", ",", "$", "vars", "=", "[", "]", ")", "{", "// override the twig header vars for local resolution", "$", "this", "->", "grav", "->", "fireEvent", "(", "'onTwigTemplateVariables'", ")", ";", "$", "vars"...
Process a Twig template directly by using a template name and optional array of variables @param string $template template to render with @param array $vars Optional variables @return string
[ "Process", "a", "Twig", "template", "directly", "by", "using", "a", "template", "name", "and", "optional", "array", "of", "variables" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Twig/Twig.php#L307-L321
train
processTemplate - render a twig template
[ 30522, 2270, 3853, 2832, 18532, 15725, 1006, 1002, 23561, 1010, 1002, 13075, 2015, 1027, 1031, 1033, 1007, 1063, 1013, 1013, 2058, 15637, 1996, 1056, 16279, 20346, 13075, 2015, 2005, 2334, 5813, 1002, 2023, 1011, 1028, 24665, 11431, 1011, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Support/MessageBag.php
MessageBag.getMessagesForWildcardKey
protected function getMessagesForWildcardKey($key, $format) { return collect($this->messages) ->filter(function ($messages, $messageKey) use ($key) { return Str::is($key, $messageKey); }) ->map(function ($messages, $messageKey) use ($format...
php
protected function getMessagesForWildcardKey($key, $format) { return collect($this->messages) ->filter(function ($messages, $messageKey) use ($key) { return Str::is($key, $messageKey); }) ->map(function ($messages, $messageKey) use ($format...
[ "protected", "function", "getMessagesForWildcardKey", "(", "$", "key", ",", "$", "format", ")", "{", "return", "collect", "(", "$", "this", "->", "messages", ")", "->", "filter", "(", "function", "(", "$", "messages", ",", "$", "messageKey", ")", "use", ...
Get the messages for a wildcard key. @param string $key @param string|null $format @return array
[ "Get", "the", "messages", "for", "a", "wildcard", "key", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Support/MessageBag.php#L198-L209
train
Returns all messages for wildcard key
[ 30522, 5123, 3853, 2131, 7834, 3736, 8449, 29278, 29602, 16409, 4232, 14839, 1006, 1002, 3145, 1010, 1002, 4289, 1007, 1063, 2709, 8145, 1006, 1002, 2023, 1011, 1028, 7696, 1007, 1011, 1028, 11307, 1006, 3853, 1006, 1002, 7696, 1010, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/HTML/Common2.php
HTML_Common2.removeClass
public function removeClass($class) { if (!is_array($class)) { $class = preg_split('/\s+/', $class, null, PREG_SPLIT_NO_EMPTY); } $curClass = array_diff( preg_split('/\s+/', $this->getAttribute('class'), null, PREG_SPLIT_NO_EMPTY), $...
php
public function removeClass($class) { if (!is_array($class)) { $class = preg_split('/\s+/', $class, null, PREG_SPLIT_NO_EMPTY); } $curClass = array_diff( preg_split('/\s+/', $this->getAttribute('class'), null, PREG_SPLIT_NO_EMPTY), $...
[ "public", "function", "removeClass", "(", "$", "class", ")", "{", "if", "(", "!", "is_array", "(", "$", "class", ")", ")", "{", "$", "class", "=", "preg_split", "(", "'/\\s+/'", ",", "$", "class", ",", "null", ",", "PREG_SPLIT_NO_EMPTY", ")", ";", "}...
Removes the given CSS class(es) from the element @param string|array Class name, multiple class names separated by whitespace, array of class names @return HTML_Common2
[ "Removes", "the", "given", "CSS", "class", "(", "es", ")", "from", "the", "element" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/Common2.php#L443-L459
train
Remove all classes from the element
[ 30522, 2270, 3853, 6366, 26266, 1006, 1002, 2465, 1007, 1063, 2065, 1006, 999, 2003, 1035, 9140, 1006, 1002, 2465, 1007, 1007, 1063, 1002, 2465, 1027, 3653, 2290, 1035, 3975, 1006, 1005, 1013, 1032, 1055, 1009, 1013, 1005, 1010, 1002, 246...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpKernel/Kernel.php
Kernel.terminate
public function terminate(Request $request, Response $response) { if (false === $this->booted) { return; } if ($this->getHttpKernel() instanceof TerminableInterface) { $this->getHttpKernel()->terminate($request, $response); } }
php
public function terminate(Request $request, Response $response) { if (false === $this->booted) { return; } if ($this->getHttpKernel() instanceof TerminableInterface) { $this->getHttpKernel()->terminate($request, $response); } }
[ "public", "function", "terminate", "(", "Request", "$", "request", ",", "Response", "$", "response", ")", "{", "if", "(", "false", "===", "$", "this", "->", "booted", ")", "{", "return", ";", "}", "if", "(", "$", "this", "->", "getHttpKernel", "(", "...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpKernel/Kernel.php#L156-L165
train
Terminate the request and response
[ 30522, 2270, 3853, 20320, 1006, 5227, 1002, 5227, 1010, 3433, 1002, 3433, 1007, 1063, 2065, 1006, 6270, 1027, 1027, 1027, 1002, 2023, 1011, 1028, 9573, 2098, 1007, 1063, 2709, 1025, 1065, 2065, 1006, 1002, 2023, 1011, 1028, 2131, 11039, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Cache/Manager.php
Zend_Cache_Manager.hasCache
public function hasCache($name) { if (isset($this->_caches[$name]) || $this->hasCacheTemplate($name) ) { return true; } return false; }
php
public function hasCache($name) { if (isset($this->_caches[$name]) || $this->hasCacheTemplate($name) ) { return true; } return false; }
[ "public", "function", "hasCache", "(", "$", "name", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "_caches", "[", "$", "name", "]", ")", "||", "$", "this", "->", "hasCacheTemplate", "(", "$", "name", ")", ")", "{", "return", "true", ";", ...
Check if the Cache Manager contains the named cache object, or a named configuration template to lazy load the cache object @param string $name @return bool
[ "Check", "if", "the", "Cache", "Manager", "contains", "the", "named", "cache", "object", "or", "a", "named", "configuration", "template", "to", "lazy", "load", "the", "cache", "object" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Cache/Manager.php#L134-L142
train
Has Cache? - > hasCache
[ 30522, 2270, 3853, 2038, 3540, 5403, 1006, 1002, 2171, 1007, 1063, 2065, 1006, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 1035, 17053, 2015, 1031, 1002, 2171, 1033, 1007, 1064, 1064, 1002, 2023, 1011, 1028, 2038, 3540, 20318, 6633, 15725, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
Worker.php
Worker.signalHandler
public static function signalHandler($signal) { switch ($signal) { // Stop. case SIGINT: static::$_gracefulStop = false; static::stopAll(); break; // Graceful stop. case SIGTERM: static::$_gracefu...
php
public static function signalHandler($signal) { switch ($signal) { // Stop. case SIGINT: static::$_gracefulStop = false; static::stopAll(); break; // Graceful stop. case SIGTERM: static::$_gracefu...
[ "public", "static", "function", "signalHandler", "(", "$", "signal", ")", "{", "switch", "(", "$", "signal", ")", "{", "// Stop.", "case", "SIGINT", ":", "static", "::", "$", "_gracefulStop", "=", "false", ";", "static", "::", "stopAll", "(", ")", ";", ...
Signal handler. @param int $signal
[ "Signal", "handler", "." ]
13649907f05014fcfffcfccaef01e63ad3339351
https://github.com/walkor/Workerman/blob/13649907f05014fcfffcfccaef01e63ad3339351/Worker.php#L1112-L1145
train
Signal handler for the main process
[ 30522, 2270, 10763, 3853, 4742, 11774, 3917, 1006, 1002, 4742, 1007, 1063, 6942, 1006, 1002, 4742, 1007, 1063, 1013, 1013, 2644, 1012, 2553, 9033, 11528, 2102, 1024, 10763, 1024, 1024, 1002, 1035, 19415, 16033, 2361, 1027, 6270, 1025, 10763...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/CacheItem.php
CacheItem.validateKey
public static function validateKey($key) { if (!\is_string($key)) { throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given', \is_object($key) ? \get_class($key) : \gettype($key))); } if ('' === $key) { throw new InvalidArgumentException('Cach...
php
public static function validateKey($key) { if (!\is_string($key)) { throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given', \is_object($key) ? \get_class($key) : \gettype($key))); } if ('' === $key) { throw new InvalidArgumentException('Cach...
[ "public", "static", "function", "validateKey", "(", "$", "key", ")", "{", "if", "(", "!", "\\", "is_string", "(", "$", "key", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", "sprintf", "(", "'Cache key must be string, \"%s\" given'", ",", "\\",...
Validates a cache key according to PSR-6. @param string $key The key to validate @return string @throws InvalidArgumentException When $key is not valid
[ "Validates", "a", "cache", "key", "according", "to", "PSR", "-", "6", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Cache/CacheItem.php#L166-L179
train
Validate cache key
[ 30522, 2270, 10763, 3853, 9398, 3686, 14839, 1006, 1002, 3145, 1007, 1063, 2065, 1006, 999, 1032, 2003, 1035, 5164, 1006, 1002, 3145, 1007, 1007, 1063, 5466, 2047, 19528, 2906, 22850, 15781, 2595, 24422, 1006, 9043, 2546, 1006, 1005, 17053,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/ComponentManager.php
ComponentManager.makeComponent
public function makeComponent($name, $cmsObject = null, $properties = []) { $className = $this->resolve($name); if (!$className) { throw new SystemException(sprintf( 'Class name is not registered for the component "%s". Check the component plugin.', $name ...
php
public function makeComponent($name, $cmsObject = null, $properties = []) { $className = $this->resolve($name); if (!$className) { throw new SystemException(sprintf( 'Class name is not registered for the component "%s". Check the component plugin.', $name ...
[ "public", "function", "makeComponent", "(", "$", "name", ",", "$", "cmsObject", "=", "null", ",", "$", "properties", "=", "[", "]", ")", "{", "$", "className", "=", "$", "this", "->", "resolve", "(", "$", "name", ")", ";", "if", "(", "!", "$", "c...
Makes a component object with properties set. @param string $name A component class name or code. @param CmsObject $cmsObject The Cms object that spawned this component. @param array $properties The properties set by the Page or Layout. @return ComponentBase The component object.
[ "Makes", "a", "component", "object", "with", "properties", "set", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/classes/ComponentManager.php#L196-L217
train
Makes a component
[ 30522, 2270, 3853, 2191, 9006, 29513, 3372, 1006, 1002, 2171, 1010, 1002, 4642, 6499, 2497, 20614, 1027, 19701, 1010, 1002, 5144, 1027, 1031, 1033, 1007, 1063, 1002, 2465, 18442, 1027, 1002, 2023, 1011, 1028, 10663, 1006, 1002, 2171, 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/HttpFoundation/Request.php
Request.get
public function get($key, $default = null) { if ($this !== $result = $this->attributes->get($key, $this)) { return $result; } if ($this !== $result = $this->query->get($key, $this)) { return $result; } if ($this !== $result = $this->request->get($key...
php
public function get($key, $default = null) { if ($this !== $result = $this->attributes->get($key, $this)) { return $result; } if ($this !== $result = $this->query->get($key, $this)) { return $result; } if ($this !== $result = $this->request->get($key...
[ "public", "function", "get", "(", "$", "key", ",", "$", "default", "=", "null", ")", "{", "if", "(", "$", "this", "!==", "$", "result", "=", "$", "this", "->", "attributes", "->", "get", "(", "$", "key", ",", "$", "this", ")", ")", "{", "return...
Gets a "parameter" value from any bag. This method is mainly useful for libraries that want to provide some flexibility. If you don't need the flexibility in controllers, it is better to explicitly get request parameters from the appropriate public property instead (attributes, query, request). Order of precedence: P...
[ "Gets", "a", "parameter", "value", "from", "any", "bag", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Request.php#L681-L696
train
Get a value from the query and request parameters
[ 30522, 2270, 3853, 2131, 1006, 1002, 3145, 1010, 1002, 12398, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 2023, 999, 1027, 1027, 1002, 2765, 1027, 1002, 2023, 1011, 1028, 12332, 1011, 1028, 2131, 1006, 1002, 3145, 1010, 1002, 2023, 1007, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Mime/MimeTypes.php
MimeTypes.getMimeTypes
public function getMimeTypes(string $ext): array { if ($this->mimeTypes) { $mimeTypes = $this->mimeTypes[$ext] ?? $this->mimeTypes[$lcExt = strtolower($ext)] ?? null; } return $mimeTypes ?? self::$reverseMap[$ext] ?? self::$reverseMap[$lcExt ?? strtolower($ext)] ?? []; }
php
public function getMimeTypes(string $ext): array { if ($this->mimeTypes) { $mimeTypes = $this->mimeTypes[$ext] ?? $this->mimeTypes[$lcExt = strtolower($ext)] ?? null; } return $mimeTypes ?? self::$reverseMap[$ext] ?? self::$reverseMap[$lcExt ?? strtolower($ext)] ?? []; }
[ "public", "function", "getMimeTypes", "(", "string", "$", "ext", ")", ":", "array", "{", "if", "(", "$", "this", "->", "mimeTypes", ")", "{", "$", "mimeTypes", "=", "$", "this", "->", "mimeTypes", "[", "$", "ext", "]", "??", "$", "this", "->", "mim...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Mime/MimeTypes.php#L98-L105
train
Returns the mime types of a file extension.
[ 30522, 2270, 3853, 2131, 4328, 11368, 18863, 2015, 1006, 5164, 1002, 4654, 2102, 1007, 1024, 9140, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 2771, 11368, 18863, 2015, 1007, 1063, 1002, 2771, 11368, 18863, 2015, 1027, 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/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php
TextDescriptor.describeContainerEnvVars
protected function describeContainerEnvVars(array $envs, array $options = []) { $dump = new Dumper($this->output); $options['output']->title('Symfony Container Environment Variables'); if (null !== $name = $options['name'] ?? null) { $options['output']->comment('Displaying detai...
php
protected function describeContainerEnvVars(array $envs, array $options = []) { $dump = new Dumper($this->output); $options['output']->title('Symfony Container Environment Variables'); if (null !== $name = $options['name'] ?? null) { $options['output']->comment('Displaying detai...
[ "protected", "function", "describeContainerEnvVars", "(", "array", "$", "envs", ",", "array", "$", "options", "=", "[", "]", ")", "{", "$", "dump", "=", "new", "Dumper", "(", "$", "this", "->", "output", ")", ";", "$", "options", "[", "'output'", "]", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php#L400-L460
train
Describes the container environment variables.
[ 30522, 5123, 3853, 6235, 8663, 18249, 7869, 2078, 2615, 10755, 2015, 1006, 9140, 1002, 4372, 15088, 1010, 9140, 1002, 7047, 1027, 1031, 1033, 1007, 1063, 1002, 15653, 1027, 2047, 15653, 2121, 1006, 1002, 2023, 1011, 1028, 6434, 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/Security/Http/EntryPoint/FormAuthenticationEntryPoint.php
FormAuthenticationEntryPoint.start
public function start(Request $request, AuthenticationException $authException = null) { if ($this->useForward) { $subRequest = $this->httpUtils->createRequest($request, $this->loginPath); $response = $this->httpKernel->handle($subRequest, HttpKernelInterface::SUB_REQUEST); ...
php
public function start(Request $request, AuthenticationException $authException = null) { if ($this->useForward) { $subRequest = $this->httpUtils->createRequest($request, $this->loginPath); $response = $this->httpKernel->handle($subRequest, HttpKernelInterface::SUB_REQUEST); ...
[ "public", "function", "start", "(", "Request", "$", "request", ",", "AuthenticationException", "$", "authException", "=", "null", ")", "{", "if", "(", "$", "this", "->", "useForward", ")", "{", "$", "subRequest", "=", "$", "this", "->", "httpUtils", "->", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Security/Http/EntryPoint/FormAuthenticationEntryPoint.php#L48-L62
train
Start the request
[ 30522, 2270, 3853, 2707, 1006, 5227, 1002, 5227, 1010, 27280, 10288, 24422, 1002, 8740, 10760, 2595, 24422, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 2224, 29278, 7652, 1007, 1063, 1002, 4942, 2890, 15500, 1027, 1002, 202...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Tracker/Action.php
Action.factory
public static function factory(Request $request) { /** @var Action[] $actions */ $actions = self::getAllActions($request); foreach ($actions as $actionType) { if (empty($action)) { $action = $actionType; continue; } $posPr...
php
public static function factory(Request $request) { /** @var Action[] $actions */ $actions = self::getAllActions($request); foreach ($actions as $actionType) { if (empty($action)) { $action = $actionType; continue; } $posPr...
[ "public", "static", "function", "factory", "(", "Request", "$", "request", ")", "{", "/** @var Action[] $actions */", "$", "actions", "=", "self", "::", "getAllActions", "(", "$", "request", ")", ";", "foreach", "(", "$", "actions", "as", "$", "actionType", ...
Makes the correct Action object based on the request. @param Request $request @return Action
[ "Makes", "the", "correct", "Action", "object", "based", "on", "the", "request", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Tracker/Action.php#L85-L109
train
Factory method to create a new ActionPageview object
[ 30522, 2270, 10763, 3853, 4713, 1006, 5227, 1002, 5227, 1007, 1063, 1013, 1008, 1008, 1030, 13075, 2895, 1031, 1033, 1002, 4506, 1008, 1013, 1002, 4506, 1027, 2969, 1024, 1024, 2131, 25425, 22014, 1006, 1002, 5227, 1007, 1025, 18921, 6776, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Db/Schema/Mysql.php
Mysql.getTablesNames
public function getTablesNames() { $aTables = array_keys($this->getTablesCreateSql()); $prefixTables = $this->getTablePrefix(); $return = array(); foreach ($aTables as $table) { $return[] = $prefixTables . $table; } return $return; }
php
public function getTablesNames() { $aTables = array_keys($this->getTablesCreateSql()); $prefixTables = $this->getTablePrefix(); $return = array(); foreach ($aTables as $table) { $return[] = $prefixTables . $table; } return $return; }
[ "public", "function", "getTablesNames", "(", ")", "{", "$", "aTables", "=", "array_keys", "(", "$", "this", "->", "getTablesCreateSql", "(", ")", ")", ";", "$", "prefixTables", "=", "$", "this", "->", "getTablePrefix", "(", ")", ";", "$", "return", "=", ...
Names of all the prefixed tables in piwik Doesn't use the DB @return array Table names
[ "Names", "of", "all", "the", "prefixed", "tables", "in", "piwik", "Doesn", "t", "use", "the", "DB" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Db/Schema/Mysql.php#L342-L353
train
Get all tables names
[ 30522, 2270, 3853, 2131, 10880, 2015, 18442, 2015, 1006, 1007, 1063, 1002, 29533, 13510, 1027, 9140, 1035, 6309, 1006, 1002, 2023, 1011, 1028, 2131, 10880, 11020, 29313, 2015, 4160, 2140, 1006, 1007, 1007, 1025, 1002, 17576, 10880, 2015, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/models/Preference.php
Preference.setAppFallbackLocale
public static function setAppFallbackLocale() { if (Session::has('fallback_locale')) { Lang::setFallback(Session::get('fallback_locale')); } elseif ( ($user = BackendAuth::getUser()) && ($locale = static::get('fallback_locale')) ) { Ses...
php
public static function setAppFallbackLocale() { if (Session::has('fallback_locale')) { Lang::setFallback(Session::get('fallback_locale')); } elseif ( ($user = BackendAuth::getUser()) && ($locale = static::get('fallback_locale')) ) { Ses...
[ "public", "static", "function", "setAppFallbackLocale", "(", ")", "{", "if", "(", "Session", "::", "has", "(", "'fallback_locale'", ")", ")", "{", "Lang", "::", "setFallback", "(", "Session", "::", "get", "(", "'fallback_locale'", ")", ")", ";", "}", "else...
Same as setAppLocale except for the fallback definition. @return void
[ "Same", "as", "setAppLocale", "except", "for", "the", "fallback", "definition", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/models/Preference.php#L97-L109
train
Set App Fallback Locale
[ 30522, 2270, 10763, 3853, 2275, 29098, 13976, 5963, 4135, 9289, 2063, 1006, 1007, 1063, 2065, 1006, 5219, 1024, 1024, 2038, 1006, 1005, 2991, 5963, 1035, 2334, 2063, 1005, 1007, 1007, 1063, 11374, 1024, 1024, 2275, 13976, 5963, 1006, 5219, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dompdf/dompdf
src/Adapter/PDFLib.php
PDFLib._set_line_style
protected function _set_line_style($width, $cap, $join, $dash) { if (count($dash) == 1) { $dash[] = $dash[0]; } if ($this->getPDFLibMajorVersion() >= 9) { if (count($dash) > 1) { $this->_pdf->set_graphics_option("dasharray={" . implode(" ", $dash) . "...
php
protected function _set_line_style($width, $cap, $join, $dash) { if (count($dash) == 1) { $dash[] = $dash[0]; } if ($this->getPDFLibMajorVersion() >= 9) { if (count($dash) > 1) { $this->_pdf->set_graphics_option("dasharray={" . implode(" ", $dash) . "...
[ "protected", "function", "_set_line_style", "(", "$", "width", ",", "$", "cap", ",", "$", "join", ",", "$", "dash", ")", "{", "if", "(", "count", "(", "$", "dash", ")", "==", "1", ")", "{", "$", "dash", "[", "]", "=", "$", "dash", "[", "0", "...
Sets the line style @param float $width @param $cap @param string $join @param array $dash @return void
[ "Sets", "the", "line", "style" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/Adapter/PDFLib.php#L514-L593
train
Set the line style for the PDF
[ 30522, 5123, 3853, 1035, 2275, 1035, 2240, 1035, 2806, 1006, 1002, 9381, 1010, 1002, 6178, 1010, 1002, 3693, 1010, 1002, 11454, 1007, 1063, 2065, 1006, 4175, 1006, 1002, 11454, 1007, 1027, 1027, 1015, 1007, 1063, 1002, 11454, 1031, 1033, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Console/Scheduling/CommandBuilder.php
CommandBuilder.buildForegroundCommand
protected function buildForegroundCommand(Event $event) { $output = ProcessUtils::escapeArgument($event->output); return $this->ensureCorrectUser( $event, $event->command.($event->shouldAppendOutput ? ' >> ' : ' > ').$output.' 2>&1' ); }
php
protected function buildForegroundCommand(Event $event) { $output = ProcessUtils::escapeArgument($event->output); return $this->ensureCorrectUser( $event, $event->command.($event->shouldAppendOutput ? ' >> ' : ' > ').$output.' 2>&1' ); }
[ "protected", "function", "buildForegroundCommand", "(", "Event", "$", "event", ")", "{", "$", "output", "=", "ProcessUtils", "::", "escapeArgument", "(", "$", "event", "->", "output", ")", ";", "return", "$", "this", "->", "ensureCorrectUser", "(", "$", "eve...
Build the command for running the event in the foreground. @param \Illuminate\Console\Scheduling\Event $event @return string
[ "Build", "the", "command", "for", "running", "the", "event", "in", "the", "foreground", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Console/Scheduling/CommandBuilder.php#L31-L38
train
Build the foreground command.
[ 30522, 5123, 3853, 3857, 29278, 13910, 22494, 4859, 9006, 2386, 2094, 1006, 2724, 1002, 2724, 1007, 1063, 1002, 6434, 1027, 2832, 21823, 4877, 1024, 1024, 4019, 2906, 22850, 4765, 1006, 1002, 2724, 1011, 1028, 6434, 1007, 1025, 2709, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/HTML/QuickForm2/Renderer.php
HTML_QuickForm2_Renderer.factory
final public static function factory($type) { $type = strtolower($type); if (!isset(self::$_types[$type])) { throw new HTML_QuickForm2_InvalidArgumentException( "Renderer type '$type' is not known" ); } list ($className, $includeFile) = self::...
php
final public static function factory($type) { $type = strtolower($type); if (!isset(self::$_types[$type])) { throw new HTML_QuickForm2_InvalidArgumentException( "Renderer type '$type' is not known" ); } list ($className, $includeFile) = self::...
[ "final", "public", "static", "function", "factory", "(", "$", "type", ")", "{", "$", "type", "=", "strtolower", "(", "$", "type", ")", ";", "if", "(", "!", "isset", "(", "self", "::", "$", "_types", "[", "$", "type", "]", ")", ")", "{", "throw", ...
Creates a new renderer instance of the given type A renderer is always wrapped by a Proxy, which handles calling its "published" methods and methods of its plugins. Registered plugins are added automagically to the existing renderer instances so that <code> $foo = HTML_QuickForm2_Renderer::factory('foo'); // Plugin im...
[ "Creates", "a", "new", "renderer", "instance", "of", "the", "given", "type" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Renderer.php#L131-L148
train
Returns a renderer object of the given type
[ 30522, 2345, 2270, 10763, 3853, 4713, 1006, 1002, 2828, 1007, 1063, 1002, 2828, 1027, 2358, 5339, 12898, 13777, 1006, 1002, 2828, 1007, 1025, 2065, 1006, 999, 26354, 3388, 1006, 2969, 1024, 1024, 1002, 1035, 4127, 1031, 1002, 2828, 1033, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/Intl/DateTimeFormatProvider.php
DateTimeFormatProvider.getFormatPattern
public function getFormatPattern($format) { switch ($format) { case self::DATETIME_FORMAT_LONG: $pattern = $this->translator->translate('Intl_Format_DateTime_Long'); break; case self::DATETIME_FORMAT_SHORT: $pattern = $this->translato...
php
public function getFormatPattern($format) { switch ($format) { case self::DATETIME_FORMAT_LONG: $pattern = $this->translator->translate('Intl_Format_DateTime_Long'); break; case self::DATETIME_FORMAT_SHORT: $pattern = $this->translato...
[ "public", "function", "getFormatPattern", "(", "$", "format", ")", "{", "switch", "(", "$", "format", ")", "{", "case", "self", "::", "DATETIME_FORMAT_LONG", ":", "$", "pattern", "=", "$", "this", "->", "translator", "->", "translate", "(", "'Intl_Format_Dat...
Returns the format pattern for the given format type @param int $format one of the format constants @return string
[ "Returns", "the", "format", "pattern", "for", "the", "given", "format", "type" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Intl/DateTimeFormatProvider.php#L38-L87
train
Return the pattern of the format
[ 30522, 2270, 3853, 2131, 14192, 4017, 4502, 12079, 2078, 1006, 1002, 4289, 1007, 1063, 6942, 1006, 1002, 4289, 1007, 1063, 2553, 2969, 1024, 1024, 3058, 7292, 1035, 4289, 1035, 2146, 1024, 1002, 5418, 1027, 1002, 2023, 1011, 1028, 11403, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Grid/Filter.php
Filter.registerFilters
public static function registerFilters() { $filters = [ 'equal' => Equal::class, 'notEqual' => NotEqual::class, 'ilike' => Ilike::class, 'like' => Like::class, 'gt' => Gt::class, 'lt' => Lt::class, ...
php
public static function registerFilters() { $filters = [ 'equal' => Equal::class, 'notEqual' => NotEqual::class, 'ilike' => Ilike::class, 'like' => Like::class, 'gt' => Gt::class, 'lt' => Lt::class, ...
[ "public", "static", "function", "registerFilters", "(", ")", "{", "$", "filters", "=", "[", "'equal'", "=>", "Equal", "::", "class", ",", "'notEqual'", "=>", "NotEqual", "::", "class", ",", "'ilike'", "=>", "Ilike", "::", "class", ",", "'like'", "=>", "L...
Register builtin filters.
[ "Register", "builtin", "filters", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Grid/Filter.php#L635-L662
train
Register all the filters
[ 30522, 2270, 10763, 3853, 4236, 8873, 21928, 2015, 1006, 1007, 1063, 1002, 17736, 1027, 1031, 1005, 5020, 1005, 1027, 1028, 5020, 1024, 1024, 2465, 1010, 1005, 3602, 26426, 1005, 1027, 1028, 3602, 26426, 1024, 1024, 2465, 1010, 1005, 6335, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Workflow/Registry.php
Registry.add
public function add(Workflow $workflow, $supportStrategy) { @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1. Use addWorkflow() instead.', __METHOD__), E_USER_DEPRECATED); $this->workflows[] = [$workflow, $supportStrategy]; }
php
public function add(Workflow $workflow, $supportStrategy) { @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1. Use addWorkflow() instead.', __METHOD__), E_USER_DEPRECATED); $this->workflows[] = [$workflow, $supportStrategy]; }
[ "public", "function", "add", "(", "Workflow", "$", "workflow", ",", "$", "supportStrategy", ")", "{", "@", "trigger_error", "(", "sprintf", "(", "'The \"%s()\" method is deprecated since Symfony 4.1. Use addWorkflow() instead.'", ",", "__METHOD__", ")", ",", "E_USER_DEPRE...
@param Workflow $workflow @param SupportStrategyInterface $supportStrategy @deprecated since Symfony 4.1, use addWorkflow() instead
[ "@param", "Workflow", "$workflow", "@param", "SupportStrategyInterface", "$supportStrategy" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Workflow/Registry.php#L32-L36
train
Adds a new workflow to the list of workflows.
[ 30522, 2270, 3853, 5587, 1006, 2147, 12314, 1002, 2147, 12314, 1010, 1002, 6753, 6494, 2618, 6292, 1007, 1063, 1030, 9495, 1035, 7561, 1006, 9043, 2546, 1006, 1005, 1996, 1000, 1003, 1055, 1006, 1007, 1000, 4118, 2003, 2139, 28139, 12921, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/PrivacyManager/PrivacyManager.php
PrivacyManager.getPurgeEstimate
public static function getPurgeEstimate($settings = null) { if (is_null($settings)) { $settings = self::getPurgeDataSettings(); } $result = array(); if ($settings['delete_logs_enable']) { /** @var LogDataPurger $logDataPurger */ $logDataPurger = ...
php
public static function getPurgeEstimate($settings = null) { if (is_null($settings)) { $settings = self::getPurgeDataSettings(); } $result = array(); if ($settings['delete_logs_enable']) { /** @var LogDataPurger $logDataPurger */ $logDataPurger = ...
[ "public", "static", "function", "getPurgeEstimate", "(", "$", "settings", "=", "null", ")", "{", "if", "(", "is_null", "(", "$", "settings", ")", ")", "{", "$", "settings", "=", "self", "::", "getPurgeDataSettings", "(", ")", ";", "}", "$", "result", "...
Returns an array describing what data would be purged if both raw data & report purging is invoked. The returned array maps table names with the number of rows that will be deleted. If the table name is mapped with -1, the table will be dropped. @param array $settings The config options to use in the estimate. If nul...
[ "Returns", "an", "array", "describing", "what", "data", "would", "be", "purged", "if", "both", "raw", "data", "&", "report", "purging", "is", "invoked", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/PrivacyManager/PrivacyManager.php#L422-L442
train
Get Purge Estimate
[ 30522, 2270, 10763, 3853, 2131, 5311, 18372, 16643, 8585, 1006, 1002, 10906, 1027, 19701, 1007, 1063, 2065, 1006, 2003, 1035, 19701, 1006, 1002, 10906, 1007, 1007, 1063, 1002, 10906, 1027, 2969, 1024, 1024, 2131, 5311, 5999, 6790, 21678, 86...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Pagination/LengthAwarePaginator.php
LengthAwarePaginator.elements
protected function elements() { $window = UrlWindow::make($this); return array_filter([ $window['first'], is_array($window['slider']) ? '...' : null, $window['slider'], is_array($window['last']) ? '...' : null, $window['last'], ]);...
php
protected function elements() { $window = UrlWindow::make($this); return array_filter([ $window['first'], is_array($window['slider']) ? '...' : null, $window['slider'], is_array($window['last']) ? '...' : null, $window['last'], ]);...
[ "protected", "function", "elements", "(", ")", "{", "$", "window", "=", "UrlWindow", "::", "make", "(", "$", "this", ")", ";", "return", "array_filter", "(", "[", "$", "window", "[", "'first'", "]", ",", "is_array", "(", "$", "window", "[", "'slider'",...
Get the array of elements to pass to the view. @return array
[ "Get", "the", "array", "of", "elements", "to", "pass", "to", "the", "view", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Pagination/LengthAwarePaginator.php#L103-L114
train
Return array of elements
[ 30522, 5123, 3853, 3787, 1006, 1007, 1063, 1002, 3332, 1027, 24471, 2140, 11101, 5004, 1024, 1024, 2191, 1006, 1002, 2023, 1007, 1025, 2709, 9140, 1035, 11307, 1006, 1031, 1002, 3332, 1031, 1005, 2034, 1005, 1033, 1010, 2003, 1035, 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...
slimphp/Slim
Slim/Router.php
Router.setCacheFile
public function setCacheFile($cacheFile) { if (!is_string($cacheFile) && $cacheFile !== false) { throw new InvalidArgumentException('Router cache file must be a string or false'); } if ($cacheFile && file_exists($cacheFile) && !is_readable($cacheFile)) { throw new Ru...
php
public function setCacheFile($cacheFile) { if (!is_string($cacheFile) && $cacheFile !== false) { throw new InvalidArgumentException('Router cache file must be a string or false'); } if ($cacheFile && file_exists($cacheFile) && !is_readable($cacheFile)) { throw new Ru...
[ "public", "function", "setCacheFile", "(", "$", "cacheFile", ")", "{", "if", "(", "!", "is_string", "(", "$", "cacheFile", ")", "&&", "$", "cacheFile", "!==", "false", ")", "{", "throw", "new", "InvalidArgumentException", "(", "'Router cache file must be a strin...
Set path to fast route cache file. If this is false then route caching is disabled. @param string|false $cacheFile @return static @throws InvalidArgumentException If cacheFile is not a string or not false @throws RuntimeException If cacheFile directory is not writable
[ "Set", "path", "to", "fast", "route", "cache", "file", ".", "If", "this", "is", "false", "then", "route", "caching", "is", "disabled", "." ]
ccef5f7d8bcd469d59cbe64f6210d83764f91543
https://github.com/slimphp/Slim/blob/ccef5f7d8bcd469d59cbe64f6210d83764f91543/Slim/Router.php#L130-L150
train
Set Cache File
[ 30522, 2270, 3853, 2275, 3540, 5403, 8873, 2571, 1006, 1002, 17053, 8873, 2571, 1007, 1063, 2065, 1006, 999, 2003, 1035, 5164, 1006, 1002, 17053, 8873, 2571, 1007, 1004, 1004, 1002, 17053, 8873, 2571, 999, 1027, 1027, 6270, 1007, 1063, 54...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Loader/Configurator/Traits/ParentTrait.php
ParentTrait.parent
final public function parent(string $parent) { if (!$this->allowParent) { throw new InvalidArgumentException(sprintf('A parent cannot be defined when either "_instanceof" or "_defaults" are also defined for service prototype "%s".', $this->id)); } if ($this->definition instanceo...
php
final public function parent(string $parent) { if (!$this->allowParent) { throw new InvalidArgumentException(sprintf('A parent cannot be defined when either "_instanceof" or "_defaults" are also defined for service prototype "%s".', $this->id)); } if ($this->definition instanceo...
[ "final", "public", "function", "parent", "(", "string", "$", "parent", ")", "{", "if", "(", "!", "$", "this", "->", "allowParent", ")", "{", "throw", "new", "InvalidArgumentException", "(", "sprintf", "(", "'A parent cannot be defined when either \"_instanceof\" or ...
Sets the Definition to inherit from. @return $this @throws InvalidArgumentException when parent cannot be set
[ "Sets", "the", "Definition", "to", "inherit", "from", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ParentTrait.php#L26-L49
train
Set the parent of the service
[ 30522, 2345, 2270, 3853, 6687, 1006, 5164, 1002, 6687, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 3499, 19362, 4765, 1007, 1063, 5466, 2047, 19528, 2906, 22850, 15781, 2595, 24422, 1006, 9043, 2546, 1006, 1005, 1037, 6687, 3685, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Encoder/XmlEncoder.php
XmlEncoder.decode
public function decode($data, $format, array $context = []) { if ('' === trim($data)) { throw new NotEncodableValueException('Invalid XML data, it can not be empty.'); } $internalErrors = libxml_use_internal_errors(true); $disableEntities = libxml_disable_entity_loader(t...
php
public function decode($data, $format, array $context = []) { if ('' === trim($data)) { throw new NotEncodableValueException('Invalid XML data, it can not be empty.'); } $internalErrors = libxml_use_internal_errors(true); $disableEntities = libxml_disable_entity_loader(t...
[ "public", "function", "decode", "(", "$", "data", ",", "$", "format", ",", "array", "$", "context", "=", "[", "]", ")", "{", "if", "(", "''", "===", "trim", "(", "$", "data", ")", ")", "{", "throw", "new", "NotEncodableValueException", "(", "'Invalid...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php#L124-L188
train
Decodes XML data into an array
[ 30522, 2270, 3853, 21933, 3207, 1006, 1002, 2951, 1010, 1002, 4289, 1010, 9140, 1002, 6123, 1027, 1031, 1033, 1007, 1063, 2065, 1006, 1005, 1005, 1027, 1027, 1027, 12241, 1006, 1002, 2951, 1007, 1007, 1063, 5466, 2047, 3602, 15305, 20782, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Authentication/Token/AbstractToken.php
AbstractToken.getAttribute
public function getAttribute($name) { if (!\array_key_exists($name, $this->attributes)) { throw new \InvalidArgumentException(sprintf('This token has no "%s" attribute.', $name)); } return $this->attributes[$name]; }
php
public function getAttribute($name) { if (!\array_key_exists($name, $this->attributes)) { throw new \InvalidArgumentException(sprintf('This token has no "%s" attribute.', $name)); } return $this->attributes[$name]; }
[ "public", "function", "getAttribute", "(", "$", "name", ")", "{", "if", "(", "!", "\\", "array_key_exists", "(", "$", "name", ",", "$", "this", "->", "attributes", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "sprintf", "(", "'Th...
Returns an attribute value. @param string $name The attribute name @return mixed The attribute value @throws \InvalidArgumentException When attribute doesn't exist for this token
[ "Returns", "an", "attribute", "value", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php#L258-L265
train
Get the value of an attribute
[ 30522, 2270, 3853, 2131, 19321, 3089, 8569, 2618, 1006, 1002, 2171, 1007, 1063, 2065, 1006, 999, 1032, 9140, 1035, 3145, 1035, 6526, 1006, 1002, 2171, 1010, 1002, 2023, 1011, 1028, 12332, 1007, 1007, 1063, 5466, 2047, 1032, 19528, 2906, 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/Security/Csrf/CsrfTokenManager.php
CsrfTokenManager.refreshToken
public function refreshToken($tokenId) { $namespacedId = $this->getNamespace().$tokenId; $value = $this->generator->generateToken(); $this->storage->setToken($namespacedId, $value); return new CsrfToken($tokenId, $value); }
php
public function refreshToken($tokenId) { $namespacedId = $this->getNamespace().$tokenId; $value = $this->generator->generateToken(); $this->storage->setToken($namespacedId, $value); return new CsrfToken($tokenId, $value); }
[ "public", "function", "refreshToken", "(", "$", "tokenId", ")", "{", "$", "namespacedId", "=", "$", "this", "->", "getNamespace", "(", ")", ".", "$", "tokenId", ";", "$", "value", "=", "$", "this", "->", "generator", "->", "generateToken", "(", ")", ";...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Security/Csrf/CsrfTokenManager.php#L86-L94
train
Refreshes a CSRF token
[ 30522, 2270, 3853, 25416, 21898, 18715, 2368, 1006, 1002, 19204, 3593, 1007, 1063, 1002, 3415, 15327, 4305, 2094, 1027, 1002, 2023, 1011, 1028, 2131, 18442, 23058, 1006, 1007, 1012, 1002, 19204, 3593, 1025, 1002, 3643, 1027, 1002, 2023, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Encryption/Encrypter.php
Encrypter.encrypt
public function encrypt($value, $serialize = true) { $iv = random_bytes(openssl_cipher_iv_length($this->cipher)); // First we will encrypt the value using OpenSSL. After this is encrypted we // will proceed to calculating a MAC for the encrypted value so that this // value can be ve...
php
public function encrypt($value, $serialize = true) { $iv = random_bytes(openssl_cipher_iv_length($this->cipher)); // First we will encrypt the value using OpenSSL. After this is encrypted we // will proceed to calculating a MAC for the encrypted value so that this // value can be ve...
[ "public", "function", "encrypt", "(", "$", "value", ",", "$", "serialize", "=", "true", ")", "{", "$", "iv", "=", "random_bytes", "(", "openssl_cipher_iv_length", "(", "$", "this", "->", "cipher", ")", ")", ";", "// First we will encrypt the value using OpenSSL....
Encrypt the given value. @param mixed $value @param bool $serialize @return string @throws \Illuminate\Contracts\Encryption\EncryptException
[ "Encrypt", "the", "given", "value", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Encryption/Encrypter.php#L82-L110
train
Encrypts the value using OpenSSL and returns the MAC.
[ 30522, 2270, 3853, 4372, 26775, 22571, 2102, 1006, 1002, 3643, 1010, 1002, 7642, 4697, 1027, 2995, 1007, 1063, 1002, 4921, 1027, 6721, 1035, 27507, 1006, 7480, 14540, 1035, 27715, 1035, 4921, 1035, 3091, 1006, 1002, 2023, 1011, 1028, 27715,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Data/Validation.php
Validation.typeTextarea
public static function typeTextarea($value, array $params, array $field) { if (!isset($params['multiline'])) { $params['multiline'] = true; } return self::typeText($value, $params, $field); }
php
public static function typeTextarea($value, array $params, array $field) { if (!isset($params['multiline'])) { $params['multiline'] = true; } return self::typeText($value, $params, $field); }
[ "public", "static", "function", "typeTextarea", "(", "$", "value", ",", "array", "$", "params", ",", "array", "$", "field", ")", "{", "if", "(", "!", "isset", "(", "$", "params", "[", "'multiline'", "]", ")", ")", "{", "$", "params", "[", "'multiline...
HTML5 input: textarea @param mixed $value Value to be validated. @param array $params Validation parameters. @param array $field Blueprint for the field. @return bool True if validation succeeded.
[ "HTML5", "input", ":", "textarea" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Data/Validation.php#L197-L204
train
Type Textarea - type
[ 30522, 2270, 10763, 3853, 2828, 18209, 12069, 2050, 1006, 1002, 3643, 1010, 9140, 1002, 11498, 5244, 1010, 9140, 1002, 2492, 1007, 1063, 2065, 1006, 999, 26354, 3388, 1006, 1002, 11498, 5244, 1031, 1005, 4800, 4179, 1005, 1033, 1007, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Serializer/Serializer.php
Serializer.serialize
final public function serialize($data, $format, array $context = []) { if (!$this->supportsEncoding($format, $context)) { throw new NotEncodableValueException(sprintf('Serialization for the format %s is not supported', $format)); } if ($this->encoder->needsNormalization($format,...
php
final public function serialize($data, $format, array $context = []) { if (!$this->supportsEncoding($format, $context)) { throw new NotEncodableValueException(sprintf('Serialization for the format %s is not supported', $format)); } if ($this->encoder->needsNormalization($format,...
[ "final", "public", "function", "serialize", "(", "$", "data", ",", "$", "format", ",", "array", "$", "context", "=", "[", "]", ")", "{", "if", "(", "!", "$", "this", "->", "supportsEncoding", "(", "$", "format", ",", "$", "context", ")", ")", "{", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Serializer/Serializer.php#L118-L129
train
Serializes data according to the format and the context
[ 30522, 2345, 2270, 3853, 7642, 4697, 1006, 1002, 2951, 1010, 1002, 4289, 1010, 9140, 1002, 6123, 1027, 1031, 1033, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 6753, 2368, 3597, 4667, 1006, 1002, 4289, 1010, 1002, 6123, 1007, 1007...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Archive/DataCollection.php
DataCollection.getIndexedArray
public function getIndexedArray($resultIndices) { $indexKeys = array_keys($resultIndices); $result = $this->createOrderedIndex($indexKeys); foreach ($this->data as $idSite => $rowsByPeriod) { foreach ($rowsByPeriod as $period => $row) { // FIXME: This hack works ...
php
public function getIndexedArray($resultIndices) { $indexKeys = array_keys($resultIndices); $result = $this->createOrderedIndex($indexKeys); foreach ($this->data as $idSite => $rowsByPeriod) { foreach ($rowsByPeriod as $period => $row) { // FIXME: This hack works ...
[ "public", "function", "getIndexedArray", "(", "$", "resultIndices", ")", "{", "$", "indexKeys", "=", "array_keys", "(", "$", "resultIndices", ")", ";", "$", "result", "=", "$", "this", "->", "createOrderedIndex", "(", "$", "indexKeys", ")", ";", "foreach", ...
Returns archive data as an array indexed by metadata. @param array $resultIndices An array mapping metadata names to pretty labels for them. Each archive data row will be indexed by the metadata specified here. Eg, array('site' => 'idSite', 'period' => 'Date') @return array
[ "Returns", "archive", "data", "as", "an", "array", "indexed", "by", "metadata", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Archive/DataCollection.php#L184-L208
train
Get an ordered array of archive IDs indexed by the given indices
[ 30522, 2270, 3853, 2131, 22254, 10288, 11960, 11335, 2100, 1006, 1002, 2765, 22254, 23522, 1007, 1063, 1002, 5950, 14839, 2015, 1027, 9140, 1035, 6309, 1006, 1002, 2765, 22254, 23522, 1007, 1025, 1002, 2765, 1027, 1002, 2023, 1011, 1028, 34...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Sequence.php
Sequence.getCurrentId
public function getCurrentId() { $sql = 'SELECT value FROM ' . $this->table . ' WHERE name = ?'; $id = $this->db->fetchOne($sql, array($this->name)); if (!empty($id) || '0' === $id || 0 === $id) { return (int) $id; } }
php
public function getCurrentId() { $sql = 'SELECT value FROM ' . $this->table . ' WHERE name = ?'; $id = $this->db->fetchOne($sql, array($this->name)); if (!empty($id) || '0' === $id || 0 === $id) { return (int) $id; } }
[ "public", "function", "getCurrentId", "(", ")", "{", "$", "sql", "=", "'SELECT value FROM '", ".", "$", "this", "->", "table", ".", "' WHERE name = ?'", ";", "$", "id", "=", "$", "this", "->", "db", "->", "fetchOne", "(", "$", "sql", ",", "array", "(",...
Returns the current max id. @return int @internal
[ "Returns", "the", "current", "max", "id", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Sequence.php#L112-L121
train
Get current id
[ 30522, 2270, 3853, 2131, 10841, 14343, 16778, 2094, 1006, 1007, 1063, 1002, 29296, 1027, 1005, 7276, 3643, 2013, 1005, 1012, 1002, 2023, 1011, 1028, 2795, 1012, 1005, 2073, 2171, 1027, 1029, 1005, 1025, 1002, 8909, 1027, 1002, 2023, 1011, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Cache/Psr16Cache.php
Psr16Cache.get
public function get($key, $default = null) { try { $item = $this->pool->getItem($key); } catch (SimpleCacheException $e) { throw $e; } catch (Psr6CacheException $e) { throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e); } ...
php
public function get($key, $default = null) { try { $item = $this->pool->getItem($key); } catch (SimpleCacheException $e) { throw $e; } catch (Psr6CacheException $e) { throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e); } ...
[ "public", "function", "get", "(", "$", "key", ",", "$", "default", "=", "null", ")", "{", "try", "{", "$", "item", "=", "$", "this", "->", "pool", "->", "getItem", "(", "$", "key", ")", ";", "}", "catch", "(", "SimpleCacheException", "$", "e", ")...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Cache/Psr16Cache.php#L69-L84
train
Get an item from the cache
[ 30522, 2270, 3853, 2131, 1006, 1002, 3145, 1010, 1002, 12398, 1027, 19701, 1007, 1063, 3046, 1063, 1002, 8875, 1027, 1002, 2023, 1011, 1028, 4770, 1011, 1028, 2131, 4221, 2213, 1006, 1002, 3145, 1007, 1025, 1065, 4608, 1006, 3722, 3540, 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/HttpKernel/HttpCache/Store.php
Store.lock
public function lock(Request $request) { $key = $this->getCacheKey($request); if (!isset($this->locks[$key])) { $path = $this->getPath($key); if (!file_exists(\dirname($path)) && false === @mkdir(\dirname($path), 0777, true) && !is_dir(\dirname($path))) { ret...
php
public function lock(Request $request) { $key = $this->getCacheKey($request); if (!isset($this->locks[$key])) { $path = $this->getPath($key); if (!file_exists(\dirname($path)) && false === @mkdir(\dirname($path), 0777, true) && !is_dir(\dirname($path))) { ret...
[ "public", "function", "lock", "(", "Request", "$", "request", ")", "{", "$", "key", "=", "$", "this", "->", "getCacheKey", "(", "$", "request", ")", ";", "if", "(", "!", "isset", "(", "$", "this", "->", "locks", "[", "$", "key", "]", ")", ")", ...
Tries to lock the cache for a given Request, without blocking. @return bool|string true if the lock is acquired, the path to the current lock otherwise
[ "Tries", "to", "lock", "the", "cache", "for", "a", "given", "Request", "without", "blocking", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpKernel/HttpCache/Store.php#L63-L83
train
Lock the file
[ 30522, 2270, 3853, 5843, 1006, 5227, 1002, 5227, 1007, 1063, 1002, 3145, 1027, 1002, 2023, 1011, 1028, 2131, 3540, 5403, 14839, 1006, 1002, 5227, 1007, 1025, 2065, 1006, 999, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 11223, 1031, 1002, 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...
walkor/Workerman
Events/Libevent.php
Libevent.timerCallback
protected function timerCallback($_null1, $_null2, $timer_id) { if ($this->_eventTimer[$timer_id][3] === self::EV_TIMER) { event_add($this->_eventTimer[$timer_id][2], $this->_eventTimer[$timer_id][4]); } try { call_user_func_array($this->_eventTimer[$timer_id][0], $th...
php
protected function timerCallback($_null1, $_null2, $timer_id) { if ($this->_eventTimer[$timer_id][3] === self::EV_TIMER) { event_add($this->_eventTimer[$timer_id][2], $this->_eventTimer[$timer_id][4]); } try { call_user_func_array($this->_eventTimer[$timer_id][0], $th...
[ "protected", "function", "timerCallback", "(", "$", "_null1", ",", "$", "_null2", ",", "$", "timer_id", ")", "{", "if", "(", "$", "this", "->", "_eventTimer", "[", "$", "timer_id", "]", "[", "3", "]", "===", "self", "::", "EV_TIMER", ")", "{", "event...
Timer callback. @param mixed $_null1 @param int $_null2 @param mixed $timer_id
[ "Timer", "callback", "." ]
13649907f05014fcfffcfccaef01e63ad3339351
https://github.com/walkor/Workerman/blob/13649907f05014fcfffcfccaef01e63ad3339351/Events/Libevent.php#L167-L184
train
Timer callback function
[ 30522, 5123, 3853, 25309, 9289, 20850, 8684, 1006, 1002, 1035, 19701, 2487, 1010, 1002, 1035, 19701, 2475, 1010, 1002, 25309, 1035, 8909, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 1035, 2724, 7292, 2099, 1031, 1002, 25309, 1035, 8909,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php
TagAwareAdapter.getItems
public function getItems(array $keys = []) { if ($this->deferred) { $this->commit(); } $tagKeys = []; foreach ($keys as $key) { if ('' !== $key && \is_string($key)) { $key = static::TAGS_PREFIX.$key; $tagKeys[$key] = $key; ...
php
public function getItems(array $keys = []) { if ($this->deferred) { $this->commit(); } $tagKeys = []; foreach ($keys as $key) { if ('' !== $key && \is_string($key)) { $key = static::TAGS_PREFIX.$key; $tagKeys[$key] = $key; ...
[ "public", "function", "getItems", "(", "array", "$", "keys", "=", "[", "]", ")", "{", "if", "(", "$", "this", "->", "deferred", ")", "{", "$", "this", "->", "commit", "(", ")", ";", "}", "$", "tagKeys", "=", "[", "]", ";", "foreach", "(", "$", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php#L189-L212
train
Get items from the pool
[ 30522, 2270, 3853, 2131, 4221, 5244, 1006, 9140, 1002, 6309, 1027, 1031, 1033, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 13366, 28849, 2094, 1007, 1063, 1002, 2023, 1011, 1028, 10797, 1006, 1007, 1025, 1065, 1002, 6415, 14839, 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...
matomo-org/matomo
core/Url.php
Url.getHostFromUrl
public static function getHostFromUrl($url) { $parsedUrl = parse_url($url); if (empty($parsedUrl['host'])) { return; } return Common::mb_strtolower($parsedUrl['host']); }
php
public static function getHostFromUrl($url) { $parsedUrl = parse_url($url); if (empty($parsedUrl['host'])) { return; } return Common::mb_strtolower($parsedUrl['host']); }
[ "public", "static", "function", "getHostFromUrl", "(", "$", "url", ")", "{", "$", "parsedUrl", "=", "parse_url", "(", "$", "url", ")", ";", "if", "(", "empty", "(", "$", "parsedUrl", "[", "'host'", "]", ")", ")", "{", "return", ";", "}", "return", ...
Returns the host part of any valid URL. @param string $url Any fully qualified URL @return string|null The actual host in lower case or null if $url is not a valid fully qualified URL.
[ "Returns", "the", "host", "part", "of", "any", "valid", "URL", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Url.php#L643-L652
train
Returns the host name from a URL
[ 30522, 2270, 10763, 3853, 2131, 15006, 24475, 21716, 3126, 2140, 1006, 1002, 24471, 2140, 1007, 1063, 1002, 11968, 6924, 3126, 2140, 1027, 11968, 3366, 1035, 24471, 2140, 1006, 1002, 24471, 2140, 1007, 1025, 2065, 1006, 4064, 1006, 1002, 11...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Factory.php
Factory.extendDependent
public function extendDependent($rule, $extension, $message = null) { $this->dependentExtensions[$rule] = $extension; if ($message) { $this->fallbackMessages[Str::snake($rule)] = $message; } }
php
public function extendDependent($rule, $extension, $message = null) { $this->dependentExtensions[$rule] = $extension; if ($message) { $this->fallbackMessages[Str::snake($rule)] = $message; } }
[ "public", "function", "extendDependent", "(", "$", "rule", ",", "$", "extension", ",", "$", "message", "=", "null", ")", "{", "$", "this", "->", "dependentExtensions", "[", "$", "rule", "]", "=", "$", "extension", ";", "if", "(", "$", "message", ")", ...
Register a custom dependent validator extension. @param string $rule @param \Closure|string $extension @param string $message @return void
[ "Register", "a", "custom", "dependent", "validator", "extension", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Factory.php#L221-L228
train
Extend dependent extensions
[ 30522, 2270, 3853, 7949, 3207, 11837, 16454, 1006, 1002, 3627, 1010, 1002, 5331, 1010, 1002, 4471, 1027, 19701, 1007, 1063, 1002, 2023, 1011, 1028, 7790, 10288, 29048, 2015, 1031, 1002, 3627, 1033, 1027, 1002, 5331, 1025, 2065, 1006, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.orWhereTime
public function orWhereTime($column, $operator, $value = null) { [$value, $operator] = $this->prepareValueAndOperator( $value, $operator, func_num_args() === 2 ); return $this->whereTime($column, $operator, $value, 'or'); }
php
public function orWhereTime($column, $operator, $value = null) { [$value, $operator] = $this->prepareValueAndOperator( $value, $operator, func_num_args() === 2 ); return $this->whereTime($column, $operator, $value, 'or'); }
[ "public", "function", "orWhereTime", "(", "$", "column", ",", "$", "operator", ",", "$", "value", "=", "null", ")", "{", "[", "$", "value", ",", "$", "operator", "]", "=", "$", "this", "->", "prepareValueAndOperator", "(", "$", "value", ",", "$", "op...
Add an "or where time" statement to the query. @param string $column @param string $operator @param \DateTimeInterface|string $value @return \Illuminate\Database\Query\Builder|static
[ "Add", "an", "or", "where", "time", "statement", "to", "the", "query", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L1173-L1180
train
Add a or where time statement to the query.
[ 30522, 2270, 3853, 2030, 2860, 5886, 20624, 4168, 1006, 1002, 5930, 1010, 1002, 6872, 1010, 1002, 3643, 1027, 19701, 1007, 1063, 1031, 1002, 3643, 1010, 1002, 6872, 1033, 1027, 1002, 2023, 1011, 1028, 7374, 10175, 5657, 28574, 4842, 8844, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Theme.php
Theme.registerHalyconDatasource
public function registerHalyconDatasource() { $resolver = App::make('halcyon'); if (!$resolver->hasDatasource($this->dirName)) { $datasource = new FileDatasource($this->getPath(), App::make('files')); $resolver->addDatasource($this->dirName, $datasource); } }
php
public function registerHalyconDatasource() { $resolver = App::make('halcyon'); if (!$resolver->hasDatasource($this->dirName)) { $datasource = new FileDatasource($this->getPath(), App::make('files')); $resolver->addDatasource($this->dirName, $datasource); } }
[ "public", "function", "registerHalyconDatasource", "(", ")", "{", "$", "resolver", "=", "App", "::", "make", "(", "'halcyon'", ")", ";", "if", "(", "!", "$", "resolver", "->", "hasDatasource", "(", "$", "this", "->", "dirName", ")", ")", "{", "$", "dat...
Ensures this theme is registered as a Halcyon them datasource. @return void
[ "Ensures", "this", "theme", "is", "registered", "as", "a", "Halcyon", "them", "datasource", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/classes/Theme.php#L511-L519
train
Register Halcyon Datasource
[ 30522, 2270, 3853, 4236, 8865, 2100, 8663, 2850, 10230, 8162, 3401, 1006, 1007, 1063, 1002, 10663, 2099, 1027, 10439, 1024, 1024, 2191, 1006, 1005, 11085, 5666, 2239, 1005, 1007, 1025, 2065, 1006, 999, 1002, 10663, 2099, 1011, 1028, 2038, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/CoreVisualizations/Visualizations/Sparkline.php
Sparkline.getValuesFromDataTableMap
protected function getValuesFromDataTableMap($dataTableMap, $columnToPlot) { $dataTableMap->applyQueuedFilters(); $values = array(); foreach ($dataTableMap->getDataTables() as $table) { if ($table->getRowsCount() > 1) { throw new Exception("Expecting only one r...
php
protected function getValuesFromDataTableMap($dataTableMap, $columnToPlot) { $dataTableMap->applyQueuedFilters(); $values = array(); foreach ($dataTableMap->getDataTables() as $table) { if ($table->getRowsCount() > 1) { throw new Exception("Expecting only one r...
[ "protected", "function", "getValuesFromDataTableMap", "(", "$", "dataTableMap", ",", "$", "columnToPlot", ")", "{", "$", "dataTableMap", "->", "applyQueuedFilters", "(", ")", ";", "$", "values", "=", "array", "(", ")", ";", "foreach", "(", "$", "dataTableMap",...
@param DataTable\Map $dataTableMap @param string $columnToPlot @return array @throws \Exception
[ "@param", "DataTable", "\\", "Map", "$dataTableMap", "@param", "string", "$columnToPlot" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/CoreVisualizations/Visualizations/Sparkline.php#L71-L101
train
Returns the values from the data table
[ 30522, 5123, 3853, 2131, 10175, 15808, 19699, 5358, 2850, 29336, 3085, 2863, 2361, 1006, 1002, 2951, 10880, 2863, 2361, 1010, 1002, 5930, 14399, 10994, 1007, 1063, 1002, 2951, 10880, 2863, 2361, 1011, 1028, 6611, 4226, 5657, 20952, 4014, 77...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Validation/Concerns/ReplacesAttributes.php
ReplacesAttributes.replaceAfterOrEqual
protected function replaceAfterOrEqual($message, $attribute, $rule, $parameters) { return $this->replaceBefore($message, $attribute, $rule, $parameters); }
php
protected function replaceAfterOrEqual($message, $attribute, $rule, $parameters) { return $this->replaceBefore($message, $attribute, $rule, $parameters); }
[ "protected", "function", "replaceAfterOrEqual", "(", "$", "message", ",", "$", "attribute", ",", "$", "rule", ",", "$", "parameters", ")", "{", "return", "$", "this", "->", "replaceBefore", "(", "$", "message", ",", "$", "attribute", ",", "$", "rule", ",...
Replace all place-holders for the after_or_equal rule. @param string $message @param string $attribute @param string $rule @param array $parameters @return string
[ "Replace", "all", "place", "-", "holders", "for", "the", "after_or_equal", "rule", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ReplacesAttributes.php#L432-L435
train
Replace all place - holders for the after_or_equal rule.
[ 30522, 5123, 3853, 5672, 10354, 3334, 5686, 26426, 1006, 1002, 4471, 1010, 1002, 17961, 1010, 1002, 3627, 1010, 1002, 11709, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 5672, 4783, 29278, 2063, 1006, 1002, 4471, 1010, 1002, 17961, 1010, 1002,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/OptionsResolver/OptionsResolver.php
OptionsResolver.setNormalizer
public function setNormalizer($option, \Closure $normalizer) { if ($this->locked) { throw new AccessException('Normalizers cannot be set from a lazy option or normalizer.'); } if (!isset($this->defined[$option])) { throw new UndefinedOptionsException(sprintf('The opt...
php
public function setNormalizer($option, \Closure $normalizer) { if ($this->locked) { throw new AccessException('Normalizers cannot be set from a lazy option or normalizer.'); } if (!isset($this->defined[$option])) { throw new UndefinedOptionsException(sprintf('The opt...
[ "public", "function", "setNormalizer", "(", "$", "option", ",", "\\", "Closure", "$", "normalizer", ")", "{", "if", "(", "$", "this", "->", "locked", ")", "{", "throw", "new", "AccessException", "(", "'Normalizers cannot be set from a lazy option or normalizer.'", ...
Sets the normalizer for an option. The normalizer should be a closure with the following signature: function (Options $options, $value) { // ... } The closure is invoked when {@link resolve()} is called. The closure has access to the resolved values of other options through the passed {@link Options} instance. The ...
[ "Sets", "the", "normalizer", "for", "an", "option", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/OptionsResolver/OptionsResolver.php#L477-L493
train
Sets a normalizer for the option
[ 30522, 2270, 3853, 2275, 12131, 9067, 17629, 1006, 1002, 5724, 1010, 1032, 8503, 1002, 3671, 17629, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 5299, 1007, 1063, 5466, 2047, 3229, 10288, 24422, 1006, 1005, 3671, 17629, 2015, 3685, 2022,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.title
public function title($var = null) { if ($var !== null) { $this->title = $var; } if (empty($this->title)) { $this->title = ucfirst($this->slug()); } return $this->title; }
php
public function title($var = null) { if ($var !== null) { $this->title = $var; } if (empty($this->title)) { $this->title = ucfirst($this->slug()); } return $this->title; }
[ "public", "function", "title", "(", "$", "var", "=", "null", ")", "{", "if", "(", "$", "var", "!==", "null", ")", "{", "$", "this", "->", "title", "=", "$", "var", ";", "}", "if", "(", "empty", "(", "$", "this", "->", "title", ")", ")", "{", ...
Gets and sets the title for this Page. If no title is set, it will use the slug() to get a name @param string $var the title of the Page @return string the title of the Page
[ "Gets", "and", "sets", "the", "title", "for", "this", "Page", ".", "If", "no", "title", "is", "set", "it", "will", "use", "the", "slug", "()", "to", "get", "a", "name" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Page/Page.php#L1499-L1509
train
Get the title of the page
[ 30522, 2270, 3853, 2516, 1006, 1002, 13075, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 13075, 999, 1027, 1027, 19701, 1007, 1063, 1002, 2023, 1011, 1028, 2516, 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/Broadcasting/Broadcasters/PusherBroadcaster.php
PusherBroadcaster.decodePusherResponse
protected function decodePusherResponse($request, $response) { if (! $request->input('callback', false)) { return json_decode($response, true); } return response()->json(json_decode($response, true)) ->withCallback($request->callback); }
php
protected function decodePusherResponse($request, $response) { if (! $request->input('callback', false)) { return json_decode($response, true); } return response()->json(json_decode($response, true)) ->withCallback($request->callback); }
[ "protected", "function", "decodePusherResponse", "(", "$", "request", ",", "$", "response", ")", "{", "if", "(", "!", "$", "request", "->", "input", "(", "'callback'", ",", "false", ")", ")", "{", "return", "json_decode", "(", "$", "response", ",", "true...
Decode the given Pusher response. @param \Illuminate\Http\Request $request @param mixed $response @return array
[ "Decode", "the", "given", "Pusher", "response", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php#L88-L96
train
Decode the response from the pusher
[ 30522, 5123, 3853, 21933, 3207, 12207, 5886, 6072, 26029, 3366, 1006, 1002, 5227, 1010, 1002, 3433, 1007, 1063, 2065, 1006, 999, 1002, 5227, 1011, 1028, 7953, 1006, 1005, 2655, 5963, 1005, 1010, 6270, 1007, 1007, 1063, 2709, 1046, 3385, 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/Data/BlueprintSchema.php
BlueprintSchema.filter
public function filter(array $data, $missingValuesAsNull = false, $keepEmptyValues = false) { return $this->filterArray($data, $this->nested, $missingValuesAsNull, $keepEmptyValues); }
php
public function filter(array $data, $missingValuesAsNull = false, $keepEmptyValues = false) { return $this->filterArray($data, $this->nested, $missingValuesAsNull, $keepEmptyValues); }
[ "public", "function", "filter", "(", "array", "$", "data", ",", "$", "missingValuesAsNull", "=", "false", ",", "$", "keepEmptyValues", "=", "false", ")", "{", "return", "$", "this", "->", "filterArray", "(", "$", "data", ",", "$", "this", "->", "nested",...
Filter data by using blueprints. @param array $data Incoming data, for example from a form. @param bool $missingValuesAsNull Include missing values as nulls. @param bool $keepEmptyValues Include empty values. @return array
[ "Filter", "data", "by", "using", "blueprints", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Data/BlueprintSchema.php#L85-L88
train
Filter an array of data into a single level
[ 30522, 2270, 3853, 11307, 1006, 9140, 1002, 2951, 1010, 1002, 4394, 10175, 15808, 3022, 11231, 3363, 1027, 6270, 1010, 1002, 2562, 6633, 13876, 2100, 10175, 15808, 1027, 6270, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 11307, 2906, 9447, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Console/Question/Question.php
Question.setHidden
public function setHidden($hidden) { if ($this->autocompleterCallback) { throw new LogicException('A hidden question cannot use the autocompleter.'); } $this->hidden = (bool) $hidden; return $this; }
php
public function setHidden($hidden) { if ($this->autocompleterCallback) { throw new LogicException('A hidden question cannot use the autocompleter.'); } $this->hidden = (bool) $hidden; return $this; }
[ "public", "function", "setHidden", "(", "$", "hidden", ")", "{", "if", "(", "$", "this", "->", "autocompleterCallback", ")", "{", "throw", "new", "LogicException", "(", "'A hidden question cannot use the autocompleter.'", ")", ";", "}", "$", "this", "->", "hidde...
Sets whether the user response must be hidden or not. @param bool $hidden @return $this @throws LogicException In case the autocompleter is also used
[ "Sets", "whether", "the", "user", "response", "must", "be", "hidden", "or", "not", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Question/Question.php#L82-L91
train
Set whether the question should be hidden
[ 30522, 2270, 3853, 6662, 3593, 4181, 1006, 1002, 5023, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 8285, 9006, 10814, 3334, 9289, 20850, 8684, 1007, 1063, 5466, 2047, 7961, 10288, 24422, 1006, 1005, 1037, 5023, 3160, 3685, 2224, 1996, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Foundation/Bootstrap/LoadEnvironmentVariables.php
LoadEnvironmentVariables.createDotenv
protected function createDotenv($app) { return Dotenv::create( $app->environmentPath(), $app->environmentFile(), new DotenvFactory([new EnvConstAdapter, new ServerConstAdapter, new PutenvAdapter]) ); }
php
protected function createDotenv($app) { return Dotenv::create( $app->environmentPath(), $app->environmentFile(), new DotenvFactory([new EnvConstAdapter, new ServerConstAdapter, new PutenvAdapter]) ); }
[ "protected", "function", "createDotenv", "(", "$", "app", ")", "{", "return", "Dotenv", "::", "create", "(", "$", "app", "->", "environmentPath", "(", ")", ",", "$", "app", "->", "environmentFile", "(", ")", ",", "new", "DotenvFactory", "(", "[", "new", ...
Create a Dotenv instance. @param \Illuminate\Contracts\Foundation\Application $app @return \Dotenv\Dotenv
[ "Create", "a", "Dotenv", "instance", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Bootstrap/LoadEnvironmentVariables.php#L87-L94
train
Create a Dotenv instance
[ 30522, 5123, 3853, 2580, 12184, 2078, 2615, 1006, 1002, 10439, 1007, 1063, 2709, 11089, 2368, 2615, 1024, 1024, 3443, 1006, 1002, 10439, 1011, 1028, 4044, 15069, 1006, 1007, 1010, 1002, 10439, 1011, 1028, 4044, 8873, 2571, 1006, 1007, 1010,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/widgets/Form.php
Form.getTab
public function getTab($tab) { if (isset($this->allTabs->$tab)) { return $this->allTabs->$tab; } return null; }
php
public function getTab($tab) { if (isset($this->allTabs->$tab)) { return $this->allTabs->$tab; } return null; }
[ "public", "function", "getTab", "(", "$", "tab", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "allTabs", "->", "$", "tab", ")", ")", "{", "return", "$", "this", "->", "allTabs", "->", "$", "tab", ";", "}", "return", "null", ";", "}" ]
Get a specified tab object. Options: outside, primary, secondary. @param string $field @return mixed
[ "Get", "a", "specified", "tab", "object", ".", "Options", ":", "outside", "primary", "secondary", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/widgets/Form.php#L1033-L1040
train
Get Tab Information
[ 30522, 2270, 3853, 2131, 2696, 2497, 1006, 1002, 21628, 1007, 1063, 2065, 1006, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 2035, 2696, 5910, 1011, 1028, 1002, 21628, 1007, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 2035, 2696, 5910, 1011, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Cache/Backend/Libmemcached.php
Zend_Cache_Backend_Libmemcached.getFillingPercentage
public function getFillingPercentage() { $mems = $this->_memcache->getStats(); if ($mems === false) { return 0; } $memSize = null; $memUsed = null; foreach ($mems as $key => $mem) { if ($mem === false) { $this->_log('can\'t get...
php
public function getFillingPercentage() { $mems = $this->_memcache->getStats(); if ($mems === false) { return 0; } $memSize = null; $memUsed = null; foreach ($mems as $key => $mem) { if ($mem === false) { $this->_log('can\'t get...
[ "public", "function", "getFillingPercentage", "(", ")", "{", "$", "mems", "=", "$", "this", "->", "_memcache", "->", "getStats", "(", ")", ";", "if", "(", "$", "mems", "===", "false", ")", "{", "return", "0", ";", "}", "$", "memSize", "=", "null", ...
Return the filling percentage of the backend storage @throws Zend_Cache_Exception @return int integer between 0 and 100
[ "Return", "the", "filling", "percentage", "of", "the", "backend", "storage" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Cache/Backend/Libmemcached.php#L366-L396
train
Get filling percentage
[ 30522, 2270, 3853, 2131, 8873, 13112, 4842, 13013, 4270, 1006, 1007, 1063, 1002, 2033, 5244, 1027, 1002, 2023, 1011, 1028, 1035, 2033, 12458, 15395, 1011, 1028, 4152, 29336, 2015, 1006, 1007, 1025, 2065, 1006, 1002, 2033, 5244, 1027, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Connectors/ConnectionFactory.php
ConnectionFactory.createPdoResolverWithHosts
protected function createPdoResolverWithHosts(array $config) { return function () use ($config) { foreach (Arr::shuffle($hosts = $this->parseHosts($config)) as $key => $host) { $config['host'] = $host; try { return $this->createConnector($conf...
php
protected function createPdoResolverWithHosts(array $config) { return function () use ($config) { foreach (Arr::shuffle($hosts = $this->parseHosts($config)) as $key => $host) { $config['host'] = $host; try { return $this->createConnector($conf...
[ "protected", "function", "createPdoResolverWithHosts", "(", "array", "$", "config", ")", "{", "return", "function", "(", ")", "use", "(", "$", "config", ")", "{", "foreach", "(", "Arr", "::", "shuffle", "(", "$", "hosts", "=", "$", "this", "->", "parseHo...
Create a new Closure that resolves to a PDO instance with a specific host or an array of hosts. @param array $config @return \Closure
[ "Create", "a", "new", "Closure", "that", "resolves", "to", "a", "PDO", "instance", "with", "a", "specific", "host", "or", "an", "array", "of", "hosts", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Connectors/ConnectionFactory.php#L175-L190
train
Create a closure that will connect to multiple hosts
[ 30522, 5123, 3853, 3443, 17299, 16610, 4747, 6299, 24415, 15006, 3215, 1006, 9140, 1002, 9530, 8873, 2290, 1007, 1063, 2709, 3853, 1006, 1007, 2224, 1006, 1002, 9530, 8873, 2290, 1007, 1063, 18921, 6776, 1006, 12098, 2099, 1024, 1024, 23046...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.initComponents
protected function initComponents() { if (!$this->layout->isFallBack()) { foreach ($this->layout->settings['components'] as $component => $properties) { list($name, $alias) = strpos($component, ' ') ? explode(' ', $component) : [$component,...
php
protected function initComponents() { if (!$this->layout->isFallBack()) { foreach ($this->layout->settings['components'] as $component => $properties) { list($name, $alias) = strpos($component, ' ') ? explode(' ', $component) : [$component,...
[ "protected", "function", "initComponents", "(", ")", "{", "if", "(", "!", "$", "this", "->", "layout", "->", "isFallBack", "(", ")", ")", "{", "foreach", "(", "$", "this", "->", "layout", "->", "settings", "[", "'components'", "]", "as", "$", "componen...
Initializes the components for the layout and page. @return void
[ "Initializes", "the", "components", "for", "the", "layout", "and", "page", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/classes/Controller.php#L643-L681
train
Initializes the page components
[ 30522, 5123, 3853, 1999, 4183, 9006, 29513, 7666, 1006, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 9621, 1011, 1028, 2003, 13976, 5963, 1006, 1007, 1007, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 9621, 1011, 1028, 10906, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...