repo
stringclasses
21 values
path
stringlengths
10
100
func_name
stringlengths
6
71
original_string
stringlengths
115
97k
language
stringclasses
1 value
code
stringlengths
115
97k
code_tokens
listlengths
27
7.5k
docstring
stringlengths
6
1.88k
docstring_tokens
listlengths
1
177
sha
stringclasses
21 values
url
stringlengths
100
189
partition
stringclasses
1 value
summary
stringlengths
9
340
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
octobercms/october
modules/system/classes/MailManager.php
MailManager.startTwig
protected function startTwig() { if ($this->isTwigStarted) { return; } $this->isTwigStarted = true; $markupManager = MarkupManager::instance(); $markupManager->beginTransaction(); $markupManager->registerTokenParsers([ new MailPartialTokenPar...
php
protected function startTwig() { if ($this->isTwigStarted) { return; } $this->isTwigStarted = true; $markupManager = MarkupManager::instance(); $markupManager->beginTransaction(); $markupManager->registerTokenParsers([ new MailPartialTokenPar...
[ "protected", "function", "startTwig", "(", ")", "{", "if", "(", "$", "this", "->", "isTwigStarted", ")", "{", "return", ";", "}", "$", "this", "->", "isTwigStarted", "=", "true", ";", "$", "markupManager", "=", "MarkupManager", "::", "instance", "(", ")"...
Temporarily registers mail based token parsers with Twig. @return void
[ "Temporarily", "registers", "mail", "based", "token", "parsers", "with", "Twig", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/classes/MailManager.php#L296-L309
train
Starts Twig.
[ 30522, 5123, 3853, 2707, 2102, 16279, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 21541, 16279, 14117, 3064, 1007, 1063, 2709, 1025, 1065, 1002, 2023, 1011, 1028, 21541, 16279, 14117, 3064, 1027, 2995, 1025, 1002, 2928, 6279, 2480...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Form/Extension/Core/Type/CollectionType.php
CollectionType.buildView
public function buildView(FormView $view, FormInterface $form, array $options) { $view->vars = array_replace($view->vars, [ 'allow_add' => $options['allow_add'], 'allow_delete' => $options['allow_delete'], ]); if ($form->getConfig()->hasAttribute('prototype')) { ...
php
public function buildView(FormView $view, FormInterface $form, array $options) { $view->vars = array_replace($view->vars, [ 'allow_add' => $options['allow_add'], 'allow_delete' => $options['allow_delete'], ]); if ($form->getConfig()->hasAttribute('prototype')) { ...
[ "public", "function", "buildView", "(", "FormView", "$", "view", ",", "FormInterface", "$", "form", ",", "array", "$", "options", ")", "{", "$", "view", "->", "vars", "=", "array_replace", "(", "$", "view", "->", "vars", ",", "[", "'allow_add'", "=>", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/Extension/Core/Type/CollectionType.php#L57-L68
train
Build the view
[ 30522, 2270, 3853, 3857, 8584, 1006, 2433, 8584, 1002, 3193, 1010, 2433, 18447, 2121, 12172, 1002, 2433, 1010, 9140, 1002, 7047, 1007, 1063, 1002, 3193, 1011, 1028, 13075, 2015, 1027, 9140, 1035, 5672, 1006, 1002, 3193, 1011, 1028, 13075, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
overtrue/wechat
src/OpenPlatform/Application.php
Application.getPreAuthorizationUrl
public function getPreAuthorizationUrl(string $callbackUrl, $optional = []): string { // 兼容旧版 API 设计 if (\is_string($optional)) { $optional = [ 'pre_auth_code' => $optional, ]; } else { $optional['pre_auth_code'] = $this->createPreAuthoriza...
php
public function getPreAuthorizationUrl(string $callbackUrl, $optional = []): string { // 兼容旧版 API 设计 if (\is_string($optional)) { $optional = [ 'pre_auth_code' => $optional, ]; } else { $optional['pre_auth_code'] = $this->createPreAuthoriza...
[ "public", "function", "getPreAuthorizationUrl", "(", "string", "$", "callbackUrl", ",", "$", "optional", "=", "[", "]", ")", ":", "string", "{", "// 兼容旧版 API 设计", "if", "(", "\\", "is_string", "(", "$", "optional", ")", ")", "{", "$", "optional", "=", "[...
Return the pre-authorization login page url. @param string $callbackUrl @param string|array|null $optional @return string
[ "Return", "the", "pre", "-", "authorization", "login", "page", "url", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OpenPlatform/Application.php#L119-L136
train
Get pre authorization url
[ 30522, 2270, 3853, 2131, 28139, 4887, 27844, 3989, 3126, 2140, 1006, 5164, 1002, 2655, 5963, 3126, 2140, 1010, 1002, 11887, 1027, 1031, 1033, 1007, 1024, 5164, 1063, 1013, 1013, 100, 100, 100, 1907, 17928, 100, 100, 2065, 1006, 1032, 2003...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Queue/Console/TableCommand.php
TableCommand.handle
public function handle() { $table = $this->laravel['config']['queue.connections.database.table']; $this->replaceMigration( $this->createBaseMigration($table), $table, Str::studly($table) ); $this->info('Migration created successfully!'); $this->composer->dumpAu...
php
public function handle() { $table = $this->laravel['config']['queue.connections.database.table']; $this->replaceMigration( $this->createBaseMigration($table), $table, Str::studly($table) ); $this->info('Migration created successfully!'); $this->composer->dumpAu...
[ "public", "function", "handle", "(", ")", "{", "$", "table", "=", "$", "this", "->", "laravel", "[", "'config'", "]", "[", "'queue.connections.database.table'", "]", ";", "$", "this", "->", "replaceMigration", "(", "$", "this", "->", "createBaseMigration", "...
Execute the console command. @return void
[ "Execute", "the", "console", "command", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Queue/Console/TableCommand.php#L58-L69
train
Create base migration and dump autoloader
[ 30522, 2270, 3853, 5047, 1006, 1007, 1063, 1002, 2795, 1027, 1002, 2023, 1011, 1028, 13679, 15985, 1031, 1005, 9530, 8873, 2290, 1005, 1033, 1031, 1005, 24240, 1012, 7264, 1012, 7809, 1012, 2795, 1005, 1033, 1025, 1002, 2023, 1011, 1028, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Db/Table/Row/Abstract.php
Zend_Db_Table_Row_Abstract.setFromArray
public function setFromArray(array $data) { $data = array_intersect_key($data, $this->_data); foreach ($data as $columnName => $value) { $this->__set($columnName, $value); } return $this; }
php
public function setFromArray(array $data) { $data = array_intersect_key($data, $this->_data); foreach ($data as $columnName => $value) { $this->__set($columnName, $value); } return $this; }
[ "public", "function", "setFromArray", "(", "array", "$", "data", ")", "{", "$", "data", "=", "array_intersect_key", "(", "$", "data", ",", "$", "this", "->", "_data", ")", ";", "foreach", "(", "$", "data", "as", "$", "columnName", "=>", "$", "value", ...
Sets all data in the row from an array. @param array $data @return Zend_Db_Table_Row_Abstract Provides a fluent interface
[ "Sets", "all", "data", "in", "the", "row", "from", "an", "array", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Table/Row/Abstract.php#L666-L675
train
Set the values of the object from an array
[ 30522, 2270, 3853, 2275, 19699, 9626, 11335, 2100, 1006, 9140, 1002, 2951, 1007, 1063, 1002, 2951, 1027, 9140, 1035, 29261, 1035, 3145, 1006, 1002, 2951, 1010, 1002, 2023, 1011, 1028, 1035, 2951, 1007, 1025, 18921, 6776, 1006, 1002, 2951, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/DomCrawler/Crawler.php
Crawler.xpathLiteral
public static function xpathLiteral($s) { if (false === strpos($s, "'")) { return sprintf("'%s'", $s); } if (false === strpos($s, '"')) { return sprintf('"%s"', $s); } $string = $s; $parts = []; while (true) { if (false !=...
php
public static function xpathLiteral($s) { if (false === strpos($s, "'")) { return sprintf("'%s'", $s); } if (false === strpos($s, '"')) { return sprintf('"%s"', $s); } $string = $s; $parts = []; while (true) { if (false !=...
[ "public", "static", "function", "xpathLiteral", "(", "$", "s", ")", "{", "if", "(", "false", "===", "strpos", "(", "$", "s", ",", "\"'\"", ")", ")", "{", "return", "sprintf", "(", "\"'%s'\"", ",", "$", "s", ")", ";", "}", "if", "(", "false", "===...
Converts string for XPath expressions. Escaped characters are: quotes (") and apostrophe ('). Examples: echo Crawler::xpathLiteral('foo " bar'); //prints 'foo " bar' echo Crawler::xpathLiteral("foo ' bar"); //prints "foo ' bar" echo Crawler::xpathLiteral('a\'b"c'); //prints concat('a', "'", 'b"c') @param string ...
[ "Converts", "string", "for", "XPath", "expressions", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DomCrawler/Crawler.php#L928-L952
train
Converts a string like a xpath literal to a string
[ 30522, 2270, 10763, 3853, 26726, 8988, 22779, 7941, 1006, 1002, 1055, 1007, 1063, 2065, 1006, 6270, 1027, 1027, 1027, 2358, 14536, 2891, 1006, 1002, 1055, 1010, 1000, 1005, 1000, 1007, 1007, 1063, 2709, 9043, 2546, 1006, 1000, 1005, 1003, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Framework/Flex/FlexForm.php
FlexForm.filterData
protected function filterData(\ArrayAccess $data): void { if ($data instanceof Data) { $data->filter(true, true); } }
php
protected function filterData(\ArrayAccess $data): void { if ($data instanceof Data) { $data->filter(true, true); } }
[ "protected", "function", "filterData", "(", "\\", "ArrayAccess", "$", "data", ")", ":", "void", "{", "if", "(", "$", "data", "instanceof", "Data", ")", "{", "$", "data", "->", "filter", "(", "true", ",", "true", ")", ";", "}", "}" ]
Filter validated data. @param \ArrayAccess $data
[ "Filter", "validated", "data", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Framework/Flex/FlexForm.php#L337-L342
train
Filter data to avoid memory leaks
[ 30522, 5123, 3853, 11307, 2850, 2696, 1006, 1032, 9140, 6305, 9623, 2015, 1002, 2951, 1007, 1024, 11675, 1063, 2065, 1006, 1002, 2951, 6013, 11253, 2951, 1007, 1063, 1002, 2951, 1011, 1028, 11307, 1006, 2995, 1010, 2995, 1007, 1025, 1065, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/UserCountry/LocationProvider/GeoIp/Pecl.php
Pecl.getInfo
public function getInfo() { $desc = Piwik::translate('UserCountry_GeoIpLocationProviderDesc_Pecl1') . '<br/><br/>' . Piwik::translate('UserCountry_GeoIpLocationProviderDesc_Pecl2'); $installDocs = '<a rel="noreferrer noopener" target="_blank" href="https://matomo.org/faq/how-to/#faq_164...
php
public function getInfo() { $desc = Piwik::translate('UserCountry_GeoIpLocationProviderDesc_Pecl1') . '<br/><br/>' . Piwik::translate('UserCountry_GeoIpLocationProviderDesc_Pecl2'); $installDocs = '<a rel="noreferrer noopener" target="_blank" href="https://matomo.org/faq/how-to/#faq_164...
[ "public", "function", "getInfo", "(", ")", "{", "$", "desc", "=", "Piwik", "::", "translate", "(", "'UserCountry_GeoIpLocationProviderDesc_Pecl1'", ")", ".", "'<br/><br/>'", ".", "Piwik", "::", "translate", "(", "'UserCountry_GeoIpLocationProviderDesc_Pecl2'", ")", ";...
Returns information about this location provider. Contains an id, title & description: array( 'id' => 'geoip_pecl', 'title' => '...', 'description' => '...' ); @return array
[ "Returns", "information", "about", "this", "location", "provider", ".", "Contains", "an", "id", "title", "&", "description", ":" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/UserCountry/LocationProvider/GeoIp/Pecl.php#L216-L262
train
Returns the info about the country
[ 30522, 2270, 3853, 2131, 2378, 14876, 1006, 1007, 1063, 1002, 4078, 2278, 1027, 14255, 9148, 2243, 1024, 1024, 17637, 1006, 1005, 5310, 3597, 16671, 2854, 1035, 20248, 11514, 4135, 10719, 21572, 17258, 2121, 6155, 2278, 1035, 21877, 20464, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Config/Writer.php
Zend_Config_Writer.setOptions
public function setOptions(array $options) { foreach ($options as $key => $value) { if (in_array(strtolower($key), $this->_skipOptions)) { continue; } $method = 'set' . ucfirst($key); if (method_exists($this, $method)) { $this-...
php
public function setOptions(array $options) { foreach ($options as $key => $value) { if (in_array(strtolower($key), $this->_skipOptions)) { continue; } $method = 'set' . ucfirst($key); if (method_exists($this, $method)) { $this-...
[ "public", "function", "setOptions", "(", "array", "$", "options", ")", "{", "foreach", "(", "$", "options", "as", "$", "key", "=>", "$", "value", ")", "{", "if", "(", "in_array", "(", "strtolower", "(", "$", "key", ")", ",", "$", "this", "->", "_sk...
Set options via an array @param array $options @return Zend_Config_Writer
[ "Set", "options", "via", "an", "array" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Config/Writer.php#L79-L93
train
Set options for this object
[ 30522, 2270, 3853, 2275, 30524, 1063, 3613, 1025, 1065, 1002, 4118, 1027, 1005, 2275, 1005, 1012, 15384, 8873, 12096, 1006, 1002, 3145, 1007, 1025, 2065, 1006, 4118, 1035, 6526, 1006, 1002, 2023, 1010, 1002, 4118, 1007, 1007, 1063, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Db/Adapter/Mysqli.php
Zend_Db_Adapter_Mysqli.prepare
public function prepare($sql) { $this->_connect(); if ($this->_stmt) { $this->_stmt->close(); } $stmtClass = $this->_defaultStmtClass; if (!class_exists($stmtClass)) { // require_once 'Zend/Loader.php'; Zend_Loader::loadClass($stmtClass); ...
php
public function prepare($sql) { $this->_connect(); if ($this->_stmt) { $this->_stmt->close(); } $stmtClass = $this->_defaultStmtClass; if (!class_exists($stmtClass)) { // require_once 'Zend/Loader.php'; Zend_Loader::loadClass($stmtClass); ...
[ "public", "function", "prepare", "(", "$", "sql", ")", "{", "$", "this", "->", "_connect", "(", ")", ";", "if", "(", "$", "this", "->", "_stmt", ")", "{", "$", "this", "->", "_stmt", "->", "close", "(", ")", ";", "}", "$", "stmtClass", "=", "$"...
Prepare a statement and return a PDOStatement-like object. @param string $sql SQL query @return Zend_Db_Statement_Mysqli
[ "Prepare", "a", "statement", "and", "return", "a", "PDOStatement", "-", "like", "object", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Adapter/Mysqli.php#L406-L424
train
Prepare statement for execution
[ 30522, 2270, 3853, 7374, 1006, 1002, 29296, 1007, 1063, 1002, 2023, 1011, 1028, 1035, 7532, 1006, 1007, 1025, 2065, 1006, 1002, 2023, 1011, 1028, 1035, 2358, 20492, 1007, 1063, 1002, 2023, 1011, 1028, 1035, 2358, 20492, 1011, 1028, 2485, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/View.php
View.assign
public function assign($var, $value = null) { if (is_string($var)) { $this->$var = $value; } elseif (is_array($var)) { foreach ($var as $key => $value) { $this->$key = $value; } } }
php
public function assign($var, $value = null) { if (is_string($var)) { $this->$var = $value; } elseif (is_array($var)) { foreach ($var as $key => $value) { $this->$key = $value; } } }
[ "public", "function", "assign", "(", "$", "var", ",", "$", "value", "=", "null", ")", "{", "if", "(", "is_string", "(", "$", "var", ")", ")", "{", "$", "this", "->", "$", "var", "=", "$", "value", ";", "}", "elseif", "(", "is_array", "(", "$", ...
Assign value to a variable for use in a template @param string|array $var @param mixed $value @ignore
[ "Assign", "value", "to", "a", "variable", "for", "use", "in", "a", "template" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/View.php#L410-L419
train
Assign a value to the class variables
[ 30522, 2270, 3853, 23911, 1006, 1002, 13075, 1010, 1002, 3643, 1027, 19701, 1007, 1063, 2065, 1006, 2003, 1035, 5164, 1006, 1002, 13075, 1007, 1007, 1063, 1002, 2023, 1011, 1028, 1002, 13075, 1027, 1002, 3643, 1025, 1065, 2842, 10128, 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/Translation/Dumper/PhpFileDumper.php
PhpFileDumper.formatCatalogue
public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = []) { return "<?php\n\nreturn ".var_export($messages->all($domain), true).";\n"; }
php
public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = []) { return "<?php\n\nreturn ".var_export($messages->all($domain), true).";\n"; }
[ "public", "function", "formatCatalogue", "(", "MessageCatalogue", "$", "messages", ",", "$", "domain", ",", "array", "$", "options", "=", "[", "]", ")", "{", "return", "\"<?php\\n\\nreturn \"", ".", "var_export", "(", "$", "messages", "->", "all", "(", "$", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Translation/Dumper/PhpFileDumper.php#L26-L29
train
Format the message catalogue into a PHP string
[ 30522, 2270, 3853, 4289, 11266, 23067, 9077, 1006, 4471, 11266, 23067, 9077, 1002, 7696, 1010, 1002, 5884, 1010, 9140, 1002, 7047, 1027, 1031, 1033, 1007, 1063, 2709, 1000, 1026, 1029, 25718, 1032, 1050, 1032, 17212, 3388, 14287, 1000, 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...
barryvdh/laravel-debugbar
src/DataCollector/LaravelCollector.php
LaravelCollector.collect
public function collect() { // Fallback if not injected $app = $this->app ?: app(); return [ "version" => $app::VERSION, "environment" => $app->environment(), "locale" => $app->getLocale(), ]; }
php
public function collect() { // Fallback if not injected $app = $this->app ?: app(); return [ "version" => $app::VERSION, "environment" => $app->environment(), "locale" => $app->getLocale(), ]; }
[ "public", "function", "collect", "(", ")", "{", "// Fallback if not injected", "$", "app", "=", "$", "this", "->", "app", "?", ":", "app", "(", ")", ";", "return", "[", "\"version\"", "=>", "$", "app", "::", "VERSION", ",", "\"environment\"", "=>", "$", ...
{@inheritDoc}
[ "{" ]
2d195779ea4f809f69764a795e2ec371dbb76a96
https://github.com/barryvdh/laravel-debugbar/blob/2d195779ea4f809f69764a795e2ec371dbb76a96/src/DataCollector/LaravelCollector.php#L25-L35
train
Collect the array of all the configuration options
[ 30522, 2270, 3853, 8145, 1006, 1007, 1063, 1013, 1013, 2991, 5963, 2065, 2025, 19737, 1002, 10439, 1027, 1002, 2023, 1011, 1028, 10439, 1029, 1024, 10439, 1006, 1007, 1025, 2709, 1031, 1000, 2544, 1000, 1027, 1028, 1002, 10439, 1024, 1024, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Bridge/Twig/Extension/WorkflowExtension.php
WorkflowExtension.canTransition
public function canTransition($subject, $transitionName, $name = null) { return $this->workflowRegistry->get($subject, $name)->can($subject, $transitionName); }
php
public function canTransition($subject, $transitionName, $name = null) { return $this->workflowRegistry->get($subject, $name)->can($subject, $transitionName); }
[ "public", "function", "canTransition", "(", "$", "subject", ",", "$", "transitionName", ",", "$", "name", "=", "null", ")", "{", "return", "$", "this", "->", "workflowRegistry", "->", "get", "(", "$", "subject", ",", "$", "name", ")", "->", "can", "(",...
Returns true if the transition is enabled. @param object $subject A subject @param string $transitionName A transition @param string $name A workflow name @return bool true if the transition is enabled
[ "Returns", "true", "if", "the", "transition", "is", "enabled", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bridge/Twig/Extension/WorkflowExtension.php#L55-L58
train
Can transition a subject
[ 30522, 2270, 3853, 2064, 6494, 3619, 22753, 1006, 1002, 3395, 1010, 1002, 6653, 18442, 1010, 1002, 2171, 1027, 19701, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 2147, 12314, 2890, 24063, 2854, 1011, 1028, 2131, 1006, 1002, 3395, 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...
laravel/framework
src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php
BelongsToMany.updateOrCreate
public function updateOrCreate(array $attributes, array $values = [], array $joining = [], $touch = true) { if (is_null($instance = $this->where($attributes)->first())) { return $this->create($values, $joining, $touch); } $instance->fill($values); $instance->save(['touc...
php
public function updateOrCreate(array $attributes, array $values = [], array $joining = [], $touch = true) { if (is_null($instance = $this->where($attributes)->first())) { return $this->create($values, $joining, $touch); } $instance->fill($values); $instance->save(['touc...
[ "public", "function", "updateOrCreate", "(", "array", "$", "attributes", ",", "array", "$", "values", "=", "[", "]", ",", "array", "$", "joining", "=", "[", "]", ",", "$", "touch", "=", "true", ")", "{", "if", "(", "is_null", "(", "$", "instance", ...
Create or update a related record matching the attributes, and fill it with values. @param array $attributes @param array $values @param array $joining @param bool $touch @return \Illuminate\Database\Eloquent\Model
[ "Create", "or", "update", "a", "related", "record", "matching", "the", "attributes", "and", "fill", "it", "with", "values", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php#L485-L496
train
Update or Create a record if it doesn t exist
[ 30522, 2270, 3853, 10651, 2953, 16748, 3686, 1006, 9140, 1002, 12332, 1010, 9140, 1002, 5300, 1027, 1031, 1033, 1010, 9140, 1002, 5241, 1027, 1031, 1033, 1010, 1002, 3543, 1027, 2995, 1007, 1063, 2065, 1006, 2003, 1035, 19701, 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/Period/Range.php
Range.processOptimalSubperiods
protected function processOptimalSubperiods($startDate, $endDate) { while ($startDate->isEarlier($endDate) || $startDate == $endDate) { $endOfPeriod = null; $month = new Month($startDate); $endOfMonth = $month->getDateEnd(); $startOfMonth...
php
protected function processOptimalSubperiods($startDate, $endDate) { while ($startDate->isEarlier($endDate) || $startDate == $endDate) { $endOfPeriod = null; $month = new Month($startDate); $endOfMonth = $month->getDateEnd(); $startOfMonth...
[ "protected", "function", "processOptimalSubperiods", "(", "$", "startDate", ",", "$", "endDate", ")", "{", "while", "(", "$", "startDate", "->", "isEarlier", "(", "$", "endDate", ")", "||", "$", "startDate", "==", "$", "endDate", ")", "{", "$", "endOfPerio...
Determine which kind of period is best to use. See Range.test.php @param Date $startDate @param Date $endDate
[ "Determine", "which", "kind", "of", "period", "is", "best", "to", "use", ".", "See", "Range", ".", "test", ".", "php" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Period/Range.php#L325-L400
train
Process Optimal Subperiods
[ 30522, 5123, 3853, 2832, 7361, 3775, 9067, 6342, 2497, 4842, 3695, 5104, 1006, 1002, 2707, 13701, 1010, 1002, 2203, 13701, 1007, 1063, 2096, 1006, 1002, 2707, 13701, 1011, 1028, 2003, 14644, 14355, 1006, 1002, 2203, 13701, 1007, 1064, 1064,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Page/Page.php
Page.getContentMeta
public function getContentMeta($name = null) { if ($name) { if (isset($this->content_meta[$name])) { return $this->content_meta[$name]; } return null; } return $this->content_meta; }
php
public function getContentMeta($name = null) { if ($name) { if (isset($this->content_meta[$name])) { return $this->content_meta[$name]; } return null; } return $this->content_meta; }
[ "public", "function", "getContentMeta", "(", "$", "name", "=", "null", ")", "{", "if", "(", "$", "name", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "content_meta", "[", "$", "name", "]", ")", ")", "{", "return", "$", "this", "->", "con...
Return the whole contentMeta array as it currently stands @param string|null $name @return string
[ "Return", "the", "whole", "contentMeta", "array", "as", "it", "currently", "stands" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Page/Page.php#L789-L800
train
Get content meta
[ 30522, 2270, 3853, 2131, 8663, 6528, 21246, 12928, 1006, 1002, 2171, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 2171, 1007, 1063, 2065, 1006, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 4180, 1035, 18804, 1031, 1002, 2171, 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/Intl/NumberFormatter/NumberFormatter.php
NumberFormatter.create
public static function create($locale = 'en', $style = null, $pattern = null) { return new self($locale, $style, $pattern); }
php
public static function create($locale = 'en', $style = null, $pattern = null) { return new self($locale, $style, $pattern); }
[ "public", "static", "function", "create", "(", "$", "locale", "=", "'en'", ",", "$", "style", "=", "null", ",", "$", "pattern", "=", "null", ")", "{", "return", "new", "self", "(", "$", "locale", ",", "$", "style", ",", "$", "pattern", ")", ";", ...
Static constructor. @param string $locale The locale code. The only supported locale is "en" (or null using the default locale, i.e. "en") @param int $style Style of the formatting, one of the format style constants. The only currently supported styles are NumberFormatter::DECIMAL and NumberFormatter::CURRENCY. ...
[ "Static", "constructor", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php#L299-L302
train
Create a new Locale Style Pattern
[ 30522, 2270, 10763, 3853, 3443, 1006, 1002, 2334, 2063, 1027, 1005, 4372, 1005, 1010, 1002, 2806, 1027, 19701, 1010, 1002, 5418, 1027, 19701, 1007, 1063, 2709, 2047, 2969, 1006, 1002, 2334, 2063, 1010, 1002, 2806, 1010, 1002, 5418, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/Annotations/AnnotationList.php
AnnotationList.augmentAnnotationData
private function augmentAnnotationData($idSite, $idNote, &$annotation) { $annotation['idNote'] = $idNote; $annotation['canEditOrDelete'] = self::canUserModifyOrDelete($idSite, $annotation); // we don't supply user info if the current user is anonymous if (Piwik::isUserIsAnonymous())...
php
private function augmentAnnotationData($idSite, $idNote, &$annotation) { $annotation['idNote'] = $idNote; $annotation['canEditOrDelete'] = self::canUserModifyOrDelete($idSite, $annotation); // we don't supply user info if the current user is anonymous if (Piwik::isUserIsAnonymous())...
[ "private", "function", "augmentAnnotationData", "(", "$", "idSite", ",", "$", "idNote", ",", "&", "$", "annotation", ")", "{", "$", "annotation", "[", "'idNote'", "]", "=", "$", "idNote", ";", "$", "annotation", "[", "'canEditOrDelete'", "]", "=", "self", ...
Adds extra data to an annotation, including the annotation's ID and whether the current user can edit or delete it. Also, if the current user is anonymous, the user attribute is removed. @param int $idSite @param int $idNote @param array $annotation
[ "Adds", "extra", "data", "to", "an", "annotation", "including", "the", "annotation", "s", "ID", "and", "whether", "the", "current", "user", "can", "edit", "or", "delete", "it", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Annotations/AnnotationList.php#L408-L417
train
augment the annotation data with the correct idNote and canEditOrDelete values
[ 30522, 2797, 3853, 15476, 3672, 11639, 17287, 3508, 2850, 2696, 1006, 1002, 8909, 28032, 2063, 1010, 1002, 8909, 22074, 1010, 1004, 30524, 5302, 4305, 12031, 8551, 12260, 2618, 1006, 1002, 8909, 28032, 2063, 1010, 1002, 5754, 17287, 3508, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Concerns/ManagesTransactions.php
ManagesTransactions.commit
public function commit() { if ($this->transactions == 1) { $this->getPdo()->commit(); } $this->transactions = max(0, $this->transactions - 1); $this->fireConnectionEvent('committed'); }
php
public function commit() { if ($this->transactions == 1) { $this->getPdo()->commit(); } $this->transactions = max(0, $this->transactions - 1); $this->fireConnectionEvent('committed'); }
[ "public", "function", "commit", "(", ")", "{", "if", "(", "$", "this", "->", "transactions", "==", "1", ")", "{", "$", "this", "->", "getPdo", "(", ")", "->", "commit", "(", ")", ";", "}", "$", "this", "->", "transactions", "=", "max", "(", "0", ...
Commit the active database transaction. @return void
[ "Commit", "the", "active", "database", "transaction", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Concerns/ManagesTransactions.php#L154-L163
train
Commit all transactions
[ 30522, 2270, 3853, 10797, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 11817, 1027, 1027, 1015, 1007, 1063, 1002, 2023, 1011, 1028, 2131, 17299, 2080, 1006, 1007, 1011, 1028, 10797, 1006, 1007, 1025, 1065, 1002, 2023, 1011, 1028, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Validate/File/Exists.php
Zend_Validate_File_Exists.getDirectory
public function getDirectory($asArray = false) { $asArray = (bool) $asArray; $directory = (string) $this->_directory; if ($asArray) { $directory = explode(',', $directory); } return $directory; }
php
public function getDirectory($asArray = false) { $asArray = (bool) $asArray; $directory = (string) $this->_directory; if ($asArray) { $directory = explode(',', $directory); } return $directory; }
[ "public", "function", "getDirectory", "(", "$", "asArray", "=", "false", ")", "{", "$", "asArray", "=", "(", "bool", ")", "$", "asArray", ";", "$", "directory", "=", "(", "string", ")", "$", "this", "->", "_directory", ";", "if", "(", "$", "asArray",...
Returns the set file directories which are checked @param boolean $asArray Returns the values as array, when false an concated string is returned @return string
[ "Returns", "the", "set", "file", "directories", "which", "are", "checked" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Validate/File/Exists.php#L88-L97
train
Get directory of the file
[ 30522, 2270, 3853, 2131, 4305, 2890, 16761, 2100, 1006, 1002, 17306, 11335, 2100, 1027, 6270, 1007, 1063, 1002, 17306, 11335, 2100, 1027, 1006, 22017, 2140, 1007, 1002, 17306, 11335, 2100, 1025, 1002, 14176, 1027, 1006, 5164, 1007, 1002, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Plugin/ComponentFactory.php
ComponentFactory.factory
public static function factory($pluginName, $componentClassSimpleName, $componentTypeClass) { if (empty($pluginName) || empty($componentClassSimpleName)) { Log::debug("ComponentFactory::%s: empty plugin name or component simple name requested (%s, %s)", __FUNCTION__, $pluginName,...
php
public static function factory($pluginName, $componentClassSimpleName, $componentTypeClass) { if (empty($pluginName) || empty($componentClassSimpleName)) { Log::debug("ComponentFactory::%s: empty plugin name or component simple name requested (%s, %s)", __FUNCTION__, $pluginName,...
[ "public", "static", "function", "factory", "(", "$", "pluginName", ",", "$", "componentClassSimpleName", ",", "$", "componentTypeClass", ")", "{", "if", "(", "empty", "(", "$", "pluginName", ")", "||", "empty", "(", "$", "componentClassSimpleName", ")", ")", ...
Create a component instance that exists within a specific plugin. Uses the component's unqualified class name and expected base type. This method will only create a class if it is located within the component type's associated subdirectory. @param string $pluginName The name of the plugin the component is expected to...
[ "Create", "a", "component", "instance", "that", "exists", "within", "a", "specific", "plugin", ".", "Uses", "the", "component", "s", "unqualified", "class", "name", "and", "expected", "base", "type", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Plugin/ComponentFactory.php#L37-L65
train
Factory method to create a new component
[ 30522, 2270, 10763, 3853, 4713, 1006, 1002, 13354, 23111, 14074, 1010, 1002, 6922, 26266, 5332, 23344, 18442, 1010, 1002, 6922, 13874, 26266, 1007, 1063, 2065, 1006, 4064, 1006, 1002, 13354, 23111, 14074, 1007, 1064, 1064, 4064, 1006, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Show.php
Show.handleModelField
protected function handleModelField($method, $label) { if (in_array($method, $this->model->getAttributes())) { return $this->addField($method, $label); } return false; }
php
protected function handleModelField($method, $label) { if (in_array($method, $this->model->getAttributes())) { return $this->addField($method, $label); } return false; }
[ "protected", "function", "handleModelField", "(", "$", "method", ",", "$", "label", ")", "{", "if", "(", "in_array", "(", "$", "method", ",", "$", "this", "->", "model", "->", "getAttributes", "(", ")", ")", ")", "{", "return", "$", "this", "->", "ad...
Handle model field. @param string $method @param string $label @return bool|Field
[ "Handle", "model", "field", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Show.php#L490-L497
train
Handle Model Field
[ 30522, 5123, 3853, 5047, 5302, 9247, 3790, 1006, 1002, 4118, 1010, 1002, 3830, 1007, 1063, 2065, 1006, 1999, 1035, 9140, 1006, 1002, 4118, 1010, 1002, 2023, 1011, 1028, 2944, 1011, 1028, 2131, 19321, 3089, 8569, 4570, 1006, 1007, 1007, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Validator/Mapping/ClassMetadata.php
ClassMetadata.addPropertyConstraint
public function addPropertyConstraint($property, Constraint $constraint) { if (!isset($this->properties[$property])) { $this->properties[$property] = new PropertyMetadata($this->getClassName(), $property); $this->addPropertyMetadata($this->properties[$property]); } ...
php
public function addPropertyConstraint($property, Constraint $constraint) { if (!isset($this->properties[$property])) { $this->properties[$property] = new PropertyMetadata($this->getClassName(), $property); $this->addPropertyMetadata($this->properties[$property]); } ...
[ "public", "function", "addPropertyConstraint", "(", "$", "property", ",", "Constraint", "$", "constraint", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "properties", "[", "$", "property", "]", ")", ")", "{", "$", "this", "->", "properties",...
Adds a constraint to the given property. @param string $property The name of the property @param Constraint $constraint The constraint @return $this
[ "Adds", "a", "constraint", "to", "the", "given", "property", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Validator/Mapping/ClassMetadata.php#L213-L226
train
Add a property constraint
[ 30522, 2270, 3853, 5587, 21572, 4842, 3723, 8663, 20528, 18447, 1006, 1002, 3200, 1010, 27142, 1002, 27142, 1007, 1063, 2065, 30524, 5144, 1031, 1002, 3200, 1033, 1027, 2047, 3200, 11368, 8447, 2696, 1006, 1002, 2023, 1011, 1028, 2131, 2626...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/cms/twig/Loader.php
Loader.isFresh
public function isFresh($name, $time) { if (!$this->validateCmsObject($name)) { return parent::isFresh($name, $time); } return $this->obj->mtime <= $time; }
php
public function isFresh($name, $time) { if (!$this->validateCmsObject($name)) { return parent::isFresh($name, $time); } return $this->obj->mtime <= $time; }
[ "public", "function", "isFresh", "(", "$", "name", ",", "$", "time", ")", "{", "if", "(", "!", "$", "this", "->", "validateCmsObject", "(", "$", "name", ")", ")", "{", "return", "parent", "::", "isFresh", "(", "$", "name", ",", "$", "time", ")", ...
Determines if the content is fresh.
[ "Determines", "if", "the", "content", "is", "fresh", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/twig/Loader.php#L81-L88
train
Returns true if the object is fresh.
[ 30522, 2270, 3853, 2003, 19699, 9953, 1006, 1002, 2171, 1010, 1002, 2051, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 9398, 3686, 27487, 6499, 2497, 20614, 1006, 1002, 2171, 1007, 1007, 1063, 2709, 6687, 1024, 1024, 2003, 19699, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/DataTable/Filter/ColumnDelete.php
ColumnDelete.filter
public function filter($table) { // always do recursive filter $this->enableRecursive(true); $recurse = false; // only recurse if there are columns to remove/keep // remove columns specified in $this->columnsToRemove if (!empty($this->columnsToRemove)) { $this->r...
php
public function filter($table) { // always do recursive filter $this->enableRecursive(true); $recurse = false; // only recurse if there are columns to remove/keep // remove columns specified in $this->columnsToRemove if (!empty($this->columnsToRemove)) { $this->r...
[ "public", "function", "filter", "(", "$", "table", ")", "{", "// always do recursive filter", "$", "this", "->", "enableRecursive", "(", "true", ")", ";", "$", "recurse", "=", "false", ";", "// only recurse if there are columns to remove/keep", "// remove columns specif...
See {@link ColumnDelete}. @param DataTable $table @return DataTable
[ "See", "{", "@link", "ColumnDelete", "}", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataTable/Filter/ColumnDelete.php#L96-L147
train
Filter the table
[ 30522, 2270, 3853, 11307, 1006, 1002, 2795, 1007, 1063, 1013, 1013, 2467, 2079, 28667, 9236, 3512, 11307, 1002, 2023, 1011, 1028, 9585, 2890, 10841, 2869, 3512, 1006, 2995, 1007, 1025, 1002, 28667, 28393, 1027, 6270, 1025, 1013, 1013, 2069,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Validation/Concerns/ValidatesAttributes.php
ValidatesAttributes.validateGt
public function validateGt($attribute, $value, $parameters) { $this->requireParameterCount(1, $parameters, 'gt'); $comparedToValue = $this->getValue($parameters[0]); $this->shouldBeNumeric($attribute, 'Gt'); if (is_null($comparedToValue) && (is_numeric($value) && is_numeric($param...
php
public function validateGt($attribute, $value, $parameters) { $this->requireParameterCount(1, $parameters, 'gt'); $comparedToValue = $this->getValue($parameters[0]); $this->shouldBeNumeric($attribute, 'Gt'); if (is_null($comparedToValue) && (is_numeric($value) && is_numeric($param...
[ "public", "function", "validateGt", "(", "$", "attribute", ",", "$", "value", ",", "$", "parameters", ")", "{", "$", "this", "->", "requireParameterCount", "(", "1", ",", "$", "parameters", ",", "'gt'", ")", ";", "$", "comparedToValue", "=", "$", "this",...
Validate that an attribute is greater than another attribute. @param string $attribute @param mixed $value @param array $parameters @return bool
[ "Validate", "that", "an", "attribute", "is", "greater", "than", "another", "attribute", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L882-L899
train
Validate that an attribute is greater than another attribute value
[ 30522, 2270, 3853, 9398, 3686, 13512, 1006, 1002, 17961, 1010, 1002, 3643, 1010, 1002, 11709, 1007, 1063, 1002, 2023, 1011, 1028, 5478, 28689, 22828, 3597, 16671, 1006, 1015, 1010, 1002, 11709, 1010, 1005, 14181, 1005, 1007, 1025, 1002, 410...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php
MockFileSessionStorage.read
private function read() { $filePath = $this->getFilePath(); $this->data = is_readable($filePath) && is_file($filePath) ? unserialize(file_get_contents($filePath)) : []; $this->loadSession(); }
php
private function read() { $filePath = $this->getFilePath(); $this->data = is_readable($filePath) && is_file($filePath) ? unserialize(file_get_contents($filePath)) : []; $this->loadSession(); }
[ "private", "function", "read", "(", ")", "{", "$", "filePath", "=", "$", "this", "->", "getFilePath", "(", ")", ";", "$", "this", "->", "data", "=", "is_readable", "(", "$", "filePath", ")", "&&", "is_file", "(", "$", "filePath", ")", "?", "unseriali...
Reads session from storage and loads session.
[ "Reads", "session", "from", "storage", "and", "loads", "session", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php#L145-L151
train
Read the session data from the file
[ 30522, 2797, 3853, 3191, 1006, 1007, 1063, 1002, 5371, 15069, 1027, 1002, 2023, 1011, 1028, 2131, 8873, 2571, 15069, 1006, 1007, 1025, 1002, 2023, 1011, 1028, 2951, 1027, 2003, 1035, 3191, 3085, 1006, 1002, 5371, 15069, 1007, 1004, 1004, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Eloquent/Relations/Concerns/AsPivot.php
AsPivot.newQueryForCollectionRestoration
protected function newQueryForCollectionRestoration(array $ids) { if (! Str::contains($ids[0], ':')) { return parent::newQueryForRestoration($ids); } $query = $this->newQueryWithoutScopes(); foreach ($ids as $id) { $segments = explode(':', $id); ...
php
protected function newQueryForCollectionRestoration(array $ids) { if (! Str::contains($ids[0], ':')) { return parent::newQueryForRestoration($ids); } $query = $this->newQueryWithoutScopes(); foreach ($ids as $id) { $segments = explode(':', $id); ...
[ "protected", "function", "newQueryForCollectionRestoration", "(", "array", "$", "ids", ")", "{", "if", "(", "!", "Str", "::", "contains", "(", "$", "ids", "[", "0", "]", ",", "':'", ")", ")", "{", "return", "parent", "::", "newQueryForRestoration", "(", ...
Get a new query to restore multiple models by their queueable IDs. @param array|int $ids @return \Illuminate\Database\Eloquent\Builder
[ "Get", "a", "new", "query", "to", "restore", "multiple", "models", "by", "their", "queueable", "IDs", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Relations/Concerns/AsPivot.php#L285-L303
train
Returns a new query for restoration
[ 30522, 5123, 3853, 2047, 4226, 2854, 29278, 26895, 18491, 28533, 21223, 1006, 9140, 1002, 8909, 2015, 1007, 1063, 2065, 1006, 999, 2358, 2099, 1024, 1024, 3397, 1006, 1002, 8909, 2015, 1031, 1014, 1033, 1010, 1005, 1024, 1005, 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...
laravel/framework
src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php
HasManyThrough.getRelationExistenceQueryForSelfRelation
public function getRelationExistenceQueryForSelfRelation(Builder $query, Builder $parentQuery, $columns = ['*']) { $query->from($query->getModel()->getTable().' as '.$hash = $this->getRelationCountHash()); $query->join($this->throughParent->getTable(), $this->getQualifiedParentKeyName(), '=', $hash...
php
public function getRelationExistenceQueryForSelfRelation(Builder $query, Builder $parentQuery, $columns = ['*']) { $query->from($query->getModel()->getTable().' as '.$hash = $this->getRelationCountHash()); $query->join($this->throughParent->getTable(), $this->getQualifiedParentKeyName(), '=', $hash...
[ "public", "function", "getRelationExistenceQueryForSelfRelation", "(", "Builder", "$", "query", ",", "Builder", "$", "parentQuery", ",", "$", "columns", "=", "[", "'*'", "]", ")", "{", "$", "query", "->", "from", "(", "$", "query", "->", "getModel", "(", "...
Add the constraints for a relationship query on the same table. @param \Illuminate\Database\Eloquent\Builder $query @param \Illuminate\Database\Eloquent\Builder $parentQuery @param array|mixed $columns @return \Illuminate\Database\Eloquent\Builder
[ "Add", "the", "constraints", "for", "a", "relationship", "query", "on", "the", "same", "table", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php#L526-L541
train
Get Query for a self relation
[ 30522, 2270, 3853, 2131, 16570, 3370, 10288, 27870, 5897, 4226, 2854, 29278, 11246, 19699, 10581, 3508, 1006, 12508, 1002, 23032, 1010, 12508, 1002, 6687, 4226, 2854, 1010, 1002, 7753, 1027, 1031, 1005, 1008, 1005, 1033, 1007, 1063, 1002, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Tracker/Visit/ReferrerSpamFilter.php
ReferrerSpamFilter.isSpam
public function isSpam(Request $request) { $spammers = $this->getSpammerListFromCache(); $referrerUrl = $request->getParam('urlref'); foreach ($spammers as $spammerHost) { if (stripos($referrerUrl, $spammerHost) !== false) { Common::printDebug('Referrer URL is a...
php
public function isSpam(Request $request) { $spammers = $this->getSpammerListFromCache(); $referrerUrl = $request->getParam('urlref'); foreach ($spammers as $spammerHost) { if (stripos($referrerUrl, $spammerHost) !== false) { Common::printDebug('Referrer URL is a...
[ "public", "function", "isSpam", "(", "Request", "$", "request", ")", "{", "$", "spammers", "=", "$", "this", "->", "getSpammerListFromCache", "(", ")", ";", "$", "referrerUrl", "=", "$", "request", "->", "getParam", "(", "'urlref'", ")", ";", "foreach", ...
Check if the request is from a known spammer host. @param Request $request @return bool
[ "Check", "if", "the", "request", "is", "from", "a", "known", "spammer", "host", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Tracker/Visit/ReferrerSpamFilter.php#L33-L47
train
Check if the referrer URL is a known spam
[ 30522, 2270, 3853, 26354, 4502, 2213, 1006, 5227, 1002, 5227, 1007, 1063, 1002, 12403, 15810, 2015, 1027, 1002, 2023, 1011, 1028, 4152, 4502, 15810, 9863, 19699, 5358, 3540, 5403, 1006, 1007, 1025, 1002, 6523, 14544, 3126, 2140, 1027, 1002,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Finder/Finder.php
Finder.sortByName
public function sortByName(/* bool $useNaturalSort = false */) { if (\func_num_args() < 1 && __CLASS__ !== \get_class($this) && __CLASS__ !== (new \ReflectionMethod($this, __FUNCTION__))->getDeclaringClass()->getName() && !$this instanceof \PHPUnit\Framework\MockObject\MockObject && !$this instanceof \Proph...
php
public function sortByName(/* bool $useNaturalSort = false */) { if (\func_num_args() < 1 && __CLASS__ !== \get_class($this) && __CLASS__ !== (new \ReflectionMethod($this, __FUNCTION__))->getDeclaringClass()->getName() && !$this instanceof \PHPUnit\Framework\MockObject\MockObject && !$this instanceof \Proph...
[ "public", "function", "sortByName", "(", "/* bool $useNaturalSort = false */", ")", "{", "if", "(", "\\", "func_num_args", "(", ")", "<", "1", "&&", "__CLASS__", "!==", "\\", "get_class", "(", "$", "this", ")", "&&", "__CLASS__", "!==", "(", "new", "\\", "...
Sorts files and directories by name. This can be slow as all the matching files and directories must be retrieved for comparison. @param bool $useNaturalSort Whether to use natural sort or not, disabled by default @return $this @see SortableIterator
[ "Sorts", "files", "and", "directories", "by", "name", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Finder/Finder.php#L441-L451
train
Sort the iterator by name
[ 30522, 2270, 3853, 4066, 3762, 18442, 1006, 1013, 1008, 22017, 2140, 1002, 2224, 19833, 11137, 21748, 2102, 1027, 6270, 1008, 1013, 1007, 1063, 2065, 1006, 1032, 4569, 2278, 1035, 16371, 2213, 1035, 12098, 5620, 1006, 1007, 1026, 1015, 1004...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
ccxt/ccxt
php/Exchange.php
Exchange.safe_float_2
public static function safe_float_2 ($object, $key1, $key2, $default_value = null) { $value = static::safe_float ($object, $key1); return isset ($value) ? $value : static::safe_float ($object, $key2, $default_value); }
php
public static function safe_float_2 ($object, $key1, $key2, $default_value = null) { $value = static::safe_float ($object, $key1); return isset ($value) ? $value : static::safe_float ($object, $key2, $default_value); }
[ "public", "static", "function", "safe_float_2", "(", "$", "object", ",", "$", "key1", ",", "$", "key2", ",", "$", "default_value", "=", "null", ")", "{", "$", "value", "=", "static", "::", "safe_float", "(", "$", "object", ",", "$", "key1", ")", ";",...
we're not using safe_float_3 either because those cases are too rare to deserve their own optimization
[ "we", "re", "not", "using", "safe_float_3", "either", "because", "those", "cases", "are", "too", "rare", "to", "deserve", "their", "own", "optimization" ]
0113da333a51acded0b44d9528809bbf654acfbd
https://github.com/ccxt/ccxt/blob/0113da333a51acded0b44d9528809bbf654acfbd/php/Exchange.php#L247-L250
train
Wrapper for the safe_float function.
[ 30522, 2270, 10763, 3853, 3647, 1035, 14257, 1035, 1016, 1006, 1002, 4874, 1010, 1002, 3145, 2487, 1010, 1002, 3145, 2475, 1010, 1002, 12398, 1035, 3643, 1027, 19701, 1007, 1063, 1002, 3643, 1027, 10763, 1024, 1024, 3647, 1035, 14257, 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/Console/Style/SymfonyStyle.php
SymfonyStyle.writeln
public function writeln($messages, $type = self::OUTPUT_NORMAL) { if (!is_iterable($messages)) { $messages = [$messages]; } foreach ($messages as $message) { parent::writeln($message, $type); $this->writeBuffer($message, true, $type); } }
php
public function writeln($messages, $type = self::OUTPUT_NORMAL) { if (!is_iterable($messages)) { $messages = [$messages]; } foreach ($messages as $message) { parent::writeln($message, $type); $this->writeBuffer($message, true, $type); } }
[ "public", "function", "writeln", "(", "$", "messages", ",", "$", "type", "=", "self", "::", "OUTPUT_NORMAL", ")", "{", "if", "(", "!", "is_iterable", "(", "$", "messages", ")", ")", "{", "$", "messages", "=", "[", "$", "messages", "]", ";", "}", "f...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Style/SymfonyStyle.php#L307-L317
train
Write messages to the output buffer
[ 30522, 2270, 3853, 4339, 19666, 1006, 1002, 7696, 1010, 1002, 2828, 1027, 2969, 1024, 1024, 6434, 1035, 3671, 1007, 1063, 2065, 1006, 999, 2003, 1035, 2009, 6906, 3468, 1006, 1002, 7696, 1007, 1007, 1063, 1002, 7696, 1027, 1031, 1002, 769...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.php
Schema.loadSchema
private function loadSchema() { $config = Config::getInstance(); $dbInfos = $config->database; $schemaName = trim($dbInfos['schema']); $className = self::getSchemaClassName($schemaName); $this->schema = new $className(); }
php
private function loadSchema() { $config = Config::getInstance(); $dbInfos = $config->database; $schemaName = trim($dbInfos['schema']); $className = self::getSchemaClassName($schemaName); $this->schema = new $className(); }
[ "private", "function", "loadSchema", "(", ")", "{", "$", "config", "=", "Config", "::", "getInstance", "(", ")", ";", "$", "dbInfos", "=", "$", "config", "->", "database", ";", "$", "schemaName", "=", "trim", "(", "$", "dbInfos", "[", "'schema'", "]", ...
Load schema
[ "Load", "schema" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Db/Schema.php#L54-L62
train
Load schema from database
[ 30522, 2797, 3853, 15665, 30524, 1025, 1002, 16962, 2378, 14876, 2015, 1027, 1002, 9530, 8873, 2290, 1011, 1028, 7809, 1025, 1002, 8040, 28433, 18442, 1027, 12241, 1006, 1002, 16962, 2378, 14876, 2015, 1031, 1005, 8040, 28433, 1005, 1033, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/system/classes/MarkupManager.php
MarkupManager.registerExtensions
public function registerExtensions($type, array $definitions) { $items = $this->transactionMode ? 'transactionItems' : 'items'; if ($this->$items === null) { $this->$items = []; } if (!array_key_exists($type, $this->$items)) { $this->$items[$type] = []; ...
php
public function registerExtensions($type, array $definitions) { $items = $this->transactionMode ? 'transactionItems' : 'items'; if ($this->$items === null) { $this->$items = []; } if (!array_key_exists($type, $this->$items)) { $this->$items[$type] = []; ...
[ "public", "function", "registerExtensions", "(", "$", "type", ",", "array", "$", "definitions", ")", "{", "$", "items", "=", "$", "this", "->", "transactionMode", "?", "'transactionItems'", ":", "'items'", ";", "if", "(", "$", "this", "->", "$", "items", ...
Registers the CMS Twig extension items. The argument is an array of the extension definitions. The array keys represent the function/filter name, specific for the plugin/module. Each element in the array should be an associative array. @param string $type The extension type: filters, functions, tokens @param array $def...
[ "Registers", "the", "CMS", "Twig", "extension", "items", ".", "The", "argument", "is", "an", "array", "of", "the", "extension", "definitions", ".", "The", "array", "keys", "represent", "the", "function", "/", "filter", "name", "specific", "for", "the", "plug...
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/classes/MarkupManager.php#L114-L138
train
Registers the extensions for the given type
[ 30522, 2270, 3853, 4236, 10288, 29048, 2015, 1006, 1002, 2828, 1010, 9140, 1002, 15182, 1007, 1063, 1002, 5167, 1027, 1002, 2023, 1011, 1028, 12598, 5302, 3207, 1029, 1005, 12598, 4221, 5244, 1005, 1024, 1005, 5167, 1005, 1025, 2065, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Validator/Constraints/ExpressionValidator.php
ExpressionValidator.validate
public function validate($value, Constraint $constraint) { if (!$constraint instanceof Expression) { throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Expression'); } $variables = $constraint->values; $variables['value'] = $value; $variables['this'] ...
php
public function validate($value, Constraint $constraint) { if (!$constraint instanceof Expression) { throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Expression'); } $variables = $constraint->values; $variables['value'] = $value; $variables['this'] ...
[ "public", "function", "validate", "(", "$", "value", ",", "Constraint", "$", "constraint", ")", "{", "if", "(", "!", "$", "constraint", "instanceof", "Expression", ")", "{", "throw", "new", "UnexpectedTypeException", "(", "$", "constraint", ",", "__NAMESPACE__...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Validator/Constraints/ExpressionValidator.php#L36-L52
train
Validate the value against the expression
[ 30522, 2270, 3853, 9398, 3686, 1006, 1002, 3643, 1010, 27142, 1002, 27142, 1007, 1063, 2065, 1006, 999, 1002, 27142, 6013, 11253, 3670, 1007, 1063, 5466, 2047, 9223, 13874, 10288, 24422, 1006, 1002, 27142, 1010, 1035, 1035, 3415, 15327, 103...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Eloquent/Relations/HasOne.php
HasOne.match
public function match(array $models, Collection $results, $relation) { return $this->matchOne($models, $results, $relation); }
php
public function match(array $models, Collection $results, $relation) { return $this->matchOne($models, $results, $relation); }
[ "public", "function", "match", "(", "array", "$", "models", ",", "Collection", "$", "results", ",", "$", "relation", ")", "{", "return", "$", "this", "->", "matchOne", "(", "$", "models", ",", "$", "results", ",", "$", "relation", ")", ";", "}" ]
Match the eagerly loaded results to their parents. @param array $models @param \Illuminate\Database\Eloquent\Collection $results @param string $relation @return array
[ "Match", "the", "eagerly", "loaded", "results", "to", "their", "parents", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Relations/HasOne.php#L51-L54
train
Match one or more models to a list of models
[ 30522, 2270, 3853, 2674, 1006, 9140, 1002, 4275, 1010, 3074, 1002, 3463, 1010, 1002, 7189, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 2674, 5643, 1006, 1002, 4275, 1010, 1002, 3463, 1010, 1002, 7189, 1007, 1025, 1065, 102, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Notifications/Messages/MailMessage.php
MailMessage.markdown
public function markdown($view, array $data = []) { $this->markdown = $view; $this->viewData = $data; $this->view = null; return $this; }
php
public function markdown($view, array $data = []) { $this->markdown = $view; $this->viewData = $data; $this->view = null; return $this; }
[ "public", "function", "markdown", "(", "$", "view", ",", "array", "$", "data", "=", "[", "]", ")", "{", "$", "this", "->", "markdown", "=", "$", "view", ";", "$", "this", "->", "viewData", "=", "$", "data", ";", "$", "this", "->", "view", "=", ...
Set the Markdown template for the notification. @param string $view @param array $data @return $this
[ "Set", "the", "Markdown", "template", "for", "the", "notification", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Notifications/Messages/MailMessage.php#L107-L115
train
Set the Markdown view
[ 30522, 2270, 3853, 2928, 7698, 1006, 1002, 3193, 1010, 9140, 1002, 2951, 1027, 1031, 1033, 1007, 1063, 1002, 2023, 1011, 1028, 2928, 7698, 1027, 1002, 3193, 1025, 1002, 2023, 1011, 1028, 3193, 2850, 2696, 1027, 1002, 2951, 1025, 1002, 202...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/PropertyAccess/PropertyAccessor.php
PropertyAccessor.writeIndex
private function writeIndex($zval, $index, $value) { if (!$zval[self::VALUE] instanceof \ArrayAccess && !\is_array($zval[self::VALUE])) { throw new NoSuchIndexException(sprintf('Cannot modify index "%s" in object of type "%s" because it doesn\'t implement \ArrayAccess.', $index, \get_class($zval...
php
private function writeIndex($zval, $index, $value) { if (!$zval[self::VALUE] instanceof \ArrayAccess && !\is_array($zval[self::VALUE])) { throw new NoSuchIndexException(sprintf('Cannot modify index "%s" in object of type "%s" because it doesn\'t implement \ArrayAccess.', $index, \get_class($zval...
[ "private", "function", "writeIndex", "(", "$", "zval", ",", "$", "index", ",", "$", "value", ")", "{", "if", "(", "!", "$", "zval", "[", "self", "::", "VALUE", "]", "instanceof", "\\", "ArrayAccess", "&&", "!", "\\", "is_array", "(", "$", "zval", "...
Sets the value of an index in a given array-accessible value. @param array $zval The array containing the array or \ArrayAccess object to write to @param string|int $index The index to write at @param mixed $value The value to write @throws NoSuchIndexException If the array does not implement \ArrayAccess ...
[ "Sets", "the", "value", "of", "an", "index", "in", "a", "given", "array", "-", "accessible", "value", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/PropertyAccess/PropertyAccessor.php#L522-L529
train
Write an index value in the array
[ 30522, 2797, 3853, 4339, 22254, 10288, 1006, 1002, 1062, 10175, 1010, 1002, 5950, 1010, 1002, 3643, 1007, 1063, 2065, 1006, 999, 1002, 1062, 10175, 1031, 2969, 1024, 1024, 3643, 1033, 6013, 11253, 1032, 9140, 6305, 9623, 2015, 1004, 1004, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/DataAccess/RawLogDao.php
RawLogDao.insertActionsToKeep
protected function insertActionsToKeep($maxIds, $olderThan = true, $insertIntoTempIterationStep = 100000) { $tempTableName = Common::prefixTable(self::DELETE_UNUSED_ACTIONS_TEMP_TABLE_NAME); $idColumns = $this->getTableIdColumns(); foreach ($this->dimensionMetadataProvider->getActionReferen...
php
protected function insertActionsToKeep($maxIds, $olderThan = true, $insertIntoTempIterationStep = 100000) { $tempTableName = Common::prefixTable(self::DELETE_UNUSED_ACTIONS_TEMP_TABLE_NAME); $idColumns = $this->getTableIdColumns(); foreach ($this->dimensionMetadataProvider->getActionReferen...
[ "protected", "function", "insertActionsToKeep", "(", "$", "maxIds", ",", "$", "olderThan", "=", "true", ",", "$", "insertIntoTempIterationStep", "=", "100000", ")", "{", "$", "tempTableName", "=", "Common", "::", "prefixTable", "(", "self", "::", "DELETE_UNUSED_...
protected for testing purposes
[ "protected", "for", "testing", "purposes" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataAccess/RawLogDao.php#L324-L371
train
Insert actions into the temp table
[ 30522, 5123, 3853, 19274, 18908, 8496, 18715, 4402, 2361, 1006, 1002, 21510, 5104, 1010, 1002, 3080, 21604, 1027, 2995, 1010, 1002, 19274, 18447, 12184, 8737, 21646, 10708, 2618, 2361, 1027, 6694, 8889, 1007, 1063, 1002, 8915, 27718, 3085, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.getFormWidget
public function getFormWidget($field) { if (isset($this->formWidgets[$field])) { return $this->formWidgets[$field]; } return null; }
php
public function getFormWidget($field) { if (isset($this->formWidgets[$field])) { return $this->formWidgets[$field]; } return null; }
[ "public", "function", "getFormWidget", "(", "$", "field", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "formWidgets", "[", "$", "field", "]", ")", ")", "{", "return", "$", "this", "->", "formWidgets", "[", "$", "field", "]", ";", "}", "ret...
Get a specified form widget @param string $field @return mixed
[ "Get", "a", "specified", "form", "widget" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/widgets/Form.php#L982-L989
train
Get Form Widget
[ 30522, 2270, 3853, 2131, 14192, 9148, 24291, 1006, 1002, 2492, 1007, 1063, 2065, 1006, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 2433, 9148, 28682, 1031, 1002, 2492, 1033, 1007, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 2433, 9148, 28682, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/PropertyInfo/PropertyInfoCacheExtractor.php
PropertyInfoCacheExtractor.isInitializable
public function isInitializable(string $class, string $property, array $context = []): ?bool { return $this->extract('isInitializable', [$class, $property, $context]); }
php
public function isInitializable(string $class, string $property, array $context = []): ?bool { return $this->extract('isInitializable', [$class, $property, $context]); }
[ "public", "function", "isInitializable", "(", "string", "$", "class", ",", "string", "$", "property", ",", "array", "$", "context", "=", "[", "]", ")", ":", "?", "bool", "{", "return", "$", "this", "->", "extract", "(", "'isInitializable'", ",", "[", "...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/PropertyInfo/PropertyInfoCacheExtractor.php#L93-L96
train
Is initializable - Returns true if the property is initializable
[ 30522, 2270, 3853, 2003, 5498, 20925, 21335, 3468, 1006, 5164, 1002, 2465, 1010, 5164, 1002, 3200, 1010, 9140, 1002, 6123, 1027, 1031, 1033, 1007, 1024, 1029, 22017, 2140, 1063, 2709, 1002, 2023, 1011, 1028, 14817, 1006, 1005, 2003, 5498, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/SitesManager/Model.php
Model.getSiteFromId
public function getSiteFromId($idSite) { $db = $this->getDb(); $site = $db->fetchRow("SELECT * FROM " . $this->table . " WHERE idsite = ?", $idSite); return $site; }
php
public function getSiteFromId($idSite) { $db = $this->getDb(); $site = $db->fetchRow("SELECT * FROM " . $this->table . " WHERE idsite = ?", $idSite); return $site; }
[ "public", "function", "getSiteFromId", "(", "$", "idSite", ")", "{", "$", "db", "=", "$", "this", "->", "getDb", "(", ")", ";", "$", "site", "=", "$", "db", "->", "fetchRow", "(", "\"SELECT * FROM \"", ".", "$", "this", "->", "table", ".", "\"\n ...
Returns the website information : name, main_url @throws Exception if the site ID doesn't exist or the user doesn't have access to it @param int $idSite @return array
[ "Returns", "the", "website", "information", ":", "name", "main_url" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/SitesManager/Model.php#L230-L237
train
Get the record of the type of the site from the id
[ 30522, 2270, 3853, 4152, 4221, 19699, 20936, 2094, 1006, 1002, 8909, 28032, 2063, 1007, 1063, 1002, 16962, 1027, 1002, 2023, 1011, 1028, 2131, 18939, 1006, 1007, 1025, 1002, 2609, 1027, 1002, 16962, 1011, 1028, 18584, 10524, 1006, 1000, 727...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php
PdoSessionHandler.doWrite
protected function doWrite($sessionId, $data) { $maxlifetime = (int) ini_get('session.gc_maxlifetime'); try { // We use a single MERGE SQL query when supported by the database. $mergeStmt = $this->getMergeStatement($sessionId, $data, $maxlifetime); if (null !== $...
php
protected function doWrite($sessionId, $data) { $maxlifetime = (int) ini_get('session.gc_maxlifetime'); try { // We use a single MERGE SQL query when supported by the database. $mergeStmt = $this->getMergeStatement($sessionId, $data, $maxlifetime); if (null !== $...
[ "protected", "function", "doWrite", "(", "$", "sessionId", ",", "$", "data", ")", "{", "$", "maxlifetime", "=", "(", "int", ")", "ini_get", "(", "'session.gc_maxlifetime'", ")", ";", "try", "{", "// We use a single MERGE SQL query when supported by the database.", "...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php#L324-L365
train
Write session data
[ 30522, 5123, 3853, 23268, 17625, 1006, 1002, 5219, 3593, 1010, 1002, 2951, 1007, 1063, 1002, 4098, 15509, 7292, 1027, 1006, 20014, 1007, 1999, 2072, 1035, 2131, 1006, 1005, 5219, 1012, 1043, 2278, 1035, 4098, 15509, 7292, 1005, 1007, 1025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php
NumberFormatter.formatNumber
private function formatNumber($value, $precision) { $precision = $this->getUninitializedPrecision($value, $precision); return number_format($value, $precision, '.', $this->getAttribute(self::GROUPING_USED) ? ',' : ''); }
php
private function formatNumber($value, $precision) { $precision = $this->getUninitializedPrecision($value, $precision); return number_format($value, $precision, '.', $this->getAttribute(self::GROUPING_USED) ? ',' : ''); }
[ "private", "function", "formatNumber", "(", "$", "value", ",", "$", "precision", ")", "{", "$", "precision", "=", "$", "this", "->", "getUninitializedPrecision", "(", "$", "value", ",", "$", "precision", ")", ";", "return", "number_format", "(", "$", "valu...
Formats a number. @param int|float $value The numeric value to format @param int $precision The number of decimal digits to use @return string The formatted number
[ "Formats", "a", "number", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php#L749-L754
train
Format number using number_format
[ 30522, 2797, 3853, 4289, 19172, 5677, 1006, 1002, 3643, 1010, 1002, 11718, 1007, 1063, 1002, 11718, 1027, 1002, 2023, 1011, 1028, 2131, 19496, 3490, 20925, 3550, 28139, 28472, 1006, 1002, 3643, 1010, 1002, 11718, 1007, 1025, 2709, 2193, 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...
symfony/symfony
src/Symfony/Component/DependencyInjection/Loader/GlobFileLoader.php
GlobFileLoader.load
public function load($resource, $type = null) { foreach ($this->glob($resource, false, $globResource) as $path => $info) { $this->import($path); } $this->container->addResource($globResource); }
php
public function load($resource, $type = null) { foreach ($this->glob($resource, false, $globResource) as $path => $info) { $this->import($path); } $this->container->addResource($globResource); }
[ "public", "function", "load", "(", "$", "resource", ",", "$", "type", "=", "null", ")", "{", "foreach", "(", "$", "this", "->", "glob", "(", "$", "resource", ",", "false", ",", "$", "globResource", ")", "as", "$", "path", "=>", "$", "info", ")", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/Loader/GlobFileLoader.php#L24-L31
train
Load the content of a resource into the container
[ 30522, 2270, 3853, 7170, 1006, 1002, 7692, 1010, 1002, 2828, 1027, 19701, 1007, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 1043, 4135, 2497, 1006, 1002, 7692, 1010, 6270, 1010, 1002, 1043, 4135, 13578, 6499, 3126, 3401, 1007, 2004, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Auth/EloquentUserProvider.php
EloquentUserProvider.retrieveById
public function retrieveById($identifier) { $model = $this->createModel(); return $this->newModelQuery($model) ->where($model->getAuthIdentifierName(), $identifier) ->first(); }
php
public function retrieveById($identifier) { $model = $this->createModel(); return $this->newModelQuery($model) ->where($model->getAuthIdentifierName(), $identifier) ->first(); }
[ "public", "function", "retrieveById", "(", "$", "identifier", ")", "{", "$", "model", "=", "$", "this", "->", "createModel", "(", ")", ";", "return", "$", "this", "->", "newModelQuery", "(", "$", "model", ")", "->", "where", "(", "$", "model", "->", ...
Retrieve a user by their unique identifier. @param mixed $identifier @return \Illuminate\Contracts\Auth\Authenticatable|null
[ "Retrieve", "a", "user", "by", "their", "unique", "identifier", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/EloquentUserProvider.php#L46-L53
train
Retrieve a record by its identifier
[ 30522, 2270, 3853, 12850, 3762, 3593, 1006, 1002, 8909, 4765, 18095, 1007, 1063, 1002, 2944, 1027, 1002, 2023, 1011, 1028, 3443, 5302, 9247, 1006, 1007, 1025, 2709, 1002, 2023, 1011, 1028, 2047, 5302, 9247, 4226, 2854, 1006, 1002, 2944, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Db/Statement.php
Zend_Db_Statement._stripQuoted
protected function _stripQuoted($sql) { // get the character for delimited id quotes, // this is usually " but in MySQL is ` $d = $this->_adapter->quoteIdentifier('a'); $d = $d[0]; // get the value used as an escaped delimited id quote, // e.g. \" or "" or \` ...
php
protected function _stripQuoted($sql) { // get the character for delimited id quotes, // this is usually " but in MySQL is ` $d = $this->_adapter->quoteIdentifier('a'); $d = $d[0]; // get the value used as an escaped delimited id quote, // e.g. \" or "" or \` ...
[ "protected", "function", "_stripQuoted", "(", "$", "sql", ")", "{", "// get the character for delimited id quotes,", "// this is usually \" but in MySQL is `", "$", "d", "=", "$", "this", "->", "_adapter", "->", "quoteIdentifier", "(", "'a'", ")", ";", "$", "d", "="...
Remove parts of a SQL string that contain quoted strings of values or identifiers. @param string $sql @return string
[ "Remove", "parts", "of", "a", "SQL", "string", "that", "contain", "quoted", "strings", "of", "values", "or", "identifiers", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Statement.php#L177-L211
train
Strip quoted SQL statement
[ 30522, 5123, 3853, 1035, 6167, 28940, 27428, 1006, 1002, 29296, 1007, 1063, 1013, 1013, 2131, 1996, 2839, 2005, 3972, 27605, 3064, 8909, 16614, 1010, 1013, 1013, 2023, 2003, 2788, 1000, 2021, 1999, 2026, 2015, 4160, 2140, 2003, 1036, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/system/traits/AssetMaker.php
AssetMaker.addRss
public function addRss($name, $attributes = []) { $rssPath = $this->getAssetPath($name); if (isset($this->controller)) { $this->controller->addRss($rssPath, $attributes); } if (is_string($attributes)) { $attributes = ['build' => $attributes]; } ...
php
public function addRss($name, $attributes = []) { $rssPath = $this->getAssetPath($name); if (isset($this->controller)) { $this->controller->addRss($rssPath, $attributes); } if (is_string($attributes)) { $attributes = ['build' => $attributes]; } ...
[ "public", "function", "addRss", "(", "$", "name", ",", "$", "attributes", "=", "[", "]", ")", "{", "$", "rssPath", "=", "$", "this", "->", "getAssetPath", "(", "$", "name", ")", ";", "if", "(", "isset", "(", "$", "this", "->", "controller", ")", ...
Adds an RSS link asset to the asset list. Call $this->makeAssets() in a view to output corresponding markup. @param string $name Specifies a path (URL) to the RSS channel @param array $attributes Adds extra HTML attributes to the asset link. @return void
[ "Adds", "an", "RSS", "link", "asset", "to", "the", "asset", "list", ".", "Call", "$this", "-", ">", "makeAssets", "()", "in", "a", "view", "to", "output", "corresponding", "markup", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/traits/AssetMaker.php#L173-L190
train
Add Rss to the asset
[ 30522, 2270, 3853, 5587, 2869, 2015, 1006, 1002, 2171, 1010, 1002, 12332, 1027, 1031, 1033, 1007, 1063, 1002, 12667, 13102, 8988, 1027, 1002, 2023, 1011, 1028, 2131, 27241, 25856, 8988, 1006, 1002, 2171, 1007, 1025, 2065, 1006, 26354, 3388,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Translation/MessageCatalogue.php
MessageCatalogue.replace
public function replace($messages, $domain = 'messages') { unset($this->messages[$domain], $this->messages[$domain.self::INTL_DOMAIN_SUFFIX]); $this->add($messages, $domain); }
php
public function replace($messages, $domain = 'messages') { unset($this->messages[$domain], $this->messages[$domain.self::INTL_DOMAIN_SUFFIX]); $this->add($messages, $domain); }
[ "public", "function", "replace", "(", "$", "messages", ",", "$", "domain", "=", "'messages'", ")", "{", "unset", "(", "$", "this", "->", "messages", "[", "$", "domain", "]", ",", "$", "this", "->", "messages", "[", "$", "domain", ".", "self", "::", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Translation/MessageCatalogue.php#L144-L149
train
Replace messages in the current language
[ 30522, 2270, 3853, 5672, 1006, 1002, 7696, 1010, 1002, 5884, 1027, 1005, 7696, 1005, 1007, 1063, 4895, 13462, 1006, 1002, 2023, 1011, 1028, 7696, 1031, 1002, 5884, 1033, 1010, 1002, 2023, 1011, 1028, 7696, 1031, 1002, 5884, 1012, 2969, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/API/Request.php
Request.getCurrentUrlWithoutGenericFilters
public static function getCurrentUrlWithoutGenericFilters($params) { // unset all filter query params so the related report will show up in its default state, // unless the filter param was in $queryParams $genericFiltersInfo = DataTableGenericFilter::getGenericFiltersInformation(); ...
php
public static function getCurrentUrlWithoutGenericFilters($params) { // unset all filter query params so the related report will show up in its default state, // unless the filter param was in $queryParams $genericFiltersInfo = DataTableGenericFilter::getGenericFiltersInformation(); ...
[ "public", "static", "function", "getCurrentUrlWithoutGenericFilters", "(", "$", "params", ")", "{", "// unset all filter query params so the related report will show up in its default state,", "// unless the filter param was in $queryParams", "$", "genericFiltersInfo", "=", "DataTableGen...
Returns the current URL without generic filter query parameters. @param array $params Query parameter values to override in the new URL. @return string
[ "Returns", "the", "current", "URL", "without", "generic", "filter", "query", "parameters", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/API/Request.php#L546-L560
train
Returns the current URL without generic filters
[ 30522, 2270, 10763, 3853, 2131, 10841, 14343, 3372, 3126, 2140, 24415, 5833, 6914, 22420, 8873, 21928, 2015, 1006, 1002, 11498, 5244, 1007, 1063, 1013, 1013, 4895, 13462, 2035, 11307, 23032, 11498, 5244, 2061, 1996, 3141, 3189, 2097, 2265, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Templating/DelegatingEngine.php
DelegatingEngine.resolveEngines
private function resolveEngines() { foreach ($this->engines as $i => $engine) { if (\is_string($engine)) { $this->engines[$i] = $this->container->get($engine); } } }
php
private function resolveEngines() { foreach ($this->engines as $i => $engine) { if (\is_string($engine)) { $this->engines[$i] = $this->container->get($engine); } } }
[ "private", "function", "resolveEngines", "(", ")", "{", "foreach", "(", "$", "this", "->", "engines", "as", "$", "i", "=>", "$", "engine", ")", "{", "if", "(", "\\", "is_string", "(", "$", "engine", ")", ")", "{", "$", "this", "->", "engines", "[",...
Resolved engine ids to their real engine instances from the container.
[ "Resolved", "engine", "ids", "to", "their", "real", "engine", "instances", "from", "the", "container", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/FrameworkBundle/Templating/DelegatingEngine.php#L70-L77
train
Resolve all engine objects
[ 30522, 2797, 3853, 10663, 13159, 10586, 1006, 1007, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 5209, 2004, 1002, 1045, 1027, 1028, 1002, 3194, 1007, 1063, 2065, 1006, 1032, 2003, 1035, 5164, 1006, 1002, 3194, 1007, 1007, 1063, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Form/Footer.php
Footer.render
public function render() { $this->setupScript(); $data = [ 'buttons' => $this->buttons, 'checkboxes' => $this->checkboxes, 'width' => $this->builder->getWidth(), ]; return view($this->view, $data)->render(); }
php
public function render() { $this->setupScript(); $data = [ 'buttons' => $this->buttons, 'checkboxes' => $this->checkboxes, 'width' => $this->builder->getWidth(), ]; return view($this->view, $data)->render(); }
[ "public", "function", "render", "(", ")", "{", "$", "this", "->", "setupScript", "(", ")", ";", "$", "data", "=", "[", "'buttons'", "=>", "$", "this", "->", "buttons", ",", "'checkboxes'", "=>", "$", "this", "->", "checkboxes", ",", "'width'", "=>", ...
Render footer. @return string
[ "Render", "footer", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Form/Footer.php#L147-L158
train
Returns the HTML code of the form
[ 30522, 2270, 3853, 17552, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 16437, 22483, 1006, 1007, 1025, 1002, 2951, 1027, 1031, 1005, 11287, 1005, 1027, 1028, 1002, 2023, 30524, 1011, 1028, 12508, 1011, 1028, 2131, 9148, 11927, 2232, 1006, 1007...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Finder/Finder.php
Finder.normalizeDir
private function normalizeDir($dir) { $dir = rtrim($dir, '/'.\DIRECTORY_SEPARATOR); if (preg_match('#^s?ftp://#', $dir)) { $dir .= '/'; } return $dir; }
php
private function normalizeDir($dir) { $dir = rtrim($dir, '/'.\DIRECTORY_SEPARATOR); if (preg_match('#^s?ftp://#', $dir)) { $dir .= '/'; } return $dir; }
[ "private", "function", "normalizeDir", "(", "$", "dir", ")", "{", "$", "dir", "=", "rtrim", "(", "$", "dir", ",", "'/'", ".", "\\", "DIRECTORY_SEPARATOR", ")", ";", "if", "(", "preg_match", "(", "'#^s?ftp://#'", ",", "$", "dir", ")", ")", "{", "$", ...
Normalizes given directory names by removing trailing slashes. Excluding: (s)ftp:// wrapper @param string $dir @return string
[ "Normalizes", "given", "directory", "names", "by", "removing", "trailing", "slashes", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Finder/Finder.php#L801-L810
train
Normalize directory to allow for ftp://
[ 30522, 2797, 3853, 3671, 3550, 4313, 1006, 1002, 16101, 1007, 1063, 1002, 16101, 1027, 19387, 20026, 1006, 1002, 16101, 1010, 1005, 1013, 1005, 1012, 1032, 14176, 1035, 19802, 25879, 2953, 1007, 1025, 2065, 1006, 3653, 2290, 1035, 2674, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Piwik.php
Piwik.secureDiv
public static function secureDiv($i1, $i2) { if (is_numeric($i1) && is_numeric($i2) && floatval($i2) != 0) { return $i1 / $i2; } return 0; }
php
public static function secureDiv($i1, $i2) { if (is_numeric($i1) && is_numeric($i2) && floatval($i2) != 0) { return $i1 / $i2; } return 0; }
[ "public", "static", "function", "secureDiv", "(", "$", "i1", ",", "$", "i2", ")", "{", "if", "(", "is_numeric", "(", "$", "i1", ")", "&&", "is_numeric", "(", "$", "i2", ")", "&&", "floatval", "(", "$", "i2", ")", "!=", "0", ")", "{", "return", ...
Computes the division of i1 by i2. If either i1 or i2 are not number, or if i2 has a value of zero we return 0 to avoid the division by zero. @param number $i1 @param number $i2 @return number The result of the division or zero
[ "Computes", "the", "division", "of", "i1", "by", "i2", ".", "If", "either", "i1", "or", "i2", "are", "not", "number", "or", "if", "i2", "has", "a", "value", "of", "zero", "we", "return", "0", "to", "avoid", "the", "division", "by", "zero", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Piwik.php#L104-L110
train
Safely divides two numbers
[ 30522, 2270, 10763, 3853, 7119, 12848, 1006, 1002, 1045, 2487, 1010, 1002, 1045, 2475, 1007, 1063, 2065, 1006, 2003, 1035, 16371, 25531, 1006, 1002, 1045, 2487, 1007, 1004, 1004, 2003, 1035, 16371, 25531, 1006, 1002, 1045, 2475, 1007, 1004,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpKernel/HttpCache/Store.php
Store.requestsMatch
private function requestsMatch($vary, $env1, $env2) { if (empty($vary)) { return true; } foreach (preg_split('/[\s,]+/', $vary) as $header) { $key = str_replace('_', '-', strtolower($header)); $v1 = isset($env1[$key]) ? $env1[$key] : null; $v2...
php
private function requestsMatch($vary, $env1, $env2) { if (empty($vary)) { return true; } foreach (preg_split('/[\s,]+/', $vary) as $header) { $key = str_replace('_', '-', strtolower($header)); $v1 = isset($env1[$key]) ? $env1[$key] : null; $v2...
[ "private", "function", "requestsMatch", "(", "$", "vary", ",", "$", "env1", ",", "$", "env2", ")", "{", "if", "(", "empty", "(", "$", "vary", ")", ")", "{", "return", "true", ";", "}", "foreach", "(", "preg_split", "(", "'/[\\s,]+/'", ",", "$", "va...
Determines whether two Request HTTP header sets are non-varying based on the vary response header value provided. @param string $vary A Response vary header @param array $env1 A Request HTTP header array @param array $env2 A Request HTTP header array @return bool true if the two environments match, false otherwise
[ "Determines", "whether", "two", "Request", "HTTP", "header", "sets", "are", "non", "-", "varying", "based", "on", "the", "vary", "response", "header", "value", "provided", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpKernel/HttpCache/Store.php#L264-L280
train
Checks if the Vary header matches the request headers
[ 30522, 2797, 3853, 11186, 18900, 2818, 1006, 1002, 8137, 1010, 1002, 4372, 2615, 2487, 1010, 1002, 4372, 2615, 2475, 1007, 1063, 2065, 1006, 4064, 1006, 1002, 8137, 1007, 1007, 1063, 2709, 2995, 1025, 1065, 18921, 6776, 1006, 3653, 2290, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/SitesManager/API.php
API.addSite
public function addSite($siteName, $urls = null, $ecommerce = null, $siteSearch = null, $searchKeywordParameters = null, $searchCategoryParameters = null, ...
php
public function addSite($siteName, $urls = null, $ecommerce = null, $siteSearch = null, $searchKeywordParameters = null, $searchCategoryParameters = null, ...
[ "public", "function", "addSite", "(", "$", "siteName", ",", "$", "urls", "=", "null", ",", "$", "ecommerce", "=", "null", ",", "$", "siteSearch", "=", "null", ",", "$", "searchKeywordParameters", "=", "null", ",", "$", "searchCategoryParameters", "=", "nul...
Add a website. Requires Super User access. The website is defined by a name and an array of URLs. @param string $siteName Site name @param array|string $urls The URLs array must contain at least one URL called the 'main_url' ; if several URLs are provided in the array, they will be recorded as Alias URLs for this webs...
[ "Add", "a", "website", ".", "Requires", "Super", "User", "access", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/SitesManager/API.php#L599-L715
train
Add a site to the site list
[ 30522, 2270, 3853, 9909, 4221, 1006, 1002, 2609, 18442, 1010, 1002, 24471, 4877, 1027, 19701, 1010, 1002, 17338, 15810, 3401, 1027, 19701, 1010, 1002, 4573, 14644, 2818, 1027, 19701, 1010, 1002, 3945, 14839, 18351, 28689, 22828, 2015, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/View/Compilers/BladeCompiler.php
BladeCompiler.compileStatement
protected function compileStatement($match) { if (Str::contains($match[1], '@')) { $match[0] = isset($match[3]) ? $match[1].$match[3] : $match[1]; } elseif (isset($this->customDirectives[$match[1]])) { $match[0] = $this->callCustomDirective($match[1], Arr::get($match, 3)); ...
php
protected function compileStatement($match) { if (Str::contains($match[1], '@')) { $match[0] = isset($match[3]) ? $match[1].$match[3] : $match[1]; } elseif (isset($this->customDirectives[$match[1]])) { $match[0] = $this->callCustomDirective($match[1], Arr::get($match, 3)); ...
[ "protected", "function", "compileStatement", "(", "$", "match", ")", "{", "if", "(", "Str", "::", "contains", "(", "$", "match", "[", "1", "]", ",", "'@'", ")", ")", "{", "$", "match", "[", "0", "]", "=", "isset", "(", "$", "match", "[", "3", "...
Compile a single Blade @ statement. @param array $match @return string
[ "Compile", "a", "single", "Blade", "@", "statement", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/View/Compilers/BladeCompiler.php#L356-L367
train
Compiles a statement into PHP code.
[ 30522, 5123, 3853, 4012, 22090, 9153, 18532, 4765, 1006, 1002, 2674, 1007, 1063, 2065, 1006, 2358, 2099, 1024, 1024, 3397, 1006, 1002, 2674, 1031, 1015, 1033, 1010, 1005, 1030, 1005, 1007, 1007, 1063, 1002, 2674, 1031, 1014, 1033, 1027, 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/Intl/Data/Generator/CurrencyDataGenerator.php
CurrencyDataGenerator.generateDataForMeta
protected function generateDataForMeta(BundleReaderInterface $reader, $tempDir) { $rootBundle = $reader->read($tempDir, 'root'); $supplementalDataBundle = $reader->read($tempDir, 'supplementalData'); $numericCodesBundle = $reader->read($tempDir, 'currencyNumericCodes'); $this->curre...
php
protected function generateDataForMeta(BundleReaderInterface $reader, $tempDir) { $rootBundle = $reader->read($tempDir, 'root'); $supplementalDataBundle = $reader->read($tempDir, 'supplementalData'); $numericCodesBundle = $reader->read($tempDir, 'currencyNumericCodes'); $this->curre...
[ "protected", "function", "generateDataForMeta", "(", "BundleReaderInterface", "$", "reader", ",", "$", "tempDir", ")", "{", "$", "rootBundle", "=", "$", "reader", "->", "read", "(", "$", "tempDir", ",", "'root'", ")", ";", "$", "supplementalDataBundle", "=", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Intl/Data/Generator/CurrencyDataGenerator.php#L128-L148
train
Generate data for meta
[ 30522, 5123, 3853, 7013, 6790, 14192, 12928, 1006, 14012, 16416, 4063, 18447, 2121, 12172, 1002, 8068, 1010, 1002, 8915, 8737, 4305, 2099, 1007, 1063, 1002, 7117, 27265, 2571, 1027, 1002, 8068, 1011, 1028, 3191, 1006, 1002, 8915, 8737, 4305...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Cache/Core.php
Zend_Cache_Core.setBackend
public function setBackend(Zend_Cache_Backend $backendObject) { $this->_backend= $backendObject; // some options (listed in $_directivesList) have to be given // to the backend too (even if they are not "backend specific") $directives = array(); foreach (Zend_Cache_Core::$_di...
php
public function setBackend(Zend_Cache_Backend $backendObject) { $this->_backend= $backendObject; // some options (listed in $_directivesList) have to be given // to the backend too (even if they are not "backend specific") $directives = array(); foreach (Zend_Cache_Core::$_di...
[ "public", "function", "setBackend", "(", "Zend_Cache_Backend", "$", "backendObject", ")", "{", "$", "this", "->", "_backend", "=", "$", "backendObject", ";", "// some options (listed in $_directivesList) have to be given", "// to the backend too (even if they are not \"backend sp...
Set the backend @param Zend_Cache_Backend $backendObject @throws Zend_Cache_Exception @return void
[ "Set", "the", "backend" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Cache/Core.php#L174-L189
train
set the cache backend
[ 30522, 2270, 3853, 2275, 5963, 10497, 1006, 16729, 2094, 1035, 17053, 1035, 2067, 10497, 1002, 2067, 10497, 16429, 20614, 1007, 1063, 1002, 2023, 1011, 1028, 1035, 2067, 10497, 1027, 1002, 2067, 10497, 16429, 20614, 1025, 1013, 1013, 2070, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Application.php
Application.run
public function run(InputInterface $input = null, OutputInterface $output = null) { putenv('LINES='.$this->terminal->getHeight()); putenv('COLUMNS='.$this->terminal->getWidth()); if (null === $input) { $input = new ArgvInput(); } if (null === $output) { ...
php
public function run(InputInterface $input = null, OutputInterface $output = null) { putenv('LINES='.$this->terminal->getHeight()); putenv('COLUMNS='.$this->terminal->getWidth()); if (null === $input) { $input = new ArgvInput(); } if (null === $output) { ...
[ "public", "function", "run", "(", "InputInterface", "$", "input", "=", "null", ",", "OutputInterface", "$", "output", "=", "null", ")", "{", "putenv", "(", "'LINES='", ".", "$", "this", "->", "terminal", "->", "getHeight", "(", ")", ")", ";", "putenv", ...
Runs the current application. @return int 0 if everything went fine, or an error code @throws \Exception When running fails. Bypass this when {@link setCatchExceptions()}.
[ "Runs", "the", "current", "application", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Application.php#L114-L191
train
Runs the terminal
[ 30522, 2270, 3853, 2448, 1006, 7953, 18447, 2121, 12172, 1002, 7953, 1027, 19701, 1010, 6434, 18447, 2121, 12172, 1002, 6434, 1027, 19701, 1007, 1063, 2404, 2368, 2615, 1006, 1005, 3210, 1027, 1005, 1012, 1002, 2023, 1011, 1028, 5536, 1011,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Grid/Concerns/HasFilter.php
HasFilter.disableFilter
public function disableFilter(bool $disable = true) { $this->tools->disableFilterButton($disable); return $this->option('show_filter', !$disable); }
php
public function disableFilter(bool $disable = true) { $this->tools->disableFilterButton($disable); return $this->option('show_filter', !$disable); }
[ "public", "function", "disableFilter", "(", "bool", "$", "disable", "=", "true", ")", "{", "$", "this", "->", "tools", "->", "disableFilterButton", "(", "$", "disable", ")", ";", "return", "$", "this", "->", "option", "(", "'show_filter'", ",", "!", "$",...
Disable grid filter. @return $this
[ "Disable", "grid", "filter", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Grid/Concerns/HasFilter.php#L33-L38
train
Disable the filter button
[ 30522, 2270, 3853, 4487, 19150, 8873, 21928, 1006, 22017, 2140, 1002, 4487, 19150, 1027, 2995, 1007, 1063, 1002, 2023, 1011, 1028, 5906, 1011, 1028, 4487, 19150, 8873, 21928, 8569, 15474, 1006, 1002, 4487, 19150, 1007, 1025, 2709, 1002, 202...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php
PropertyNormalizer.isAllowedAttribute
protected function isAllowedAttribute($classOrObject, $attribute, $format = null, array $context = []) { if (!parent::isAllowedAttribute($classOrObject, $attribute, $format, $context)) { return false; } try { $reflectionProperty = $this->getReflectionProperty($classO...
php
protected function isAllowedAttribute($classOrObject, $attribute, $format = null, array $context = []) { if (!parent::isAllowedAttribute($classOrObject, $attribute, $format, $context)) { return false; } try { $reflectionProperty = $this->getReflectionProperty($classO...
[ "protected", "function", "isAllowedAttribute", "(", "$", "classOrObject", ",", "$", "attribute", ",", "$", "format", "=", "null", ",", "array", "$", "context", "=", "[", "]", ")", "{", "if", "(", "!", "parent", "::", "isAllowedAttribute", "(", "$", "clas...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php#L79-L95
train
Check if an attribute is allowed in the class
[ 30522, 5123, 3853, 18061, 7174, 15557, 19321, 3089, 8569, 2618, 1006, 1002, 2465, 14604, 2497, 20614, 1010, 1002, 17961, 1010, 1002, 4289, 1027, 19701, 1010, 9140, 1002, 6123, 1027, 1031, 1033, 1007, 1063, 2065, 1006, 999, 6687, 1024, 1024,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Routing/ImplicitRouteBinding.php
ImplicitRouteBinding.resolveForRoute
public static function resolveForRoute($container, $route) { $parameters = $route->parameters(); foreach ($route->signatureParameters(UrlRoutable::class) as $parameter) { if (! $parameterName = static::getParameterName($parameter->name, $parameters)) { continue; ...
php
public static function resolveForRoute($container, $route) { $parameters = $route->parameters(); foreach ($route->signatureParameters(UrlRoutable::class) as $parameter) { if (! $parameterName = static::getParameterName($parameter->name, $parameters)) { continue; ...
[ "public", "static", "function", "resolveForRoute", "(", "$", "container", ",", "$", "route", ")", "{", "$", "parameters", "=", "$", "route", "->", "parameters", "(", ")", ";", "foreach", "(", "$", "route", "->", "signatureParameters", "(", "UrlRoutable", "...
Resolve the implicit route bindings for the given route. @param \Illuminate\Container\Container $container @param \Illuminate\Routing\Route $route @return void @throws \Illuminate\Database\Eloquent\ModelNotFoundException
[ "Resolve", "the", "implicit", "route", "bindings", "for", "the", "given", "route", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/ImplicitRouteBinding.php#L20-L43
train
Resolve for route
[ 30522, 2270, 10763, 3853, 10663, 29278, 22494, 2618, 1006, 1002, 11661, 1010, 1002, 2799, 1007, 1063, 1002, 11709, 1027, 1002, 2799, 1011, 1028, 11709, 1006, 1007, 1025, 18921, 6776, 1006, 1002, 2799, 1011, 1028, 8085, 28689, 22828, 2015, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Cache/Core.php
Zend_Cache_Core.load
public function load($id, $doNotTestCacheValidity = false, $doNotUnserialize = false) { if (!$this->_options['caching']) { return false; } $id = $this->_id($id); // cache id may need prefix $this->_lastId = $id; self::_validateIdOrTag($id); $this->_log("Z...
php
public function load($id, $doNotTestCacheValidity = false, $doNotUnserialize = false) { if (!$this->_options['caching']) { return false; } $id = $this->_id($id); // cache id may need prefix $this->_lastId = $id; self::_validateIdOrTag($id); $this->_log("Z...
[ "public", "function", "load", "(", "$", "id", ",", "$", "doNotTestCacheValidity", "=", "false", ",", "$", "doNotUnserialize", "=", "false", ")", "{", "if", "(", "!", "$", "this", "->", "_options", "[", "'caching'", "]", ")", "{", "return", "false", ";"...
Test if a cache is available for the given id and (if yes) return it (false else) @param string $id Cache id @param boolean $doNotTestCacheValidity If set to true, the cache validity won't be tested @param boolean $doNotUnserialize Do not serialize (even if automatic_serialization is true...
[ "Test", "if", "a", "cache", "is", "available", "for", "the", "given", "id", "and", "(", "if", "yes", ")", "return", "it", "(", "false", "else", ")" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Cache/Core.php#L295-L315
train
Load an item from the cache
[ 30522, 2270, 3853, 7170, 1006, 1002, 8909, 1010, 1002, 2123, 28495, 3367, 3540, 16179, 11475, 25469, 1027, 6270, 1010, 1002, 2123, 4140, 4609, 8043, 4818, 4697, 1027, 6270, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 1035, 7047, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Uri.php
Uri.init
public function init() { $grav = Grav::instance(); /** @var Config $config */ $config = $grav['config']; /** @var Language $language */ $language = $grav['language']; // add the port to the base for non-standard ports if ($this->port !== null && $config->ge...
php
public function init() { $grav = Grav::instance(); /** @var Config $config */ $config = $grav['config']; /** @var Language $language */ $language = $grav['language']; // add the port to the base for non-standard ports if ($this->port !== null && $config->ge...
[ "public", "function", "init", "(", ")", "{", "$", "grav", "=", "Grav", "::", "instance", "(", ")", ";", "/** @var Config $config */", "$", "config", "=", "$", "grav", "[", "'config'", "]", ";", "/** @var Language $language */", "$", "language", "=", "$", "...
Initializes the URI object based on the url set on the object
[ "Initializes", "the", "URI", "object", "based", "on", "the", "url", "set", "on", "the", "object" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Uri.php#L119-L210
train
Initializes the class variables
[ 30522, 2270, 3853, 1999, 4183, 1006, 1007, 1063, 1002, 24665, 11431, 1027, 24665, 11431, 1024, 1024, 6013, 1006, 1007, 1025, 1013, 1008, 1008, 1030, 13075, 9530, 8873, 2290, 1002, 9530, 8873, 2290, 1008, 1013, 1002, 9530, 8873, 2290, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Foundation/Console/VendorPublishCommand.php
VendorPublishCommand.handle
public function handle() { $this->determineWhatShouldBePublished(); foreach ($this->tags ?: [null] as $tag) { $this->publishTag($tag); } $this->info('Publishing complete.'); }
php
public function handle() { $this->determineWhatShouldBePublished(); foreach ($this->tags ?: [null] as $tag) { $this->publishTag($tag); } $this->info('Publishing complete.'); }
[ "public", "function", "handle", "(", ")", "{", "$", "this", "->", "determineWhatShouldBePublished", "(", ")", ";", "foreach", "(", "$", "this", "->", "tags", "?", ":", "[", "null", "]", "as", "$", "tag", ")", "{", "$", "this", "->", "publishTag", "("...
Execute the console command. @return void
[ "Execute", "the", "console", "command", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Console/VendorPublishCommand.php#L71-L80
train
Publishes all tags
[ 30522, 2270, 3853, 5047, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 5646, 2860, 12707, 22231, 21285, 4783, 14289, 16558, 13295, 1006, 1007, 1025, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 22073, 1029, 1024, 1031, 19701, 1033, 2004, 1002, 64...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Frame.php
Frame.get_margin_width
public function get_margin_width() { $style = $this->_style; return (float)$style->length_in_pt(array( $style->width, $style->margin_left, $style->margin_right, $style->border_left_width, $style->border_right_width, $style->pad...
php
public function get_margin_width() { $style = $this->_style; return (float)$style->length_in_pt(array( $style->width, $style->margin_left, $style->margin_right, $style->border_left_width, $style->border_right_width, $style->pad...
[ "public", "function", "get_margin_width", "(", ")", "{", "$", "style", "=", "$", "this", "->", "_style", ";", "return", "(", "float", ")", "$", "style", "->", "length_in_pt", "(", "array", "(", "$", "style", "->", "width", ",", "$", "style", "->", "m...
Return the width of the margin box of the frame, in pt. Meaningless unless the width has been calculated properly. @return float
[ "Return", "the", "width", "of", "the", "margin", "box", "of", "the", "frame", "in", "pt", ".", "Meaningless", "unless", "the", "width", "has", "been", "calculated", "properly", "." ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/Frame.php#L495-L508
train
Return the width of the margin box
[ 30522, 2270, 3853, 2131, 1035, 7785, 1035, 9381, 1006, 1007, 1063, 1002, 2806, 1027, 1002, 2023, 1011, 1028, 1035, 2806, 1025, 2709, 1006, 14257, 1007, 1002, 2806, 1011, 1028, 3091, 1035, 1999, 1035, 13866, 1006, 9140, 1006, 1002, 2806, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Eloquent/Builder.php
Builder.withoutGlobalScope
public function withoutGlobalScope($scope) { if (! is_string($scope)) { $scope = get_class($scope); } unset($this->scopes[$scope]); $this->removedScopes[] = $scope; return $this; }
php
public function withoutGlobalScope($scope) { if (! is_string($scope)) { $scope = get_class($scope); } unset($this->scopes[$scope]); $this->removedScopes[] = $scope; return $this; }
[ "public", "function", "withoutGlobalScope", "(", "$", "scope", ")", "{", "if", "(", "!", "is_string", "(", "$", "scope", ")", ")", "{", "$", "scope", "=", "get_class", "(", "$", "scope", ")", ";", "}", "unset", "(", "$", "this", "->", "scopes", "["...
Remove a registered global scope. @param \Illuminate\Database\Eloquent\Scope|string $scope @return $this
[ "Remove", "a", "registered", "global", "scope", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Builder.php#L138-L149
train
Remove a global scope from the list of scopes
[ 30522, 2270, 3853, 2302, 23296, 16429, 9777, 16186, 1006, 1002, 9531, 1007, 1063, 2065, 1006, 999, 2003, 1035, 5164, 1006, 1002, 9531, 1007, 1007, 1063, 1002, 9531, 1027, 2131, 1035, 2465, 1006, 1002, 9531, 1007, 1025, 1065, 4895, 13462, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Tools/ColumnSelector.php
ColumnSelector.render
public function render() { if (!$this->grid->showColumnSelector()) { return ''; } $show = array_filter(explode(',', request(static::SELECT_COLUMN_NAME))); $columns = $this->getGridColumns(); $this->setupScript(); $lists = $columns->map(function ($val, $...
php
public function render() { if (!$this->grid->showColumnSelector()) { return ''; } $show = array_filter(explode(',', request(static::SELECT_COLUMN_NAME))); $columns = $this->getGridColumns(); $this->setupScript(); $lists = $columns->map(function ($val, $...
[ "public", "function", "render", "(", ")", "{", "if", "(", "!", "$", "this", "->", "grid", "->", "showColumnSelector", "(", ")", ")", "{", "return", "''", ";", "}", "$", "show", "=", "array_filter", "(", "explode", "(", "','", ",", "request", "(", "...
{@inheritdoc} @return string
[ "{", "@inheritdoc", "}" ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Grid/Tools/ColumnSelector.php#L33-L87
train
Renders the language tree
[ 30522, 2270, 3853, 17552, 1006, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 8370, 1011, 1028, 2265, 25778, 2819, 12325, 2571, 16761, 1006, 1007, 1007, 1063, 2709, 1005, 1005, 1025, 1065, 1002, 2265, 1027, 9140, 1035, 11307, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Utils.php
Utils.getPagePathFromToken
public static function getPagePathFromToken($path, PageInterface $page = null) { $path_parts = pathinfo($path); $grav = Grav::instance(); $basename = ''; if (isset($path_parts['extension'])) { $basename = '/' . $path_parts['basename']; $path = rtrim...
php
public static function getPagePathFromToken($path, PageInterface $page = null) { $path_parts = pathinfo($path); $grav = Grav::instance(); $basename = ''; if (isset($path_parts['extension'])) { $basename = '/' . $path_parts['basename']; $path = rtrim...
[ "public", "static", "function", "getPagePathFromToken", "(", "$", "path", ",", "PageInterface", "$", "page", "=", "null", ")", "{", "$", "path_parts", "=", "pathinfo", "(", "$", "path", ")", ";", "$", "grav", "=", "Grav", "::", "instance", "(", ")", ";...
Get's path based on a token @param string $path @param PageInterface|null $page @return string @throws \RuntimeException
[ "Get", "s", "path", "based", "on", "a", "token" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Utils.php#L1297-L1340
train
Get the page path from a token
[ 30522, 2270, 10763, 3853, 2131, 13704, 15069, 19699, 5358, 18715, 2368, 1006, 1002, 4130, 1010, 3931, 18447, 2121, 12172, 1002, 3931, 1027, 19701, 1007, 1063, 1002, 4130, 1035, 3033, 1027, 4130, 2378, 14876, 1006, 1002, 4130, 1007, 1025, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
barryvdh/laravel-debugbar
src/DataFormatter/QueryFormatter.php
QueryFormatter.escapeBindings
public function escapeBindings($bindings) { foreach ($bindings as &$binding) { $binding = htmlentities($binding, ENT_QUOTES, 'UTF-8', false); } return $bindings; }
php
public function escapeBindings($bindings) { foreach ($bindings as &$binding) { $binding = htmlentities($binding, ENT_QUOTES, 'UTF-8', false); } return $bindings; }
[ "public", "function", "escapeBindings", "(", "$", "bindings", ")", "{", "foreach", "(", "$", "bindings", "as", "&", "$", "binding", ")", "{", "$", "binding", "=", "htmlentities", "(", "$", "binding", ",", "ENT_QUOTES", ",", "'UTF-8'", ",", "false", ")", ...
Make the bindings safe for outputting. @param array $bindings @return array
[ "Make", "the", "bindings", "safe", "for", "outputting", "." ]
2d195779ea4f809f69764a795e2ec371dbb76a96
https://github.com/barryvdh/laravel-debugbar/blob/2d195779ea4f809f69764a795e2ec371dbb76a96/src/DataFormatter/QueryFormatter.php#L44-L51
train
escape all bindings
[ 30522, 2270, 3853, 4019, 8428, 4667, 2015, 1006, 1002, 8031, 2015, 1007, 1063, 18921, 6776, 1006, 1002, 8031, 2015, 2004, 1004, 1002, 8031, 1007, 1063, 1002, 8031, 1027, 16129, 4765, 6447, 1006, 1002, 8031, 1010, 4372, 2102, 1035, 16614, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Sparklines/Config.php
Config.replaceSparklineMetric
public function replaceSparklineMetric($metricNames, $replacementColumns) { foreach ($this->sparkline_metrics as $index => $metric) { if ($metric['columns'] === $metricNames) { $this->sparkline_metrics[$index]['columns'] = $replacementColumns; } } }
php
public function replaceSparklineMetric($metricNames, $replacementColumns) { foreach ($this->sparkline_metrics as $index => $metric) { if ($metric['columns'] === $metricNames) { $this->sparkline_metrics[$index]['columns'] = $replacementColumns; } } }
[ "public", "function", "replaceSparklineMetric", "(", "$", "metricNames", ",", "$", "replacementColumns", ")", "{", "foreach", "(", "$", "this", "->", "sparkline_metrics", "as", "$", "index", "=>", "$", "metric", ")", "{", "if", "(", "$", "metric", "[", "'c...
Replaces an existing sparkline entry with different columns. Especially useful in dataTable filters in case sparklines should be not displayed depending on the fetched data. Example: $config->addSparklineMetric('nb_users'); $config->filters[] = function ($dataTable) use ($config) { if ($dataTable->getFirstRow()->getCo...
[ "Replaces", "an", "existing", "sparkline", "entry", "with", "different", "columns", ".", "Especially", "useful", "in", "dataTable", "filters", "in", "case", "sparklines", "should", "be", "not", "displayed", "depending", "on", "the", "fetched", "data", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/CoreVisualizations/Visualizations/Sparklines/Config.php#L118-L125
train
Replace the sparkline metric with the new columns
[ 30522, 2270, 3853, 20736, 14432, 4179, 12589, 1006, 1002, 12046, 18442, 2015, 1010, 1002, 6110, 25778, 2819, 3619, 1007, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 12125, 4179, 1035, 12046, 2015, 2004, 1002, 5950, 1027, 1028, 1002, 12...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/TwigExtension.php
TwigExtension.absoluteUrlFilter
public function absoluteUrlFilter($string) { $url = $this->grav['uri']->base(); $string = preg_replace('/((?:href|src) *= *[\'"](?!(http|ftp)))/i', "$1$url", $string); return $string; }
php
public function absoluteUrlFilter($string) { $url = $this->grav['uri']->base(); $string = preg_replace('/((?:href|src) *= *[\'"](?!(http|ftp)))/i', "$1$url", $string); return $string; }
[ "public", "function", "absoluteUrlFilter", "(", "$", "string", ")", "{", "$", "url", "=", "$", "this", "->", "grav", "[", "'uri'", "]", "->", "base", "(", ")", ";", "$", "string", "=", "preg_replace", "(", "'/((?:href|src) *= *[\\'\"](?!(http|ftp)))/i'", ","...
@param string $string @return mixed
[ "@param", "string", "$string" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Twig/TwigExtension.php#L604-L611
train
This filter is used to filter the absolute URL of a string.
[ 30522, 2270, 3853, 7619, 3126, 10270, 4014, 3334, 1006, 1002, 5164, 1007, 1063, 1002, 24471, 2140, 1027, 1002, 2023, 1011, 1028, 24665, 11431, 1031, 1005, 24471, 2072, 1005, 1033, 1011, 1028, 2918, 1006, 1007, 1025, 1002, 5164, 1027, 3653, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
barryvdh/laravel-debugbar
src/DataCollector/LogsCollector.php
LogsCollector.tailFile
protected function tailFile($file, $lines) { $handle = fopen($file, "r"); $linecounter = $lines; $pos = -2; $beginning = false; $text = []; while ($linecounter > 0) { $t = " "; while ($t != "\n") { if (fseek($handle, $pos, SEEK_...
php
protected function tailFile($file, $lines) { $handle = fopen($file, "r"); $linecounter = $lines; $pos = -2; $beginning = false; $text = []; while ($linecounter > 0) { $t = " "; while ($t != "\n") { if (fseek($handle, $pos, SEEK_...
[ "protected", "function", "tailFile", "(", "$", "file", ",", "$", "lines", ")", "{", "$", "handle", "=", "fopen", "(", "$", "file", ",", "\"r\"", ")", ";", "$", "linecounter", "=", "$", "lines", ";", "$", "pos", "=", "-", "2", ";", "$", "beginning...
By Ain Tohvri (ain) http://tekkie.flashbit.net/php/tail-functionality-in-php @param string $file @param int $lines @return array
[ "By", "Ain", "Tohvri", "(", "ain", ")", "http", ":", "//", "tekkie", ".", "flashbit", ".", "net", "/", "php", "/", "tail", "-", "functionality", "-", "in", "-", "php" ]
2d195779ea4f809f69764a795e2ec371dbb76a96
https://github.com/barryvdh/laravel-debugbar/blob/2d195779ea4f809f69764a795e2ec371dbb76a96/src/DataCollector/LogsCollector.php#L67-L95
train
Tail a file
[ 30522, 5123, 3853, 5725, 8873, 2571, 1006, 1002, 5371, 1010, 1002, 3210, 1007, 1063, 1002, 5047, 1027, 1042, 26915, 1006, 1002, 5371, 1010, 1000, 1054, 1000, 1007, 1025, 1002, 2240, 3597, 16671, 2121, 1027, 1002, 3210, 1025, 1002, 13433, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Stylesheet.php
Stylesheet.load_css
function load_css(&$css, $origin = self::ORIG_AUTHOR) { if ($origin) { $this->_current_origin = $origin; } $this->_parse_css($css); }
php
function load_css(&$css, $origin = self::ORIG_AUTHOR) { if ($origin) { $this->_current_origin = $origin; } $this->_parse_css($css); }
[ "function", "load_css", "(", "&", "$", "css", ",", "$", "origin", "=", "self", "::", "ORIG_AUTHOR", ")", "{", "if", "(", "$", "origin", ")", "{", "$", "this", "->", "_current_origin", "=", "$", "origin", ";", "}", "$", "this", "->", "_parse_css", "...
load and parse a CSS string @param string $css @param int $origin
[ "load", "and", "parse", "a", "CSS", "string" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/Css/Stylesheet.php#L324-L330
train
Load the CSS file
[ 30522, 3853, 7170, 1035, 20116, 2015, 1006, 1004, 1002, 20116, 2015, 1010, 1002, 4761, 1027, 2969, 1024, 1024, 2030, 8004, 1035, 3166, 1007, 1063, 2065, 1006, 1002, 4761, 1007, 1063, 1002, 2023, 1011, 1028, 1035, 2783, 1035, 4761, 1027, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Plugin/Controller.php
Controller.setGeneralVariablesView
protected function setGeneralVariablesView($view) { $view->idSite = $this->idSite; $this->checkSitePermission(); $this->setPeriodVariablesView($view); $view->siteName = $this->site->getName(); $view->siteMainUrl = $this->site->getMainUrl(); $siteTimezone = $this->si...
php
protected function setGeneralVariablesView($view) { $view->idSite = $this->idSite; $this->checkSitePermission(); $this->setPeriodVariablesView($view); $view->siteName = $this->site->getName(); $view->siteMainUrl = $this->site->getMainUrl(); $siteTimezone = $this->si...
[ "protected", "function", "setGeneralVariablesView", "(", "$", "view", ")", "{", "$", "view", "->", "idSite", "=", "$", "this", "->", "idSite", ";", "$", "this", "->", "checkSitePermission", "(", ")", ";", "$", "this", "->", "setPeriodVariablesView", "(", "...
Assigns variables to {@link Piwik\View} instances that display an entire page. The following variables assigned: **date** - The value of the **date** query parameter. **idSite** - The value of the **idSite** query parameter. **rawDate** - The value of the **date** query parameter. **prettyDate** - A pretty string des...
[ "Assigns", "variables", "to", "{", "@link", "Piwik", "\\", "View", "}", "instances", "that", "display", "an", "entire", "page", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Plugin/Controller.php#L582-L656
train
Set the variables view for the calendar
[ 30522, 5123, 3853, 2275, 6914, 21673, 10755, 19210, 2015, 8584, 1006, 1002, 3193, 1007, 1063, 1002, 3193, 1011, 1028, 8909, 28032, 2063, 1027, 1002, 2023, 1011, 1028, 8909, 28032, 2063, 1025, 1002, 2023, 1011, 1028, 14148, 4221, 4842, 25481...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Archiver.php
Archiver.insertDayReports
protected function insertDayReports() { $this->insertDayNumericMetrics(); // insert DataTable reports foreach ($this->getRecordNames() as $recordName) { $blob = $this->getDataArray($recordName)->asDataTable()->getSerialized($this->maximumRowsInDataTableLevelZero, $this->maximumR...
php
protected function insertDayReports() { $this->insertDayNumericMetrics(); // insert DataTable reports foreach ($this->getRecordNames() as $recordName) { $blob = $this->getDataArray($recordName)->asDataTable()->getSerialized($this->maximumRowsInDataTableLevelZero, $this->maximumR...
[ "protected", "function", "insertDayReports", "(", ")", "{", "$", "this", "->", "insertDayNumericMetrics", "(", ")", ";", "// insert DataTable reports", "foreach", "(", "$", "this", "->", "getRecordNames", "(", ")", "as", "$", "recordName", ")", "{", "$", "blob...
Records the daily stats (numeric or datatable blob) into the archive tables.
[ "Records", "the", "daily", "stats", "(", "numeric", "or", "datatable", "blob", ")", "into", "the", "archive", "tables", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Referrers/Archiver.php#L205-L214
train
Insert Day reports
[ 30522, 5123, 3853, 19274, 10259, 2890, 25378, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 19274, 10259, 19172, 22420, 12589, 2015, 1006, 1007, 1025, 1013, 1013, 30524, 2004, 2850, 29336, 3085, 1006, 1007, 1011, 1028, 4152, 11610, 28931, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/ServiceProvider.php
ServiceProvider.registerBackendSettings
protected function registerBackendSettings() { SettingsManager::instance()->registerCallback(function ($manager) { $manager->registerSettingItems('October.Backend', [ 'branding' => [ 'label' => 'backend::lang.branding.menu_label', 'de...
php
protected function registerBackendSettings() { SettingsManager::instance()->registerCallback(function ($manager) { $manager->registerSettingItems('October.Backend', [ 'branding' => [ 'label' => 'backend::lang.branding.menu_label', 'de...
[ "protected", "function", "registerBackendSettings", "(", ")", "{", "SettingsManager", "::", "instance", "(", ")", "->", "registerCallback", "(", "function", "(", "$", "manager", ")", "{", "$", "manager", "->", "registerSettingItems", "(", "'October.Backend'", ",",...
/* Register settings
[ "/", "*", "Register", "settings" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/ServiceProvider.php#L194-L249
train
Registers the backend settings
[ 30522, 5123, 3853, 4236, 5963, 10497, 21678, 8613, 1006, 1007, 1063, 10906, 24805, 4590, 1024, 1024, 6013, 1006, 1007, 1011, 1028, 4236, 9289, 20850, 8684, 1006, 3853, 1006, 1002, 3208, 1007, 1063, 1002, 3208, 1011, 1028, 18687, 18319, 3070...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/ValidatorBuilder.php
ValidatorBuilder.addXmlMappings
public function addXmlMappings(array $paths) { if (null !== $this->metadataFactory) { throw new ValidatorException('You cannot add custom mappings after setting a custom metadata factory. Configure your metadata factory instead.'); } $this->xmlMappings = array_merge($this->xmlMa...
php
public function addXmlMappings(array $paths) { if (null !== $this->metadataFactory) { throw new ValidatorException('You cannot add custom mappings after setting a custom metadata factory. Configure your metadata factory instead.'); } $this->xmlMappings = array_merge($this->xmlMa...
[ "public", "function", "addXmlMappings", "(", "array", "$", "paths", ")", "{", "if", "(", "null", "!==", "$", "this", "->", "metadataFactory", ")", "{", "throw", "new", "ValidatorException", "(", "'You cannot add custom mappings after setting a custom metadata factory. C...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Validator/ValidatorBuilder.php#L119-L128
train
Add custom xml mappings
[ 30522, 2270, 3853, 5587, 2595, 19968, 2863, 14853, 2015, 1006, 9140, 1002, 10425, 1007, 1063, 2065, 1006, 19701, 999, 1027, 1027, 1002, 2023, 1011, 1028, 27425, 21450, 1007, 1063, 5466, 2047, 9398, 8844, 10288, 24422, 1006, 1005, 2017, 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...
laravel/framework
src/Illuminate/Validation/ValidationRuleParser.php
ValidationRuleParser.mergeRulesForAttribute
protected function mergeRulesForAttribute($results, $attribute, $rules) { $merge = head($this->explodeRules([$rules])); $results[$attribute] = array_merge( isset($results[$attribute]) ? $this->explodeExplicitRule($results[$attribute]) : [], $merge ); return $results; ...
php
protected function mergeRulesForAttribute($results, $attribute, $rules) { $merge = head($this->explodeRules([$rules])); $results[$attribute] = array_merge( isset($results[$attribute]) ? $this->explodeExplicitRule($results[$attribute]) : [], $merge ); return $results; ...
[ "protected", "function", "mergeRulesForAttribute", "(", "$", "results", ",", "$", "attribute", ",", "$", "rules", ")", "{", "$", "merge", "=", "head", "(", "$", "this", "->", "explodeRules", "(", "[", "$", "rules", "]", ")", ")", ";", "$", "results", ...
Merge additional rules into a given attribute. @param array $results @param string $attribute @param string|array $rules @return array
[ "Merge", "additional", "rules", "into", "a", "given", "attribute", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/ValidationRuleParser.php#L175-L184
train
Merge rules for attribute
[ 30522, 5123, 3853, 7660, 16308, 29278, 19321, 3089, 8569, 2618, 1006, 1002, 3463, 1010, 1002, 17961, 1010, 1002, 3513, 1007, 1063, 1002, 13590, 1027, 2132, 1006, 1002, 2023, 1011, 1028, 15044, 6820, 4244, 1006, 1031, 1002, 3513, 1033, 1007,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Console/Migrations/InstallCommand.php
InstallCommand.handle
public function handle() { $this->repository->setSource($this->input->getOption('database')); $this->repository->createRepository(); $this->info('Migration table created successfully.'); }
php
public function handle() { $this->repository->setSource($this->input->getOption('database')); $this->repository->createRepository(); $this->info('Migration table created successfully.'); }
[ "public", "function", "handle", "(", ")", "{", "$", "this", "->", "repository", "->", "setSource", "(", "$", "this", "->", "input", "->", "getOption", "(", "'database'", ")", ")", ";", "$", "this", "->", "repository", "->", "createRepository", "(", ")", ...
Execute the console command. @return void
[ "Execute", "the", "console", "command", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Console/Migrations/InstallCommand.php#L50-L57
train
Create migration table
[ 30522, 2270, 3853, 5047, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 22409, 1011, 1028, 4520, 8162, 3401, 1006, 1002, 2023, 1011, 1028, 7953, 1011, 1028, 2131, 7361, 3508, 1006, 1005, 7809, 1005, 1007, 1007, 1025, 1002, 2023, 1011, 1028, 22...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Console/Output/StreamOutput.php
StreamOutput.hasColorSupport
protected function hasColorSupport() { if ('Hyper' === getenv('TERM_PROGRAM')) { return true; } if (\DIRECTORY_SEPARATOR === '\\') { return (\function_exists('sapi_windows_vt100_support') && @sapi_windows_vt100_support($this->stream)) ...
php
protected function hasColorSupport() { if ('Hyper' === getenv('TERM_PROGRAM')) { return true; } if (\DIRECTORY_SEPARATOR === '\\') { return (\function_exists('sapi_windows_vt100_support') && @sapi_windows_vt100_support($this->stream)) ...
[ "protected", "function", "hasColorSupport", "(", ")", "{", "if", "(", "'Hyper'", "===", "getenv", "(", "'TERM_PROGRAM'", ")", ")", "{", "return", "true", ";", "}", "if", "(", "\\", "DIRECTORY_SEPARATOR", "===", "'\\\\'", ")", "{", "return", "(", "\\", "f...
Returns true if the stream supports colorization. Colorization is disabled if not supported by the stream: This is tricky on Windows, because Cygwin, Msys2 etc emulate pseudo terminals via named pipes, so we can only check the environment. Reference: Composer\XdebugHandler\Process::supportsColor https://github.com/c...
[ "Returns", "true", "if", "the", "stream", "supports", "colorization", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Output/StreamOutput.php#L98-L123
train
Returns true if the current stream has color support
[ 30522, 5123, 3853, 2038, 18717, 6342, 9397, 30524, 2615, 1006, 1005, 2744, 1035, 2565, 1005, 1007, 1007, 1063, 2709, 2995, 1025, 1065, 2065, 1006, 1032, 14176, 1035, 19802, 25879, 2953, 1027, 1027, 1027, 1005, 1032, 1032, 1005, 1007, 1063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/cms/classes/CmsObject.php
CmsObject.getFilePath
public function getFilePath($fileName = null) { if ($fileName === null) { $fileName = $this->fileName; } return $this->theme->getPath().'/'.$this->getObjectTypeDirName().'/'.$fileName; }
php
public function getFilePath($fileName = null) { if ($fileName === null) { $fileName = $this->fileName; } return $this->theme->getPath().'/'.$this->getObjectTypeDirName().'/'.$fileName; }
[ "public", "function", "getFilePath", "(", "$", "fileName", "=", "null", ")", "{", "if", "(", "$", "fileName", "===", "null", ")", "{", "$", "fileName", "=", "$", "this", "->", "fileName", ";", "}", "return", "$", "this", "->", "theme", "->", "getPath...
Returns the full path to the template file corresponding to this object. @param string $fileName @return string
[ "Returns", "the", "full", "path", "to", "the", "template", "file", "corresponding", "to", "this", "object", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/classes/CmsObject.php#L224-L231
train
Get the file path of the object
[ 30522, 2270, 3853, 2131, 8873, 2571, 15069, 1006, 1002, 5371, 18442, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 5371, 18442, 1027, 1027, 1027, 19701, 1007, 1063, 1002, 5371, 18442, 1027, 1002, 2023, 1011, 1028, 5371, 18442, 1025, 1065, 2709...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Access.php
Access.getCapabilitiesForSite
public function getCapabilitiesForSite($idSite) { $result = []; foreach ($this->capabilityProvider->getAllCapabilityIds() as $capabilityId) { if (empty($this->idsitesByAccess[$capabilityId])) { continue; } if (in_array($idSite, $this->idsitesByAcc...
php
public function getCapabilitiesForSite($idSite) { $result = []; foreach ($this->capabilityProvider->getAllCapabilityIds() as $capabilityId) { if (empty($this->idsitesByAccess[$capabilityId])) { continue; } if (in_array($idSite, $this->idsitesByAcc...
[ "public", "function", "getCapabilitiesForSite", "(", "$", "idSite", ")", "{", "$", "result", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "capabilityProvider", "->", "getAllCapabilityIds", "(", ")", "as", "$", "capabilityId", ")", "{", "if", "(",...
Returns the capabilities the current user has for a given site. @param int $idSite The site to check. @return string[] The capabilities the user has.
[ "Returns", "the", "capabilities", "the", "current", "user", "has", "for", "a", "given", "site", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Access.php#L677-L690
train
Returns the capability ids for the given site
[ 30522, 2270, 3853, 2131, 17695, 28518, 15909, 3111, 29278, 28032, 2063, 1006, 1002, 8909, 28032, 2063, 1007, 1063, 1002, 2765, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 10673, 21572, 17258, 2121, 1011, 1028, 2131, 8...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
barryvdh/laravel-debugbar
src/Storage/FilesystemStorage.php
FilesystemStorage.get
public function get($id) { return json_decode($this->files->get($this->makeFilename($id)), true); }
php
public function get($id) { return json_decode($this->files->get($this->makeFilename($id)), true); }
[ "public", "function", "get", "(", "$", "id", ")", "{", "return", "json_decode", "(", "$", "this", "->", "files", "->", "get", "(", "$", "this", "->", "makeFilename", "(", "$", "id", ")", ")", ",", "true", ")", ";", "}" ]
{@inheritDoc}
[ "{" ]
2d195779ea4f809f69764a795e2ec371dbb76a96
https://github.com/barryvdh/laravel-debugbar/blob/2d195779ea4f809f69764a795e2ec371dbb76a96/src/Storage/FilesystemStorage.php#L80-L83
train
Get the record from the cache
[ 30522, 2270, 3853, 2131, 1006, 1002, 8909, 1007, 1063, 2709, 1046, 3385, 1035, 21933, 3207, 1006, 1002, 2023, 1011, 1028, 6764, 1011, 1028, 2131, 1006, 1002, 2023, 1011, 1028, 2191, 8873, 20844, 4168, 1006, 1002, 8909, 1007, 1007, 1010, 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
plugins/UserCountry/UserCountry.php
UserCountry.getCountriesForContinent
public static function getCountriesForContinent($continent) { /** @var RegionDataProvider $regionDataProvider */ $regionDataProvider = StaticContainer::get('Piwik\Intl\Data\Provider\RegionDataProvider'); $result = array(); $continent = strtolower($continent); foreach ($regio...
php
public static function getCountriesForContinent($continent) { /** @var RegionDataProvider $regionDataProvider */ $regionDataProvider = StaticContainer::get('Piwik\Intl\Data\Provider\RegionDataProvider'); $result = array(); $continent = strtolower($continent); foreach ($regio...
[ "public", "static", "function", "getCountriesForContinent", "(", "$", "continent", ")", "{", "/** @var RegionDataProvider $regionDataProvider */", "$", "regionDataProvider", "=", "StaticContainer", "::", "get", "(", "'Piwik\\Intl\\Data\\Provider\\RegionDataProvider'", ")", ";",...
Returns a list of country codes for a given continent code. @param string $continent The continent code. @return array
[ "Returns", "a", "list", "of", "country", "codes", "for", "a", "given", "continent", "code", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/UserCountry/UserCountry.php#L72-L86
train
Returns all the countries for a given continent
[ 30522, 2270, 10763, 3853, 2131, 3597, 16671, 5134, 29278, 8663, 10196, 3372, 1006, 1002, 9983, 1007, 1063, 1013, 1008, 1008, 1030, 13075, 2555, 2850, 2696, 21572, 17258, 2121, 1002, 2555, 2850, 2696, 21572, 17258, 2121, 1008, 1013, 1002, 25...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
FrameworkExtension.createPackageDefinition
private function createPackageDefinition($basePath, array $baseUrls, Reference $version) { if ($basePath && $baseUrls) { throw new \LogicException('An asset package cannot have base URLs and base paths.'); } $package = new ChildDefinition($baseUrls ? 'assets.url_package' : 'asse...
php
private function createPackageDefinition($basePath, array $baseUrls, Reference $version) { if ($basePath && $baseUrls) { throw new \LogicException('An asset package cannot have base URLs and base paths.'); } $package = new ChildDefinition($baseUrls ? 'assets.url_package' : 'asse...
[ "private", "function", "createPackageDefinition", "(", "$", "basePath", ",", "array", "$", "baseUrls", ",", "Reference", "$", "version", ")", "{", "if", "(", "$", "basePath", "&&", "$", "baseUrls", ")", "{", "throw", "new", "\\", "LogicException", "(", "'A...
Returns a definition for an asset package.
[ "Returns", "a", "definition", "for", "an", "asset", "package", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php#L1038-L1052
train
Create a child definition for the asset package
[ 30522, 2797, 3853, 3443, 23947, 18655, 12879, 5498, 3508, 1006, 1002, 2918, 15069, 1010, 9140, 1002, 2918, 3126, 4877, 1010, 4431, 1002, 2544, 30524, 1032, 7961, 10288, 24422, 1006, 1005, 2019, 11412, 7427, 3685, 2031, 2918, 24471, 4877, 19...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dompdf/dompdf
lib/Cpdf.php
Cpdf.scale
function scale($s_x, $s_y, $x, $y) { $y = $this->currentPageSize["height"] - $y; $tm = array( $s_x, 0, 0, $s_y, $x * (1 - $s_x), $y * (1 - $s_y) ); $this->transform($tm); }
php
function scale($s_x, $s_y, $x, $y) { $y = $this->currentPageSize["height"] - $y; $tm = array( $s_x, 0, 0, $s_y, $x * (1 - $s_x), $y * (1 - $s_y) ); $this->transform($tm); }
[ "function", "scale", "(", "$", "s_x", ",", "$", "s_y", ",", "$", "x", ",", "$", "y", ")", "{", "$", "y", "=", "$", "this", "->", "currentPageSize", "[", "\"height\"", "]", "-", "$", "y", ";", "$", "tm", "=", "array", "(", "$", "s_x", ",", "...
scale @param float $s_x scaling factor for width as percent @param float $s_y scaling factor for height as percent @param float $x Origin abscissa @param float $y Origin ordinate
[ "scale" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/lib/Cpdf.php#L3714-L3728
train
Scales the page by the given values
[ 30522, 3853, 4094, 1006, 1002, 1055, 1035, 1060, 1010, 1002, 1055, 1035, 1061, 1010, 1002, 1060, 1010, 1002, 1061, 1007, 1063, 1002, 1061, 1027, 1002, 2023, 1011, 1028, 2783, 13704, 5332, 4371, 1031, 1000, 4578, 1000, 1033, 1011, 1002, 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/Serializer/Normalizer/ObjectNormalizer.php
ObjectNormalizer.getAttributeValue
protected function getAttributeValue($object, $attribute, $format = null, array $context = []) { $cacheKey = \get_class($object); if (!\array_key_exists($cacheKey, $this->discriminatorCache)) { $this->discriminatorCache[$cacheKey] = null; if (null !== $this->classDiscriminato...
php
protected function getAttributeValue($object, $attribute, $format = null, array $context = []) { $cacheKey = \get_class($object); if (!\array_key_exists($cacheKey, $this->discriminatorCache)) { $this->discriminatorCache[$cacheKey] = null; if (null !== $this->classDiscriminato...
[ "protected", "function", "getAttributeValue", "(", "$", "object", ",", "$", "attribute", ",", "$", "format", "=", "null", ",", "array", "$", "context", "=", "[", "]", ")", "{", "$", "cacheKey", "=", "\\", "get_class", "(", "$", "object", ")", ";", "i...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php#L121-L133
train
Get the value of an attribute of an object
[ 30522, 5123, 3853, 2131, 19321, 3089, 8569, 2618, 10175, 5657, 1006, 1002, 4874, 1010, 1002, 17961, 1010, 1002, 4289, 1027, 19701, 1010, 9140, 1002, 6123, 1027, 1031, 1033, 1007, 1063, 1002, 30524, 5860, 20026, 23207, 3540, 5403, 1031, 1002...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Console/Helper/Table.php
Table.renderRowSeparator
private function renderRowSeparator(int $type = self::SEPARATOR_MID, string $title = null, string $titleFormat = null) { if (0 === $count = $this->numberOfColumns) { return; } $borders = $this->style->getBorderChars(); if (!$borders[0] && !$borders[2] && !$this->style->g...
php
private function renderRowSeparator(int $type = self::SEPARATOR_MID, string $title = null, string $titleFormat = null) { if (0 === $count = $this->numberOfColumns) { return; } $borders = $this->style->getBorderChars(); if (!$borders[0] && !$borders[2] && !$this->style->g...
[ "private", "function", "renderRowSeparator", "(", "int", "$", "type", "=", "self", "::", "SEPARATOR_MID", ",", "string", "$", "title", "=", "null", ",", "string", "$", "titleFormat", "=", "null", ")", "{", "if", "(", "0", "===", "$", "count", "=", "$",...
Renders horizontal header separator. Example: +-----+-----------+-------+
[ "Renders", "horizontal", "header", "separator", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Helper/Table.php#L391-L437
train
Render row separator
[ 30522, 2797, 3853, 17552, 10524, 3366, 28689, 4263, 1006, 20014, 1002, 2828, 1027, 2969, 1024, 1024, 19802, 25879, 2953, 1035, 3054, 1010, 5164, 1002, 2516, 1027, 19701, 1010, 5164, 1002, 2516, 14192, 4017, 1027, 19701, 1007, 1063, 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...
dompdf/dompdf
src/Css/Style.php
Style.get_outline_width
function get_outline_width() { $style = $this->__get("outline_style"); return $style !== "none" && $style !== "hidden" ? $this->length_in_pt($this->_props["outline_width"]) : 0; }
php
function get_outline_width() { $style = $this->__get("outline_style"); return $style !== "none" && $style !== "hidden" ? $this->length_in_pt($this->_props["outline_width"]) : 0; }
[ "function", "get_outline_width", "(", ")", "{", "$", "style", "=", "$", "this", "->", "__get", "(", "\"outline_style\"", ")", ";", "return", "$", "style", "!==", "\"none\"", "&&", "$", "style", "!==", "\"hidden\"", "?", "$", "this", "->", "length_in_pt", ...
#@+ Returns the outline width, as it is currently stored @return float|string
[ "#" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/Css/Style.php#L1539-L1543
train
Returns the outline width in pt
[ 30522, 3853, 2131, 1035, 12685, 1035, 9381, 1006, 1007, 1063, 1002, 2806, 1027, 1002, 2023, 1011, 1028, 1035, 1035, 2131, 1006, 1000, 12685, 1035, 2806, 1000, 1007, 1025, 2709, 1002, 2806, 999, 1027, 1027, 1000, 3904, 1000, 1004, 1004, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Validation/DatabasePresenceVerifier.php
DatabasePresenceVerifier.getMultiCount
public function getMultiCount($collection, $column, array $values, array $extra = []) { $query = $this->table($collection)->whereIn($column, $values); return $this->addConditions($query, $extra)->distinct()->count($column); }
php
public function getMultiCount($collection, $column, array $values, array $extra = []) { $query = $this->table($collection)->whereIn($column, $values); return $this->addConditions($query, $extra)->distinct()->count($column); }
[ "public", "function", "getMultiCount", "(", "$", "collection", ",", "$", "column", ",", "array", "$", "values", ",", "array", "$", "extra", "=", "[", "]", ")", "{", "$", "query", "=", "$", "this", "->", "table", "(", "$", "collection", ")", "->", "...
Count the number of objects in a collection with the given values. @param string $collection @param string $column @param array $values @param array $extra @return int
[ "Count", "the", "number", "of", "objects", "in", "a", "collection", "with", "the", "given", "values", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/DatabasePresenceVerifier.php#L67-L72
train
Get Multi Count
[ 30522, 2270, 3853, 2131, 12274, 7096, 11261, 16671, 1006, 1002, 3074, 1010, 1002, 5930, 1010, 9140, 1002, 5300, 1010, 9140, 1002, 4469, 1027, 1031, 1033, 1007, 1063, 1002, 23032, 1027, 1002, 2023, 1011, 1028, 2795, 1006, 1002, 3074, 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/Foundation/Exceptions/Handler.php
Handler.toIlluminateResponse
protected function toIlluminateResponse($response, Exception $e) { if ($response instanceof SymfonyRedirectResponse) { $response = new RedirectResponse( $response->getTargetUrl(), $response->getStatusCode(), $response->headers->all() ); } else { $r...
php
protected function toIlluminateResponse($response, Exception $e) { if ($response instanceof SymfonyRedirectResponse) { $response = new RedirectResponse( $response->getTargetUrl(), $response->getStatusCode(), $response->headers->all() ); } else { $r...
[ "protected", "function", "toIlluminateResponse", "(", "$", "response", ",", "Exception", "$", "e", ")", "{", "if", "(", "$", "response", "instanceof", "SymfonyRedirectResponse", ")", "{", "$", "response", "=", "new", "RedirectResponse", "(", "$", "response", "...
Map the given exception into an Illuminate response. @param \Symfony\Component\HttpFoundation\Response $response @param \Exception $e @return \Illuminate\Http\Response
[ "Map", "the", "given", "exception", "into", "an", "Illuminate", "response", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Exceptions/Handler.php#L407-L420
train
Converts an exception into an Illuminate response
[ 30522, 5123, 3853, 2000, 8591, 12717, 12556, 6072, 26029, 3366, 1006, 1002, 3433, 1010, 6453, 1002, 1041, 1007, 1063, 2065, 1006, 1002, 3433, 6013, 11253, 25353, 2213, 14876, 4890, 5596, 7442, 6593, 6072, 26029, 3366, 1007, 1063, 1002, 3433...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Transitions/API.php
API.queryExternalReferrers
protected function queryExternalReferrers($idaction, $actionType, $logAggregator, $limitBeforeGrouping = false) { $rankingQuery = new RankingQuery($limitBeforeGrouping ? $limitBeforeGrouping : $this->limitBeforeGrouping); // we generate a single column that contains the interesting data for each re...
php
protected function queryExternalReferrers($idaction, $actionType, $logAggregator, $limitBeforeGrouping = false) { $rankingQuery = new RankingQuery($limitBeforeGrouping ? $limitBeforeGrouping : $this->limitBeforeGrouping); // we generate a single column that contains the interesting data for each re...
[ "protected", "function", "queryExternalReferrers", "(", "$", "idaction", ",", "$", "actionType", ",", "$", "logAggregator", ",", "$", "limitBeforeGrouping", "=", "false", ")", "{", "$", "rankingQuery", "=", "new", "RankingQuery", "(", "$", "limitBeforeGrouping", ...
Get information about external referrers (i.e. search engines, websites & campaigns) @param $idaction @param $actionType @param Logaggregator $logAggregator @param $limitBeforeGrouping @return DataTable
[ "Get", "information", "about", "external", "referrers", "(", "i", ".", "e", ".", "search", "engines", "websites", "&", "campaigns", ")" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Transitions/API.php#L301-L364
train
Query external referrer types
[ 30522, 5123, 3853, 23032, 10288, 16451, 2389, 2890, 7512, 14544, 2015, 1006, 1002, 16096, 7542, 1010, 1002, 2895, 13874, 1010, 1002, 8833, 8490, 17603, 20697, 2953, 1010, 1002, 5787, 4783, 29278, 13910, 22107, 2075, 1027, 6270, 1007, 1063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/GPM/Installer.php
Installer.uninstall
public static function uninstall($path, $options = []) { $options = array_merge(self::$options, $options); if (!self::isValidDestination($path, $options['exclude_checks']) ) { return false; } $installer_file_folder = $path; $is_install = false; $i...
php
public static function uninstall($path, $options = []) { $options = array_merge(self::$options, $options); if (!self::isValidDestination($path, $options['exclude_checks']) ) { return false; } $installer_file_folder = $path; $is_install = false; $i...
[ "public", "static", "function", "uninstall", "(", "$", "path", ",", "$", "options", "=", "[", "]", ")", "{", "$", "options", "=", "array_merge", "(", "self", "::", "$", "options", ",", "$", "options", ")", ";", "if", "(", "!", "self", "::", "isVali...
Uninstalls one or more given package @param string $path The slug of the package(s) @param array $options Options to use for uninstalling @return bool True if everything went fine, False otherwise.
[ "Uninstalls", "one", "or", "more", "given", "package" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/GPM/Installer.php#L337-L369
train
Uninstalls a file or folder
[ 30522, 2270, 10763, 3853, 4895, 7076, 9080, 2140, 1006, 1002, 4130, 1010, 1002, 7047, 1027, 1031, 1033, 1007, 1063, 1002, 7047, 1027, 9140, 1035, 13590, 1006, 2969, 1024, 1024, 1002, 30524, 1025, 1065, 1002, 16500, 2121, 1035, 5371, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
PHPMailer/PHPMailer
src/PHPMailer.php
PHPMailer.smtpConnect
public function smtpConnect($options = null) { if (null === $this->smtp) { $this->smtp = $this->getSMTPInstance(); } //If no options are provided, use whatever is set in the instance if (null === $options) { $options = $this->SMTPOptions; } /...
php
public function smtpConnect($options = null) { if (null === $this->smtp) { $this->smtp = $this->getSMTPInstance(); } //If no options are provided, use whatever is set in the instance if (null === $options) { $options = $this->SMTPOptions; } /...
[ "public", "function", "smtpConnect", "(", "$", "options", "=", "null", ")", "{", "if", "(", "null", "===", "$", "this", "->", "smtp", ")", "{", "$", "this", "->", "smtp", "=", "$", "this", "->", "getSMTPInstance", "(", ")", ";", "}", "//If no options...
Initiate a connection to an SMTP server. Returns false if the operation failed. @param array $options An array of options compatible with stream_context_create() @throws Exception @uses \PHPMailer\PHPMailer\SMTP @return bool
[ "Initiate", "a", "connection", "to", "an", "SMTP", "server", ".", "Returns", "false", "if", "the", "operation", "failed", "." ]
3d7132341659a8a201adbc3ba11b1e202ee2857c
https://github.com/PHPMailer/PHPMailer/blob/3d7132341659a8a201adbc3ba11b1e202ee2857c/src/PHPMailer.php#L1881-L2004
train
Establishes a connection to the SMTP server
[ 30522, 2270, 3853, 15488, 25856, 8663, 2638, 6593, 1006, 1002, 7047, 1027, 19701, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 1027, 1002, 2023, 1011, 1028, 15488, 25856, 1007, 1063, 1002, 2023, 1011, 1028, 15488, 25856, 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...
getgrav/grav
system/src/Grav/Common/Data/Validation.php
Validation.typeToggle
public static function typeToggle($value, array $params, array $field) { if (\is_bool($value)) { $value = (int)$value; } return self::typeArray((array) $value, $params, $field); }
php
public static function typeToggle($value, array $params, array $field) { if (\is_bool($value)) { $value = (int)$value; } return self::typeArray((array) $value, $params, $field); }
[ "public", "static", "function", "typeToggle", "(", "$", "value", ",", "array", "$", "params", ",", "array", "$", "field", ")", "{", "if", "(", "\\", "is_bool", "(", "$", "value", ")", ")", "{", "$", "value", "=", "(", "int", ")", "$", "value", ";...
Custom input: toggle @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.
[ "Custom", "input", ":", "toggle" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Data/Validation.php#L290-L297
train
Type Toggle value
[ 30522, 2270, 10763, 3853, 2828, 3406, 24679, 1006, 1002, 3643, 1010, 9140, 1002, 11498, 5244, 1010, 9140, 1002, 2492, 1007, 1063, 2065, 1006, 1032, 2003, 1035, 22017, 2140, 1006, 1002, 3643, 1007, 1007, 1063, 1002, 3643, 1027, 1006, 20014, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Cookie/CookieJar.php
CookieJar.queue
public function queue(...$parameters) { if (head($parameters) instanceof Cookie) { $cookie = head($parameters); } else { $cookie = call_user_func_array([$this, 'make'], $parameters); } $this->queued[$cookie->getName()] = $cookie; }
php
public function queue(...$parameters) { if (head($parameters) instanceof Cookie) { $cookie = head($parameters); } else { $cookie = call_user_func_array([$this, 'make'], $parameters); } $this->queued[$cookie->getName()] = $cookie; }
[ "public", "function", "queue", "(", "...", "$", "parameters", ")", "{", "if", "(", "head", "(", "$", "parameters", ")", "instanceof", "Cookie", ")", "{", "$", "cookie", "=", "head", "(", "$", "parameters", ")", ";", "}", "else", "{", "$", "cookie", ...
Queue a cookie to send with the next response. @param array $parameters @return void
[ "Queue", "a", "cookie", "to", "send", "with", "the", "next", "response", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Cookie/CookieJar.php#L133-L142
train
Queues a cookie for later use
[ 30522, 2270, 3853, 24240, 1006, 1012, 1012, 1012, 1002, 11709, 1007, 1063, 2065, 1006, 2132, 1006, 1002, 11709, 1007, 6013, 11253, 17387, 1007, 1063, 1002, 17387, 1027, 2132, 1006, 1002, 11709, 1007, 1025, 1065, 2842, 1063, 1002, 17387, 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...