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
laravel/framework
src/Illuminate/Database/Query/JoinClause.php
JoinClause.on
public function on($first, $operator = null, $second = null, $boolean = 'and') { if ($first instanceof Closure) { return $this->whereNested($first, $boolean); } return $this->whereColumn($first, $operator, $second, $boolean); }
php
public function on($first, $operator = null, $second = null, $boolean = 'and') { if ($first instanceof Closure) { return $this->whereNested($first, $boolean); } return $this->whereColumn($first, $operator, $second, $boolean); }
[ "public", "function", "on", "(", "$", "first", ",", "$", "operator", "=", "null", ",", "$", "second", "=", "null", ",", "$", "boolean", "=", "'and'", ")", "{", "if", "(", "$", "first", "instanceof", "Closure", ")", "{", "return", "$", "this", "->",...
Add an "on" clause to the join. On clauses can be chained, e.g. $join->on('contacts.user_id', '=', 'users.id') ->on('contacts.info_id', '=', 'info.id') will produce the following SQL: on `contacts`.`user_id` = `users`.`id` and `contacts`.`info_id` = `info`.`id` @param \Closure|string $first @param string|null ...
[ "Add", "an", "on", "clause", "to", "the", "join", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/JoinClause.php#L93-L100
train
WHERE clause.
[ 30522, 2270, 3853, 2006, 1006, 1002, 2034, 1010, 1002, 6872, 1027, 19701, 1010, 1002, 2117, 1027, 19701, 1010, 1002, 22017, 20898, 1027, 1005, 1998, 1005, 1007, 1063, 2065, 1006, 1002, 2034, 6013, 11253, 8503, 1007, 1063, 2709, 1002, 2023, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Plugin/Manager.php
Manager.updatePluginsInstalledConfig
private function updatePluginsInstalledConfig($plugins) { $section = PiwikConfig::getInstance()->PluginsInstalled; $section['PluginsInstalled'] = $plugins; PiwikConfig::getInstance()->PluginsInstalled = $section; }
php
private function updatePluginsInstalledConfig($plugins) { $section = PiwikConfig::getInstance()->PluginsInstalled; $section['PluginsInstalled'] = $plugins; PiwikConfig::getInstance()->PluginsInstalled = $section; }
[ "private", "function", "updatePluginsInstalledConfig", "(", "$", "plugins", ")", "{", "$", "section", "=", "PiwikConfig", "::", "getInstance", "(", ")", "->", "PluginsInstalled", ";", "$", "section", "[", "'PluginsInstalled'", "]", "=", "$", "plugins", ";", "P...
Update PluginsInstalled config @param array $plugins Plugins
[ "Update", "PluginsInstalled", "config" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Plugin/Manager.php#L228-L233
train
Update the plugins installed config
[ 30522, 2797, 3853, 10651, 24759, 15916, 7076, 7076, 9080, 3709, 8663, 8873, 2290, 1006, 1002, 13354, 7076, 1007, 1063, 1002, 2930, 1027, 14255, 9148, 2243, 8663, 8873, 2290, 1024, 1024, 2131, 7076, 26897, 1006, 1007, 1011, 1028, 13354, 7076...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/ViewMaker.php
ViewMaker.addViewPath
public function addViewPath($path) { $this->viewPath = (array) $this->viewPath; if (is_array($path)) { $this->viewPath = array_merge($path, $this->viewPath); } else { array_unshift($this->viewPath, $path); } }
php
public function addViewPath($path) { $this->viewPath = (array) $this->viewPath; if (is_array($path)) { $this->viewPath = array_merge($path, $this->viewPath); } else { array_unshift($this->viewPath, $path); } }
[ "public", "function", "addViewPath", "(", "$", "path", ")", "{", "$", "this", "->", "viewPath", "=", "(", "array", ")", "$", "this", "->", "viewPath", ";", "if", "(", "is_array", "(", "$", "path", ")", ")", "{", "$", "this", "->", "viewPath", "=", ...
Prepends a path on the available view path locations. @param string|array $path @return void
[ "Prepends", "a", "path", "on", "the", "available", "view", "path", "locations", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/traits/ViewMaker.php#L51-L61
train
Add View Path
[ 30522, 2270, 3853, 5587, 8584, 15069, 1006, 1002, 4130, 1007, 1063, 1002, 2023, 1011, 1028, 3193, 15069, 1027, 1006, 9140, 1007, 1002, 2023, 1011, 1028, 3193, 15069, 1025, 2065, 1006, 2003, 1035, 9140, 1006, 1002, 4130, 1007, 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/Session.php
Session.setFlashCookieObject
public function setFlashCookieObject($name, $object, $time = 60) { setcookie($name, json_encode($object), time() + $time, '/'); return $this; }
php
public function setFlashCookieObject($name, $object, $time = 60) { setcookie($name, json_encode($object), time() + $time, '/'); return $this; }
[ "public", "function", "setFlashCookieObject", "(", "$", "name", ",", "$", "object", ",", "$", "time", "=", "60", ")", "{", "setcookie", "(", "$", "name", ",", "json_encode", "(", "$", "object", ")", ",", "time", "(", ")", "+", "$", "time", ",", "'/...
Store something in cookie temporarily. @param string $name @param mixed $object @param int $time @return $this
[ "Store", "something", "in", "cookie", "temporarily", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Session.php#L143-L148
train
Set a cookie object to be sent to the user
[ 30522, 2270, 3853, 2275, 10258, 11823, 3597, 23212, 8780, 2497, 20614, 1006, 1002, 2171, 1010, 1002, 4874, 1010, 1002, 2051, 1027, 3438, 1007, 1063, 2275, 3597, 23212, 2063, 1006, 1002, 2171, 1010, 1046, 3385, 1035, 4372, 16044, 1006, 1002,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
overtrue/wechat
src/OfficialAccount/CustomerService/Client.php
Client.update
public function update(string $account, string $nickname) { $params = [ 'kf_account' => $account, 'nickname' => $nickname, ]; return $this->httpPostJson('customservice/kfaccount/update', $params); }
php
public function update(string $account, string $nickname) { $params = [ 'kf_account' => $account, 'nickname' => $nickname, ]; return $this->httpPostJson('customservice/kfaccount/update', $params); }
[ "public", "function", "update", "(", "string", "$", "account", ",", "string", "$", "nickname", ")", "{", "$", "params", "=", "[", "'kf_account'", "=>", "$", "account", ",", "'nickname'", "=>", "$", "nickname", ",", "]", ";", "return", "$", "this", "->"...
Update a staff. @param string $account @param string $nickname @return mixed
[ "Update", "a", "staff", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/CustomerService/Client.php#L69-L77
train
Update KFAccount s account
[ 30522, 2270, 3853, 10651, 1006, 5164, 1002, 4070, 1010, 5164, 1002, 8367, 1007, 1063, 1002, 11498, 5244, 1027, 1031, 1005, 1047, 2546, 1035, 4070, 1005, 1027, 1028, 1002, 4070, 1010, 1005, 8367, 1005, 1027, 1028, 1002, 8367, 1010, 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...
getgrav/grav
system/src/Grav/Common/User/Traits/UserTrait.php
UserTrait.getAvatarImage
public function getAvatarImage(): ?ImageMedium { $avatars = $this->get('avatar'); if (\is_array($avatars) && $avatars) { $avatar = array_shift($avatars); $media = $this->getMedia(); $name = $avatar['name'] ?? null; $image = $name ? $media[$name] : nu...
php
public function getAvatarImage(): ?ImageMedium { $avatars = $this->get('avatar'); if (\is_array($avatars) && $avatars) { $avatar = array_shift($avatars); $media = $this->getMedia(); $name = $avatar['name'] ?? null; $image = $name ? $media[$name] : nu...
[ "public", "function", "getAvatarImage", "(", ")", ":", "?", "ImageMedium", "{", "$", "avatars", "=", "$", "this", "->", "get", "(", "'avatar'", ")", ";", "if", "(", "\\", "is_array", "(", "$", "avatars", ")", "&&", "$", "avatars", ")", "{", "$", "a...
Return media object for the User's avatar. Note: if there's no local avatar image for the user, you should call getAvatarUrl() to get the external avatar URL. @return ImageMedium|null
[ "Return", "media", "object", "for", "the", "User", "s", "avatar", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/User/Traits/UserTrait.php#L112-L128
train
Get avatar image
[ 30522, 2270, 3853, 2131, 12462, 7559, 9581, 3351, 1006, 1007, 1024, 1029, 3746, 7583, 5007, 1063, 1002, 22128, 2015, 1027, 1002, 2023, 1011, 1028, 2131, 1006, 1005, 22128, 1005, 1007, 1025, 2065, 1006, 1032, 2003, 1035, 9140, 1006, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Auth/AuthManager.php
AuthManager.viaRequest
public function viaRequest($driver, callable $callback) { return $this->extend($driver, function () use ($callback) { $guard = new RequestGuard($callback, $this->app['request'], $this->createUserProvider()); $this->app->refresh('request', $guard, 'setRequest'); return $...
php
public function viaRequest($driver, callable $callback) { return $this->extend($driver, function () use ($callback) { $guard = new RequestGuard($callback, $this->app['request'], $this->createUserProvider()); $this->app->refresh('request', $guard, 'setRequest'); return $...
[ "public", "function", "viaRequest", "(", "$", "driver", ",", "callable", "$", "callback", ")", "{", "return", "$", "this", "->", "extend", "(", "$", "driver", ",", "function", "(", ")", "use", "(", "$", "callback", ")", "{", "$", "guard", "=", "new",...
Register a new callback based request guard. @param string $driver @param callable $callback @return $this
[ "Register", "a", "new", "callback", "based", "request", "guard", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/AuthManager.php#L226-L235
train
Extend the current request guard with a new instance.
[ 30522, 2270, 3853, 3081, 2890, 15500, 1006, 1002, 4062, 1010, 2655, 3085, 1002, 2655, 5963, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 7949, 1006, 1002, 4062, 1010, 3853, 1006, 1007, 2224, 1006, 1002, 2655, 5963, 1007, 30524, 2121, 1006, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/SitesManager/SitesManager.php
SitesManager.recordWebsiteDataInCache
public function recordWebsiteDataInCache(&$array, $idSite) { $idSite = (int) $idSite; $website = API::getInstance()->getSiteFromId($idSite); $urls = API::getInstance()->getSiteUrlsFromId($idSite); // add the 'hosts' entry in the website array $array['urls'] = $urls; ...
php
public function recordWebsiteDataInCache(&$array, $idSite) { $idSite = (int) $idSite; $website = API::getInstance()->getSiteFromId($idSite); $urls = API::getInstance()->getSiteUrlsFromId($idSite); // add the 'hosts' entry in the website array $array['urls'] = $urls; ...
[ "public", "function", "recordWebsiteDataInCache", "(", "&", "$", "array", ",", "$", "idSite", ")", "{", "$", "idSite", "=", "(", "int", ")", "$", "idSite", ";", "$", "website", "=", "API", "::", "getInstance", "(", ")", "->", "getSiteFromId", "(", "$",...
Hooks when a website tracker cache is flushed (website updated, cache deleted, or empty cache) Will record in the tracker config file all data needed for this website in Tracker. @param array $array @param int $idSite @return void
[ "Hooks", "when", "a", "website", "tracker", "cache", "is", "flushed", "(", "website", "updated", "cache", "deleted", "or", "empty", "cache", ")", "Will", "record", "in", "the", "tracker", "config", "file", "all", "data", "needed", "for", "this", "website", ...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/SitesManager/SitesManager.php#L147-L169
train
Record website data in the cache
[ 30522, 2270, 3853, 2501, 8545, 5910, 17572, 6790, 2378, 3540, 5403, 1006, 1004, 1002, 9140, 1010, 1002, 8909, 28032, 2063, 1007, 1063, 1002, 8909, 28032, 2063, 1027, 1006, 20014, 1007, 1002, 8909, 28032, 2063, 1025, 1002, 4037, 1027, 17928,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.setSiteAliasUrls
public function setSiteAliasUrls($idSite, $urls = array()) { Piwik::checkUserHasAdminAccess($idSite); $mainUrl = Site::getMainUrlFor($idSite); array_unshift($urls, $mainUrl); $urlsProperty = new Urls($idSite); $urlsProperty->setValue($urls); $urlsProperty->save(); ...
php
public function setSiteAliasUrls($idSite, $urls = array()) { Piwik::checkUserHasAdminAccess($idSite); $mainUrl = Site::getMainUrlFor($idSite); array_unshift($urls, $mainUrl); $urlsProperty = new Urls($idSite); $urlsProperty->setValue($urls); $urlsProperty->save(); ...
[ "public", "function", "setSiteAliasUrls", "(", "$", "idSite", ",", "$", "urls", "=", "array", "(", ")", ")", "{", "Piwik", "::", "checkUserHasAdminAccess", "(", "$", "idSite", ")", ";", "$", "mainUrl", "=", "Site", "::", "getMainUrlFor", "(", "$", "idSit...
Set the list of alias Urls for the given idSite Completely overwrites the current list of URLs with the provided list. The 'main_url' of the website won't be affected by this method. @return int the number of inserted URLs
[ "Set", "the", "list", "of", "alias", "Urls", "for", "the", "given", "idSite" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/SitesManager/API.php#L927-L943
train
Set alias URLs for a site
[ 30522, 2270, 3853, 4520, 4221, 22786, 26210, 4877, 1006, 1002, 8909, 28032, 2063, 1010, 1002, 24471, 4877, 1027, 9140, 1006, 1007, 1007, 1063, 14255, 9148, 2243, 1024, 1024, 4638, 20330, 14949, 4215, 22311, 9468, 7971, 1006, 1002, 8909, 280...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/ReplaceSummaryRowLabel.php
ReplaceSummaryRowLabel.filter
public function filter($table) { $row = $table->getRowFromId(DataTable::ID_SUMMARY_ROW); if ($row) { $row->setColumn('label', $this->newLabel); } else { $row = $table->getRowFromLabel(DataTable::LABEL_SUMMARY_ROW); if ($row) { $row->setColu...
php
public function filter($table) { $row = $table->getRowFromId(DataTable::ID_SUMMARY_ROW); if ($row) { $row->setColumn('label', $this->newLabel); } else { $row = $table->getRowFromLabel(DataTable::LABEL_SUMMARY_ROW); if ($row) { $row->setColu...
[ "public", "function", "filter", "(", "$", "table", ")", "{", "$", "row", "=", "$", "table", "->", "getRowFromId", "(", "DataTable", "::", "ID_SUMMARY_ROW", ")", ";", "if", "(", "$", "row", ")", "{", "$", "row", "->", "setColumn", "(", "'label'", ",",...
See {@link ReplaceSummaryRowLabel}. @param DataTable $table
[ "See", "{", "@link", "ReplaceSummaryRowLabel", "}", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataTable/Filter/ReplaceSummaryRowLabel.php#L53-L81
train
Filter the table to only the rows with the new label
[ 30522, 2270, 3853, 11307, 1006, 1002, 2795, 1007, 1063, 1002, 5216, 1027, 1002, 2795, 1011, 1028, 2131, 10524, 19699, 20936, 2094, 1006, 2951, 10880, 1024, 1024, 8909, 1035, 12654, 1035, 5216, 1007, 1025, 2065, 1006, 1002, 5216, 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...
matomo-org/matomo
libs/HTML/QuickForm2/Rule/MaxFileSize.php
HTML_QuickForm2_Rule_MaxFileSize.validateOwner
protected function validateOwner() { $value = $this->owner->getValue(); if (!isset($value['error']) || UPLOAD_ERR_NO_FILE == $value['error']) { return true; } return ($this->getConfig() >= @filesize($value['tmp_name'])); }
php
protected function validateOwner() { $value = $this->owner->getValue(); if (!isset($value['error']) || UPLOAD_ERR_NO_FILE == $value['error']) { return true; } return ($this->getConfig() >= @filesize($value['tmp_name'])); }
[ "protected", "function", "validateOwner", "(", ")", "{", "$", "value", "=", "$", "this", "->", "owner", "->", "getValue", "(", ")", ";", "if", "(", "!", "isset", "(", "$", "value", "[", "'error'", "]", ")", "||", "UPLOAD_ERR_NO_FILE", "==", "$", "val...
Validates the owner element @return bool whether uploaded file's size is within given limit
[ "Validates", "the", "owner", "element" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Rule/MaxFileSize.php#L79-L86
train
Validate owner.
[ 30522, 5123, 3853, 9398, 3686, 12384, 2121, 1006, 1007, 1063, 1002, 3643, 1027, 1002, 2023, 1011, 1028, 3954, 1011, 1028, 2131, 10175, 5657, 1006, 1007, 1025, 2065, 1006, 999, 26354, 3388, 1006, 1002, 3643, 1031, 1005, 7561, 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...
symfony/symfony
src/Symfony/Component/Stopwatch/Stopwatch.php
Stopwatch.stopSection
public function stopSection($id) { $this->stop('__section__'); if (1 == \count($this->activeSections)) { throw new \LogicException('There is no started section to stop.'); } $this->sections[$id] = array_pop($this->activeSections)->setId($id); $this->stop('__sect...
php
public function stopSection($id) { $this->stop('__section__'); if (1 == \count($this->activeSections)) { throw new \LogicException('There is no started section to stop.'); } $this->sections[$id] = array_pop($this->activeSections)->setId($id); $this->stop('__sect...
[ "public", "function", "stopSection", "(", "$", "id", ")", "{", "$", "this", "->", "stop", "(", "'__section__'", ")", ";", "if", "(", "1", "==", "\\", "count", "(", "$", "this", "->", "activeSections", ")", ")", "{", "throw", "new", "\\", "LogicExcept...
Stops the last started section. The id parameter is used to retrieve the events from this section. @see getSectionEvents() @param string $id The identifier of the section @throws \LogicException When there's no started section to be stopped
[ "Stops", "the", "last", "started", "section", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Stopwatch/Stopwatch.php#L86-L96
train
Stops a section
[ 30522, 2270, 3853, 6762, 18491, 1006, 1002, 8909, 1007, 1063, 1002, 2023, 1011, 1028, 2644, 1006, 1005, 1035, 1035, 2930, 1035, 1035, 1005, 1007, 1025, 2065, 1006, 1015, 1027, 1027, 1032, 4175, 1006, 1002, 2023, 1011, 1028, 3161, 29015, 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...
octobercms/october
modules/cms/classes/CmsCompoundObject.php
CmsCompoundObject.getViewBag
public function getViewBag() { if ($this->viewBagCache !== false) { return $this->viewBagCache; } $componentName = 'viewBag'; if (!isset($this->settings['components'][$componentName])) { $viewBag = new ViewBag(null, []); $viewBag->name = $compone...
php
public function getViewBag() { if ($this->viewBagCache !== false) { return $this->viewBagCache; } $componentName = 'viewBag'; if (!isset($this->settings['components'][$componentName])) { $viewBag = new ViewBag(null, []); $viewBag->name = $compone...
[ "public", "function", "getViewBag", "(", ")", "{", "if", "(", "$", "this", "->", "viewBagCache", "!==", "false", ")", "{", "return", "$", "this", "->", "viewBagCache", ";", "}", "$", "componentName", "=", "'viewBag'", ";", "if", "(", "!", "isset", "(",...
Returns the configured view bag component. This method is used only in the back-end and for internal system needs when the standard way to access components is not an option. @return \Cms\Components\ViewBag Returns the view bag component instance.
[ "Returns", "the", "configured", "view", "bag", "component", ".", "This", "method", "is", "used", "only", "in", "the", "back", "-", "end", "and", "for", "internal", "system", "needs", "when", "the", "standard", "way", "to", "access", "components", "is", "no...
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/classes/CmsCompoundObject.php#L355-L371
train
Get ViewBag object
[ 30522, 2270, 3853, 2131, 8584, 16078, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 3193, 16078, 3540, 5403, 999, 1027, 1027, 6270, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 3193, 16078, 3540, 5403, 1025, 1065, 1002, 6922, 18442, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Bundle/WebProfilerBundle/Controller/RouterController.php
RouterController.getTraces
private function getTraces(RequestDataCollector $request, string $method): array { $traceRequest = Request::create( $request->getPathInfo(), $request->getRequestServer(true)->get('REQUEST_METHOD'), [], $request->getRequestCookies(true)->all(), [], ...
php
private function getTraces(RequestDataCollector $request, string $method): array { $traceRequest = Request::create( $request->getPathInfo(), $request->getRequestServer(true)->get('REQUEST_METHOD'), [], $request->getRequestCookies(true)->all(), [], ...
[ "private", "function", "getTraces", "(", "RequestDataCollector", "$", "request", ",", "string", "$", "method", ")", ":", "array", "{", "$", "traceRequest", "=", "Request", "::", "create", "(", "$", "request", "->", "getPathInfo", "(", ")", ",", "$", "reque...
Returns the routing traces associated to the given request.
[ "Returns", "the", "routing", "traces", "associated", "to", "the", "given", "request", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/WebProfilerBundle/Controller/RouterController.php#L81-L97
train
Returns the traces for the given request and method
[ 30522, 2797, 3853, 2131, 6494, 9623, 1006, 5227, 2850, 2696, 26895, 22471, 2953, 1002, 5227, 1010, 5164, 1002, 4118, 1007, 1024, 9140, 1063, 1002, 7637, 2890, 15500, 1027, 5227, 1024, 1024, 3443, 1006, 1002, 5227, 1011, 1028, 2131, 15069, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Menu/MenuTop.php
MenuTop.getMenu
public function getMenu() { if (!$this->menu) { foreach ($this->getAllMenus() as $menu) { $menu->configureTopMenu($this); } } return parent::getMenu(); }
php
public function getMenu() { if (!$this->menu) { foreach ($this->getAllMenus() as $menu) { $menu->configureTopMenu($this); } } return parent::getMenu(); }
[ "public", "function", "getMenu", "(", ")", "{", "if", "(", "!", "$", "this", "->", "menu", ")", "{", "foreach", "(", "$", "this", "->", "getAllMenus", "(", ")", "as", "$", "menu", ")", "{", "$", "menu", "->", "configureTopMenu", "(", "$", "this", ...
Triggers the Menu.Top.addItems hook and returns the menu. @return Array
[ "Triggers", "the", "Menu", ".", "Top", ".", "addItems", "hook", "and", "returns", "the", "menu", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Menu/MenuTop.php#L52-L62
train
Returns the top menu
[ 30522, 2270, 3853, 2131, 3549, 2226, 1006, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 12183, 1007, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 2131, 8095, 3549, 2271, 1006, 1007, 2004, 1002, 12183, 1007, 1063, 1002, 12183, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/ParameterBag/ParameterBag.php
ParameterBag.add
public function add(array $parameters) { foreach ($parameters as $key => $value) { $this->set($key, $value); } }
php
public function add(array $parameters) { foreach ($parameters as $key => $value) { $this->set($key, $value); } }
[ "public", "function", "add", "(", "array", "$", "parameters", ")", "{", "foreach", "(", "$", "parameters", "as", "$", "key", "=>", "$", "value", ")", "{", "$", "this", "->", "set", "(", "$", "key", ",", "$", "value", ")", ";", "}", "}" ]
Adds parameters to the service container parameters. @param array $parameters An array of parameters
[ "Adds", "parameters", "to", "the", "service", "container", "parameters", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php#L49-L54
train
Add parameters to the array
[ 30522, 2270, 3853, 5587, 1006, 9140, 1002, 11709, 1007, 1063, 18921, 6776, 1006, 1002, 11709, 2004, 1002, 3145, 1027, 1028, 1002, 3643, 1007, 1063, 1002, 2023, 1011, 1028, 2275, 1006, 1002, 3145, 1010, 1002, 3643, 1007, 1025, 1065, 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...
octobercms/october
modules/backend/widgets/MediaManager.php
MediaManager.setSortDirection
protected function setSortDirection($sortDirection) { if (!in_array($sortDirection, [ MediaLibrary::SORT_DIRECTION_ASC, MediaLibrary::SORT_DIRECTION_DESC ])) { throw new ApplicationException('Invalid input data'); } $this->putSession('media_sort_d...
php
protected function setSortDirection($sortDirection) { if (!in_array($sortDirection, [ MediaLibrary::SORT_DIRECTION_ASC, MediaLibrary::SORT_DIRECTION_DESC ])) { throw new ApplicationException('Invalid input data'); } $this->putSession('media_sort_d...
[ "protected", "function", "setSortDirection", "(", "$", "sortDirection", ")", "{", "if", "(", "!", "in_array", "(", "$", "sortDirection", ",", "[", "MediaLibrary", "::", "SORT_DIRECTION_ASC", ",", "MediaLibrary", "::", "SORT_DIRECTION_DESC", "]", ")", ")", "{", ...
Sets the user sort direction from the session state @param string $sortDirection @return void
[ "Sets", "the", "user", "sort", "direction", "from", "the", "session", "state" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/widgets/MediaManager.php#L978-L988
train
Set sort direction in session
[ 30522, 5123, 3853, 4520, 11589, 4305, 2890, 7542, 1006, 1002, 4066, 4305, 2890, 7542, 1007, 1063, 2065, 1006, 999, 1999, 1035, 9140, 1006, 1002, 4066, 4305, 2890, 7542, 1010, 1031, 23828, 12322, 19848, 2100, 1024, 1024, 4066, 1035, 3257, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/EventDispatcher/EventDispatcher.php
EventDispatcher.sortListeners
private function sortListeners(string $eventName) { krsort($this->listeners[$eventName]); $this->sorted[$eventName] = []; foreach ($this->listeners[$eventName] as &$listeners) { foreach ($listeners as $k => $listener) { if (\is_array($listener) && isset($listener...
php
private function sortListeners(string $eventName) { krsort($this->listeners[$eventName]); $this->sorted[$eventName] = []; foreach ($this->listeners[$eventName] as &$listeners) { foreach ($listeners as $k => $listener) { if (\is_array($listener) && isset($listener...
[ "private", "function", "sortListeners", "(", "string", "$", "eventName", ")", "{", "krsort", "(", "$", "this", "->", "listeners", "[", "$", "eventName", "]", ")", ";", "$", "this", "->", "sorted", "[", "$", "eventName", "]", "=", "[", "]", ";", "fore...
Sorts the internal list of listeners for the given event by priority.
[ "Sorts", "the", "internal", "list", "of", "listeners", "for", "the", "given", "event", "by", "priority", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/EventDispatcher/EventDispatcher.php#L267-L280
train
Sort listeners by priority
[ 30522, 2797, 3853, 4066, 9863, 24454, 2015, 1006, 5164, 1002, 2724, 18442, 1007, 1063, 1047, 25301, 5339, 1006, 30524, 13810, 1007, 1063, 18921, 6776, 1006, 1002, 13810, 2004, 1002, 1047, 1027, 1028, 1002, 19373, 1007, 1063, 2065, 1006, 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...
php-ai/php-ml
src/Math/LinearAlgebra/EigenvalueDecomposition.php
EigenvalueDecomposition.getDiagonalEigenvalues
public function getDiagonalEigenvalues(): array { $D = []; for ($i = 0; $i < $this->n; ++$i) { $D[$i] = array_fill(0, $this->n, 0.0); $D[$i][$i] = $this->d[$i]; if ($this->e[$i] == 0) { continue; } $o = $this->e[$i] > 0 ? ...
php
public function getDiagonalEigenvalues(): array { $D = []; for ($i = 0; $i < $this->n; ++$i) { $D[$i] = array_fill(0, $this->n, 0.0); $D[$i][$i] = $this->d[$i]; if ($this->e[$i] == 0) { continue; } $o = $this->e[$i] > 0 ? ...
[ "public", "function", "getDiagonalEigenvalues", "(", ")", ":", "array", "{", "$", "D", "=", "[", "]", ";", "for", "(", "$", "i", "=", "0", ";", "$", "i", "<", "$", "this", "->", "n", ";", "++", "$", "i", ")", "{", "$", "D", "[", "$", "i", ...
Return the block diagonal eigenvalue matrix
[ "Return", "the", "block", "diagonal", "eigenvalue", "matrix" ]
f6aa1a59b0525b8fca3d2786d661ab3e70904016
https://github.com/php-ai/php-ml/blob/f6aa1a59b0525b8fca3d2786d661ab3e70904016/src/Math/LinearAlgebra/EigenvalueDecomposition.php#L168-L184
train
getDiagonal Eigenvalues - 1 = > n 0 = > 1 0 = > 1 0 = > 1 0 = > 1 0 = > 1 0 = > 1 0 = > 1 0 = > 1 0 = > 1 0 = > 1 0 = > 1 0 = > 1 0 = > 1 0 = > 1 0 = > 1 0 = > 1 0 = > 1 0 = > 1 0 = > 1 0 = > 1 0 = > 1 0 = > 1
[ 30522, 2270, 3853, 2131, 9032, 20028, 7416, 6914, 10175, 15808, 1006, 1007, 1024, 9140, 1063, 1002, 1040, 1027, 1031, 1033, 1025, 2005, 1006, 1002, 1045, 1027, 1014, 1025, 1002, 1045, 1026, 1002, 2023, 1011, 1028, 1050, 1025, 1009, 1009, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.raw
public function raw($var = null) { $file = $this->file(); if ($var) { // First update file object. if ($file) { $file->raw($var); } // Reset header and content. $this->modified = time(); $this->id($this->modifi...
php
public function raw($var = null) { $file = $this->file(); if ($var) { // First update file object. if ($file) { $file->raw($var); } // Reset header and content. $this->modified = time(); $this->id($this->modifi...
[ "public", "function", "raw", "(", "$", "var", "=", "null", ")", "{", "$", "file", "=", "$", "this", "->", "file", "(", ")", ";", "if", "(", "$", "var", ")", "{", "// First update file object.", "if", "(", "$", "file", ")", "{", "$", "file", "->",...
Gets and Sets the raw data @param string $var Raw content string @return string Raw content string
[ "Gets", "and", "Sets", "the", "raw", "data" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Page/Page.php#L255-L274
train
Return raw content of file
[ 30522, 2270, 3853, 6315, 1006, 1002, 13075, 1027, 19701, 1007, 1063, 1002, 5371, 1027, 1002, 2023, 1011, 1028, 5371, 1006, 1007, 1025, 2065, 1006, 1002, 13075, 1007, 1063, 1013, 1013, 2034, 10651, 5371, 4874, 1012, 2065, 1006, 1002, 5371, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/system/classes/MediaLibrary.php
MediaLibrary.listAllDirectories
public function listAllDirectories($exclude = []) { $fullPath = $this->getMediaPath('/'); $folders = $this->getStorageDisk()->allDirectories($fullPath); $folders = array_unique($folders, SORT_LOCALE_STRING); $result = []; foreach ($folders as $folder) { $folde...
php
public function listAllDirectories($exclude = []) { $fullPath = $this->getMediaPath('/'); $folders = $this->getStorageDisk()->allDirectories($fullPath); $folders = array_unique($folders, SORT_LOCALE_STRING); $result = []; foreach ($folders as $folder) { $folde...
[ "public", "function", "listAllDirectories", "(", "$", "exclude", "=", "[", "]", ")", "{", "$", "fullPath", "=", "$", "this", "->", "getMediaPath", "(", "'/'", ")", ";", "$", "folders", "=", "$", "this", "->", "getStorageDisk", "(", ")", "->", "allDirec...
Returns a list of all directories in the Library, optionally excluding some of them. @param array $exclude A list of folders to exclude from the result list. The folder paths should be specified relative to the Library root. @return array
[ "Returns", "a", "list", "of", "all", "directories", "in", "the", "Library", "optionally", "excluding", "some", "of", "them", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/classes/MediaLibrary.php#L274-L302
train
Get all directories in the media directory
[ 30522, 2270, 3853, 2862, 8095, 4305, 2890, 16761, 3111, 1006, 1002, 23329, 1027, 1031, 1033, 1007, 1063, 1002, 2440, 15069, 1027, 1002, 2023, 1011, 1028, 2131, 16969, 15069, 1006, 1005, 1013, 1005, 1007, 1025, 1002, 19622, 2015, 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/Serializer/Normalizer/AbstractNormalizer.php
AbstractNormalizer.setIgnoredAttributes
public function setIgnoredAttributes(array $ignoredAttributes) { @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the "ignored_attributes" key of the context instead.', __METHOD__), E_USER_DEPRECATED); $this->defaultContext[self::IGNORED_ATTRIBUTES] = $this->ignoredAtt...
php
public function setIgnoredAttributes(array $ignoredAttributes) { @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the "ignored_attributes" key of the context instead.', __METHOD__), E_USER_DEPRECATED); $this->defaultContext[self::IGNORED_ATTRIBUTES] = $this->ignoredAtt...
[ "public", "function", "setIgnoredAttributes", "(", "array", "$", "ignoredAttributes", ")", "{", "@", "trigger_error", "(", "sprintf", "(", "'The \"%s()\" method is deprecated since Symfony 4.2, use the \"ignored_attributes\" key of the context instead.'", ",", "__METHOD__", ")", ...
Sets ignored attributes for normalization and denormalization. @deprecated since Symfony 4.2 @return self
[ "Sets", "ignored", "attributes", "for", "normalization", "and", "denormalization", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php#L256-L263
train
Sets the ignored attributes
[ 30522, 2270, 3853, 2275, 23773, 19574, 19321, 3089, 8569, 4570, 1006, 9140, 1002, 6439, 19321, 3089, 8569, 4570, 1007, 1063, 1030, 9495, 1035, 7561, 1006, 9043, 2546, 1006, 1005, 1996, 1000, 1003, 1055, 1006, 1007, 1000, 4118, 2003, 2139, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Query/Grammars/Grammar.php
Grammar.compileAggregate
protected function compileAggregate(Builder $query, $aggregate) { $column = $this->columnize($aggregate['columns']); // If the query has a "distinct" constraint and we're not asking for all columns // we need to prepend "distinct" onto the column name so that the query takes // it i...
php
protected function compileAggregate(Builder $query, $aggregate) { $column = $this->columnize($aggregate['columns']); // If the query has a "distinct" constraint and we're not asking for all columns // we need to prepend "distinct" onto the column name so that the query takes // it i...
[ "protected", "function", "compileAggregate", "(", "Builder", "$", "query", ",", "$", "aggregate", ")", "{", "$", "column", "=", "$", "this", "->", "columnize", "(", "$", "aggregate", "[", "'columns'", "]", ")", ";", "// If the query has a \"distinct\" constraint...
Compile an aggregated select clause. @param \Illuminate\Database\Query\Builder $query @param array $aggregate @return string
[ "Compile", "an", "aggregated", "select", "clause", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Grammars/Grammar.php#L105-L117
train
Compiles an aggregate function into a string
[ 30522, 5123, 3853, 4012, 22090, 8490, 17603, 5867, 1006, 12508, 1002, 23032, 1010, 1002, 9572, 1007, 1063, 1002, 5930, 1027, 1002, 2023, 1011, 1028, 5930, 4697, 1006, 1002, 9572, 1031, 1005, 7753, 1005, 1033, 1007, 1025, 1013, 1013, 2065, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
barryvdh/laravel-debugbar
src/ServiceProvider.php
ServiceProvider.boot
public function boot() { $configPath = __DIR__ . '/../config/debugbar.php'; $this->publishes([$configPath => $this->getConfigPath()], 'config'); $routeConfig = [ 'namespace' => 'Barryvdh\Debugbar\Controllers', 'prefix' => $this->app['config']->get('debugbar.route_pre...
php
public function boot() { $configPath = __DIR__ . '/../config/debugbar.php'; $this->publishes([$configPath => $this->getConfigPath()], 'config'); $routeConfig = [ 'namespace' => 'Barryvdh\Debugbar\Controllers', 'prefix' => $this->app['config']->get('debugbar.route_pre...
[ "public", "function", "boot", "(", ")", "{", "$", "configPath", "=", "__DIR__", ".", "'/../config/debugbar.php'", ";", "$", "this", "->", "publishes", "(", "[", "$", "configPath", "=>", "$", "this", "->", "getConfigPath", "(", ")", "]", ",", "'config'", ...
Bootstrap the application events. @return void
[ "Bootstrap", "the", "application", "events", "." ]
2d195779ea4f809f69764a795e2ec371dbb76a96
https://github.com/barryvdh/laravel-debugbar/blob/2d195779ea4f809f69764a795e2ec371dbb76a96/src/ServiceProvider.php#L64-L109
train
Boots the debug bar
[ 30522, 2270, 3853, 9573, 1006, 1007, 1063, 1002, 9530, 8873, 21600, 8988, 1027, 1035, 1035, 16101, 1035, 1035, 1012, 1005, 1013, 1012, 1012, 1013, 9530, 8873, 2290, 1013, 2139, 8569, 18259, 2906, 1012, 25718, 1005, 1025, 1002, 2023, 1011, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Piwik.php
Piwik.isUserIsAnonymous
public static function isUserIsAnonymous() { $currentUserLogin = Piwik::getCurrentUserLogin(); $isSuperUser = self::hasUserSuperUserAccess(); return !$isSuperUser && $currentUserLogin && strtolower($currentUserLogin) == 'anonymous'; }
php
public static function isUserIsAnonymous() { $currentUserLogin = Piwik::getCurrentUserLogin(); $isSuperUser = self::hasUserSuperUserAccess(); return !$isSuperUser && $currentUserLogin && strtolower($currentUserLogin) == 'anonymous'; }
[ "public", "static", "function", "isUserIsAnonymous", "(", ")", "{", "$", "currentUserLogin", "=", "Piwik", "::", "getCurrentUserLogin", "(", ")", ";", "$", "isSuperUser", "=", "self", "::", "hasUserSuperUserAccess", "(", ")", ";", "return", "!", "$", "isSuperU...
Returns true if the current user is the special **anonymous** user or not. @return bool @api
[ "Returns", "true", "if", "the", "current", "user", "is", "the", "special", "**", "anonymous", "**", "user", "or", "not", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Piwik.php#L320-L325
train
Returns true if the current user is not a super user
[ 30522, 2270, 10763, 3853, 2003, 20330, 29196, 16585, 27711, 1006, 1007, 1063, 1002, 2783, 20330, 21197, 2378, 1027, 14255, 9148, 2243, 1024, 1024, 2131, 10841, 14343, 3372, 20330, 21197, 2378, 1006, 1007, 1025, 1002, 26354, 6279, 21608, 2121,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/QueueServiceProvider.php
QueueServiceProvider.register
public function register() { $this->registerManager(); $this->registerConnection(); $this->registerWorker(); $this->registerListener(); $this->registerFailedJobServices(); $this->registerOpisSecurityKey(); }
php
public function register() { $this->registerManager(); $this->registerConnection(); $this->registerWorker(); $this->registerListener(); $this->registerFailedJobServices(); $this->registerOpisSecurityKey(); }
[ "public", "function", "register", "(", ")", "{", "$", "this", "->", "registerManager", "(", ")", ";", "$", "this", "->", "registerConnection", "(", ")", ";", "$", "this", "->", "registerWorker", "(", ")", ";", "$", "this", "->", "registerListener", "(", ...
Register the service provider. @return void
[ "Register", "the", "service", "provider", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Queue/QueueServiceProvider.php#L26-L34
train
Register all the classes
[ 30522, 2270, 3853, 4236, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 4236, 24805, 4590, 1006, 1007, 1025, 1002, 2023, 1011, 1028, 4236, 8663, 2638, 7542, 1006, 1007, 1025, 1002, 2023, 1011, 1028, 4236, 6198, 2121, 1006, 1007, 1025, 1002, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpFoundation/Session/Session.php
Session.setId
public function setId($id) { if ($this->storage->getId() !== $id) { $this->storage->setId($id); } }
php
public function setId($id) { if ($this->storage->getId() !== $id) { $this->storage->setId($id); } }
[ "public", "function", "setId", "(", "$", "id", ")", "{", "if", "(", "$", "this", "->", "storage", "->", "getId", "(", ")", "!==", "$", "id", ")", "{", "$", "this", "->", "storage", "->", "setId", "(", "$", "id", ")", ";", "}", "}" ]
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Session/Session.php#L210-L215
train
Set ID of the record in the cache
[ 30522, 2270, 3853, 2275, 3593, 1006, 1002, 8909, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 5527, 1011, 1028, 2131, 3593, 1006, 1007, 999, 1027, 1027, 1002, 8909, 1007, 1063, 1002, 2023, 1011, 1028, 5527, 1011, 1028, 2275, 3593, 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/Templating/Helper/SlotsHelper.php
SlotsHelper.get
public function get($name, $default = false) { return isset($this->slots[$name]) ? $this->slots[$name] : $default; }
php
public function get($name, $default = false) { return isset($this->slots[$name]) ? $this->slots[$name] : $default; }
[ "public", "function", "get", "(", "$", "name", ",", "$", "default", "=", "false", ")", "{", "return", "isset", "(", "$", "this", "->", "slots", "[", "$", "name", "]", ")", "?", "$", "this", "->", "slots", "[", "$", "name", "]", ":", "$", "defau...
Gets the slot value. @param string $name The slot name @param bool|string $default The default slot content @return string The slot content
[ "Gets", "the", "slot", "value", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Templating/Helper/SlotsHelper.php#L83-L86
train
Get a slot
[ 30522, 2270, 3853, 2131, 1006, 1002, 2171, 1010, 1002, 12398, 1027, 6270, 1007, 1063, 2709, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 19832, 1031, 1002, 2171, 1033, 1007, 1029, 1002, 2023, 1011, 1028, 19832, 1031, 1002, 2171, 1033, 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/Component/Process/Process.php
Process.resetProcessData
private function resetProcessData() { $this->starttime = null; $this->callback = null; $this->exitcode = null; $this->fallbackStatus = []; $this->processInformation = null; $this->stdout = fopen('php://temp/maxmemory:'.(1024 * 1024), 'w+b'); $this->stderr = fo...
php
private function resetProcessData() { $this->starttime = null; $this->callback = null; $this->exitcode = null; $this->fallbackStatus = []; $this->processInformation = null; $this->stdout = fopen('php://temp/maxmemory:'.(1024 * 1024), 'w+b'); $this->stderr = fo...
[ "private", "function", "resetProcessData", "(", ")", "{", "$", "this", "->", "starttime", "=", "null", ";", "$", "this", "->", "callback", "=", "null", ";", "$", "this", "->", "exitcode", "=", "null", ";", "$", "this", "->", "fallbackStatus", "=", "[",...
Resets data related to the latest run of the process.
[ "Resets", "data", "related", "to", "the", "latest", "run", "of", "the", "process", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Process/Process.php#L1470-L1484
train
Reset process data
[ 30522, 2797, 3853, 25141, 21572, 9623, 16150, 6790, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 2707, 7292, 1027, 19701, 1025, 1002, 2023, 1011, 1028, 2655, 5963, 1027, 19701, 1025, 1002, 2023, 1011, 1028, 6164, 16044, 1027, 19701, 1025, 1002...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Cache/Repository.php
Repository.handleManyResult
protected function handleManyResult($keys, $key, $value) { // If we could not find the cache value, we will fire the missed event and get // the default value for this cache value. This default could be a callback // so we will execute the value function which will resolve it if needed. ...
php
protected function handleManyResult($keys, $key, $value) { // If we could not find the cache value, we will fire the missed event and get // the default value for this cache value. This default could be a callback // so we will execute the value function which will resolve it if needed. ...
[ "protected", "function", "handleManyResult", "(", "$", "keys", ",", "$", "key", ",", "$", "value", ")", "{", "// If we could not find the cache value, we will fire the missed event and get", "// the default value for this cache value. This default could be a callback", "// so we will...
Handle a result for the "many" method. @param array $keys @param string $key @param mixed $value @return mixed
[ "Handle", "a", "result", "for", "the", "many", "method", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Cache/Repository.php#L158-L175
train
Handle the many result
[ 30522, 5123, 3853, 5047, 2386, 16363, 23722, 2102, 1006, 1002, 6309, 1010, 1002, 3145, 1010, 1002, 3643, 1007, 1063, 1013, 1013, 2065, 2057, 2071, 2025, 2424, 1996, 17053, 3643, 1010, 2057, 2097, 2543, 1996, 4771, 2724, 1998, 2131, 1013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Form/Field/Select.php
Select.options
public function options($options = []) { // remote options if (is_string($options)) { // reload selected if (class_exists($options) && in_array(Model::class, class_parents($options))) { return $this->model(...func_get_args()); } return...
php
public function options($options = []) { // remote options if (is_string($options)) { // reload selected if (class_exists($options) && in_array(Model::class, class_parents($options))) { return $this->model(...func_get_args()); } return...
[ "public", "function", "options", "(", "$", "options", "=", "[", "]", ")", "{", "// remote options", "if", "(", "is_string", "(", "$", "options", ")", ")", "{", "// reload selected", "if", "(", "class_exists", "(", "$", "options", ")", "&&", "in_array", "...
Set options. @param array|callable|string $options @return $this|mixed
[ "Set", "options", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Form/Field/Select.php#L45-L68
train
Options getter and setter
[ 30522, 2270, 3853, 7047, 1006, 1002, 7047, 1027, 1031, 1033, 1007, 1063, 1013, 1013, 6556, 7047, 2065, 1006, 2003, 1035, 5164, 1006, 1002, 7047, 1007, 1007, 1063, 1013, 1013, 2128, 11066, 3479, 2065, 1006, 2465, 1035, 6526, 1006, 1002, 70...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Mail/Mailable.php
Mailable.render
public function render() { return $this->withLocale($this->locale, function () { Container::getInstance()->call([$this, 'build']); return Container::getInstance()->make('mailer')->render( $this->buildView(), $this->buildViewData() ); }); }
php
public function render() { return $this->withLocale($this->locale, function () { Container::getInstance()->call([$this, 'build']); return Container::getInstance()->make('mailer')->render( $this->buildView(), $this->buildViewData() ); }); }
[ "public", "function", "render", "(", ")", "{", "return", "$", "this", "->", "withLocale", "(", "$", "this", "->", "locale", ",", "function", "(", ")", "{", "Container", "::", "getInstance", "(", ")", "->", "call", "(", "[", "$", "this", ",", "'build'...
Render the mailable into a view. @return \Illuminate\View\View @throws \ReflectionException
[ "Render", "the", "mailable", "into", "a", "view", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Mail/Mailable.php#L209-L218
train
Render the message.
[ 30522, 2270, 3853, 17552, 1006, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 2007, 4135, 9289, 2063, 1006, 1002, 2023, 1011, 1028, 2334, 2063, 1010, 3853, 1006, 1007, 1063, 11661, 1024, 1024, 2131, 7076, 26897, 1006, 1007, 1011, 1028, 2655, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Ldap/Adapter/ExtLdap/EntryManager.php
EntryManager.addAttributeValues
public function addAttributeValues(Entry $entry, string $attribute, array $values) { $con = $this->getConnectionResource(); if (!@ldap_mod_add($con, $entry->getDn(), [$attribute => $values])) { throw new LdapException(sprintf('Could not add values to entry "%s", attribute %s: %s.', $ent...
php
public function addAttributeValues(Entry $entry, string $attribute, array $values) { $con = $this->getConnectionResource(); if (!@ldap_mod_add($con, $entry->getDn(), [$attribute => $values])) { throw new LdapException(sprintf('Could not add values to entry "%s", attribute %s: %s.', $ent...
[ "public", "function", "addAttributeValues", "(", "Entry", "$", "entry", ",", "string", "$", "attribute", ",", "array", "$", "values", ")", "{", "$", "con", "=", "$", "this", "->", "getConnectionResource", "(", ")", ";", "if", "(", "!", "@", "ldap_mod_add...
Adds values to an entry's multi-valued attribute from the LDAP server. @throws NotBoundException @throws LdapException
[ "Adds", "values", "to", "an", "entry", "s", "multi", "-", "valued", "attribute", "from", "the", "LDAP", "server", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Ldap/Adapter/ExtLdap/EntryManager.php#L77-L84
train
Adds values to an entry s attribute
[ 30522, 2270, 3853, 5587, 19321, 3089, 8569, 2618, 10175, 15808, 1006, 4443, 1002, 4443, 1010, 5164, 1002, 17961, 1010, 9140, 1002, 5300, 1007, 1063, 1002, 9530, 1027, 1002, 2023, 1011, 1028, 2131, 8663, 2638, 7542, 6072, 8162, 3401, 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...
dompdf/dompdf
src/Adapter/CPDF.php
CPDF.line
public function line($x1, $y1, $x2, $y2, $color, $width, $style = array()) { $this->_set_stroke_color($color); $this->_set_line_style($width, "butt", "", $style); $this->_pdf->line($x1, $this->y($y1), $x2, $this->y($y2)); $this->_set_line_transparency("Normal", $this->_c...
php
public function line($x1, $y1, $x2, $y2, $color, $width, $style = array()) { $this->_set_stroke_color($color); $this->_set_line_style($width, "butt", "", $style); $this->_pdf->line($x1, $this->y($y1), $x2, $this->y($y2)); $this->_set_line_transparency("Normal", $this->_c...
[ "public", "function", "line", "(", "$", "x1", ",", "$", "y1", ",", "$", "x2", ",", "$", "y2", ",", "$", "color", ",", "$", "width", ",", "$", "style", "=", "array", "(", ")", ")", "{", "$", "this", "->", "_set_stroke_color", "(", "$", "color", ...
Canvas implementation @param float $x1 @param float $y1 @param float $x2 @param float $y2 @param array $color @param float $width @param array $style
[ "Canvas", "implementation" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/Adapter/CPDF.php#L554-L562
train
Write a line to the pdf
[ 30522, 2270, 3853, 2240, 1006, 1002, 1060, 2487, 1010, 1002, 1061, 2487, 1010, 1002, 1060, 2475, 1010, 1002, 1061, 2475, 1010, 1002, 3609, 1010, 1002, 9381, 1010, 1002, 2806, 1027, 9140, 1006, 1007, 1007, 1063, 1002, 2023, 1011, 1028, 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/Bundle/FrameworkBundle/Command/DebugAutowiringCommand.php
DebugAutowiringCommand.execute
protected function execute(InputInterface $input, OutputInterface $output) { $io = new SymfonyStyle($input, $output); $errorIo = $io->getErrorStyle(); $builder = $this->getContainerBuilder(); $serviceIds = $builder->getServiceIds(); $serviceIds = array_filter($serviceIds, [$...
php
protected function execute(InputInterface $input, OutputInterface $output) { $io = new SymfonyStyle($input, $output); $errorIo = $io->getErrorStyle(); $builder = $this->getContainerBuilder(); $serviceIds = $builder->getServiceIds(); $serviceIds = array_filter($serviceIds, [$...
[ "protected", "function", "execute", "(", "InputInterface", "$", "input", ",", "OutputInterface", "$", "output", ")", "{", "$", "io", "=", "new", "SymfonyStyle", "(", "$", "input", ",", "$", "output", ")", ";", "$", "errorIo", "=", "$", "io", "->", "get...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/FrameworkBundle/Command/DebugAutowiringCommand.php#L72-L148
train
Executes the type - hint command
[ 30522, 5123, 3853, 15389, 1006, 7953, 18447, 2121, 12172, 1002, 7953, 1010, 6434, 18447, 2121, 12172, 1002, 6434, 1007, 1063, 1002, 22834, 1027, 2047, 25353, 2213, 14876, 4890, 30524, 2023, 1011, 1028, 2131, 8663, 18249, 2121, 8569, 23891, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Intl/Data/Util/LocaleScanner.php
LocaleScanner.scanLocales
public function scanLocales($sourceDir) { $locales = glob($sourceDir.'/*.txt'); // Remove file extension and sort array_walk($locales, function (&$locale) { $locale = basename($locale, '.txt'); }); // Remove non-locales $locales = array_filter($locales, function ($locale) {...
php
public function scanLocales($sourceDir) { $locales = glob($sourceDir.'/*.txt'); // Remove file extension and sort array_walk($locales, function (&$locale) { $locale = basename($locale, '.txt'); }); // Remove non-locales $locales = array_filter($locales, function ($locale) {...
[ "public", "function", "scanLocales", "(", "$", "sourceDir", ")", "{", "$", "locales", "=", "glob", "(", "$", "sourceDir", ".", "'/*.txt'", ")", ";", "// Remove file extension and sort", "array_walk", "(", "$", "locales", ",", "function", "(", "&", "$", "loca...
Returns all locales found in the given directory. @param string $sourceDir The directory with ICU files @return array An array of locales. The result also contains locales that are in fact just aliases for other locales. Use {@link scanAliases()} to determine which of the locales are aliases
[ "Returns", "all", "locales", "found", "in", "the", "given", "directory", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Intl/Data/Util/LocaleScanner.php#L43-L58
train
Scan locales in source directory and return array of locales
[ 30522, 2270, 3853, 13594, 4135, 9289, 2229, 1006, 1002, 23184, 4313, 1007, 1063, 1002, 2334, 2229, 1027, 1043, 4135, 2497, 1006, 1002, 23184, 4313, 1012, 1005, 1013, 1008, 1012, 19067, 2102, 1005, 1007, 1025, 1013, 1013, 6366, 5371, 5331, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/SettingsManager.php
SettingsManager.filterByContext
protected function filterByContext($items, $context) { $filteredItems = []; foreach ($items as $categoryName => $category) { $filteredCategory = []; foreach ($category as $item) { $itemContext = is_array($item->context) ? $item->context : [$item->context]; ...
php
protected function filterByContext($items, $context) { $filteredItems = []; foreach ($items as $categoryName => $category) { $filteredCategory = []; foreach ($category as $item) { $itemContext = is_array($item->context) ? $item->context : [$item->context]; ...
[ "protected", "function", "filterByContext", "(", "$", "items", ",", "$", "context", ")", "{", "$", "filteredItems", "=", "[", "]", ";", "foreach", "(", "$", "items", "as", "$", "categoryName", "=>", "$", "category", ")", "{", "$", "filteredCategory", "="...
Filters a set of items by a given context. @param array $items @param string $context @return array
[ "Filters", "a", "set", "of", "items", "by", "a", "given", "context", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/classes/SettingsManager.php#L170-L189
train
Filter items by context
[ 30522, 5123, 3853, 11307, 3762, 8663, 18209, 1006, 1002, 5167, 1010, 1002, 6123, 1007, 1063, 1002, 21839, 4221, 5244, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1002, 5167, 2004, 1002, 4696, 18442, 1027, 1028, 1002, 4696, 1007, 1063, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Events/CallQueuedListener.php
CallQueuedListener.handle
public function handle(Container $container) { $this->prepareData(); $handler = $this->setJobInstanceIfNecessary( $this->job, $container->make($this->class) ); call_user_func_array( [$handler, $this->method], $this->data ); }
php
public function handle(Container $container) { $this->prepareData(); $handler = $this->setJobInstanceIfNecessary( $this->job, $container->make($this->class) ); call_user_func_array( [$handler, $this->method], $this->data ); }
[ "public", "function", "handle", "(", "Container", "$", "container", ")", "{", "$", "this", "->", "prepareData", "(", ")", ";", "$", "handler", "=", "$", "this", "->", "setJobInstanceIfNecessary", "(", "$", "this", "->", "job", ",", "$", "container", "->"...
Handle the queued job. @param \Illuminate\Container\Container $container @return void
[ "Handle", "the", "queued", "job", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Events/CallQueuedListener.php#L77-L88
train
Handle the request and call the handler
[ 30522, 2270, 3853, 5047, 1006, 11661, 1002, 11661, 1007, 1063, 1002, 2023, 1011, 1028, 4810, 6790, 1006, 1007, 1025, 1002, 28213, 1027, 1002, 2023, 1011, 1028, 2275, 5558, 8428, 12693, 3401, 10128, 2638, 9623, 10286, 2100, 1006, 1002, 2023,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Framework/File/AbstractFile.php
AbstractFile.unlock
public function unlock(): bool { if (!$this->handle) { return false; } if ($this->locked) { flock($this->handle, LOCK_UN); $this->locked = false; } fclose($this->handle); $this->handle = null; return true; }
php
public function unlock(): bool { if (!$this->handle) { return false; } if ($this->locked) { flock($this->handle, LOCK_UN); $this->locked = false; } fclose($this->handle); $this->handle = null; return true; }
[ "public", "function", "unlock", "(", ")", ":", "bool", "{", "if", "(", "!", "$", "this", "->", "handle", ")", "{", "return", "false", ";", "}", "if", "(", "$", "this", "->", "locked", ")", "{", "flock", "(", "$", "this", "->", "handle", ",", "L...
{@inheritdoc} @see FileInterface::unlock()
[ "{" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Framework/File/AbstractFile.php#L203-L218
train
Unlocks the current thread
[ 30522, 2270, 3853, 19829, 1006, 1007, 1024, 22017, 2140, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 5047, 1007, 1063, 2709, 6270, 1025, 1065, 2065, 1006, 1002, 2023, 1011, 1028, 5299, 1007, 1063, 19311, 1006, 1002, 2023, 1011, 1028, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
walkor/Workerman
Worker.php
Worker.reload
protected static function reload() { // For master process. if (static::$_masterPid === posix_getpid()) { // Set reloading state. if (static::$_status !== static::STATUS_RELOADING && static::$_status !== static::STATUS_SHUTDOWN) { static::log("Workerman[" . ba...
php
protected static function reload() { // For master process. if (static::$_masterPid === posix_getpid()) { // Set reloading state. if (static::$_status !== static::STATUS_RELOADING && static::$_status !== static::STATUS_SHUTDOWN) { static::log("Workerman[" . ba...
[ "protected", "static", "function", "reload", "(", ")", "{", "// For master process.", "if", "(", "static", "::", "$", "_masterPid", "===", "posix_getpid", "(", ")", ")", "{", "// Set reloading state.", "if", "(", "static", "::", "$", "_status", "!==", "static"...
Execute reload. @return void
[ "Execute", "reload", "." ]
13649907f05014fcfffcfccaef01e63ad3339351
https://github.com/walkor/Workerman/blob/13649907f05014fcfffcfccaef01e63ad3339351/Worker.php#L1677-L1761
train
Reloads the master process.
[ 30522, 5123, 10763, 3853, 2128, 11066, 1006, 1007, 1063, 1013, 1013, 2005, 3040, 2832, 1012, 2065, 1006, 10763, 1024, 1024, 1002, 1035, 3040, 23267, 1027, 1027, 1027, 13433, 5332, 2595, 1035, 2131, 23267, 1006, 1007, 1007, 1063, 1013, 1013,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php
TextDescriptor.describeRoute
protected function describeRoute(Route $route, array $options = []) { $tableHeaders = ['Property', 'Value']; $tableRows = [ ['Route Name', isset($options['name']) ? $options['name'] : ''], ['Path', $route->getPath()], ['Path Regex', $route->compile()->getRegex()],...
php
protected function describeRoute(Route $route, array $options = []) { $tableHeaders = ['Property', 'Value']; $tableRows = [ ['Route Name', isset($options['name']) ? $options['name'] : ''], ['Path', $route->getPath()], ['Path Regex', $route->compile()->getRegex()],...
[ "protected", "function", "describeRoute", "(", "Route", "$", "route", ",", "array", "$", "options", "=", "[", "]", ")", "{", "$", "tableHeaders", "=", "[", "'Property'", ",", "'Value'", "]", ";", "$", "tableRows", "=", "[", "[", "'Route Name'", ",", "i...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php#L88-L112
train
Describes a route
[ 30522, 5123, 3853, 6235, 22494, 2618, 1006, 2799, 1002, 2799, 1010, 9140, 1002, 7047, 1027, 1031, 1033, 1007, 1063, 1002, 2795, 4974, 2545, 1027, 1031, 1005, 3200, 1005, 1010, 1005, 3643, 1005, 1033, 1025, 1002, 2795, 10524, 2015, 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...
octobercms/october
modules/system/console/ThemeList.php
ThemeList.handle
public function handle() { $themeManager = ThemeManager::instance(); $updateManager = UpdateManager::instance(); foreach (Theme::all() as $theme) { $flag = $theme->isActiveTheme() ? '[*] ' : '[-] '; $themeId = $theme->getId(); $themeName = $themeManager->...
php
public function handle() { $themeManager = ThemeManager::instance(); $updateManager = UpdateManager::instance(); foreach (Theme::all() as $theme) { $flag = $theme->isActiveTheme() ? '[*] ' : '[-] '; $themeId = $theme->getId(); $themeName = $themeManager->...
[ "public", "function", "handle", "(", ")", "{", "$", "themeManager", "=", "ThemeManager", "::", "instance", "(", ")", ";", "$", "updateManager", "=", "UpdateManager", "::", "instance", "(", ")", ";", "foreach", "(", "Theme", "::", "all", "(", ")", "as", ...
Execute the console command.
[ "Execute", "the", "console", "command", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/console/ThemeList.php#L32-L58
train
Handle all active themes
[ 30522, 2270, 3853, 5047, 1006, 1007, 1063, 1002, 4323, 24805, 4590, 1027, 4323, 24805, 4590, 1024, 1024, 6013, 1006, 1007, 1025, 1002, 10651, 24805, 4590, 1027, 10651, 24805, 4590, 1024, 1024, 6013, 1006, 1007, 1025, 18921, 6776, 1006, 4323...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/View/Concerns/ManagesEvents.php
ManagesEvents.composer
public function composer($views, $callback) { $composers = []; foreach ((array) $views as $view) { $composers[] = $this->addViewEvent($view, $callback, 'composing: '); } return $composers; }
php
public function composer($views, $callback) { $composers = []; foreach ((array) $views as $view) { $composers[] = $this->addViewEvent($view, $callback, 'composing: '); } return $composers; }
[ "public", "function", "composer", "(", "$", "views", ",", "$", "callback", ")", "{", "$", "composers", "=", "[", "]", ";", "foreach", "(", "(", "array", ")", "$", "views", "as", "$", "view", ")", "{", "$", "composers", "[", "]", "=", "$", "this",...
Register a view composer event. @param array|string $views @param \Closure|string $callback @return array
[ "Register", "a", "view", "composer", "event", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/View/Concerns/ManagesEvents.php#L53-L62
train
Add view composer
[ 30522, 2270, 3853, 4543, 1006, 1002, 5328, 1010, 1002, 2655, 5963, 1007, 1063, 1002, 9929, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1006, 9140, 1007, 1002, 5328, 2004, 1002, 3193, 1007, 1063, 1002, 9929, 1031, 1033, 1027, 1002, 2023, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php
TraceableEventDispatcher.beforeDispatch
protected function beforeDispatch(string $eventName, $event) { switch ($eventName) { case KernelEvents::REQUEST: $this->stopwatch->openSection(); break; case KernelEvents::VIEW: case KernelEvents::RESPONSE: // stop only if a...
php
protected function beforeDispatch(string $eventName, $event) { switch ($eventName) { case KernelEvents::REQUEST: $this->stopwatch->openSection(); break; case KernelEvents::VIEW: case KernelEvents::RESPONSE: // stop only if a...
[ "protected", "function", "beforeDispatch", "(", "string", "$", "eventName", ",", "$", "event", ")", "{", "switch", "(", "$", "eventName", ")", "{", "case", "KernelEvents", "::", "REQUEST", ":", "$", "this", "->", "stopwatch", "->", "openSection", "(", ")",...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php#L29-L55
train
Before dispatch event
[ 30522, 5123, 3853, 2077, 10521, 4502, 10649, 1006, 5164, 1002, 2724, 18442, 1010, 1002, 2724, 1007, 1063, 6942, 1006, 1002, 2724, 18442, 1007, 1063, 2553, 16293, 18697, 7666, 1024, 1024, 5227, 1024, 1002, 2023, 1011, 1028, 2644, 18866, 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...
walkor/Workerman
Events/Select.php
Select.clearAllTimer
public function clearAllTimer() { $this->_scheduler = new \SplPriorityQueue(); $this->_scheduler->setExtractFlags(\SplPriorityQueue::EXTR_BOTH); $this->_eventTimer = array(); }
php
public function clearAllTimer() { $this->_scheduler = new \SplPriorityQueue(); $this->_scheduler->setExtractFlags(\SplPriorityQueue::EXTR_BOTH); $this->_eventTimer = array(); }
[ "public", "function", "clearAllTimer", "(", ")", "{", "$", "this", "->", "_scheduler", "=", "new", "\\", "SplPriorityQueue", "(", ")", ";", "$", "this", "->", "_scheduler", "->", "setExtractFlags", "(", "\\", "SplPriorityQueue", "::", "EXTR_BOTH", ")", ";", ...
{@inheritdoc}
[ "{" ]
13649907f05014fcfffcfccaef01e63ad3339351
https://github.com/walkor/Workerman/blob/13649907f05014fcfffcfccaef01e63ad3339351/Events/Select.php#L253-L258
train
Clear all timer
[ 30522, 2270, 3853, 3154, 8095, 7292, 2099, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 1035, 6134, 2099, 1027, 2047, 1032, 11867, 14277, 9488, 15780, 4226, 5657, 1006, 1007, 1025, 1002, 2023, 1011, 1028, 1035, 6134, 2099, 1011, 1028, 2275, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/OptionsResolver/OptionsResolver.php
OptionsResolver.addAllowedValues
public function addAllowedValues($option, $allowedValues) { if ($this->locked) { throw new AccessException('Allowed values cannot be added from a lazy option or normalizer.'); } if (!isset($this->defined[$option])) { throw new UndefinedOptionsException(sprintf('The o...
php
public function addAllowedValues($option, $allowedValues) { if ($this->locked) { throw new AccessException('Allowed values cannot be added from a lazy option or normalizer.'); } if (!isset($this->defined[$option])) { throw new UndefinedOptionsException(sprintf('The o...
[ "public", "function", "addAllowedValues", "(", "$", "option", ",", "$", "allowedValues", ")", "{", "if", "(", "$", "this", "->", "locked", ")", "{", "throw", "new", "AccessException", "(", "'Allowed values cannot be added from a lazy option or normalizer.'", ")", ";...
Adds allowed values for an option. The values are merged with the allowed values defined previously. Instead of passing values, you may also pass a closures with the following signature: function ($value) { // return true or false } The closure receives the value as argument and should return true to accept the val...
[ "Adds", "allowed", "values", "for", "an", "option", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/OptionsResolver/OptionsResolver.php#L606-L630
train
Add allowed values for an option
[ 30522, 2270, 3853, 5587, 8095, 15096, 10175, 15808, 1006, 1002, 5724, 1010, 1002, 3039, 10175, 15808, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 5299, 1007, 1063, 5466, 2047, 3229, 10288, 24422, 1006, 1005, 3039, 5300, 3685, 2022, 2794...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
php-ai/php-ml
src/Classification/Ensemble/RandomForest.php
RandomForest.getFeatureImportances
public function getFeatureImportances(): array { // Traverse each tree and sum importance of the columns $sum = []; foreach ($this->classifiers as $tree) { /** @var DecisionTree $tree */ $importances = $tree->getFeatureImportances(); foreach ($importances...
php
public function getFeatureImportances(): array { // Traverse each tree and sum importance of the columns $sum = []; foreach ($this->classifiers as $tree) { /** @var DecisionTree $tree */ $importances = $tree->getFeatureImportances(); foreach ($importances...
[ "public", "function", "getFeatureImportances", "(", ")", ":", "array", "{", "// Traverse each tree and sum importance of the columns", "$", "sum", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "classifiers", "as", "$", "tree", ")", "{", "/** @var Decision...
This will return an array including an importance value for each column in the given dataset. Importance values for a column is the average importance of that column in all trees in the forest
[ "This", "will", "return", "an", "array", "including", "an", "importance", "value", "for", "each", "column", "in", "the", "given", "dataset", ".", "Importance", "values", "for", "a", "column", "is", "the", "average", "importance", "of", "that", "column", "in"...
f6aa1a59b0525b8fca3d2786d661ab3e70904016
https://github.com/php-ai/php-ml/blob/f6aa1a59b0525b8fca3d2786d661ab3e70904016/src/Classification/Ensemble/RandomForest.php#L86-L111
train
Returns the feature importances of all columns in the tree
[ 30522, 2270, 3853, 2131, 7959, 4017, 5397, 5714, 6442, 26755, 1006, 1007, 1024, 9140, 1063, 1013, 1013, 20811, 2169, 3392, 1998, 7680, 5197, 1997, 1996, 7753, 1002, 7680, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1002, 2023, 1011, 1028, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Cache/RedisTaggedCache.php
RedisTaggedCache.increment
public function increment($key, $value = 1) { $this->pushStandardKeys($this->tags->getNamespace(), $key); parent::increment($key, $value); }
php
public function increment($key, $value = 1) { $this->pushStandardKeys($this->tags->getNamespace(), $key); parent::increment($key, $value); }
[ "public", "function", "increment", "(", "$", "key", ",", "$", "value", "=", "1", ")", "{", "$", "this", "->", "pushStandardKeys", "(", "$", "this", "->", "tags", "->", "getNamespace", "(", ")", ",", "$", "key", ")", ";", "parent", "::", "increment", ...
Increment the value of an item in the cache. @param string $key @param mixed $value @return void
[ "Increment", "the", "value", "of", "an", "item", "in", "the", "cache", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Cache/RedisTaggedCache.php#L46-L51
train
Increment the value of a tag
[ 30522, 2270, 3853, 4297, 28578, 4765, 1006, 1002, 3145, 1010, 1002, 3643, 1027, 1015, 1007, 1063, 1002, 2023, 1011, 1028, 5245, 21515, 4232, 14839, 2015, 1006, 1002, 2023, 1011, 1028, 22073, 1011, 1028, 2131, 18442, 23058, 1006, 1007, 1010,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Container/Container.php
Container.extend
public function extend($abstract, Closure $closure) { $abstract = $this->getAlias($abstract); if (isset($this->instances[$abstract])) { $this->instances[$abstract] = $closure($this->instances[$abstract], $this); $this->rebound($abstract); } else { $this-...
php
public function extend($abstract, Closure $closure) { $abstract = $this->getAlias($abstract); if (isset($this->instances[$abstract])) { $this->instances[$abstract] = $closure($this->instances[$abstract], $this); $this->rebound($abstract); } else { $this-...
[ "public", "function", "extend", "(", "$", "abstract", ",", "Closure", "$", "closure", ")", "{", "$", "abstract", "=", "$", "this", "->", "getAlias", "(", "$", "abstract", ")", ";", "if", "(", "isset", "(", "$", "this", "->", "instances", "[", "$", ...
"Extend" an abstract type in the container. @param string $abstract @param \Closure $closure @return void @throws \InvalidArgumentException
[ "Extend", "an", "abstract", "type", "in", "the", "container", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Container/Container.php#L369-L384
train
Extends an abstract with a closure
[ 30522, 2270, 3853, 7949, 1006, 1002, 10061, 1010, 8503, 1002, 8503, 1007, 1063, 1002, 10061, 1027, 1002, 2023, 1011, 1028, 2131, 22786, 2015, 1006, 1002, 10061, 1007, 1025, 2065, 1006, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 12107, 1031,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/UserCountry/API.php
API.getCity
public function getCity($idSite, $period, $date, $segment = false) { $dataTable = $this->getDataTable(Archiver::CITY_RECORD_NAME, $idSite, $period, $date, $segment); $separator = Archiver::LOCATION_SEPARATOR; $unk = Visit::UNKNOWN_CODE; $dataTables = [$dataTable]; if ($dat...
php
public function getCity($idSite, $period, $date, $segment = false) { $dataTable = $this->getDataTable(Archiver::CITY_RECORD_NAME, $idSite, $period, $date, $segment); $separator = Archiver::LOCATION_SEPARATOR; $unk = Visit::UNKNOWN_CODE; $dataTables = [$dataTable]; if ($dat...
[ "public", "function", "getCity", "(", "$", "idSite", ",", "$", "period", ",", "$", "date", ",", "$", "segment", "=", "false", ")", "{", "$", "dataTable", "=", "$", "this", "->", "getDataTable", "(", "Archiver", "::", "CITY_RECORD_NAME", ",", "$", "idSi...
Returns visit information for every city with at least one visit. @param int|string $idSite @param string $period @param string $date @param string|bool $segment @return DataTable
[ "Returns", "visit", "information", "for", "every", "city", "with", "at", "least", "one", "visit", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/UserCountry/API.php#L182-L280
train
Get City Location
[ 30522, 2270, 3853, 2131, 12972, 1006, 1002, 8909, 28032, 2063, 1010, 1002, 2558, 1010, 1002, 3058, 1010, 1002, 6903, 1027, 6270, 1007, 1063, 1002, 2951, 10880, 1027, 1002, 2023, 1011, 1028, 2131, 2850, 29336, 3085, 1006, 8756, 2099, 1024, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Updates/2.10.0-b5.php
Updates_2_10_0_b5.getFirstDayOfArchivedDeviceDetectorData
public static function getFirstDayOfArchivedDeviceDetectorData() { static $deviceDetectionBlobAvailableDate; if (empty($deviceDetectionBlobAvailableDate)) { $archiveBlobTables = self::getAllArchiveBlobTables(); $deviceDetectionBlobAvailableDate = null; foreach (...
php
public static function getFirstDayOfArchivedDeviceDetectorData() { static $deviceDetectionBlobAvailableDate; if (empty($deviceDetectionBlobAvailableDate)) { $archiveBlobTables = self::getAllArchiveBlobTables(); $deviceDetectionBlobAvailableDate = null; foreach (...
[ "public", "static", "function", "getFirstDayOfArchivedDeviceDetectorData", "(", ")", "{", "static", "$", "deviceDetectionBlobAvailableDate", ";", "if", "(", "empty", "(", "$", "deviceDetectionBlobAvailableDate", ")", ")", "{", "$", "archiveBlobTables", "=", "self", ":...
Find the first day on which DevicesDetection archives were generated @return int Timestamp
[ "Find", "the", "first", "day", "on", "which", "DevicesDetection", "archives", "were", "generated" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Updates/2.10.0-b5.php#L156-L178
train
Returns the date of the first day of archive device detection data
[ 30522, 2270, 10763, 3853, 2131, 8873, 12096, 10259, 11253, 2906, 5428, 7178, 24844, 6610, 3207, 26557, 4263, 2850, 2696, 1006, 1007, 1063, 10763, 1002, 5080, 3207, 26557, 3508, 16558, 16429, 12462, 11733, 23242, 3686, 1025, 2065, 1006, 4064, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/TotalRow.php
TotalRow.render
public function render() { $columns = $this->getGrid()->columns()->flatMap(function (Column $column) { $name = $column->getName(); $total = ($display = Arr::get($this->columns, $name)) ? $this->total($name, $display) : ''; return [$name => $total]; })->toArray()...
php
public function render() { $columns = $this->getGrid()->columns()->flatMap(function (Column $column) { $name = $column->getName(); $total = ($display = Arr::get($this->columns, $name)) ? $this->total($name, $display) : ''; return [$name => $total]; })->toArray()...
[ "public", "function", "render", "(", ")", "{", "$", "columns", "=", "$", "this", "->", "getGrid", "(", ")", "->", "columns", "(", ")", "->", "flatMap", "(", "function", "(", "Column", "$", "column", ")", "{", "$", "name", "=", "$", "column", "->", ...
Render total-row. @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
[ "Render", "total", "-", "row", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Grid/Tools/TotalRow.php#L62-L73
train
Render total row
[ 30522, 2270, 3853, 17552, 1006, 1007, 1063, 1002, 7753, 1027, 1002, 2023, 1011, 1028, 2131, 16523, 3593, 1006, 1007, 1011, 1028, 7753, 1006, 1007, 1011, 1028, 4257, 2863, 2361, 1006, 3853, 1006, 5930, 1002, 5930, 1007, 1063, 1002, 2171, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Config/ConfigFileFinder.php
ConfigFileFinder.detectInFolder
protected function detectInFolder($folder, $lookup = null) { $folder = rtrim($folder, '/'); $path = trim(Folder::getRelativePath($folder), '/'); $base = $path === $folder ? '' : ($path ? substr($folder, 0, -strlen($path)) : $folder . '/'); $list = []; if (is_dir($folder)) {...
php
protected function detectInFolder($folder, $lookup = null) { $folder = rtrim($folder, '/'); $path = trim(Folder::getRelativePath($folder), '/'); $base = $path === $folder ? '' : ($path ? substr($folder, 0, -strlen($path)) : $folder . '/'); $list = []; if (is_dir($folder)) {...
[ "protected", "function", "detectInFolder", "(", "$", "folder", ",", "$", "lookup", "=", "null", ")", "{", "$", "folder", "=", "rtrim", "(", "$", "folder", ",", "'/'", ")", ";", "$", "path", "=", "trim", "(", "Folder", "::", "getRelativePath", "(", "$...
Detects all directories with the lookup file and returns them with last modification time. @param string $folder Location to look up from. @param string $lookup Filename to be located (defaults to directory name). @return array @internal
[ "Detects", "all", "directories", "with", "the", "lookup", "file", "and", "returns", "them", "with", "last", "modification", "time", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Config/ConfigFileFinder.php#L194-L223
train
Detects all files in a folder and returns an array of array with the filename and modification time as key
[ 30522, 5123, 3853, 11487, 2378, 10371, 2121, 1006, 1002, 19622, 1010, 1002, 2298, 6279, 1027, 19701, 1007, 1063, 1002, 19622, 1027, 19387, 20026, 1006, 1002, 19622, 1010, 1005, 1013, 1005, 1007, 1025, 1002, 4130, 1027, 12241, 1006, 19622, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Filesystem/Folder.php
Folder.getRelativePathDotDot
public static function getRelativePathDotDot($path, $base) { // Normalize paths. $base = preg_replace('![\\\/]+!', '/', $base); $path = preg_replace('![\\\/]+!', '/', $path); if ($path === $base) { return ''; } $baseParts = explode('/', ltrim($base, '/')...
php
public static function getRelativePathDotDot($path, $base) { // Normalize paths. $base = preg_replace('![\\\/]+!', '/', $base); $path = preg_replace('![\\\/]+!', '/', $path); if ($path === $base) { return ''; } $baseParts = explode('/', ltrim($base, '/')...
[ "public", "static", "function", "getRelativePathDotDot", "(", "$", "path", ",", "$", "base", ")", "{", "// Normalize paths.", "$", "base", "=", "preg_replace", "(", "'![\\\\\\/]+!'", ",", "'/'", ",", "$", "base", ")", ";", "$", "path", "=", "preg_replace", ...
Get relative path between target and base path. If path isn't relative, return full path. @param string $path @param string $base @return string
[ "Get", "relative", "path", "between", "target", "and", "base", "path", ".", "If", "path", "isn", "t", "relative", "return", "full", "path", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Filesystem/Folder.php#L143-L172
train
Returns the relative path to the file.
[ 30522, 2270, 10763, 3853, 2131, 16570, 8082, 15069, 27364, 27364, 1006, 1002, 4130, 1010, 1002, 2918, 1007, 1063, 1013, 1013, 3671, 4697, 10425, 1012, 1002, 2918, 1027, 3653, 2290, 1035, 5672, 1006, 1005, 999, 1031, 1032, 1032, 1032, 1013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/CssSelector/XPath/XPathExpr.php
XPathExpr.join
public function join(string $combiner, self $expr): self { $path = $this->__toString().$combiner; if ('*/' !== $expr->path) { $path .= $expr->path; } $this->path = $path; $this->element = $expr->element; $this->condition = $expr->condition; retu...
php
public function join(string $combiner, self $expr): self { $path = $this->__toString().$combiner; if ('*/' !== $expr->path) { $path .= $expr->path; } $this->path = $path; $this->element = $expr->element; $this->condition = $expr->condition; retu...
[ "public", "function", "join", "(", "string", "$", "combiner", ",", "self", "$", "expr", ")", ":", "self", "{", "$", "path", "=", "$", "this", "->", "__toString", "(", ")", ".", "$", "combiner", ";", "if", "(", "'*/'", "!==", "$", "expr", "->", "p...
Joins another XPathExpr with a combiner. @return $this
[ "Joins", "another", "XPathExpr", "with", "a", "combiner", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/CssSelector/XPath/XPathExpr.php#L80-L93
train
Joins the path element condition and path of the current tree with the given combiner.
[ 30522, 2270, 3853, 3693, 1006, 5164, 1002, 11506, 2099, 1010, 2969, 1002, 4654, 18098, 1007, 1024, 2969, 1063, 1002, 4130, 1027, 1002, 2023, 1011, 1028, 1035, 1035, 2000, 3367, 4892, 1006, 1007, 1012, 1002, 11506, 2099, 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...
matomo-org/matomo
core/DataTable/Filter/PivotByDimension.php
PivotByDimension.getIntersectedTable
private function getIntersectedTable(DataTable $table, Row $row) { if ($this->isPivotDimensionSubtable()) { return $this->loadSubtable($table, $row); } if ($this->isFetchingBySegmentEnabled) { $segment = $row->getMetadata('segment'); if (empty($segment)) ...
php
private function getIntersectedTable(DataTable $table, Row $row) { if ($this->isPivotDimensionSubtable()) { return $this->loadSubtable($table, $row); } if ($this->isFetchingBySegmentEnabled) { $segment = $row->getMetadata('segment'); if (empty($segment)) ...
[ "private", "function", "getIntersectedTable", "(", "DataTable", "$", "table", ",", "Row", "$", "row", ")", "{", "if", "(", "$", "this", "->", "isPivotDimensionSubtable", "(", ")", ")", "{", "return", "$", "this", "->", "loadSubtable", "(", "$", "table", ...
An intersected table is a table that describes visits by a certain dimension for the visits represented by a row in another table. This method fetches intersected tables either via subtable or by using a segment. Read the class docs for more info.
[ "An", "intersected", "table", "is", "a", "table", "that", "describes", "visits", "by", "a", "certain", "dimension", "for", "the", "visits", "represented", "by", "a", "row", "in", "another", "table", ".", "This", "method", "fetches", "intersected", "tables", ...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataTable/Filter/PivotByDimension.php#L265-L291
train
Returns intersected table
[ 30522, 2797, 3853, 2131, 18447, 2545, 22471, 2098, 10880, 1006, 2951, 10880, 1002, 2795, 1010, 5216, 1002, 5216, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 2003, 8197, 22994, 22172, 6132, 8496, 12083, 10880, 1006, 1007, 1007, 1063, 270...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.overwriteExistingRelation
protected function overwriteExistingRelation($name) { if ($this->relations->isEmpty()) { return; } $this->relations = $this->relations->filter( function (Relation $relation) use ($name) { return $relation->getName() != $name; } ); ...
php
protected function overwriteExistingRelation($name) { if ($this->relations->isEmpty()) { return; } $this->relations = $this->relations->filter( function (Relation $relation) use ($name) { return $relation->getName() != $name; } ); ...
[ "protected", "function", "overwriteExistingRelation", "(", "$", "name", ")", "{", "if", "(", "$", "this", "->", "relations", "->", "isEmpty", "(", ")", ")", "{", "return", ";", "}", "$", "this", "->", "relations", "=", "$", "this", "->", "relations", "...
Overwrite existing relation. @param string $name
[ "Overwrite", "existing", "relation", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Show.php#L276-L287
train
Overwrite existing relation
[ 30522, 5123, 3853, 2058, 26373, 10288, 2923, 2075, 16570, 3370, 1006, 1002, 2171, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 4262, 1011, 1028, 2003, 6633, 13876, 2100, 1006, 1007, 1007, 1063, 2709, 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...
laravel/framework
src/Illuminate/Database/Schema/Blueprint.php
Blueprint.tinyInteger
public function tinyInteger($column, $autoIncrement = false, $unsigned = false) { return $this->addColumn('tinyInteger', $column, compact('autoIncrement', 'unsigned')); }
php
public function tinyInteger($column, $autoIncrement = false, $unsigned = false) { return $this->addColumn('tinyInteger', $column, compact('autoIncrement', 'unsigned')); }
[ "public", "function", "tinyInteger", "(", "$", "column", ",", "$", "autoIncrement", "=", "false", ",", "$", "unsigned", "=", "false", ")", "{", "return", "$", "this", "->", "addColumn", "(", "'tinyInteger'", ",", "$", "column", ",", "compact", "(", "'aut...
Create a new tiny integer (1-byte) column on the table. @param string $column @param bool $autoIncrement @param bool $unsigned @return \Illuminate\Database\Schema\ColumnDefinition
[ "Create", "a", "new", "tiny", "integer", "(", "1", "-", "byte", ")", "column", "on", "the", "table", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Blueprint.php#L678-L681
train
Add tiny integer column
[ 30522, 2270, 3853, 4714, 18447, 26320, 1006, 1002, 5930, 1010, 1002, 8285, 2378, 16748, 3672, 1027, 6270, 1010, 1002, 27121, 1027, 6270, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 5587, 25778, 2819, 2078, 1006, 1005, 4714, 18447, 26320, 1005...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/DomCrawler/Form.php
Form.disableValidation
public function disableValidation() { foreach ($this->fields->all() as $field) { if ($field instanceof Field\ChoiceFormField) { $field->disableValidation(); } } return $this; }
php
public function disableValidation() { foreach ($this->fields->all() as $field) { if ($field instanceof Field\ChoiceFormField) { $field->disableValidation(); } } return $this; }
[ "public", "function", "disableValidation", "(", ")", "{", "foreach", "(", "$", "this", "->", "fields", "->", "all", "(", ")", "as", "$", "field", ")", "{", "if", "(", "$", "field", "instanceof", "Field", "\\", "ChoiceFormField", ")", "{", "$", "field",...
Disables validation. @return self
[ "Disables", "validation", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DomCrawler/Form.php#L361-L370
train
Disable validation for all choice fields
[ 30522, 2270, 3853, 4487, 19150, 10175, 8524, 3508, 1006, 1007, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 4249, 1011, 1028, 2035, 1006, 1007, 2004, 1002, 2492, 1007, 1063, 2065, 1006, 1002, 2492, 6013, 11253, 2492, 1032, 3601, 14192, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/HTML/QuickForm2/Controller/Action/Jump.php
HTML_QuickForm2_Controller_Action_Jump.splitUri
protected static function splitUri($uri) { if (false === ($qm = strpos($uri, '?'))) { return array($uri, ''); } else { return array(substr($uri, 0, $qm), substr($uri, $qm)); } }
php
protected static function splitUri($uri) { if (false === ($qm = strpos($uri, '?'))) { return array($uri, ''); } else { return array(substr($uri, 0, $qm), substr($uri, $qm)); } }
[ "protected", "static", "function", "splitUri", "(", "$", "uri", ")", "{", "if", "(", "false", "===", "(", "$", "qm", "=", "strpos", "(", "$", "uri", ",", "'?'", ")", ")", ")", "{", "return", "array", "(", "$", "uri", ",", "''", ")", ";", "}", ...
Splits (part of) the URI into path and query components @param string String of the form 'foo?bar' @return array Array of the form array('foo', '?bar)
[ "Splits", "(", "part", "of", ")", "the", "URI", "into", "path", "and", "query", "components" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Controller/Action/Jump.php#L67-L74
train
Splits the URI into its components
[ 30522, 5123, 10763, 3853, 3975, 9496, 1006, 1002, 24471, 2072, 1007, 1063, 2065, 1006, 6270, 1027, 1027, 1027, 1006, 1002, 1053, 2213, 1027, 2358, 14536, 2891, 1006, 1002, 24471, 2072, 1010, 1005, 1029, 1005, 1007, 1007, 1007, 1063, 2709, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Console/Scheduling/CommandBuilder.php
CommandBuilder.ensureCorrectUser
protected function ensureCorrectUser(Event $event, $command) { return $event->user && ! windows_os() ? 'sudo -u '.$event->user.' -- sh -c \''.$command.'\'' : $command; }
php
protected function ensureCorrectUser(Event $event, $command) { return $event->user && ! windows_os() ? 'sudo -u '.$event->user.' -- sh -c \''.$command.'\'' : $command; }
[ "protected", "function", "ensureCorrectUser", "(", "Event", "$", "event", ",", "$", "command", ")", "{", "return", "$", "event", "->", "user", "&&", "!", "windows_os", "(", ")", "?", "'sudo -u '", ".", "$", "event", "->", "user", ".", "' -- sh -c \\''", ...
Finalize the event's command syntax with the correct user. @param \Illuminate\Console\Scheduling\Event $event @param string $command @return string
[ "Finalize", "the", "event", "s", "command", "syntax", "with", "the", "correct", "user", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Console/Scheduling/CommandBuilder.php#L67-L70
train
Ensure correct user
[ 30522, 5123, 3853, 5676, 27108, 2890, 22675, 2121, 1006, 2724, 1002, 2724, 1010, 1002, 3094, 1007, 1063, 2709, 1002, 2724, 1011, 1028, 5310, 1004, 1004, 999, 3645, 1035, 9808, 1006, 30524, 1011, 1039, 1032, 1005, 1005, 1012, 1002, 3094, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Grid/Column.php
Column.view
public function view($view) { return $this->display(function ($value) use ($view) { $model = $this; return view($view, compact('model', 'value'))->render(); }); }
php
public function view($view) { return $this->display(function ($value) use ($view) { $model = $this; return view($view, compact('model', 'value'))->render(); }); }
[ "public", "function", "view", "(", "$", "view", ")", "{", "return", "$", "this", "->", "display", "(", "function", "(", "$", "value", ")", "use", "(", "$", "view", ")", "{", "$", "model", "=", "$", "this", ";", "return", "view", "(", "$", "view",...
Render this column with the given view. @param string $view @return $this
[ "Render", "this", "column", "with", "the", "given", "view", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Grid/Column.php#L385-L392
train
View the value of the field
[ 30522, 2270, 3853, 3193, 1006, 1002, 3193, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 4653, 1006, 3853, 1006, 1002, 3643, 1007, 2224, 1006, 1002, 3193, 1007, 1063, 1002, 2944, 1027, 1002, 2023, 1025, 2709, 3193, 1006, 1002, 3193, 1010, 923...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Auth/SessionGuard.php
SessionGuard.attemptBasic
protected function attemptBasic(Request $request, $field, $extraConditions = []) { if (! $request->getUser()) { return false; } return $this->attempt(array_merge( $this->basicCredentials($request, $field), $extraConditions )); }
php
protected function attemptBasic(Request $request, $field, $extraConditions = []) { if (! $request->getUser()) { return false; } return $this->attempt(array_merge( $this->basicCredentials($request, $field), $extraConditions )); }
[ "protected", "function", "attemptBasic", "(", "Request", "$", "request", ",", "$", "field", ",", "$", "extraConditions", "=", "[", "]", ")", "{", "if", "(", "!", "$", "request", "->", "getUser", "(", ")", ")", "{", "return", "false", ";", "}", "retur...
Attempt to authenticate using basic authentication. @param \Symfony\Component\HttpFoundation\Request $request @param string $field @param array $extraConditions @return bool
[ "Attempt", "to", "authenticate", "using", "basic", "authentication", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/SessionGuard.php#L303-L312
train
Attempt to authenticate with basic credentials
[ 30522, 5123, 3853, 3535, 22083, 2594, 1006, 5227, 1002, 5227, 1010, 1002, 2492, 1010, 1002, 4469, 8663, 20562, 2015, 1027, 1031, 1033, 1007, 1063, 2065, 1006, 999, 1002, 5227, 1011, 1028, 2131, 20330, 1006, 1007, 1007, 1063, 2709, 6270, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Mime/Decode.php
Zend_Mime_Decode.splitMime
public static function splitMime($body, $boundary) { // TODO: we're ignoring \r for now - is this function fast enough and is it safe to asume noone needs \r? $body = str_replace("\r", '', $body); $start = 0; $res = array(); // find every mime part limiter and cut out the ...
php
public static function splitMime($body, $boundary) { // TODO: we're ignoring \r for now - is this function fast enough and is it safe to asume noone needs \r? $body = str_replace("\r", '', $body); $start = 0; $res = array(); // find every mime part limiter and cut out the ...
[ "public", "static", "function", "splitMime", "(", "$", "body", ",", "$", "boundary", ")", "{", "// TODO: we're ignoring \\r for now - is this function fast enough and is it safe to asume noone needs \\r?", "$", "body", "=", "str_replace", "(", "\"\\r\"", ",", "''", ",", "...
Explode MIME multipart string into seperate parts Parts consist of the header and the body of each MIME part. @param string $body raw body of message @param string $boundary boundary as found in content-type @return array parts with content of each part, empty if no parts found @throws Zend_Exception
[ "Explode", "MIME", "multipart", "string", "into", "seperate", "parts" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mime/Decode.php#L45-L78
train
Split the MIME part into its parts
[ 30522, 2270, 10763, 3853, 3975, 4328, 4168, 1006, 1002, 2303, 1010, 1002, 6192, 1007, 1063, 1013, 1013, 28681, 2080, 1024, 2057, 1005, 2128, 9217, 1032, 1054, 2005, 2085, 1011, 2003, 2023, 3853, 3435, 2438, 1998, 2003, 2009, 3647, 2000, 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...
octobercms/october
modules/backend/widgets/Lists.php
Lists.getRecords
protected function getRecords() { $query = $this->prepareQuery(); if ($this->showTree) { $records = $query->getNested(); } elseif ($this->showPagination) { $method = $this->showPageNumbers ? 'paginate' : 'simplePaginate'; $currentPageNu...
php
protected function getRecords() { $query = $this->prepareQuery(); if ($this->showTree) { $records = $query->getNested(); } elseif ($this->showPagination) { $method = $this->showPageNumbers ? 'paginate' : 'simplePaginate'; $currentPageNu...
[ "protected", "function", "getRecords", "(", ")", "{", "$", "query", "=", "$", "this", "->", "prepareQuery", "(", ")", ";", "if", "(", "$", "this", "->", "showTree", ")", "{", "$", "records", "=", "$", "query", "->", "getNested", "(", ")", ";", "}",...
Returns all the records from the supplied model, after filtering. @return Collection
[ "Returns", "all", "the", "records", "from", "the", "supplied", "model", "after", "filtering", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/widgets/Lists.php#L579-L619
train
Get records from the database
[ 30522, 5123, 3853, 2131, 2890, 27108, 5104, 1006, 1007, 1063, 1002, 23032, 1027, 1002, 2023, 1011, 1028, 7374, 4226, 2854, 1006, 1007, 1025, 2065, 1006, 1002, 2023, 1011, 1028, 2265, 13334, 1007, 1063, 1002, 2636, 1027, 1002, 23032, 1011, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Form/Util/OrderedHashMap.php
OrderedHashMap.offsetUnset
public function offsetUnset($key) { if (false !== ($position = array_search((string) $key, $this->orderedKeys))) { array_splice($this->orderedKeys, $position, 1); unset($this->elements[$key]); foreach ($this->managedCursors as $i => $cursor) { if ($cursor...
php
public function offsetUnset($key) { if (false !== ($position = array_search((string) $key, $this->orderedKeys))) { array_splice($this->orderedKeys, $position, 1); unset($this->elements[$key]); foreach ($this->managedCursors as $i => $cursor) { if ($cursor...
[ "public", "function", "offsetUnset", "(", "$", "key", ")", "{", "if", "(", "false", "!==", "(", "$", "position", "=", "array_search", "(", "(", "string", ")", "$", "key", ",", "$", "this", "->", "orderedKeys", ")", ")", ")", "{", "array_splice", "(",...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/Util/OrderedHashMap.php#L145-L157
train
Unsets an element from the list
[ 30522, 2270, 3853, 16396, 4609, 13462, 1006, 1002, 3145, 1007, 1063, 2065, 1006, 6270, 999, 1027, 1027, 1006, 1002, 2597, 1027, 9140, 1035, 3945, 1006, 1006, 5164, 1007, 1002, 3145, 1010, 1002, 2023, 1011, 1028, 3641, 14839, 2015, 1007, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/HTML/QuickForm2/Renderer.php
HTML_QuickForm2_Renderer.factory
final public static function factory($type) { $type = strtolower($type); if (!isset(self::$_types[$type])) { throw new HTML_QuickForm2_InvalidArgumentException( "Renderer type '$type' is not known" ); } list ($className, $includeFile) = self::...
php
final public static function factory($type) { $type = strtolower($type); if (!isset(self::$_types[$type])) { throw new HTML_QuickForm2_InvalidArgumentException( "Renderer type '$type' is not known" ); } list ($className, $includeFile) = self::...
[ "final", "public", "static", "function", "factory", "(", "$", "type", ")", "{", "$", "type", "=", "strtolower", "(", "$", "type", ")", ";", "if", "(", "!", "isset", "(", "self", "::", "$", "_types", "[", "$", "type", "]", ")", ")", "{", "throw", ...
Creates a new renderer instance of the given type A renderer is always wrapped by a Proxy, which handles calling its "published" methods and methods of its plugins. Registered plugins are added automagically to the existing renderer instances so that <code> $foo = HTML_QuickForm2_Renderer::factory('foo'); // Plugin im...
[ "Creates", "a", "new", "renderer", "instance", "of", "the", "given", "type" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Renderer.php#L131-L148
train
Returns a renderer object of the given type
[ 30522, 2345, 2270, 10763, 3853, 4713, 1006, 1002, 2828, 1007, 1063, 1002, 2828, 1027, 2358, 5339, 12898, 13777, 1006, 1002, 2828, 1007, 1025, 2065, 1006, 999, 26354, 3388, 1006, 2969, 1024, 1024, 1002, 1035, 4127, 1031, 1002, 2828, 1033, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.parseSub
protected function parseSub($query) { if ($query instanceof self || $query instanceof EloquentBuilder) { return [$query->toSql(), $query->getBindings()]; } elseif (is_string($query)) { return [$query, []]; } else { throw new InvalidArgumentException; ...
php
protected function parseSub($query) { if ($query instanceof self || $query instanceof EloquentBuilder) { return [$query->toSql(), $query->getBindings()]; } elseif (is_string($query)) { return [$query, []]; } else { throw new InvalidArgumentException; ...
[ "protected", "function", "parseSub", "(", "$", "query", ")", "{", "if", "(", "$", "query", "instanceof", "self", "||", "$", "query", "instanceof", "EloquentBuilder", ")", "{", "return", "[", "$", "query", "->", "toSql", "(", ")", ",", "$", "query", "->...
Parse the subquery into SQL and bindings. @param mixed $query @return array
[ "Parse", "the", "subquery", "into", "SQL", "and", "bindings", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L321-L330
train
Parse sub query
[ 30522, 5123, 3853, 11968, 8583, 12083, 1006, 1002, 23032, 1007, 1063, 2065, 1006, 1002, 23032, 6013, 11253, 2969, 1064, 1064, 1002, 23032, 6013, 11253, 3449, 2080, 15417, 8569, 23891, 2099, 1007, 1063, 2709, 1031, 1002, 23032, 1011, 1028, 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/EventDispatcher.php
EventDispatcher.postPendingEventsTo
public function postPendingEventsTo($plugin) { foreach ($this->pendingEvents as $eventInfo) { list($eventName, $eventParams) = $eventInfo; $this->postEvent($eventName, $eventParams, $pending = false, array($plugin)); } }
php
public function postPendingEventsTo($plugin) { foreach ($this->pendingEvents as $eventInfo) { list($eventName, $eventParams) = $eventInfo; $this->postEvent($eventName, $eventParams, $pending = false, array($plugin)); } }
[ "public", "function", "postPendingEventsTo", "(", "$", "plugin", ")", "{", "foreach", "(", "$", "this", "->", "pendingEvents", "as", "$", "eventInfo", ")", "{", "list", "(", "$", "eventName", ",", "$", "eventParams", ")", "=", "$", "eventInfo", ";", "$",...
Re-posts all pending events to the given plugin. @param Plugin $plugin
[ "Re", "-", "posts", "all", "pending", "events", "to", "the", "given", "plugin", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/EventDispatcher.php#L176-L182
train
Post pending events to a specific plugin
[ 30522, 2270, 3853, 2695, 11837, 4667, 18697, 7666, 3406, 1006, 1002, 13354, 2378, 1007, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 14223, 18697, 7666, 2004, 1002, 2724, 2378, 14876, 1007, 1063, 2862, 1006, 1002, 2724, 18442, 1010, 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...
laravel/framework
src/Illuminate/Pagination/LengthAwarePaginator.php
LengthAwarePaginator.elements
protected function elements() { $window = UrlWindow::make($this); return array_filter([ $window['first'], is_array($window['slider']) ? '...' : null, $window['slider'], is_array($window['last']) ? '...' : null, $window['last'], ]);...
php
protected function elements() { $window = UrlWindow::make($this); return array_filter([ $window['first'], is_array($window['slider']) ? '...' : null, $window['slider'], is_array($window['last']) ? '...' : null, $window['last'], ]);...
[ "protected", "function", "elements", "(", ")", "{", "$", "window", "=", "UrlWindow", "::", "make", "(", "$", "this", ")", ";", "return", "array_filter", "(", "[", "$", "window", "[", "'first'", "]", ",", "is_array", "(", "$", "window", "[", "'slider'",...
Get the array of elements to pass to the view. @return array
[ "Get", "the", "array", "of", "elements", "to", "pass", "to", "the", "view", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Pagination/LengthAwarePaginator.php#L103-L114
train
Return array of elements
[ 30522, 5123, 3853, 3787, 1006, 1007, 1063, 1002, 3332, 1027, 24471, 2140, 11101, 5004, 1024, 1024, 2191, 1006, 1002, 2023, 1007, 1025, 2709, 9140, 1035, 11307, 1006, 1031, 1002, 3332, 1031, 1005, 2034, 1005, 1033, 1010, 2003, 1035, 9140, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Console/Output/ConsoleOutput.php
ConsoleOutput.section
public function section(): ConsoleSectionOutput { return new ConsoleSectionOutput($this->getStream(), $this->consoleSectionOutputs, $this->getVerbosity(), $this->isDecorated(), $this->getFormatter()); }
php
public function section(): ConsoleSectionOutput { return new ConsoleSectionOutput($this->getStream(), $this->consoleSectionOutputs, $this->getVerbosity(), $this->isDecorated(), $this->getFormatter()); }
[ "public", "function", "section", "(", ")", ":", "ConsoleSectionOutput", "{", "return", "new", "ConsoleSectionOutput", "(", "$", "this", "->", "getStream", "(", ")", ",", "$", "this", "->", "consoleSectionOutputs", ",", "$", "this", "->", "getVerbosity", "(", ...
Creates a new output section.
[ "Creates", "a", "new", "output", "section", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Output/ConsoleOutput.php#L55-L58
train
Create a new ConsoleSectionOutput object
[ 30522, 2270, 3853, 2930, 1006, 1007, 1024, 22659, 18491, 5833, 18780, 1063, 2709, 2047, 22659, 18491, 5833, 18780, 1006, 1002, 2023, 1011, 1028, 4152, 25379, 1006, 1007, 1010, 1002, 2023, 1011, 1028, 22659, 18491, 5833, 18780, 2015, 1010, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Framework/Uri/UriPartsFilter.php
UriPartsFilter.filterPort
public static function filterPort($port = null) { if (null === $port || (\is_int($port) && ($port >= 1 && $port <= 65535))) { return $port; } throw new \InvalidArgumentException('Uri port must be null or an integer between 1 and 65535'); }
php
public static function filterPort($port = null) { if (null === $port || (\is_int($port) && ($port >= 1 && $port <= 65535))) { return $port; } throw new \InvalidArgumentException('Uri port must be null or an integer between 1 and 65535'); }
[ "public", "static", "function", "filterPort", "(", "$", "port", "=", "null", ")", "{", "if", "(", "null", "===", "$", "port", "||", "(", "\\", "is_int", "(", "$", "port", ")", "&&", "(", "$", "port", ">=", "1", "&&", "$", "port", "<=", "65535", ...
Filter Uri port. This method @param int|null $port @return int|null @throws \InvalidArgumentException If the port is invalid.
[ "Filter", "Uri", "port", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Framework/Uri/UriPartsFilter.php#L85-L92
train
Filter the port
[ 30522, 2270, 10763, 3853, 11307, 6442, 1006, 1002, 3417, 1027, 19701, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 1027, 1002, 3417, 1064, 1064, 1006, 1032, 2003, 1035, 20014, 1006, 1002, 3417, 1007, 1004, 1004, 1006, 1002, 3417, 1028, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Plugin/Report.php
Report.getMetricsDocumentation
protected function getMetricsDocumentation() { $translations = Metrics::getDefaultMetricsDocumentation(); $documentation = array(); foreach ($this->metrics as $metric) { if (!empty($translations[$metric])) { $documentation[$metric] = $translations[$metric]; ...
php
protected function getMetricsDocumentation() { $translations = Metrics::getDefaultMetricsDocumentation(); $documentation = array(); foreach ($this->metrics as $metric) { if (!empty($translations[$metric])) { $documentation[$metric] = $translations[$metric]; ...
[ "protected", "function", "getMetricsDocumentation", "(", ")", "{", "$", "translations", "=", "Metrics", "::", "getDefaultMetricsDocumentation", "(", ")", ";", "$", "documentation", "=", "array", "(", ")", ";", "foreach", "(", "$", "this", "->", "metrics", "as"...
Returns an array of metric documentations and their corresponding translations. Eg `array('nb_visits' => 'If a visitor comes to your website for the first time or if they visit a page more than 30 minutes after...')`. By default the given {@link $metrics} are used and their corresponding translations are looked up auto...
[ "Returns", "an", "array", "of", "metric", "documentations", "and", "their", "corresponding", "translations", ".", "Eg", "array", "(", "nb_visits", "=", ">", "If", "a", "visitor", "comes", "to", "your", "website", "for", "the", "first", "time", "or", "if", ...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Plugin/Report.php#L482-L511
train
Returns the metrics documentation
[ 30522, 5123, 3853, 2131, 12589, 16150, 10085, 27417, 12516, 1006, 1007, 1063, 1002, 11913, 1027, 12046, 2015, 1024, 1024, 2131, 3207, 7011, 11314, 12589, 16150, 10085, 27417, 12516, 1006, 1007, 1025, 1002, 12653, 1027, 9140, 1006, 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...
matomo-org/matomo
core/Plugin/SettingsProvider.php
SettingsProvider.getAllSystemSettings
public function getAllSystemSettings() { $cacheId = CacheId::languageAware('AllSystemSettings'); $cache = PiwikCache::getTransientCache(); if (!$cache->contains($cacheId)) { $pluginNames = $this->pluginManager->getActivatedPlugins(); $byPluginName = array(); ...
php
public function getAllSystemSettings() { $cacheId = CacheId::languageAware('AllSystemSettings'); $cache = PiwikCache::getTransientCache(); if (!$cache->contains($cacheId)) { $pluginNames = $this->pluginManager->getActivatedPlugins(); $byPluginName = array(); ...
[ "public", "function", "getAllSystemSettings", "(", ")", "{", "$", "cacheId", "=", "CacheId", "::", "languageAware", "(", "'AllSystemSettings'", ")", ";", "$", "cache", "=", "PiwikCache", "::", "getTransientCache", "(", ")", ";", "if", "(", "!", "$", "cache",...
Returns all available system settings. A plugin has to specify a file named `SystemSettings.php` containing a class named `SystemSettings` that extends `Piwik\Settings\Plugin\SystemSettings` in order to be considered as a system setting. Otherwise the settings for a plugin won't be available. @return SystemSettings[] ...
[ "Returns", "all", "available", "system", "settings", ".", "A", "plugin", "has", "to", "specify", "a", "file", "named", "SystemSettings", ".", "php", "containing", "a", "class", "named", "SystemSettings", "that", "extends", "Piwik", "\\", "Settings", "\\", "Plu...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Plugin/SettingsProvider.php#L84-L105
train
Returns all system settings
[ 30522, 2270, 3853, 2131, 8095, 29390, 18319, 3070, 2015, 1006, 1007, 1063, 1002, 17053, 3593, 1027, 17053, 3593, 1024, 1024, 2653, 10830, 2890, 1006, 1005, 2035, 29390, 18319, 3070, 2015, 1005, 1007, 1025, 1002, 17053, 1027, 14255, 9148, 22...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Cache/Backend/ZendPlatform.php
Zend_Cache_Backend_ZendPlatform.save
public function save($data, $id, $tags = array(), $specificLifetime = false) { if (!($specificLifetime === false)) { $this->_log("Zend_Cache_Backend_ZendPlatform::save() : non false specifc lifetime is unsuported for this backend"); } $lifetime = $this->_directives['lifetime']; ...
php
public function save($data, $id, $tags = array(), $specificLifetime = false) { if (!($specificLifetime === false)) { $this->_log("Zend_Cache_Backend_ZendPlatform::save() : non false specifc lifetime is unsuported for this backend"); } $lifetime = $this->_directives['lifetime']; ...
[ "public", "function", "save", "(", "$", "data", ",", "$", "id", ",", "$", "tags", "=", "array", "(", ")", ",", "$", "specificLifetime", "=", "false", ")", "{", "if", "(", "!", "(", "$", "specificLifetime", "===", "false", ")", ")", "{", "$", "thi...
Save some string datas into a cache record Note : $data is always "string" (serialization is done by the core not by the backend) @param string $data Data to cache @param string $id Cache id @param array $tags Array of strings, the cache record will be tagged by each string e...
[ "Save", "some", "string", "datas", "into", "a", "cache", "record" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Cache/Backend/ZendPlatform.php#L130-L152
train
Save cache data
[ 30522, 2270, 3853, 3828, 1006, 1002, 2951, 1010, 1002, 8909, 1010, 1002, 22073, 1027, 9140, 1006, 1007, 1010, 1002, 3563, 15509, 7292, 1027, 6270, 1007, 1063, 2065, 1006, 999, 1006, 1002, 3563, 15509, 7292, 1027, 1027, 1027, 6270, 1007, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Routing/Router.php
Router.updateGroupStack
protected function updateGroupStack(array $attributes) { if (! empty($this->groupStack)) { $attributes = $this->mergeWithLastGroup($attributes); } $this->groupStack[] = $attributes; }
php
protected function updateGroupStack(array $attributes) { if (! empty($this->groupStack)) { $attributes = $this->mergeWithLastGroup($attributes); } $this->groupStack[] = $attributes; }
[ "protected", "function", "updateGroupStack", "(", "array", "$", "attributes", ")", "{", "if", "(", "!", "empty", "(", "$", "this", "->", "groupStack", ")", ")", "{", "$", "attributes", "=", "$", "this", "->", "mergeWithLastGroup", "(", "$", "attributes", ...
Update the group stack with the given attributes. @param array $attributes @return void
[ "Update", "the", "group", "stack", "with", "the", "given", "attributes", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/Router.php#L384-L391
train
Update the group stack with the attributes
[ 30522, 5123, 3853, 10651, 17058, 9153, 3600, 1006, 9140, 1002, 12332, 1007, 1063, 2065, 1006, 999, 4064, 1006, 1002, 2023, 1011, 1028, 2967, 2696, 3600, 1007, 1007, 1063, 1002, 12332, 1027, 1002, 2023, 1011, 1028, 13590, 24415, 8523, 2102, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Data/Validation.php
Validation.typeUrl
public static function typeUrl($value, array $params, array $field) { return self::typeText($value, $params, $field) && filter_var($value, FILTER_VALIDATE_URL); }
php
public static function typeUrl($value, array $params, array $field) { return self::typeText($value, $params, $field) && filter_var($value, FILTER_VALIDATE_URL); }
[ "public", "static", "function", "typeUrl", "(", "$", "value", ",", "array", "$", "params", ",", "array", "$", "field", ")", "{", "return", "self", "::", "typeText", "(", "$", "value", ",", "$", "params", ",", "$", "field", ")", "&&", "filter_var", "(...
HTML5 input: url @param mixed $value Value to be validated. @param array $params Validation parameters. @param array $field Blueprint for the field. @return bool True if validation succeeded.
[ "HTML5", "input", ":", "url" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Data/Validation.php#L434-L437
train
Type a value to a URL
[ 30522, 2270, 10763, 3853, 2828, 3126, 2140, 1006, 1002, 3643, 1010, 9140, 1002, 11498, 5244, 1010, 9140, 1002, 2492, 1007, 1063, 2709, 2969, 1024, 1024, 2828, 18209, 1006, 1002, 3643, 1010, 1002, 11498, 5244, 1010, 1002, 2492, 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...
laravel/framework
src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php
Broadcaster.retrieveChannelOptions
protected function retrieveChannelOptions($channel) { foreach ($this->channelOptions as $pattern => $options) { if (! $this->channelNameMatchesPattern($channel, $pattern)) { continue; } return $options; } return []; }
php
protected function retrieveChannelOptions($channel) { foreach ($this->channelOptions as $pattern => $options) { if (! $this->channelNameMatchesPattern($channel, $pattern)) { continue; } return $options; } return []; }
[ "protected", "function", "retrieveChannelOptions", "(", "$", "channel", ")", "{", "foreach", "(", "$", "this", "->", "channelOptions", "as", "$", "pattern", "=>", "$", "options", ")", "{", "if", "(", "!", "$", "this", "->", "channelNameMatchesPattern", "(", ...
Retrieve options for a certain channel. @param string $channel @return array
[ "Retrieve", "options", "for", "a", "certain", "channel", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php#L305-L316
train
Retrieve Channel Options
[ 30522, 5123, 3853, 12850, 26058, 7361, 9285, 1006, 1002, 3149, 1007, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 3149, 7361, 9285, 2004, 1002, 5418, 1027, 1028, 1002, 7047, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 3149, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
overtrue/wechat
src/OpenPlatform/Authorizer/MiniProgram/Code/Client.php
Client.commit
public function commit(int $templateId, string $extJson, string $version, string $description) { return $this->httpPostJson('wxa/commit', [ 'template_id' => $templateId, 'ext_json' => $extJson, 'user_version' => $version, 'user_desc' => $description, ]...
php
public function commit(int $templateId, string $extJson, string $version, string $description) { return $this->httpPostJson('wxa/commit', [ 'template_id' => $templateId, 'ext_json' => $extJson, 'user_version' => $version, 'user_desc' => $description, ]...
[ "public", "function", "commit", "(", "int", "$", "templateId", ",", "string", "$", "extJson", ",", "string", "$", "version", ",", "string", "$", "description", ")", "{", "return", "$", "this", "->", "httpPostJson", "(", "'wxa/commit'", ",", "[", "'template...
@param int $templateId @param string $extJson @param string $version @param string $description @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
[ "@param", "int", "$templateId", "@param", "string", "$extJson", "@param", "string", "$version", "@param", "string", "$description" ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OpenPlatform/Authorizer/MiniProgram/Code/Client.php#L33-L41
train
Commit a new template
[ 30522, 2270, 3853, 10797, 1006, 20014, 1002, 23561, 3593, 1010, 5164, 1002, 4654, 2102, 22578, 2239, 1010, 5164, 1002, 2544, 1010, 5164, 1002, 6412, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 8299, 19894, 22578, 2239, 1006, 1005, 1059, 18684...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.newQueryForRestoration
public function newQueryForRestoration($ids) { if (is_array($ids)) { return $this->newQueryForCollectionRestoration($ids); } if (! Str::contains($ids, ':')) { return parent::newQueryForRestoration($ids); } $segments = explode(':', $ids); ret...
php
public function newQueryForRestoration($ids) { if (is_array($ids)) { return $this->newQueryForCollectionRestoration($ids); } if (! Str::contains($ids, ':')) { return parent::newQueryForRestoration($ids); } $segments = explode(':', $ids); ret...
[ "public", "function", "newQueryForRestoration", "(", "$", "ids", ")", "{", "if", "(", "is_array", "(", "$", "ids", ")", ")", "{", "return", "$", "this", "->", "newQueryForCollectionRestoration", "(", "$", "ids", ")", ";", "}", "if", "(", "!", "Str", ":...
Get a new query to restore one or more models by their queueable IDs. @param array<int> $ids @return \Illuminate\Database\Eloquent\Builder
[ "Get", "a", "new", "query", "to", "restore", "one", "or", "more", "models", "by", "their", "queueable", "IDs", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Relations/Concerns/AsPivot.php#L262-L277
train
Return a new Query for restoration
[ 30522, 2270, 3853, 2047, 4226, 2854, 29278, 28533, 21223, 1006, 1002, 8909, 2015, 1007, 1063, 2065, 1006, 2003, 1035, 9140, 1006, 1002, 8909, 2015, 1007, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 2047, 4226, 2854, 29278, 26895, 18491, 28533...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Cache/RetrievesMultipleKeys.php
RetrievesMultipleKeys.putMany
public function putMany(array $values, $seconds) { $manyResult = null; foreach ($values as $key => $value) { $result = $this->put($key, $value, $seconds); $manyResult = is_null($manyResult) ? $result : $result && $manyResult; } return $manyResult ?: false; ...
php
public function putMany(array $values, $seconds) { $manyResult = null; foreach ($values as $key => $value) { $result = $this->put($key, $value, $seconds); $manyResult = is_null($manyResult) ? $result : $result && $manyResult; } return $manyResult ?: false; ...
[ "public", "function", "putMany", "(", "array", "$", "values", ",", "$", "seconds", ")", "{", "$", "manyResult", "=", "null", ";", "foreach", "(", "$", "values", "as", "$", "key", "=>", "$", "value", ")", "{", "$", "result", "=", "$", "this", "->", ...
Store multiple items in the cache for a given number of seconds. @param array $values @param int $seconds @return bool
[ "Store", "multiple", "items", "in", "the", "cache", "for", "a", "given", "number", "of", "seconds", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Cache/RetrievesMultipleKeys.php#L33-L44
train
Put many values to the cache
[ 30522, 2270, 3853, 2404, 2386, 2100, 1006, 9140, 1002, 5300, 1010, 1002, 3823, 1007, 1063, 1002, 2116, 6072, 11314, 1027, 19701, 1025, 18921, 6776, 1006, 1002, 5300, 2004, 1002, 3145, 1027, 1028, 1002, 3643, 1007, 1063, 1002, 2765, 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/Validation/Concerns/ValidatesAttributes.php
ValidatesAttributes.getExistCount
protected function getExistCount($connection, $table, $column, $value, $parameters) { $verifier = $this->getPresenceVerifierFor($connection); $extra = $this->getExtraConditions( array_values(array_slice($parameters, 2)) ); if ($this->currentRule instanceof Exists) { ...
php
protected function getExistCount($connection, $table, $column, $value, $parameters) { $verifier = $this->getPresenceVerifierFor($connection); $extra = $this->getExtraConditions( array_values(array_slice($parameters, 2)) ); if ($this->currentRule instanceof Exists) { ...
[ "protected", "function", "getExistCount", "(", "$", "connection", ",", "$", "table", ",", "$", "column", ",", "$", "value", ",", "$", "parameters", ")", "{", "$", "verifier", "=", "$", "this", "->", "getPresenceVerifierFor", "(", "$", "connection", ")", ...
Get the number of records that exist in storage. @param mixed $connection @param string $table @param string $column @param mixed $value @param array $parameters @return int
[ "Get", "the", "number", "of", "records", "that", "exist", "in", "storage", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L672-L687
train
Get exist count
[ 30522, 5123, 3853, 2131, 10288, 2923, 3597, 16671, 1006, 1002, 4434, 1010, 1002, 2795, 1010, 1002, 5930, 1010, 1002, 3643, 1010, 1002, 11709, 1007, 1063, 1002, 2310, 3089, 8873, 2121, 1027, 1002, 2023, 1011, 1028, 2131, 28994, 10127, 6299, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Translation/Loader/PoFileLoader.php
PoFileLoader.addMessage
private function addMessage(array &$messages, array $item) { if (\is_array($item['translated'])) { $messages[stripcslashes($item['ids']['singular'])] = stripcslashes($item['translated'][0]); if (isset($item['ids']['plural'])) { $plurals = $item['translated']; ...
php
private function addMessage(array &$messages, array $item) { if (\is_array($item['translated'])) { $messages[stripcslashes($item['ids']['singular'])] = stripcslashes($item['translated'][0]); if (isset($item['ids']['plural'])) { $plurals = $item['translated']; ...
[ "private", "function", "addMessage", "(", "array", "&", "$", "messages", ",", "array", "$", "item", ")", "{", "if", "(", "\\", "is_array", "(", "$", "item", "[", "'translated'", "]", ")", ")", "{", "$", "messages", "[", "stripcslashes", "(", "$", "it...
Save a translation item to the messages. A .po file could contain by error missing plural indexes. We need to fix these before saving them.
[ "Save", "a", "translation", "item", "to", "the", "messages", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Translation/Loader/PoFileLoader.php#L127-L147
train
Adds an item to the messages array
[ 30522, 2797, 3853, 5587, 7834, 3736, 3351, 1006, 9140, 1004, 1002, 7696, 1010, 9140, 1002, 8875, 1007, 1063, 2065, 1006, 1032, 2003, 1035, 9140, 1006, 1002, 8875, 1031, 1005, 5421, 1005, 1033, 1007, 1007, 1063, 1002, 7696, 1031, 6167, 616...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Data/Validation.php
Validation.typeCheckbox
public static function typeCheckbox($value, array $params, array $field) { $value = (string)$value; $field_value = (string)($field['value'] ?? '1'); return $value === $field_value; }
php
public static function typeCheckbox($value, array $params, array $field) { $value = (string)$value; $field_value = (string)($field['value'] ?? '1'); return $value === $field_value; }
[ "public", "static", "function", "typeCheckbox", "(", "$", "value", ",", "array", "$", "params", ",", "array", "$", "field", ")", "{", "$", "value", "=", "(", "string", ")", "$", "value", ";", "$", "field_value", "=", "(", "string", ")", "(", "$", "...
HTML5 input: checkbox @param mixed $value Value to be validated. @param array $params Validation parameters. @param array $field Blueprint for the field. @return bool True if validation succeeded.
[ "HTML5", "input", ":", "checkbox" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Data/Validation.php#L261-L267
train
Type checkbox.
[ 30522, 30524, 8758, 1006, 1002, 3643, 1010, 9140, 1002, 11498, 5244, 1010, 9140, 1002, 2492, 1007, 1063, 1002, 3643, 1027, 1006, 5164, 1007, 1002, 3643, 1025, 1002, 2492, 1035, 3643, 1027, 1006, 5164, 1007, 1006, 1002, 2492, 1031, 1005, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Validation/Validator.php
Validator.validated
public function validated() { if ($this->invalid()) { throw new ValidationException($this); } $results = []; $missingValue = Str::random(10); foreach (array_keys($this->getRules()) as $key) { $value = data_get($this->getData(), $key, $missingValue);...
php
public function validated() { if ($this->invalid()) { throw new ValidationException($this); } $results = []; $missingValue = Str::random(10); foreach (array_keys($this->getRules()) as $key) { $value = data_get($this->getData(), $key, $missingValue);...
[ "public", "function", "validated", "(", ")", "{", "if", "(", "$", "this", "->", "invalid", "(", ")", ")", "{", "throw", "new", "ValidationException", "(", "$", "this", ")", ";", "}", "$", "results", "=", "[", "]", ";", "$", "missingValue", "=", "St...
Get the attributes and values that were validated. @return array @throws \Illuminate\Validation\ValidationException
[ "Get", "the", "attributes", "and", "values", "that", "were", "validated", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Validator.php#L328-L347
train
Return array of all the rules that have been validated
[ 30522, 2270, 3853, 9398, 4383, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 19528, 1006, 1007, 1007, 1063, 5466, 2047, 27354, 10288, 24422, 1006, 1002, 2023, 1007, 1025, 1065, 1002, 3463, 1027, 1031, 1033, 1025, 1002, 4394, 10175, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Data/Blueprints.php
Blueprints.get
public function get($type) { if (!isset($this->instances[$type])) { $this->instances[$type] = $this->loadFile($type); } return $this->instances[$type]; }
php
public function get($type) { if (!isset($this->instances[$type])) { $this->instances[$type] = $this->loadFile($type); } return $this->instances[$type]; }
[ "public", "function", "get", "(", "$", "type", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "instances", "[", "$", "type", "]", ")", ")", "{", "$", "this", "->", "instances", "[", "$", "type", "]", "=", "$", "this", "->", "loadFil...
Get blueprint. @param string $type Blueprint type. @return Blueprint @throws \RuntimeException
[ "Get", "blueprint", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Data/Blueprints.php#L39-L46
train
Get the instance of the given type.
[ 30522, 2270, 3853, 2131, 1006, 1002, 2828, 1007, 1063, 2065, 1006, 999, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 12107, 1031, 1002, 2828, 1033, 1007, 1007, 1063, 1002, 2023, 1011, 1028, 12107, 1031, 1002, 2828, 1033, 1027, 1002, 2023, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
overtrue/wechat
src/Payment/Redpack/Client.php
Client.sendGroup
public function sendGroup(array $params) { $base = [ 'amt_type' => 'ALL_RAND', 'wxappid' => $this->app['config']->app_id, ]; return $this->safeRequest('mmpaymkttransfers/sendgroupredpack', array_merge($base, $params)); }
php
public function sendGroup(array $params) { $base = [ 'amt_type' => 'ALL_RAND', 'wxappid' => $this->app['config']->app_id, ]; return $this->safeRequest('mmpaymkttransfers/sendgroupredpack', array_merge($base, $params)); }
[ "public", "function", "sendGroup", "(", "array", "$", "params", ")", "{", "$", "base", "=", "[", "'amt_type'", "=>", "'ALL_RAND'", ",", "'wxappid'", "=>", "$", "this", "->", "app", "[", "'config'", "]", "->", "app_id", ",", "]", ";", "return", "$", "...
Send group redpack. @param array $params @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
[ "Send", "group", "redpack", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Payment/Redpack/Client.php#L73-L81
train
Send Group Redpack
[ 30522, 2270, 3853, 4604, 17058, 1006, 9140, 1002, 11498, 5244, 1007, 1063, 1002, 2918, 1027, 1031, 1005, 2572, 2102, 1035, 2828, 1005, 1027, 1028, 1005, 2035, 1035, 14566, 1005, 1010, 1005, 1059, 18684, 9397, 3593, 1005, 1027, 1028, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Routing/RouteGroup.php
RouteGroup.merge
public static function merge($new, $old) { if (isset($new['domain'])) { unset($old['domain']); } $new = array_merge(static::formatAs($new, $old), [ 'namespace' => static::formatNamespace($new, $old), 'prefix' => static::formatPrefix($new, $old), ...
php
public static function merge($new, $old) { if (isset($new['domain'])) { unset($old['domain']); } $new = array_merge(static::formatAs($new, $old), [ 'namespace' => static::formatNamespace($new, $old), 'prefix' => static::formatPrefix($new, $old), ...
[ "public", "static", "function", "merge", "(", "$", "new", ",", "$", "old", ")", "{", "if", "(", "isset", "(", "$", "new", "[", "'domain'", "]", ")", ")", "{", "unset", "(", "$", "old", "[", "'domain'", "]", ")", ";", "}", "$", "new", "=", "ar...
Merge route groups into a new array. @param array $new @param array $old @return array
[ "Merge", "route", "groups", "into", "a", "new", "array", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/RouteGroup.php#L16-L31
train
Merge new and old array with new values
[ 30522, 2270, 10763, 3853, 13590, 1006, 1002, 2047, 1010, 1002, 2214, 1007, 1063, 2065, 1006, 26354, 3388, 1006, 1002, 2047, 1031, 1005, 5884, 1005, 1033, 1007, 1007, 1063, 4895, 13462, 1006, 1002, 2214, 1031, 1005, 5884, 1005, 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...
matomo-org/matomo
plugins/Transitions/API.php
API.addExternalReferrers
private function addExternalReferrers($logAggregator, &$report, $idaction, $actionType, $limitBeforeGrouping) { $data = $this->queryExternalReferrers( $idaction, $actionType, $logAggregator, $limitBeforeGrouping); $report['pageMetrics']['entries'] = 0; $report['referrers'] = arr...
php
private function addExternalReferrers($logAggregator, &$report, $idaction, $actionType, $limitBeforeGrouping) { $data = $this->queryExternalReferrers( $idaction, $actionType, $logAggregator, $limitBeforeGrouping); $report['pageMetrics']['entries'] = 0; $report['referrers'] = arr...
[ "private", "function", "addExternalReferrers", "(", "$", "logAggregator", ",", "&", "$", "report", ",", "$", "idaction", ",", "$", "actionType", ",", "$", "limitBeforeGrouping", ")", "{", "$", "data", "=", "$", "this", "->", "queryExternalReferrers", "(", "$...
Add the external referrers to the report: direct entries, websites, campaigns, search engines @param LogAggregator $logAggregator @param $report @param $idaction @param string $actionType @param $limitBeforeGrouping
[ "Add", "the", "external", "referrers", "to", "the", "report", ":", "direct", "entries", "websites", "campaigns", "search", "engines" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Transitions/API.php#L516-L558
train
Add external referrers to the report
[ 30522, 2797, 3853, 5587, 10288, 16451, 2389, 2890, 7512, 14544, 2015, 1006, 1002, 8833, 8490, 17603, 20697, 2953, 1010, 1004, 1002, 3189, 1010, 1002, 16096, 7542, 1010, 1002, 2895, 13874, 1010, 1002, 5787, 4783, 29278, 13910, 22107, 2075, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/cms/controllers/Index.php
Index.index
public function index() { $this->addJs('/modules/cms/assets/js/october.cmspage.js', 'core'); $this->addJs('/modules/cms/assets/js/october.dragcomponents.js', 'core'); $this->addJs('/modules/cms/assets/js/october.tokenexpander.js', 'core'); $this->addCss('/modules/cms/assets/css/octob...
php
public function index() { $this->addJs('/modules/cms/assets/js/october.cmspage.js', 'core'); $this->addJs('/modules/cms/assets/js/october.dragcomponents.js', 'core'); $this->addJs('/modules/cms/assets/js/october.tokenexpander.js', 'core'); $this->addCss('/modules/cms/assets/css/octob...
[ "public", "function", "index", "(", ")", "{", "$", "this", "->", "addJs", "(", "'/modules/cms/assets/js/october.cmspage.js'", ",", "'core'", ")", ";", "$", "this", "->", "addJs", "(", "'/modules/cms/assets/js/october.dragcomponents.js'", ",", "'core'", ")", ";", "...
Index page action @return void
[ "Index", "page", "action" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/controllers/Index.php#L103-L121
train
This method is called when the code editor is being displayed.
[ 30522, 2270, 3853, 5950, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 5587, 22578, 1006, 1005, 1013, 14184, 1013, 4642, 2015, 1013, 7045, 1013, 1046, 2015, 1013, 2255, 1012, 4642, 13102, 4270, 1012, 1046, 2015, 1005, 1010, 1005, 4563, 1005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Middleware/Authenticate.php
Authenticate.shouldPassThrough
protected function shouldPassThrough($request) { $excepts = config('admin.auth.excepts', [ 'auth/login', 'auth/logout', ]); return collect($excepts) ->map('admin_base_path') ->contains(function ($except) use ($request) { if ($e...
php
protected function shouldPassThrough($request) { $excepts = config('admin.auth.excepts', [ 'auth/login', 'auth/logout', ]); return collect($excepts) ->map('admin_base_path') ->contains(function ($except) use ($request) { if ($e...
[ "protected", "function", "shouldPassThrough", "(", "$", "request", ")", "{", "$", "excepts", "=", "config", "(", "'admin.auth.excepts'", ",", "[", "'auth/login'", ",", "'auth/logout'", ",", "]", ")", ";", "return", "collect", "(", "$", "excepts", ")", "->", ...
Determine if the request has a URI that should pass through verification. @param \Illuminate\Http\Request $request @return bool
[ "Determine", "if", "the", "request", "has", "a", "URI", "that", "should", "pass", "through", "verification", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Middleware/Authenticate.php#L37-L53
train
Returns true if the request should pass through the except list
[ 30522, 5123, 3853, 2323, 15194, 2705, 22494, 5603, 1006, 1002, 5227, 1007, 1063, 1002, 3272, 2015, 1027, 9530, 8873, 2290, 1006, 1005, 4748, 10020, 1012, 8740, 2705, 1012, 3272, 2015, 1005, 1010, 1031, 1005, 8740, 2705, 1013, 8833, 2378, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/traits/FormModelSaver.php
FormModelSaver.setModelAttributes
protected function setModelAttributes($model, $saveData) { $this->modelsToSave[] = $model; if (!is_array($saveData)) { return; } if ($model instanceof HalcyonModel) { $model->fill($saveData); return; } $attributesToPurge = []; ...
php
protected function setModelAttributes($model, $saveData) { $this->modelsToSave[] = $model; if (!is_array($saveData)) { return; } if ($model instanceof HalcyonModel) { $model->fill($saveData); return; } $attributesToPurge = []; ...
[ "protected", "function", "setModelAttributes", "(", "$", "model", ",", "$", "saveData", ")", "{", "$", "this", "->", "modelsToSave", "[", "]", "=", "$", "model", ";", "if", "(", "!", "is_array", "(", "$", "saveData", ")", ")", "{", "return", ";", "}"...
Sets a data collection to a model attributes, relations are also set. @param \October\Rain\Database\Model $model Model to fill. @param array $saveData Attribute values to fill model. @return void
[ "Sets", "a", "data", "collection", "to", "a", "model", "attributes", "relations", "are", "also", "set", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/traits/FormModelSaver.php#L52-L88
train
Set Model Attributes
[ 30522, 5123, 3853, 2275, 5302, 9247, 19321, 3089, 8569, 4570, 1006, 1002, 2944, 1010, 1002, 5552, 6790, 1007, 1063, 1002, 2023, 1011, 1028, 4275, 13122, 10696, 1031, 1033, 1027, 1002, 2944, 1025, 2065, 1006, 999, 2003, 1035, 9140, 1006, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/DataTable/Renderer/Xml.php
Xml.renderDataTable
protected function renderDataTable($array, $prefixLine = "") { $columnsHaveInvalidChars = $this->areTableLabelsInvalidXmlTagNames(reset($array)); $out = ''; foreach ($array as $rowId => $row) { if (!is_array($row)) { $value = self::formatValueXml($row); ...
php
protected function renderDataTable($array, $prefixLine = "") { $columnsHaveInvalidChars = $this->areTableLabelsInvalidXmlTagNames(reset($array)); $out = ''; foreach ($array as $rowId => $row) { if (!is_array($row)) { $value = self::formatValueXml($row); ...
[ "protected", "function", "renderDataTable", "(", "$", "array", ",", "$", "prefixLine", "=", "\"\"", ")", "{", "$", "columnsHaveInvalidChars", "=", "$", "this", "->", "areTableLabelsInvalidXmlTagNames", "(", "reset", "(", "$", "array", ")", ")", ";", "$", "ou...
Computes the output for the given data array @param array $array @param string $prefixLine @return string
[ "Computes", "the", "output", "for", "the", "given", "data", "array" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataTable/Renderer/Xml.php#L339-L396
train
Render the data table
[ 30522, 5123, 3853, 17552, 2850, 29336, 3085, 1006, 1002, 9140, 1010, 1002, 17576, 4179, 1027, 1000, 1000, 1007, 1063, 1002, 7753, 30524, 2595, 19968, 15900, 18442, 2015, 1006, 25141, 1006, 1002, 9140, 1007, 1007, 1025, 1002, 2041, 1027, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/User/Traits/UserTrait.php
UserTrait.authorize
public function authorize(string $action, string $scope = null): bool { if (!$this->get('authenticated')) { return false; } if ($this->get('state', 'enabled') !== 'enabled') { return false; } if (null !== $scope) { $action = $scope . '.' ...
php
public function authorize(string $action, string $scope = null): bool { if (!$this->get('authenticated')) { return false; } if ($this->get('state', 'enabled') !== 'enabled') { return false; } if (null !== $scope) { $action = $scope . '.' ...
[ "public", "function", "authorize", "(", "string", "$", "action", ",", "string", "$", "scope", "=", "null", ")", ":", "bool", "{", "if", "(", "!", "$", "this", "->", "get", "(", "'authenticated'", ")", ")", "{", "return", "false", ";", "}", "if", "(...
Checks user authorization to the action. @param string $action @param string|null $scope @return bool
[ "Checks", "user", "authorization", "to", "the", "action", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/User/Traits/UserTrait.php#L68-L103
train
Authorize the current user with the given action
[ 30522, 2270, 3853, 3166, 4697, 1006, 5164, 1002, 2895, 1010, 5164, 1002, 9531, 30524, 1002, 2023, 1011, 1028, 2131, 1006, 1005, 14469, 4383, 1005, 1007, 1007, 1063, 2709, 6270, 1025, 1065, 2065, 1006, 1002, 2023, 1011, 1028, 2131, 1006, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Mail/Storage/Imap.php
Zend_Mail_Storage_Imap.createFolder
public function createFolder($name, $parentFolder = null) { // TODO: we assume / as the hierarchy delim - need to get that from the folder class! if ($parentFolder instanceof Zend_Mail_Storage_Folder) { $folder = $parentFolder->getGlobalName() . '/' . $name; } else if ($parentFol...
php
public function createFolder($name, $parentFolder = null) { // TODO: we assume / as the hierarchy delim - need to get that from the folder class! if ($parentFolder instanceof Zend_Mail_Storage_Folder) { $folder = $parentFolder->getGlobalName() . '/' . $name; } else if ($parentFol...
[ "public", "function", "createFolder", "(", "$", "name", ",", "$", "parentFolder", "=", "null", ")", "{", "// TODO: we assume / as the hierarchy delim - need to get that from the folder class!", "if", "(", "$", "parentFolder", "instanceof", "Zend_Mail_Storage_Folder", ")", "...
create a new folder This method also creates parent folders if necessary. Some mail storages may restrict, which folder may be used as parent or which chars may be used in the folder name @param string $name global name of folder, local name if $parentFolder is set @param string|Zen...
[ "create", "a", "new", "folder" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail/Storage/Imap.php#L494-L512
train
create folder in local folder
[ 30522, 2270, 3853, 3443, 10371, 2121, 1006, 1002, 2171, 1010, 1002, 6687, 10371, 2121, 1027, 19701, 1007, 1063, 1013, 1013, 28681, 2080, 1024, 2057, 7868, 1013, 2004, 1996, 12571, 3972, 5714, 1011, 2342, 30524, 5653, 1035, 5527, 1035, 19622...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
opencart/opencart
upload/system/engine/loader.php
Loader.config
public function config($route) { $this->registry->get('event')->trigger('config/' . $route . '/before', array(&$route)); $this->registry->get('config')->load($route); $this->registry->get('event')->trigger('config/' . $route . '/after', array(&$route)); }
php
public function config($route) { $this->registry->get('event')->trigger('config/' . $route . '/before', array(&$route)); $this->registry->get('config')->load($route); $this->registry->get('event')->trigger('config/' . $route . '/after', array(&$route)); }
[ "public", "function", "config", "(", "$", "route", ")", "{", "$", "this", "->", "registry", "->", "get", "(", "'event'", ")", "->", "trigger", "(", "'config/'", ".", "$", "route", ".", "'/before'", ",", "array", "(", "&", "$", "route", ")", ")", ";...
Config @param string $route
[ "Config" ]
e7933b56ba05aafb3655c6b490c9733cd18b5c69
https://github.com/opencart/opencart/blob/e7933b56ba05aafb3655c6b490c9733cd18b5c69/upload/system/engine/loader.php#L184-L190
train
Load a config route
[ 30522, 2270, 3853, 9530, 8873, 2290, 1006, 1002, 2799, 1007, 1063, 1002, 2023, 1011, 1028, 15584, 1011, 1028, 2131, 1006, 1005, 2724, 1005, 1007, 1011, 1028, 9495, 1006, 1005, 9530, 8873, 2290, 1013, 1005, 1012, 1002, 2799, 1012, 1005, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Console/Helper/Table.php
Table.renderRow
private function renderRow(array $row, string $cellFormat) { $rowContent = $this->renderColumnSeparator(self::BORDER_OUTSIDE); $columns = $this->getRowColumns($row); $last = \count($columns) - 1; foreach ($columns as $i => $column) { $rowContent .= $this->renderCell($row,...
php
private function renderRow(array $row, string $cellFormat) { $rowContent = $this->renderColumnSeparator(self::BORDER_OUTSIDE); $columns = $this->getRowColumns($row); $last = \count($columns) - 1; foreach ($columns as $i => $column) { $rowContent .= $this->renderCell($row,...
[ "private", "function", "renderRow", "(", "array", "$", "row", ",", "string", "$", "cellFormat", ")", "{", "$", "rowContent", "=", "$", "this", "->", "renderColumnSeparator", "(", "self", "::", "BORDER_OUTSIDE", ")", ";", "$", "columns", "=", "$", "this", ...
Renders table row. Example: | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens |
[ "Renders", "table", "row", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Helper/Table.php#L456-L466
train
Render a row
[ 30522, 2797, 3853, 17552, 10524, 1006, 9140, 1002, 5216, 1010, 5164, 1002, 3526, 14192, 4017, 1007, 1063, 1002, 5216, 8663, 6528, 2102, 1027, 1002, 2023, 1011, 1028, 17552, 25778, 2819, 12325, 28689, 4263, 1006, 2969, 1024, 1024, 3675, 1035...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Routing/Pipeline.php
Pipeline.prepareDestination
protected function prepareDestination(Closure $destination) { return function ($passable) use ($destination) { try { return $destination($passable); } catch (Exception $e) { return $this->handleException($passable, $e); } catch (Throwable $...
php
protected function prepareDestination(Closure $destination) { return function ($passable) use ($destination) { try { return $destination($passable); } catch (Exception $e) { return $this->handleException($passable, $e); } catch (Throwable $...
[ "protected", "function", "prepareDestination", "(", "Closure", "$", "destination", ")", "{", "return", "function", "(", "$", "passable", ")", "use", "(", "$", "destination", ")", "{", "try", "{", "return", "$", "destination", "(", "$", "passable", ")", ";"...
Get the final piece of the Closure onion. @param \Closure $destination @return \Closure
[ "Get", "the", "final", "piece", "of", "the", "Closure", "onion", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/Pipeline.php#L26-L37
train
Prepare destination closure
[ 30522, 5123, 3853, 4810, 4355, 12758, 1006, 8503, 1002, 7688, 1007, 1063, 2709, 3853, 1006, 1002, 3413, 3085, 1007, 2224, 1006, 1002, 7688, 1007, 1063, 3046, 1063, 2709, 1002, 7688, 1006, 1002, 3413, 3085, 1007, 1025, 1065, 4608, 1006, 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...
matomo-org/matomo
plugins/Referrers/API.php
API.removeSubtableMetadata
private function removeSubtableMetadata($dataTable) { if ($dataTable instanceof DataTable\Map) { foreach ($dataTable->getDataTables() as $childTable) { $this->removeSubtableMetadata($childTable); } } else { foreach ($dataTable->getRows() as $row) {...
php
private function removeSubtableMetadata($dataTable) { if ($dataTable instanceof DataTable\Map) { foreach ($dataTable->getDataTables() as $childTable) { $this->removeSubtableMetadata($childTable); } } else { foreach ($dataTable->getRows() as $row) {...
[ "private", "function", "removeSubtableMetadata", "(", "$", "dataTable", ")", "{", "if", "(", "$", "dataTable", "instanceof", "DataTable", "\\", "Map", ")", "{", "foreach", "(", "$", "dataTable", "->", "getDataTables", "(", ")", "as", "$", "childTable", ")", ...
Removes idsubdatatable_in_db metadata from a DataTable. Used by Social tables since they use fake subtable IDs. @param DataTable $dataTable
[ "Removes", "idsubdatatable_in_db", "metadata", "from", "a", "DataTable", ".", "Used", "by", "Social", "tables", "since", "they", "use", "fake", "subtable", "IDs", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Referrers/API.php#L542-L553
train
Remove subtable metadata
[ 30522, 2797, 3853, 20362, 12083, 10880, 11368, 8447, 2696, 1006, 1002, 2951, 10880, 1007, 1063, 2065, 1006, 1002, 2951, 10880, 6013, 11253, 2951, 10880, 1032, 4949, 1007, 1063, 18921, 6776, 1006, 1002, 2951, 10880, 1011, 1028, 2131, 2850, 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/DevicesDetection/API.php
API.getOsFamilies
public function getOsFamilies($idSite, $period, $date, $segment = false) { $dataTable = $this->getDataTable('DevicesDetection_os', $idSite, $period, $date, $segment); // handle legacy archives if ($dataTable instanceof DataTable\Map || !$dataTable->getRowsCount()) { $ver...
php
public function getOsFamilies($idSite, $period, $date, $segment = false) { $dataTable = $this->getDataTable('DevicesDetection_os', $idSite, $period, $date, $segment); // handle legacy archives if ($dataTable instanceof DataTable\Map || !$dataTable->getRowsCount()) { $ver...
[ "public", "function", "getOsFamilies", "(", "$", "idSite", ",", "$", "period", ",", "$", "date", ",", "$", "segment", "=", "false", ")", "{", "$", "dataTable", "=", "$", "this", "->", "getDataTable", "(", "'DevicesDetection_os'", ",", "$", "idSite", ",",...
Gets datatable displaying number of visits by OS family (eg. Windows, Android, Linux) @param int $idSite @param string $period @param string $date @param bool|string $segment @return DataTable
[ "Gets", "datatable", "displaying", "number", "of", "visits", "by", "OS", "family", "(", "eg", ".", "Windows", "Android", "Linux", ")" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/DevicesDetection/API.php#L146-L159
train
Get OS families
[ 30522, 2270, 3853, 2131, 2891, 7011, 4328, 11983, 1006, 1002, 8909, 28032, 2063, 1010, 1002, 2558, 1010, 1002, 3058, 1010, 1002, 6903, 1027, 6270, 1007, 1063, 1002, 2951, 10880, 1027, 1002, 2023, 1011, 1028, 2131, 2850, 29336, 3085, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...