repo
stringclasses
21 values
path
stringlengths
10
105
func_name
stringlengths
6
64
original_string
stringlengths
105
15.6k
language
stringclasses
1 value
code
stringlengths
105
15.6k
code_tokens
listlengths
29
2.15k
docstring
stringlengths
11
2.85k
docstring_tokens
listlengths
1
290
sha
stringclasses
21 values
url
stringlengths
100
194
partition
stringclasses
1 value
summary
stringlengths
8
319
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
overtrue/wechat
src/MiniProgram/AppCode/Client.php
Client.getUnlimit
public function getUnlimit(string $scene, array $optional = []) { $params = array_merge([ 'scene' => $scene, ], $optional); return $this->getStream('wxa/getwxacodeunlimit', $params); }
php
public function getUnlimit(string $scene, array $optional = []) { $params = array_merge([ 'scene' => $scene, ], $optional); return $this->getStream('wxa/getwxacodeunlimit', $params); }
[ "public", "function", "getUnlimit", "(", "string", "$", "scene", ",", "array", "$", "optional", "=", "[", "]", ")", "{", "$", "params", "=", "array_merge", "(", "[", "'scene'", "=>", "$", "scene", ",", "]", ",", "$", "optional", ")", ";", "return", ...
Get AppCode unlimit. @param string $scene @param array $optional @return \EasyWeChat\Kernel\Http\StreamResponse
[ "Get", "AppCode", "unlimit", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/MiniProgram/AppCode/Client.php#L49-L56
train
Get Unlimit of code
[ 30522, 2270, 3853, 2131, 4609, 17960, 4183, 1006, 5164, 1002, 3496, 1010, 9140, 1002, 11887, 1027, 1031, 1033, 1007, 1063, 1002, 11498, 5244, 1027, 9140, 1035, 13590, 1006, 1031, 1005, 3496, 1005, 1027, 1028, 1002, 3496, 1010, 1033, 1010, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/system/classes/PluginManager.php
PluginManager.registerAll
public function registerAll($force = false) { if ($this->registered && !$force) { return; } foreach ($this->plugins as $pluginId => $plugin) { $this->registerPlugin($plugin, $pluginId); } $this->registered = true; }
php
public function registerAll($force = false) { if ($this->registered && !$force) { return; } foreach ($this->plugins as $pluginId => $plugin) { $this->registerPlugin($plugin, $pluginId); } $this->registered = true; }
[ "public", "function", "registerAll", "(", "$", "force", "=", "false", ")", "{", "if", "(", "$", "this", "->", "registered", "&&", "!", "$", "force", ")", "{", "return", ";", "}", "foreach", "(", "$", "this", "->", "plugins", "as", "$", "pluginId", ...
Runs the register() method on all plugins. Can only be called once. @return void
[ "Runs", "the", "register", "()", "method", "on", "all", "plugins", ".", "Can", "only", "be", "called", "once", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/classes/PluginManager.php#L166-L177
train
Register all plugins
[ 30522, 2270, 3853, 4236, 8095, 1006, 1002, 2486, 1027, 6270, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 5068, 1004, 1004, 999, 1002, 2486, 1007, 1063, 2709, 1025, 1065, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 13354, 7076, 2004, 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...
getgrav/grav
system/src/Grav/Common/Page/Page.php
Page.header
public function header($var = null) { if ($var) { $this->header = (object)$var; // Update also file object. $file = $this->file(); if ($file) { $file->header((array)$var); } // Force content re-processing. ...
php
public function header($var = null) { if ($var) { $this->header = (object)$var; // Update also file object. $file = $this->file(); if ($file) { $file->header((array)$var); } // Force content re-processing. ...
[ "public", "function", "header", "(", "$", "var", "=", "null", ")", "{", "if", "(", "$", "var", ")", "{", "$", "this", "->", "header", "=", "(", "object", ")", "$", "var", ";", "// Update also file object.", "$", "file", "=", "$", "this", "->", "fil...
Gets and Sets the header based on the YAML configuration at the top of the .md file @param object|array $var a YAML object representing the configuration for the file @return object the current YAML configuration
[ "Gets", "and", "Sets", "the", "header", "based", "on", "the", "YAML", "configuration", "at", "the", "top", "of", "the", ".", "md", "file" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Page/Page.php#L312-L463
train
Set page header
[ 30522, 2270, 3853, 20346, 1006, 1002, 13075, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 13075, 1007, 1063, 1002, 2023, 1011, 1028, 20346, 1027, 1006, 4874, 1007, 1002, 13075, 1025, 1013, 1013, 10651, 2036, 5371, 4874, 1012, 1002, 5371, 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/Routing/RouteCollection.php
RouteCollection.matchAgainstRoutes
protected function matchAgainstRoutes(array $routes, $request, $includingMethod = true) { [$fallbacks, $routes] = collect($routes)->partition(function ($route) { return $route->isFallback; }); return $routes->merge($fallbacks)->first(function ($value) use ($request, $includingMe...
php
protected function matchAgainstRoutes(array $routes, $request, $includingMethod = true) { [$fallbacks, $routes] = collect($routes)->partition(function ($route) { return $route->isFallback; }); return $routes->merge($fallbacks)->first(function ($value) use ($request, $includingMe...
[ "protected", "function", "matchAgainstRoutes", "(", "array", "$", "routes", ",", "$", "request", ",", "$", "includingMethod", "=", "true", ")", "{", "[", "$", "fallbacks", ",", "$", "routes", "]", "=", "collect", "(", "$", "routes", ")", "->", "partition...
Determine if a route in the array matches the request. @param array $routes @param \Illuminate\Http\Request $request @param bool $includingMethod @return \Illuminate\Routing\Route|null
[ "Determine", "if", "a", "route", "in", "the", "array", "matches", "the", "request", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/RouteCollection.php#L190-L199
train
Match against routes
[ 30522, 5123, 3853, 2674, 16098, 7076, 13181, 10421, 2015, 1006, 9140, 1002, 5847, 1010, 1002, 5227, 1010, 30524, 1033, 1027, 8145, 1006, 1002, 5847, 1007, 1011, 1028, 13571, 1006, 3853, 1006, 1002, 2799, 1007, 1063, 2709, 1002, 2799, 1011, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php
HasAttributes.addDateAttributesToArray
protected function addDateAttributesToArray(array $attributes) { foreach ($this->getDates() as $key) { if (! isset($attributes[$key])) { continue; } $attributes[$key] = $this->serializeDate( $this->asDateTime($attributes[$key]) ...
php
protected function addDateAttributesToArray(array $attributes) { foreach ($this->getDates() as $key) { if (! isset($attributes[$key])) { continue; } $attributes[$key] = $this->serializeDate( $this->asDateTime($attributes[$key]) ...
[ "protected", "function", "addDateAttributesToArray", "(", "array", "$", "attributes", ")", "{", "foreach", "(", "$", "this", "->", "getDates", "(", ")", "as", "$", "key", ")", "{", "if", "(", "!", "isset", "(", "$", "attributes", "[", "$", "key", "]", ...
Add the date attributes to the attributes array. @param array $attributes @return array
[ "Add", "the", "date", "attributes", "to", "the", "attributes", "array", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php#L123-L136
train
Adds date attributes to array
[ 30522, 5123, 3853, 5587, 13701, 19321, 3089, 8569, 22199, 10441, 11335, 2100, 1006, 9140, 1002, 12332, 1007, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 2131, 27122, 1006, 1007, 2004, 1002, 3145, 1007, 1063, 2065, 1006, 999, 26354, 338...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.shouldBlockPhpUpload
protected function shouldBlockPhpUpload($value, $parameters) { if (in_array('php', $parameters)) { return false; } $phpExtensions = [ 'php', 'php3', 'php4', 'php5', 'phtml', ]; return ($value instanceof UploadedFile) ? in_array(trim(strtol...
php
protected function shouldBlockPhpUpload($value, $parameters) { if (in_array('php', $parameters)) { return false; } $phpExtensions = [ 'php', 'php3', 'php4', 'php5', 'phtml', ]; return ($value instanceof UploadedFile) ? in_array(trim(strtol...
[ "protected", "function", "shouldBlockPhpUpload", "(", "$", "value", ",", "$", "parameters", ")", "{", "if", "(", "in_array", "(", "'php'", ",", "$", "parameters", ")", ")", "{", "return", "false", ";", "}", "$", "phpExtensions", "=", "[", "'php'", ",", ...
Check if PHP uploads are explicitly allowed. @param mixed $value @param array $parameters @return bool
[ "Check", "if", "PHP", "uploads", "are", "explicitly", "allowed", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L1176-L1189
train
Check if the uploaded file should be blocked for php uploads
[ 30522, 5123, 3853, 2323, 23467, 8458, 14289, 24759, 10441, 2094, 1006, 1002, 3643, 1010, 1002, 11709, 1007, 1063, 2065, 1006, 1999, 1035, 9140, 1006, 1005, 25718, 1005, 1010, 1002, 11709, 1007, 1007, 1063, 2709, 6270, 1025, 1065, 1002, 2571...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Filesystem/FilesystemAdapter.php
FilesystemAdapter.response
public function response($path, $name = null, array $headers = [], $disposition = 'inline') { $response = new StreamedResponse; $disposition = $response->headers->makeDisposition($disposition, $name ?? basename($path)); $response->headers->replace($headers + [ 'Content-Type' =>...
php
public function response($path, $name = null, array $headers = [], $disposition = 'inline') { $response = new StreamedResponse; $disposition = $response->headers->makeDisposition($disposition, $name ?? basename($path)); $response->headers->replace($headers + [ 'Content-Type' =>...
[ "public", "function", "response", "(", "$", "path", ",", "$", "name", "=", "null", ",", "array", "$", "headers", "=", "[", "]", ",", "$", "disposition", "=", "'inline'", ")", "{", "$", "response", "=", "new", "StreamedResponse", ";", "$", "disposition"...
Create a streamed response for a given file. @param string $path @param string|null $name @param array|null $headers @param string|null $disposition @return \Symfony\Component\HttpFoundation\StreamedResponse
[ "Create", "a", "streamed", "response", "for", "a", "given", "file", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Filesystem/FilesystemAdapter.php#L137-L156
train
Create a response object with the given path
[ 30522, 2270, 3853, 3433, 1006, 1002, 4130, 1010, 1002, 2171, 1027, 19701, 1010, 9140, 1002, 20346, 2015, 1027, 1031, 1033, 1010, 1002, 22137, 1027, 1005, 23881, 1005, 1007, 1063, 1002, 3433, 1027, 2047, 18498, 6072, 26029, 3366, 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/Translation/Translator.php
Translator.getFromJson
public function getFromJson($key, array $replace = [], $locale = null) { $locale = $locale ?: $this->locale; // For JSON translations, there is only one file per locale, so we will simply load // that file and then we will be ready to check the array for the key. These are // only o...
php
public function getFromJson($key, array $replace = [], $locale = null) { $locale = $locale ?: $this->locale; // For JSON translations, there is only one file per locale, so we will simply load // that file and then we will be ready to check the array for the key. These are // only o...
[ "public", "function", "getFromJson", "(", "$", "key", ",", "array", "$", "replace", "=", "[", "]", ",", "$", "locale", "=", "null", ")", "{", "$", "locale", "=", "$", "locale", "?", ":", "$", "this", "->", "locale", ";", "// For JSON translations, ther...
Get the translation for a given key from the JSON translation files. @param string $key @param array $replace @param string $locale @return string|array
[ "Get", "the", "translation", "for", "a", "given", "key", "from", "the", "JSON", "translation", "files", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Translation/Translator.php#L145-L168
train
Get a translation from JSON
[ 30522, 2270, 3853, 2131, 19699, 5358, 22578, 2239, 1006, 1002, 3145, 1010, 9140, 1002, 5672, 1027, 1031, 1033, 1010, 1002, 2334, 2063, 1027, 19701, 1007, 1063, 1002, 2334, 2063, 1027, 1002, 2334, 2063, 1029, 1024, 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...
dompdf/dompdf
lib/Cpdf.php
Cpdf.addLink
function addLink($url, $x0, $y0, $x1, $y1) { $this->numObj++; $info = array('type' => 'link', 'url' => $url, 'rect' => array($x0, $y0, $x1, $y1)); $this->o_annotation($this->numObj, 'new', $info); }
php
function addLink($url, $x0, $y0, $x1, $y1) { $this->numObj++; $info = array('type' => 'link', 'url' => $url, 'rect' => array($x0, $y0, $x1, $y1)); $this->o_annotation($this->numObj, 'new', $info); }
[ "function", "addLink", "(", "$", "url", ",", "$", "x0", ",", "$", "y0", ",", "$", "x1", ",", "$", "y1", ")", "{", "$", "this", "->", "numObj", "++", ";", "$", "info", "=", "array", "(", "'type'", "=>", "'link'", ",", "'url'", "=>", "$", "url"...
add a link in the document to an external URL @param $url @param $x0 @param $y0 @param $x1 @param $y1
[ "add", "a", "link", "in", "the", "document", "to", "an", "external", "URL" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/lib/Cpdf.php#L2221-L2226
train
Add a link to the grammar
[ 30522, 3853, 5587, 13767, 1006, 1002, 24471, 2140, 1010, 1002, 1060, 2692, 1010, 1002, 1061, 2692, 1010, 1002, 1060, 2487, 1010, 1002, 1061, 2487, 1007, 1063, 1002, 2023, 1011, 1028, 16371, 5302, 2497, 3501, 1009, 1009, 1025, 1002, 18558, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Db/Table/Select.php
Zend_Db_Table_Select.assemble
public function assemble() { $fields = $this->getPart(Zend_Db_Table_Select::COLUMNS); $primary = $this->_info[Zend_Db_Table_Abstract::NAME]; $schema = $this->_info[Zend_Db_Table_Abstract::SCHEMA]; if (count($this->_parts[self::UNION]) == 0) { // If no fields are spec...
php
public function assemble() { $fields = $this->getPart(Zend_Db_Table_Select::COLUMNS); $primary = $this->_info[Zend_Db_Table_Abstract::NAME]; $schema = $this->_info[Zend_Db_Table_Abstract::SCHEMA]; if (count($this->_parts[self::UNION]) == 0) { // If no fields are spec...
[ "public", "function", "assemble", "(", ")", "{", "$", "fields", "=", "$", "this", "->", "getPart", "(", "Zend_Db_Table_Select", "::", "COLUMNS", ")", ";", "$", "primary", "=", "$", "this", "->", "_info", "[", "Zend_Db_Table_Abstract", "::", "NAME", "]", ...
Performs a validation on the select query before passing back to the parent class. Ensures that only columns from the primary Zend_Db_Table are returned in the result. @return string|null This object as a SELECT string (or null if a string cannot be produced)
[ "Performs", "a", "validation", "on", "the", "select", "query", "before", "passing", "back", "to", "the", "parent", "class", ".", "Ensures", "that", "only", "columns", "from", "the", "primary", "Zend_Db_Table", "are", "returned", "in", "the", "result", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Table/Select.php#L190-L223
train
Assemble the select query into an array
[ 30522, 2270, 3853, 21365, 1006, 1007, 1063, 1002, 4249, 1027, 1002, 2023, 1011, 1028, 2131, 19362, 2102, 1006, 16729, 2094, 1035, 16962, 1035, 2795, 1035, 7276, 1024, 1024, 7753, 1007, 1025, 1002, 3078, 1027, 1002, 2023, 1011, 1028, 1035, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/View.php
View.setXFrameOptions
public function setXFrameOptions($option = 'deny') { if ($option === 'deny' || $option === 'sameorigin') { $this->xFrameOptions = $option; } if ($option == 'allow') { $this->xFrameOptions = null; } }
php
public function setXFrameOptions($option = 'deny') { if ($option === 'deny' || $option === 'sameorigin') { $this->xFrameOptions = $option; } if ($option == 'allow') { $this->xFrameOptions = null; } }
[ "public", "function", "setXFrameOptions", "(", "$", "option", "=", "'deny'", ")", "{", "if", "(", "$", "option", "===", "'deny'", "||", "$", "option", "===", "'sameorigin'", ")", "{", "$", "this", "->", "xFrameOptions", "=", "$", "option", ";", "}", "i...
Set X-Frame-Options field in the HTTP response. The header is set just before rendering. _Note: setting this allows you to make sure the View **cannot** be embedded in iframes. Learn more [here](https://developer.mozilla.org/en-US/docs/HTTP/X-Frame-Options)._ @param string $option ('deny' or 'sameorigin')
[ "Set", "X", "-", "Frame", "-", "Options", "field", "in", "the", "HTTP", "response", ".", "The", "header", "is", "set", "just", "before", "rendering", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/View.php#L379-L388
train
Set XFrame Options
[ 30522, 2270, 3853, 2275, 2595, 15643, 7361, 9285, 1006, 1002, 5724, 1027, 1005, 9772, 1005, 1007, 1063, 2065, 1006, 1002, 5724, 1027, 1027, 1027, 1005, 9772, 1005, 1064, 1064, 1002, 5724, 1027, 1027, 1027, 1005, 2168, 10050, 11528, 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...
matomo-org/matomo
core/Config/IniFileChain.php
IniFileChain.reload
public function reload($defaultSettingsFiles = array(), $userSettingsFile = null) { if (!empty($defaultSettingsFiles) || !empty($userSettingsFile) ) { $this->resetSettingsChain($defaultSettingsFiles, $userSettingsFile); } $reader = new IniReader(); fo...
php
public function reload($defaultSettingsFiles = array(), $userSettingsFile = null) { if (!empty($defaultSettingsFiles) || !empty($userSettingsFile) ) { $this->resetSettingsChain($defaultSettingsFiles, $userSettingsFile); } $reader = new IniReader(); fo...
[ "public", "function", "reload", "(", "$", "defaultSettingsFiles", "=", "array", "(", ")", ",", "$", "userSettingsFile", "=", "null", ")", "{", "if", "(", "!", "empty", "(", "$", "defaultSettingsFiles", ")", "||", "!", "empty", "(", "$", "userSettingsFile",...
Reloads settings from disk.
[ "Reloads", "settings", "from", "disk", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Config/IniFileChain.php#L203-L229
train
Reloads the settings chain
[ 30522, 2270, 3853, 2128, 11066, 1006, 1002, 12398, 21678, 8613, 8873, 4244, 1027, 9140, 1006, 1007, 1010, 1002, 5198, 18319, 3070, 22747, 9463, 1027, 19701, 1007, 1063, 2065, 1006, 999, 4064, 1006, 1002, 12398, 21678, 8613, 8873, 4244, 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...
getgrav/grav
system/src/Grav/Framework/Cache/CacheTrait.php
CacheTrait.init
protected function init($namespace = '', $defaultLifetime = null) { $this->namespace = (string) $namespace; $this->defaultLifetime = $this->convertTtl($defaultLifetime); $this->miss = new \stdClass; }
php
protected function init($namespace = '', $defaultLifetime = null) { $this->namespace = (string) $namespace; $this->defaultLifetime = $this->convertTtl($defaultLifetime); $this->miss = new \stdClass; }
[ "protected", "function", "init", "(", "$", "namespace", "=", "''", ",", "$", "defaultLifetime", "=", "null", ")", "{", "$", "this", "->", "namespace", "=", "(", "string", ")", "$", "namespace", ";", "$", "this", "->", "defaultLifetime", "=", "$", "this...
Always call from constructor. @param string $namespace @param null|int|\DateInterval $defaultLifetime @throws \Psr\SimpleCache\InvalidArgumentException|InvalidArgumentException
[ "Always", "call", "from", "constructor", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Framework/Cache/CacheTrait.php#L39-L44
train
Initializes the class
[ 30522, 5123, 3853, 1999, 4183, 1006, 1002, 3415, 15327, 1027, 1005, 1005, 1010, 1002, 12398, 15509, 7292, 1027, 19701, 1007, 1063, 1002, 2023, 1011, 1028, 3415, 15327, 1027, 1006, 5164, 1007, 1002, 3415, 15327, 1025, 1002, 2023, 1011, 1028,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpKernel/Kernel.php
Kernel.getContainerClass
protected function getContainerClass() { $class = \get_class($this); $class = 'c' === $class[0] && 0 === strpos($class, "class@anonymous\0") ? get_parent_class($class).str_replace('.', '_', ContainerBuilder::hash($class)) : $class; $class = $this->name.str_replace('\\', '_', $class).ucfirst(...
php
protected function getContainerClass() { $class = \get_class($this); $class = 'c' === $class[0] && 0 === strpos($class, "class@anonymous\0") ? get_parent_class($class).str_replace('.', '_', ContainerBuilder::hash($class)) : $class; $class = $this->name.str_replace('\\', '_', $class).ucfirst(...
[ "protected", "function", "getContainerClass", "(", ")", "{", "$", "class", "=", "\\", "get_class", "(", "$", "this", ")", ";", "$", "class", "=", "'c'", "===", "$", "class", "[", "0", "]", "&&", "0", "===", "strpos", "(", "$", "class", ",", "\"clas...
Gets the container class. @throws \InvalidArgumentException If the generated classname is invalid @return string The container class
[ "Gets", "the", "container", "class", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpKernel/Kernel.php#L449-L460
train
Get the container class name
[ 30522, 5123, 3853, 2131, 8663, 18249, 2121, 26266, 1006, 1007, 1063, 1002, 2465, 1027, 1032, 2131, 1035, 2465, 1006, 1002, 2023, 1007, 1025, 1002, 2465, 1027, 1005, 1039, 1005, 1027, 1027, 1027, 1002, 2465, 1031, 1014, 1033, 1004, 1004, 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/Diagnostics/Diagnostic/RequiredPhpSetting.php
RequiredPhpSetting.addRequiredValue
public function addRequiredValue($requiredValue, $operator) { if(!is_int($requiredValue)){ throw new \InvalidArgumentException('Required value must be an integer.'); } $this->requiredValues[] = array( 'requiredValue' => $requiredValue, 'operator' ...
php
public function addRequiredValue($requiredValue, $operator) { if(!is_int($requiredValue)){ throw new \InvalidArgumentException('Required value must be an integer.'); } $this->requiredValues[] = array( 'requiredValue' => $requiredValue, 'operator' ...
[ "public", "function", "addRequiredValue", "(", "$", "requiredValue", ",", "$", "operator", ")", "{", "if", "(", "!", "is_int", "(", "$", "requiredValue", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'Required value must be an integer.'", ...
@param int $requiredValue @param string $operator @return $this
[ "@param", "int", "$requiredValue", "@param", "string", "$operator" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Diagnostics/Diagnostic/RequiredPhpSetting.php#L34-L47
train
Add required value
[ 30522, 2270, 3853, 5587, 2890, 15549, 5596, 10175, 5657, 1006, 1002, 3223, 10175, 5657, 1010, 1002, 6872, 1007, 1063, 2065, 1006, 999, 2003, 1035, 20014, 1006, 1002, 3223, 10175, 5657, 1007, 1007, 1063, 5466, 2047, 1032, 19528, 2906, 22850,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php
PostgresGrammar.compileRenameIndex
public function compileRenameIndex(Blueprint $blueprint, Fluent $command) { return sprintf('alter index %s rename to %s', $this->wrap($command->from), $this->wrap($command->to) ); }
php
public function compileRenameIndex(Blueprint $blueprint, Fluent $command) { return sprintf('alter index %s rename to %s', $this->wrap($command->from), $this->wrap($command->to) ); }
[ "public", "function", "compileRenameIndex", "(", "Blueprint", "$", "blueprint", ",", "Fluent", "$", "command", ")", "{", "return", "sprintf", "(", "'alter index %s rename to %s'", ",", "$", "this", "->", "wrap", "(", "$", "command", "->", "from", ")", ",", "...
Compile a rename index command. @param \Illuminate\Database\Schema\Blueprint $blueprint @param \Illuminate\Support\Fluent $command @return string
[ "Compile", "a", "rename", "index", "command", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php#L345-L351
train
Compiles a rename index command.
[ 30522, 2270, 3853, 21624, 8189, 26432, 13629, 2595, 1006, 2630, 16550, 1002, 2630, 16550, 1010, 19376, 1002, 3094, 1007, 1063, 2709, 9043, 2546, 1006, 1005, 11477, 5950, 1003, 1055, 14916, 14074, 2000, 1003, 1055, 1005, 1010, 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...
overtrue/wechat
src/Kernel/Providers/LogServiceProvider.php
LogServiceProvider.register
public function register(Container $pimple) { $pimple['logger'] = $pimple['log'] = function ($app) { $config = $this->formatLogConfig($app); if (!empty($config)) { $app->rebind('config', $app['config']->merge($config)); } return new LogManage...
php
public function register(Container $pimple) { $pimple['logger'] = $pimple['log'] = function ($app) { $config = $this->formatLogConfig($app); if (!empty($config)) { $app->rebind('config', $app['config']->merge($config)); } return new LogManage...
[ "public", "function", "register", "(", "Container", "$", "pimple", ")", "{", "$", "pimple", "[", "'logger'", "]", "=", "$", "pimple", "[", "'log'", "]", "=", "function", "(", "$", "app", ")", "{", "$", "config", "=", "$", "this", "->", "formatLogConf...
Registers services on the given container. This method should only be used to configure services and parameters. It should not get services. @param Container $pimple A container instance
[ "Registers", "services", "on", "the", "given", "container", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Kernel/Providers/LogServiceProvider.php#L33-L44
train
Register the LogManager into the Container
[ 30522, 2270, 3853, 4236, 1006, 11661, 1002, 14255, 23344, 1007, 1063, 1002, 14255, 23344, 1031, 1005, 8833, 4590, 1005, 1033, 1027, 1002, 14255, 23344, 1031, 1005, 8833, 1005, 1033, 1027, 3853, 1006, 1002, 10439, 1007, 1063, 1002, 9530, 887...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dompdf/dompdf
lib/Cpdf.php
Cpdf.setColor
function setColor($color, $force = false) { $new_color = array($color[0], $color[1], $color[2], isset($color[3]) ? $color[3] : null); if (!$force && $this->currentColor == $new_color) { return; } if (isset($new_color[3])) { $this->currentColor = $new_color; ...
php
function setColor($color, $force = false) { $new_color = array($color[0], $color[1], $color[2], isset($color[3]) ? $color[3] : null); if (!$force && $this->currentColor == $new_color) { return; } if (isset($new_color[3])) { $this->currentColor = $new_color; ...
[ "function", "setColor", "(", "$", "color", ",", "$", "force", "=", "false", ")", "{", "$", "new_color", "=", "array", "(", "$", "color", "[", "0", "]", ",", "$", "color", "[", "1", "]", ",", "$", "color", "[", "2", "]", ",", "isset", "(", "$"...
sets the color for fill operations @param $color @param bool $force
[ "sets", "the", "color", "for", "fill", "operations" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/lib/Cpdf.php#L3063-L3080
train
Set the color of the terms
[ 30522, 3853, 2275, 18717, 1006, 1002, 3609, 1010, 1002, 2486, 1027, 6270, 1007, 1063, 1002, 2047, 1035, 3609, 1027, 9140, 1006, 1002, 3609, 1031, 1014, 1033, 1010, 1002, 3609, 1031, 1015, 1033, 1010, 1002, 3609, 1031, 1016, 1033, 1010, 26...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Session/FileSessionHandler.php
FileSessionHandler.read
public function read($sessionId) { if ($this->files->isFile($path = $this->path.'/'.$sessionId)) { if ($this->files->lastModified($path) >= Carbon::now()->subMinutes($this->minutes)->getTimestamp()) { return $this->files->sharedGet($path); } } return ...
php
public function read($sessionId) { if ($this->files->isFile($path = $this->path.'/'.$sessionId)) { if ($this->files->lastModified($path) >= Carbon::now()->subMinutes($this->minutes)->getTimestamp()) { return $this->files->sharedGet($path); } } return ...
[ "public", "function", "read", "(", "$", "sessionId", ")", "{", "if", "(", "$", "this", "->", "files", "->", "isFile", "(", "$", "path", "=", "$", "this", "->", "path", ".", "'/'", ".", "$", "sessionId", ")", ")", "{", "if", "(", "$", "this", "-...
{@inheritdoc}
[ "{" ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Session/FileSessionHandler.php#L67-L76
train
Read session data
[ 30522, 2270, 3853, 3191, 1006, 1002, 5219, 3593, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 6764, 1011, 1028, 2003, 8873, 2571, 1006, 1002, 4130, 1027, 1002, 2023, 1011, 1028, 4130, 1012, 1005, 1013, 1005, 1012, 1002, 5219, 3593, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Ldap/Adapter/ExtLdap/EntryManager.php
EntryManager.removeAttributeValues
public function removeAttributeValues(Entry $entry, string $attribute, array $values) { $con = $this->getConnectionResource(); if (!@ldap_mod_del($con, $entry->getDn(), [$attribute => $values])) { throw new LdapException(sprintf('Could not remove values from entry "%s", attribute %s: %s...
php
public function removeAttributeValues(Entry $entry, string $attribute, array $values) { $con = $this->getConnectionResource(); if (!@ldap_mod_del($con, $entry->getDn(), [$attribute => $values])) { throw new LdapException(sprintf('Could not remove values from entry "%s", attribute %s: %s...
[ "public", "function", "removeAttributeValues", "(", "Entry", "$", "entry", ",", "string", "$", "attribute", ",", "array", "$", "values", ")", "{", "$", "con", "=", "$", "this", "->", "getConnectionResource", "(", ")", ";", "if", "(", "!", "@", "ldap_mod_...
Removes values from an entry's multi-valued attribute from the LDAP server. @throws NotBoundException @throws LdapException
[ "Removes", "values", "from", "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#L92-L99
train
Remove attribute values from an entry
[ 30522, 2270, 3853, 6366, 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...
symfony/symfony
src/Symfony/Component/VarDumper/Dumper/CliDumper.php
CliDumper.style
protected function style($style, $value, $attr = []) { if (null === $this->colors) { $this->colors = $this->supportsColors(); } if (null === $this->handlesHrefGracefully) { $this->handlesHrefGracefully = 'JetBrains-JediTerm' !== getenv('TERMINAL_EMULATOR'); }...
php
protected function style($style, $value, $attr = []) { if (null === $this->colors) { $this->colors = $this->supportsColors(); } if (null === $this->handlesHrefGracefully) { $this->handlesHrefGracefully = 'JetBrains-JediTerm' !== getenv('TERMINAL_EMULATOR'); }...
[ "protected", "function", "style", "(", "$", "style", ",", "$", "value", ",", "$", "attr", "=", "[", "]", ")", "{", "if", "(", "null", "===", "$", "this", "->", "colors", ")", "{", "$", "this", "->", "colors", "=", "$", "this", "->", "supportsColo...
Decorates a value with some style. @param string $style The type of style being applied @param string $value The value being styled @param array $attr Optional context information @return string The value with style decoration
[ "Decorates", "a", "value", "with", "some", "style", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/VarDumper/Dumper/CliDumper.php#L431-L499
train
Prints a color value
[ 30522, 5123, 3853, 2806, 1006, 1002, 2806, 1010, 1002, 3643, 1010, 1002, 2012, 16344, 1027, 1031, 1033, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 1027, 1002, 2023, 1011, 1028, 6087, 1007, 1063, 1002, 2023, 1011, 1028, 6087, 1027, 1002, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/system/models/MailLayout.php
MailLayout.createLayouts
public static function createLayouts() { $dbLayouts = self::lists('code', 'code'); $definitions = MailManager::instance()->listRegisteredLayouts(); foreach ($definitions as $code => $path) { if (array_key_exists($code, $dbLayouts)) { continue; } ...
php
public static function createLayouts() { $dbLayouts = self::lists('code', 'code'); $definitions = MailManager::instance()->listRegisteredLayouts(); foreach ($definitions as $code => $path) { if (array_key_exists($code, $dbLayouts)) { continue; } ...
[ "public", "static", "function", "createLayouts", "(", ")", "{", "$", "dbLayouts", "=", "self", "::", "lists", "(", "'code'", ",", "'code'", ")", ";", "$", "definitions", "=", "MailManager", "::", "instance", "(", ")", "->", "listRegisteredLayouts", "(", ")...
Loops over each mail layout and ensures the system has a layout, if the layout does not exist, it will create one. @return void
[ "Loops", "over", "each", "mail", "layout", "and", "ensures", "the", "system", "has", "a", "layout", "if", "the", "layout", "does", "not", "exist", "it", "will", "create", "one", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/models/MailLayout.php#L79-L95
train
Create all layouts
[ 30522, 2270, 10763, 3853, 3443, 8485, 12166, 1006, 1007, 1063, 1002, 16962, 8485, 12166, 1027, 2969, 1024, 1024, 7201, 1006, 1005, 3642, 1005, 1010, 1005, 3642, 1005, 1007, 1025, 1002, 15182, 1027, 5653, 24805, 4590, 1024, 1024, 6013, 1006,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.pluck
public function pluck($column, $key = null) { // First, we will need to select the results of the query accounting for the // given columns / key. Once we have the results, we will be able to take // the results and get the exact data that was requested for the query. $queryResult = ...
php
public function pluck($column, $key = null) { // First, we will need to select the results of the query accounting for the // given columns / key. Once we have the results, we will be able to take // the results and get the exact data that was requested for the query. $queryResult = ...
[ "public", "function", "pluck", "(", "$", "column", ",", "$", "key", "=", "null", ")", "{", "// First, we will need to select the results of the query accounting for the", "// given columns / key. Once we have the results, we will be able to take", "// the results and get the exact data...
Get an array with the values of a given column. @param string $column @param string|null $key @return \Illuminate\Support\Collection
[ "Get", "an", "array", "with", "the", "values", "of", "a", "given", "column", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L2309-L2337
train
Plucks the values of a column from the result set
[ 30522, 2270, 3853, 20228, 12722, 1006, 1002, 5930, 1010, 1002, 3145, 1027, 19701, 1007, 1063, 1013, 1013, 2034, 1010, 2057, 2097, 2342, 2000, 7276, 1996, 3463, 1997, 1996, 23032, 9529, 2005, 1996, 1013, 1013, 2445, 7753, 1013, 3145, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Notifications/Messages/SimpleMessage.php
SimpleMessage.toArray
public function toArray() { return [ 'level' => $this->level, 'subject' => $this->subject, 'greeting' => $this->greeting, 'salutation' => $this->salutation, 'introLines' => $this->introLines, 'outroLines' => $this->outroLines, ...
php
public function toArray() { return [ 'level' => $this->level, 'subject' => $this->subject, 'greeting' => $this->greeting, 'salutation' => $this->salutation, 'introLines' => $this->introLines, 'outroLines' => $this->outroLines, ...
[ "public", "function", "toArray", "(", ")", "{", "return", "[", "'level'", "=>", "$", "this", "->", "level", ",", "'subject'", "=>", "$", "this", "->", "subject", ",", "'greeting'", "=>", "$", "this", "->", "greeting", ",", "'salutation'", "=>", "$", "t...
Get an array representation of the message. @return array
[ "Get", "an", "array", "representation", "of", "the", "message", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Notifications/Messages/SimpleMessage.php#L211-L223
train
Array de un objeto
[ 30522, 2270, 3853, 2000, 2906, 9447, 1006, 1007, 1063, 2709, 1031, 1005, 2504, 1005, 1027, 1028, 1002, 2023, 1011, 1028, 2504, 1010, 1005, 3395, 1005, 1027, 1028, 1002, 2023, 1011, 1028, 3395, 1010, 1005, 14806, 1005, 1027, 1028, 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...
guzzle/guzzle
src/Handler/StreamHandler.php
StreamHandler.drain
private function drain( StreamInterface $source, StreamInterface $sink, $contentLength ) { // If a content-length header is provided, then stop reading once // that number of bytes has been read. This can prevent infinitely // reading from a stream when dealing with s...
php
private function drain( StreamInterface $source, StreamInterface $sink, $contentLength ) { // If a content-length header is provided, then stop reading once // that number of bytes has been read. This can prevent infinitely // reading from a stream when dealing with s...
[ "private", "function", "drain", "(", "StreamInterface", "$", "source", ",", "StreamInterface", "$", "sink", ",", "$", "contentLength", ")", "{", "// If a content-length header is provided, then stop reading once", "// that number of bytes has been read. This can prevent infinitely"...
Drains the source stream into the "sink" client option. @param StreamInterface $source @param StreamInterface $sink @param string $contentLength Header specifying the amount of data to read. @return StreamInterface @throws \RuntimeException when the sink option is invalid.
[ "Drains", "the", "source", "stream", "into", "the", "sink", "client", "option", "." ]
bf595424e4d442a190582e088985dc835a789071
https://github.com/guzzle/guzzle/blob/bf595424e4d442a190582e088985dc835a789071/src/Handler/StreamHandler.php#L201-L220
train
Drains the source stream into the sink stream.
[ 30522, 2797, 3853, 12475, 1006, 5460, 18447, 2121, 12172, 1002, 3120, 1010, 5460, 18447, 2121, 12172, 1002, 7752, 1010, 1002, 4180, 7770, 13512, 2232, 1007, 1063, 1013, 1013, 2065, 1037, 4180, 1011, 3091, 20346, 2003, 3024, 1010, 2059, 2644...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/ReleaseChannels.php
ReleaseChannels.setActiveReleaseChannelId
public function setActiveReleaseChannelId($channel) { $general = Config::getInstance()->General; $general['release_channel'] = $channel; Config::getInstance()->General = $general; }
php
public function setActiveReleaseChannelId($channel) { $general = Config::getInstance()->General; $general['release_channel'] = $channel; Config::getInstance()->General = $general; }
[ "public", "function", "setActiveReleaseChannelId", "(", "$", "channel", ")", "{", "$", "general", "=", "Config", "::", "getInstance", "(", ")", "->", "General", ";", "$", "general", "[", "'release_channel'", "]", "=", "$", "channel", ";", "Config", "::", "...
Sets the given release channel in config but does not save id. $config->forceSave() still needs to be called @internal tests only @param string $channel
[ "Sets", "the", "given", "release", "channel", "in", "config", "but", "does", "not", "save", "id", ".", "$config", "-", ">", "forceSave", "()", "still", "needs", "to", "be", "called" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Plugin/ReleaseChannels.php#L76-L81
train
Set active release channel id
[ 30522, 2270, 3853, 2275, 19620, 16570, 19500, 26058, 3593, 1006, 1002, 3149, 1007, 1063, 1002, 2236, 1027, 9530, 8873, 2290, 1024, 1024, 2131, 7076, 26897, 1006, 1007, 1011, 1028, 2236, 1025, 1002, 2236, 1031, 1005, 2713, 1035, 3149, 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/Console/Formatter/OutputFormatterStyleStack.php
OutputFormatterStyleStack.getCurrent
public function getCurrent() { if (empty($this->styles)) { return $this->emptyStyle; } return $this->styles[\count($this->styles) - 1]; }
php
public function getCurrent() { if (empty($this->styles)) { return $this->emptyStyle; } return $this->styles[\count($this->styles) - 1]; }
[ "public", "function", "getCurrent", "(", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "styles", ")", ")", "{", "return", "$", "this", "->", "emptyStyle", ";", "}", "return", "$", "this", "->", "styles", "[", "\\", "count", "(", "$", "this"...
Computes current style with stacks top codes. @return OutputFormatterStyle
[ "Computes", "current", "style", "with", "stacks", "top", "codes", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.php#L84-L91
train
Get current style
[ 30522, 2270, 3853, 2131, 10841, 14343, 3372, 1006, 1007, 1063, 2065, 1006, 4064, 1006, 1002, 2023, 1011, 1028, 6782, 1007, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 4064, 21756, 2571, 1025, 1065, 2709, 1002, 2023, 1011, 1028, 6782, 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...
octobercms/october
modules/backend/controllers/Index.php
Index.checkPermissionRedirect
protected function checkPermissionRedirect() { if (!$this->user->hasAccess('backend.access_dashboard')) { $true = function () { return true; }; if ($first = array_first(BackendMenu::listMainMenuItems(), $true)) { return Redirect::intended($first->url); } ...
php
protected function checkPermissionRedirect() { if (!$this->user->hasAccess('backend.access_dashboard')) { $true = function () { return true; }; if ($first = array_first(BackendMenu::listMainMenuItems(), $true)) { return Redirect::intended($first->url); } ...
[ "protected", "function", "checkPermissionRedirect", "(", ")", "{", "if", "(", "!", "$", "this", "->", "user", "->", "hasAccess", "(", "'backend.access_dashboard'", ")", ")", "{", "$", "true", "=", "function", "(", ")", "{", "return", "true", ";", "}", ";...
Custom permissions check that will redirect to the next available menu item, if permission to this page is denied.
[ "Custom", "permissions", "check", "that", "will", "redirect", "to", "the", "next", "available", "menu", "item", "if", "permission", "to", "this", "page", "is", "denied", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/controllers/Index.php#L71-L79
train
Check permission redirect
[ 30522, 5123, 3853, 4638, 4842, 25481, 5596, 7442, 6593, 1006, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 5310, 1011, 1028, 2038, 6305, 9623, 2015, 1006, 1005, 2067, 10497, 1012, 3229, 1035, 24923, 1005, 1007, 1007, 1063, 1002, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Access.php
Access.checkUserHasAdminAccess
public function checkUserHasAdminAccess($idSites) { if ($this->hasSuperUserAccess()) { return; } $idSites = $this->getIdSites($idSites); $idSitesAccessible = $this->getSitesIdWithAdminAccess(); foreach ($idSites as $idsite) { if (!in_array($idsite, $...
php
public function checkUserHasAdminAccess($idSites) { if ($this->hasSuperUserAccess()) { return; } $idSites = $this->getIdSites($idSites); $idSitesAccessible = $this->getSitesIdWithAdminAccess(); foreach ($idSites as $idsite) { if (!in_array($idsite, $...
[ "public", "function", "checkUserHasAdminAccess", "(", "$", "idSites", ")", "{", "if", "(", "$", "this", "->", "hasSuperUserAccess", "(", ")", ")", "{", "return", ";", "}", "$", "idSites", "=", "$", "this", "->", "getIdSites", "(", "$", "idSites", ")", ...
This method checks that the user has ADMIN access for the given list of websites. If the user doesn't have ADMIN access for at least one website of the list, we throw an exception. @param int|array $idSites List of ID sites to check @throws \Piwik\NoAccessException If for any of the websites the user doesn't have an A...
[ "This", "method", "checks", "that", "the", "user", "has", "ADMIN", "access", "for", "the", "given", "list", "of", "websites", ".", "If", "the", "user", "doesn", "t", "have", "ADMIN", "access", "for", "at", "least", "one", "website", "of", "the", "list", ...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Access.php#L500-L514
train
Checks if the current user has admin access to the list of websites
[ 30522, 2270, 3853, 4638, 20330, 14949, 4215, 22311, 9468, 7971, 1006, 1002, 8909, 28032, 2229, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 2038, 6342, 4842, 20330, 6305, 9623, 2015, 1006, 1007, 1007, 1063, 2709, 1025, 1065, 1002, 8909, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Grammar.php
Grammar.wrapSegments
protected function wrapSegments($segments) { return collect($segments)->map(function ($segment, $key) use ($segments) { return $key == 0 && count($segments) > 1 ? $this->wrapTable($segment) : $this->wrapValue($segment); })->implode(...
php
protected function wrapSegments($segments) { return collect($segments)->map(function ($segment, $key) use ($segments) { return $key == 0 && count($segments) > 1 ? $this->wrapTable($segment) : $this->wrapValue($segment); })->implode(...
[ "protected", "function", "wrapSegments", "(", "$", "segments", ")", "{", "return", "collect", "(", "$", "segments", ")", "->", "map", "(", "function", "(", "$", "segment", ",", "$", "key", ")", "use", "(", "$", "segments", ")", "{", "return", "$", "k...
Wrap the given value segments. @param array $segments @return string
[ "Wrap", "the", "given", "value", "segments", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Grammar.php#L97-L104
train
Wrap segments in a string
[ 30522, 5123, 3853, 19735, 13910, 8163, 1006, 1002, 9214, 1007, 1063, 2709, 8145, 1006, 1002, 9214, 1007, 1011, 1028, 4949, 1006, 3853, 1006, 1002, 6903, 1010, 1002, 3145, 1007, 2224, 1006, 1002, 9214, 1007, 1063, 2709, 1002, 3145, 1027, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Db/Adapter/Abstract.php
Zend_Db_Adapter_Abstract.fetchPairs
public function fetchPairs($sql, $bind = array()) { $stmt = $this->query($sql, $bind); $data = array(); while ($row = $stmt->fetch(Zend_Db::FETCH_NUM)) { $data[$row[0]] = $row[1]; } return $data; }
php
public function fetchPairs($sql, $bind = array()) { $stmt = $this->query($sql, $bind); $data = array(); while ($row = $stmt->fetch(Zend_Db::FETCH_NUM)) { $data[$row[0]] = $row[1]; } return $data; }
[ "public", "function", "fetchPairs", "(", "$", "sql", ",", "$", "bind", "=", "array", "(", ")", ")", "{", "$", "stmt", "=", "$", "this", "->", "query", "(", "$", "sql", ",", "$", "bind", ")", ";", "$", "data", "=", "array", "(", ")", ";", "whi...
Fetches all SQL result rows as an array of key-value pairs. The first column is the key, the second column is the value. @param string|Zend_Db_Select $sql An SQL SELECT statement. @param mixed $bind Data to bind into SELECT placeholders. @return array
[ "Fetches", "all", "SQL", "result", "rows", "as", "an", "array", "of", "key", "-", "value", "pairs", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Adapter/Abstract.php#L808-L816
train
Fetch all the result as array of key = > value pairs
[ 30522, 2270, 3853, 18584, 4502, 18894, 1006, 1002, 29296, 1010, 1002, 14187, 1027, 9140, 1006, 1007, 1007, 1063, 1002, 2358, 20492, 1027, 1002, 2023, 1011, 1028, 23032, 1006, 1002, 29296, 1010, 1002, 14187, 1007, 1025, 1002, 2951, 1027, 914...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Archive.php
Archive.getRequestedPlugins
private function getRequestedPlugins($archiveNames) { $result = array(); foreach ($archiveNames as $name) { $result[] = self::getPluginForReport($name); } return array_unique($result); }
php
private function getRequestedPlugins($archiveNames) { $result = array(); foreach ($archiveNames as $name) { $result[] = self::getPluginForReport($name); } return array_unique($result); }
[ "private", "function", "getRequestedPlugins", "(", "$", "archiveNames", ")", "{", "$", "result", "=", "array", "(", ")", ";", "foreach", "(", "$", "archiveNames", "as", "$", "name", ")", "{", "$", "result", "[", "]", "=", "self", "::", "getPluginForRepor...
Returns the list of plugins that archive the given reports. @param array $archiveNames @return array
[ "Returns", "the", "list", "of", "plugins", "that", "archive", "the", "given", "reports", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Archive.php#L386-L395
train
Returns the list of plugins that were requested.
[ 30522, 2797, 3853, 2131, 2890, 15500, 2098, 24759, 15916, 7076, 1006, 1002, 8756, 18442, 2015, 1007, 1063, 30524, 8756, 18442, 2015, 2004, 1002, 2171, 1007, 1063, 1002, 2765, 1031, 1033, 1027, 2969, 1024, 1024, 2131, 24759, 15916, 2378, 292...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
overtrue/wechat
src/Kernel/Traits/Observable.php
Observable.push
public function push($handler, $condition = '*') { list($handler, $condition) = $this->resolveHandlerAndCondition($handler, $condition); if (!isset($this->handlers[$condition])) { $this->handlers[$condition] = []; } array_push($this->handlers[$condition], $handler); ...
php
public function push($handler, $condition = '*') { list($handler, $condition) = $this->resolveHandlerAndCondition($handler, $condition); if (!isset($this->handlers[$condition])) { $this->handlers[$condition] = []; } array_push($this->handlers[$condition], $handler); ...
[ "public", "function", "push", "(", "$", "handler", ",", "$", "condition", "=", "'*'", ")", "{", "list", "(", "$", "handler", ",", "$", "condition", ")", "=", "$", "this", "->", "resolveHandlerAndCondition", "(", "$", "handler", ",", "$", "condition", "...
@param \Closure|EventHandlerInterface|string $handler @param \Closure|EventHandlerInterface|string $condition @return \EasyWeChat\Kernel\Clauses\Clause @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException @throws \ReflectionException
[ "@param", "\\", "Closure|EventHandlerInterface|string", "$handler", "@param", "\\", "Closure|EventHandlerInterface|string", "$condition" ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Kernel/Traits/Observable.php#L47-L58
train
Pushes a new handler onto the stack
[ 30522, 2270, 3853, 5245, 1006, 1002, 28213, 1010, 1002, 4650, 1027, 1005, 1008, 1005, 1007, 1063, 2862, 1006, 1002, 28213, 1010, 1002, 4650, 1007, 1027, 1002, 2023, 1011, 1028, 10663, 11774, 3917, 5685, 8663, 20562, 1006, 1002, 28213, 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...
symfony/symfony
src/Symfony/Component/DependencyInjection/Loader/Configurator/DefaultsConfigurator.php
DefaultsConfigurator.tag
final public function tag(string $name, array $attributes = []) { if ('' === $name) { throw new InvalidArgumentException('The tag name in "_defaults" must be a non-empty string.'); } foreach ($attributes as $attribute => $value) { if (null !== $value && !is_scalar($v...
php
final public function tag(string $name, array $attributes = []) { if ('' === $name) { throw new InvalidArgumentException('The tag name in "_defaults" must be a non-empty string.'); } foreach ($attributes as $attribute => $value) { if (null !== $value && !is_scalar($v...
[ "final", "public", "function", "tag", "(", "string", "$", "name", ",", "array", "$", "attributes", "=", "[", "]", ")", "{", "if", "(", "''", "===", "$", "name", ")", "{", "throw", "new", "InvalidArgumentException", "(", "'The tag name in \"_defaults\" must b...
Adds a tag for this definition. @return $this @throws InvalidArgumentException when an invalid tag name or attribute is provided
[ "Adds", "a", "tag", "for", "this", "definition", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/Loader/Configurator/DefaultsConfigurator.php#L45-L60
train
Adds a tag to the definition
[ 30522, 2345, 2270, 3853, 6415, 1006, 5164, 1002, 2171, 1010, 9140, 1002, 12332, 1027, 1031, 1033, 1007, 1063, 2065, 1006, 1005, 1005, 1027, 1027, 1027, 1002, 2171, 1007, 1063, 5466, 2047, 19528, 2906, 22850, 15781, 2595, 24422, 1006, 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...
matomo-org/matomo
plugins/UsersManager/Model.php
Model.getUsersLogin
public function getUsersLogin() { $db = $this->getDb(); $users = $db->fetchAll("SELECT login FROM " . $this->table . " ORDER BY login ASC"); $return = array(); foreach ($users as $login) { $return[] = $login['login']; } return $return; }
php
public function getUsersLogin() { $db = $this->getDb(); $users = $db->fetchAll("SELECT login FROM " . $this->table . " ORDER BY login ASC"); $return = array(); foreach ($users as $login) { $return[] = $login['login']; } return $return; }
[ "public", "function", "getUsersLogin", "(", ")", "{", "$", "db", "=", "$", "this", "->", "getDb", "(", ")", ";", "$", "users", "=", "$", "db", "->", "fetchAll", "(", "\"SELECT login FROM \"", ".", "$", "this", "->", "table", ".", "\" ORDER BY login ASC\"...
Returns the list of all the users login @return array the list of all the users login
[ "Returns", "the", "list", "of", "all", "the", "users", "login" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/UsersManager/Model.php#L77-L88
train
Get Users Login
[ 30522, 2270, 3853, 2131, 20330, 14540, 8649, 2378, 1006, 1007, 1063, 1002, 16962, 1027, 1002, 2023, 1011, 1028, 2131, 18939, 1006, 1007, 1025, 1002, 5198, 1027, 1002, 16962, 1011, 1028, 18584, 8095, 1006, 1000, 7276, 8833, 2378, 2013, 1000,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Debug/ErrorHandler.php
ErrorHandler.cleanTrace
private function cleanTrace($backtrace, $type, $file, $line, $throw) { $lightTrace = $backtrace; for ($i = 0; isset($backtrace[$i]); ++$i) { if (isset($backtrace[$i]['file'], $backtrace[$i]['line']) && $backtrace[$i]['line'] === $line && $backtrace[$i]['file'] === $file) { ...
php
private function cleanTrace($backtrace, $type, $file, $line, $throw) { $lightTrace = $backtrace; for ($i = 0; isset($backtrace[$i]); ++$i) { if (isset($backtrace[$i]['file'], $backtrace[$i]['line']) && $backtrace[$i]['line'] === $line && $backtrace[$i]['file'] === $file) { ...
[ "private", "function", "cleanTrace", "(", "$", "backtrace", ",", "$", "type", ",", "$", "file", ",", "$", "line", ",", "$", "throw", ")", "{", "$", "lightTrace", "=", "$", "backtrace", ";", "for", "(", "$", "i", "=", "0", ";", "isset", "(", "$", ...
Cleans the trace by removing function arguments and the frames added by the error handler and DebugClassLoader.
[ "Cleans", "the", "trace", "by", "removing", "function", "arguments", "and", "the", "frames", "added", "by", "the", "error", "handler", "and", "DebugClassLoader", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Debug/ErrorHandler.php#L685-L709
train
Clean the stack trace
[ 30522, 2797, 3853, 4550, 6494, 3401, 1006, 1002, 2067, 6494, 3401, 1010, 1002, 2828, 1010, 1002, 5371, 1010, 1002, 2240, 1010, 1002, 5466, 1007, 1063, 1002, 2422, 6494, 3401, 1027, 1002, 2067, 6494, 3401, 1025, 2005, 1006, 1002, 1045, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php
ResolveInvalidReferencesPass.processValue
private function processValue($value, $rootLevel = 0, $level = 0) { if ($value instanceof ServiceClosureArgument) { $value->setValues($this->processValue($value->getValues(), 1, 1)); } elseif ($value instanceof ArgumentInterface) { $value->setValues($this->processValue($value...
php
private function processValue($value, $rootLevel = 0, $level = 0) { if ($value instanceof ServiceClosureArgument) { $value->setValues($this->processValue($value->getValues(), 1, 1)); } elseif ($value instanceof ArgumentInterface) { $value->setValues($this->processValue($value...
[ "private", "function", "processValue", "(", "$", "value", ",", "$", "rootLevel", "=", "0", ",", "$", "level", "=", "0", ")", "{", "if", "(", "$", "value", "instanceof", "ServiceClosureArgument", ")", "{", "$", "value", "->", "setValues", "(", "$", "thi...
Processes arguments to determine invalid references. @throws RuntimeException When an invalid reference is found
[ "Processes", "arguments", "to", "determine", "invalid", "references", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php#L56-L126
train
Process value.
[ 30522, 2797, 3853, 2832, 10175, 5657, 1006, 1002, 3643, 1010, 1002, 7117, 20414, 2884, 1027, 1014, 1010, 1002, 2504, 1027, 1014, 1007, 1063, 2065, 1006, 1002, 3643, 6013, 11253, 2326, 20464, 2891, 5397, 2906, 22850, 4765, 1007, 1063, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Security/Core/Authentication/Provider/LdapBindAuthenticationProvider.php
LdapBindAuthenticationProvider.retrieveUser
protected function retrieveUser($username, UsernamePasswordToken $token) { if (AuthenticationProviderInterface::USERNAME_NONE_PROVIDED === $username) { throw new UsernameNotFoundException('Username can not be null'); } return $this->userProvider->loadUserByUsername($username); ...
php
protected function retrieveUser($username, UsernamePasswordToken $token) { if (AuthenticationProviderInterface::USERNAME_NONE_PROVIDED === $username) { throw new UsernameNotFoundException('Username can not be null'); } return $this->userProvider->loadUserByUsername($username); ...
[ "protected", "function", "retrieveUser", "(", "$", "username", ",", "UsernamePasswordToken", "$", "token", ")", "{", "if", "(", "AuthenticationProviderInterface", "::", "USERNAME_NONE_PROVIDED", "===", "$", "username", ")", "{", "throw", "new", "UsernameNotFoundExcept...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Security/Core/Authentication/Provider/LdapBindAuthenticationProvider.php#L60-L67
train
Retrieve user from the user provider
[ 30522, 5123, 3853, 12850, 20330, 1006, 1002, 5310, 18442, 1010, 5310, 18442, 15194, 18351, 18715, 2368, 1002, 19204, 1007, 1063, 2065, 1006, 27280, 21572, 17258, 23282, 3334, 12172, 1024, 1024, 5310, 18442, 1035, 3904, 1035, 3024, 1027, 1027,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Grid/Filter/Presenter/Select.php
Select.load
public function load($target, $resourceUrl, $idField = 'id', $textField = 'text') : self { $column = $this->filter->getColumn(); $script = <<<EOT $(document).off('change', ".{$this->getClass($column)}"); $(document).on('change', ".{$this->getClass($column)}", function () { var target = $(this)....
php
public function load($target, $resourceUrl, $idField = 'id', $textField = 'text') : self { $column = $this->filter->getColumn(); $script = <<<EOT $(document).off('change', ".{$this->getClass($column)}"); $(document).on('change', ".{$this->getClass($column)}", function () { var target = $(this)....
[ "public", "function", "load", "(", "$", "target", ",", "$", "resourceUrl", ",", "$", "idField", "=", "'id'", ",", "$", "textField", "=", "'text'", ")", ":", "self", "{", "$", "column", "=", "$", "this", "->", "filter", "->", "getColumn", "(", ")", ...
Load options for other select when change. @param string $target @param string $resourceUrl @param string $idField @param string $textField @return $this
[ "Load", "options", "for", "other", "select", "when", "change", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Grid/Filter/Presenter/Select.php#L271-L296
train
Load options from a resource
[ 30522, 2270, 3853, 7170, 1006, 1002, 4539, 1010, 1002, 7692, 3126, 2140, 1010, 1002, 24011, 12891, 1027, 1005, 8909, 1005, 1010, 1002, 3793, 30524, 2125, 1006, 1005, 2689, 1005, 1010, 1000, 1012, 1063, 1002, 2023, 1011, 1028, 2131, 26266, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
php-ai/php-ml
src/Math/Matrix.php
Matrix.getIdentity
private function getIdentity(): self { $array = array_fill(0, $this->rows, array_fill(0, $this->columns, 0)); for ($i = 0; $i < $this->rows; ++$i) { $array[$i][$i] = 1; } return new self($array, false); }
php
private function getIdentity(): self { $array = array_fill(0, $this->rows, array_fill(0, $this->columns, 0)); for ($i = 0; $i < $this->rows; ++$i) { $array[$i][$i] = 1; } return new self($array, false); }
[ "private", "function", "getIdentity", "(", ")", ":", "self", "{", "$", "array", "=", "array_fill", "(", "0", ",", "$", "this", "->", "rows", ",", "array_fill", "(", "0", ",", "$", "this", "->", "columns", ",", "0", ")", ")", ";", "for", "(", "$",...
Returns diagonal identity matrix of the same size of this matrix
[ "Returns", "diagonal", "identity", "matrix", "of", "the", "same", "size", "of", "this", "matrix" ]
f6aa1a59b0525b8fca3d2786d661ab3e70904016
https://github.com/php-ai/php-ml/blob/f6aa1a59b0525b8fca3d2786d661ab3e70904016/src/Math/Matrix.php#L318-L326
train
Get identity of the table
[ 30522, 2797, 3853, 2131, 5178, 16778, 3723, 1006, 1007, 1024, 2969, 1063, 1002, 9140, 1027, 9140, 30524, 2023, 1011, 1028, 7753, 1010, 1014, 1007, 1007, 1025, 2005, 1006, 1002, 1045, 1027, 1014, 1025, 1002, 1045, 1026, 1002, 2023, 1011, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php
XmlFileLoader.parseDefinitions
private function parseDefinitions(\DOMDocument $xml, $file, $defaults) { $xpath = new \DOMXPath($xml); $xpath->registerNamespace('container', self::NS); if (false === $services = $xpath->query('//container:services/container:service|//container:services/container:prototype')) { ...
php
private function parseDefinitions(\DOMDocument $xml, $file, $defaults) { $xpath = new \DOMXPath($xml); $xpath->registerNamespace('container', self::NS); if (false === $services = $xpath->query('//container:services/container:service|//container:services/container:prototype')) { ...
[ "private", "function", "parseDefinitions", "(", "\\", "DOMDocument", "$", "xml", ",", "$", "file", ",", "$", "defaults", ")", "{", "$", "xpath", "=", "new", "\\", "DOMXPath", "(", "$", "xml", ")", ";", "$", "xpath", "->", "registerNamespace", "(", "'co...
Parses multiple definitions. @param \DOMDocument $xml @param string $file
[ "Parses", "multiple", "definitions", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php#L129-L163
train
Parse definitions from XML document
[ 30522, 2797, 3853, 11968, 6924, 12879, 5498, 9285, 1006, 1032, 14383, 3527, 24894, 4765, 1002, 20950, 1010, 1002, 5371, 1010, 1002, 12398, 2015, 1007, 1063, 1002, 26726, 8988, 1027, 2047, 1032, 14383, 2595, 15069, 1006, 1002, 20950, 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/Validation/Concerns/ValidatesAttributes.php
ValidatesAttributes.shouldBeNumeric
protected function shouldBeNumeric($attribute, $rule) { if (is_numeric($this->getValue($attribute))) { $this->numericRules[] = $rule; } }
php
protected function shouldBeNumeric($attribute, $rule) { if (is_numeric($this->getValue($attribute))) { $this->numericRules[] = $rule; } }
[ "protected", "function", "shouldBeNumeric", "(", "$", "attribute", ",", "$", "rule", ")", "{", "if", "(", "is_numeric", "(", "$", "this", "->", "getValue", "(", "$", "attribute", ")", ")", ")", "{", "$", "this", "->", "numericRules", "[", "]", "=", "...
Adds the existing rule to the numericRules array if the attribute's value is numeric. @param string $attribute @param string $rule @return void
[ "Adds", "the", "existing", "rule", "to", "the", "numericRules", "array", "if", "the", "attribute", "s", "value", "is", "numeric", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L1751-L1756
train
Check if the value of the attribute is numeric
[ 30522, 5123, 3853, 2323, 10609, 17897, 7277, 1006, 1002, 17961, 1010, 1002, 3627, 1007, 1063, 2065, 1006, 2003, 1035, 16371, 25531, 1006, 1002, 2023, 1011, 1028, 2131, 10175, 5657, 1006, 1002, 17961, 1007, 1007, 1007, 1063, 1002, 2023, 1011...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Routing/RouteCollection.php
RouteCollection.addPrefix
public function addPrefix($prefix, array $defaults = [], array $requirements = []) { $prefix = trim(trim($prefix), '/'); if ('' === $prefix) { return; } foreach ($this->routes as $route) { $route->setPath('/'.$prefix.$route->getPath()); $route->a...
php
public function addPrefix($prefix, array $defaults = [], array $requirements = []) { $prefix = trim(trim($prefix), '/'); if ('' === $prefix) { return; } foreach ($this->routes as $route) { $route->setPath('/'.$prefix.$route->getPath()); $route->a...
[ "public", "function", "addPrefix", "(", "$", "prefix", ",", "array", "$", "defaults", "=", "[", "]", ",", "array", "$", "requirements", "=", "[", "]", ")", "{", "$", "prefix", "=", "trim", "(", "trim", "(", "$", "prefix", ")", ",", "'/'", ")", ";...
Adds a prefix to the path of all child routes. @param string $prefix An optional prefix to add before each pattern of the route collection @param array $defaults An array of default values @param array $requirements An array of requirements
[ "Adds", "a", "prefix", "to", "the", "path", "of", "all", "child", "routes", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Routing/RouteCollection.php#L141-L154
train
Add prefix to routes
[ 30522, 2270, 3853, 5587, 28139, 8873, 2595, 1006, 1002, 17576, 1010, 9140, 1002, 12398, 2015, 1027, 1031, 1033, 1010, 9140, 1002, 5918, 1027, 1031, 1033, 1007, 1063, 1002, 17576, 1027, 12241, 1006, 12241, 1006, 1002, 17576, 1007, 1010, 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/Auth/Database/Permission.php
Permission.matchRequest
protected function matchRequest(array $match, Request $request) : bool { if (!$request->is(trim($match['path'], '/'))) { return false; } $method = collect($match['method'])->filter()->map(function ($method) { return strtoupper($method); }); return $m...
php
protected function matchRequest(array $match, Request $request) : bool { if (!$request->is(trim($match['path'], '/'))) { return false; } $method = collect($match['method'])->filter()->map(function ($method) { return strtoupper($method); }); return $m...
[ "protected", "function", "matchRequest", "(", "array", "$", "match", ",", "Request", "$", "request", ")", ":", "bool", "{", "if", "(", "!", "$", "request", "->", "is", "(", "trim", "(", "$", "match", "[", "'path'", "]", ",", "'/'", ")", ")", ")", ...
If a request match the specific HTTP method and path. @param array $match @param Request $request @return bool
[ "If", "a", "request", "match", "the", "specific", "HTTP", "method", "and", "path", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Auth/Database/Permission.php#L109-L120
train
Matches a request against a route match.
[ 30522, 5123, 3853, 2674, 2890, 15500, 1006, 9140, 1002, 2674, 1010, 5227, 1002, 5227, 1007, 1024, 22017, 2140, 1063, 2065, 1006, 999, 1002, 5227, 1011, 1028, 2003, 1006, 12241, 1006, 1002, 2674, 1031, 1005, 4130, 1005, 1033, 1010, 1005, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Eloquent/SoftDeletingScope.php
SoftDeletingScope.addWithoutTrashed
protected function addWithoutTrashed(Builder $builder) { $builder->macro('withoutTrashed', function (Builder $builder) { $model = $builder->getModel(); $builder->withoutGlobalScope($this)->whereNull( $model->getQualifiedDeletedAtColumn() ); r...
php
protected function addWithoutTrashed(Builder $builder) { $builder->macro('withoutTrashed', function (Builder $builder) { $model = $builder->getModel(); $builder->withoutGlobalScope($this)->whereNull( $model->getQualifiedDeletedAtColumn() ); r...
[ "protected", "function", "addWithoutTrashed", "(", "Builder", "$", "builder", ")", "{", "$", "builder", "->", "macro", "(", "'withoutTrashed'", ",", "function", "(", "Builder", "$", "builder", ")", "{", "$", "model", "=", "$", "builder", "->", "getModel", ...
Add the without-trashed extension to the builder. @param \Illuminate\Database\Eloquent\Builder $builder @return void
[ "Add", "the", "without", "-", "trashed", "extension", "to", "the", "builder", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/SoftDeletingScope.php#L100-L111
train
Add withoutTrashed macro to tree builder
[ 30522, 5123, 3853, 5587, 24415, 5833, 6494, 14740, 1006, 12508, 1002, 12508, 1007, 1063, 1002, 12508, 1011, 1028, 26632, 1006, 1005, 2302, 6494, 14740, 1005, 1010, 3853, 1006, 12508, 1002, 12508, 1007, 1063, 1002, 2944, 1027, 1002, 12508, 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/Form/FormFactory.php
FormFactory.create
public function create($type = 'Symfony\Component\Form\Extension\Core\Type\FormType', $data = null, array $options = []) { return $this->createBuilder($type, $data, $options)->getForm(); }
php
public function create($type = 'Symfony\Component\Form\Extension\Core\Type\FormType', $data = null, array $options = []) { return $this->createBuilder($type, $data, $options)->getForm(); }
[ "public", "function", "create", "(", "$", "type", "=", "'Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType'", ",", "$", "data", "=", "null", ",", "array", "$", "options", "=", "[", "]", ")", "{", "return", "$", "this", "->", "createBuilder", "(", "$", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/FormFactory.php#L28-L31
train
Create form from builder
[ 30522, 2270, 3853, 3443, 1006, 1002, 2828, 1027, 1005, 25353, 2213, 14876, 4890, 1032, 6922, 1032, 2433, 1032, 5331, 1032, 4563, 1032, 2828, 1032, 2433, 13874, 1005, 1010, 1002, 2951, 1027, 19701, 1010, 9140, 1002, 7047, 1027, 1031, 1033, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Workflow/Registry.php
Registry.all
public function all($subject): array { $matched = []; foreach ($this->workflows as list($workflow, $supportStrategy)) { if ($supportStrategy->supports($workflow, $subject)) { $matched[] = $workflow; } } return $matched; }
php
public function all($subject): array { $matched = []; foreach ($this->workflows as list($workflow, $supportStrategy)) { if ($supportStrategy->supports($workflow, $subject)) { $matched[] = $workflow; } } return $matched; }
[ "public", "function", "all", "(", "$", "subject", ")", ":", "array", "{", "$", "matched", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "workflows", "as", "list", "(", "$", "workflow", ",", "$", "supportStrategy", ")", ")", "{", "if", "(",...
@param object $subject @return Workflow[]
[ "@param", "object", "$subject" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Workflow/Registry.php#L74-L84
train
Returns all workflows that support the subject
[ 30522, 2270, 3853, 2035, 1006, 1002, 3395, 1007, 1024, 9140, 1063, 1002, 10349, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 2147, 12314, 2015, 2004, 2862, 1006, 1002, 2147, 12314, 1010, 1002, 6753, 6494, 2618, 6292, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpKernel/HttpCache/Store.php
Store.invalidate
public function invalidate(Request $request) { $modified = false; $key = $this->getCacheKey($request); $entries = []; foreach ($this->getMetadata($key) as $entry) { $response = $this->restoreResponse($entry[1]); if ($response->isFresh()) { $re...
php
public function invalidate(Request $request) { $modified = false; $key = $this->getCacheKey($request); $entries = []; foreach ($this->getMetadata($key) as $entry) { $response = $this->restoreResponse($entry[1]); if ($response->isFresh()) { $re...
[ "public", "function", "invalidate", "(", "Request", "$", "request", ")", "{", "$", "modified", "=", "false", ";", "$", "key", "=", "$", "this", "->", "getCacheKey", "(", "$", "request", ")", ";", "$", "entries", "=", "[", "]", ";", "foreach", "(", ...
Invalidates all cache entries that match the request. @throws \RuntimeException
[ "Invalidates", "all", "cache", "entries", "that", "match", "the", "request", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpKernel/HttpCache/Store.php#L232-L252
train
Invalidate all response cache entries for a request
[ 30522, 2270, 3853, 19528, 3686, 1006, 5227, 1002, 5227, 1007, 1063, 1002, 6310, 1027, 6270, 1025, 1002, 3145, 1027, 1002, 2023, 1011, 1028, 2131, 3540, 5403, 14839, 1006, 1002, 5227, 1007, 1025, 1002, 10445, 1027, 1031, 1033, 1025, 18921, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpKernel/HttpCache/Store.php
Store.unlock
public function unlock(Request $request) { $key = $this->getCacheKey($request); if (isset($this->locks[$key])) { flock($this->locks[$key], LOCK_UN); fclose($this->locks[$key]); unset($this->locks[$key]); return true; } return false; ...
php
public function unlock(Request $request) { $key = $this->getCacheKey($request); if (isset($this->locks[$key])) { flock($this->locks[$key], LOCK_UN); fclose($this->locks[$key]); unset($this->locks[$key]); return true; } return false; ...
[ "public", "function", "unlock", "(", "Request", "$", "request", ")", "{", "$", "key", "=", "$", "this", "->", "getCacheKey", "(", "$", "request", ")", ";", "if", "(", "isset", "(", "$", "this", "->", "locks", "[", "$", "key", "]", ")", ")", "{", ...
Releases the lock for the given Request. @return bool False if the lock file does not exist or cannot be unlocked, true otherwise
[ "Releases", "the", "lock", "for", "the", "given", "Request", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpKernel/HttpCache/Store.php#L90-L103
train
Unlocks a request
[ 30522, 2270, 3853, 19829, 1006, 5227, 1002, 5227, 1007, 1063, 1002, 3145, 1027, 1002, 2023, 1011, 1028, 2131, 3540, 5403, 14839, 1006, 1002, 5227, 1007, 1025, 2065, 1006, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 11223, 1031, 1002, 3145, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/BroadcastManager.php
BroadcastManager.routes
public function routes(array $attributes = null) { if ($this->app->routesAreCached()) { return; } $attributes = $attributes ?: ['middleware' => ['web']]; $this->app['router']->group($attributes, function ($router) { $router->match( ['get', 'p...
php
public function routes(array $attributes = null) { if ($this->app->routesAreCached()) { return; } $attributes = $attributes ?: ['middleware' => ['web']]; $this->app['router']->group($attributes, function ($router) { $router->match( ['get', 'p...
[ "public", "function", "routes", "(", "array", "$", "attributes", "=", "null", ")", "{", "if", "(", "$", "this", "->", "app", "->", "routesAreCached", "(", ")", ")", "{", "return", ";", "}", "$", "attributes", "=", "$", "attributes", "?", ":", "[", ...
Register the routes for handling broadcast authentication and sockets. @param array|null $attributes @return void
[ "Register", "the", "routes", "for", "handling", "broadcast", "authentication", "and", "sockets", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Broadcasting/BroadcastManager.php#L59-L73
train
Adds routes to the application
[ 30522, 2270, 3853, 5847, 1006, 9140, 1002, 12332, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 10439, 1011, 1028, 5847, 12069, 3540, 7690, 1006, 1007, 1007, 1063, 2709, 1025, 1065, 1002, 12332, 1027, 1002, 12332, 1029, 1024,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Auth/SessionGuard.php
SessionGuard.id
public function id() { if ($this->loggedOut) { return; } return $this->user() ? $this->user()->getAuthIdentifier() : $this->session->get($this->getName()); }
php
public function id() { if ($this->loggedOut) { return; } return $this->user() ? $this->user()->getAuthIdentifier() : $this->session->get($this->getName()); }
[ "public", "function", "id", "(", ")", "{", "if", "(", "$", "this", "->", "loggedOut", ")", "{", "return", ";", "}", "return", "$", "this", "->", "user", "(", ")", "?", "$", "this", "->", "user", "(", ")", "->", "getAuthIdentifier", "(", ")", ":",...
Get the ID for the currently authenticated user. @return int|null
[ "Get", "the", "ID", "for", "the", "currently", "authenticated", "user", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/SessionGuard.php#L196-L205
train
Get the user s auth identifier
[ 30522, 2270, 3853, 8909, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 26618, 5833, 1007, 1063, 2709, 1025, 1065, 2709, 1002, 2023, 1011, 1028, 5310, 1006, 1007, 1029, 1002, 2023, 1011, 1028, 5310, 1006, 1007, 1011, 1028, 2131, 48...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/DataTable.php
DataTable.deleteRow
public function deleteRow($id) { if ($id === self::ID_SUMMARY_ROW) { $this->summaryRow = null; return; } if (!isset($this->rows[$id])) { throw new Exception("Trying to delete unknown row with idkey = $id"); } unset($this->rows[$id]); }
php
public function deleteRow($id) { if ($id === self::ID_SUMMARY_ROW) { $this->summaryRow = null; return; } if (!isset($this->rows[$id])) { throw new Exception("Trying to delete unknown row with idkey = $id"); } unset($this->rows[$id]); }
[ "public", "function", "deleteRow", "(", "$", "id", ")", "{", "if", "(", "$", "id", "===", "self", "::", "ID_SUMMARY_ROW", ")", "{", "$", "this", "->", "summaryRow", "=", "null", ";", "return", ";", "}", "if", "(", "!", "isset", "(", "$", "this", ...
Deletes a row by ID. @param int $id The row ID. @throws Exception If the row `$id` cannot be found.
[ "Deletes", "a", "row", "by", "ID", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataTable.php#L1139-L1149
train
Delete a row
[ 30522, 2270, 3853, 3972, 15141, 5004, 1006, 1002, 8909, 1007, 1063, 2065, 1006, 1002, 8909, 1027, 1027, 1027, 2969, 1024, 1024, 8909, 1035, 12654, 1035, 5216, 1007, 1063, 1002, 2023, 1011, 1028, 12654, 10524, 1027, 19701, 1025, 2709, 1025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Debugger.php
Debugger.stopTimer
public function stopTimer($name) { if (\in_array($name, $this->timers, true) && (strpos($name, '_') === 0 || $this->enabled())) { $this->debugbar['time']->stopMeasure($name); } return $this; }
php
public function stopTimer($name) { if (\in_array($name, $this->timers, true) && (strpos($name, '_') === 0 || $this->enabled())) { $this->debugbar['time']->stopMeasure($name); } return $this; }
[ "public", "function", "stopTimer", "(", "$", "name", ")", "{", "if", "(", "\\", "in_array", "(", "$", "name", ",", "$", "this", "->", "timers", ",", "true", ")", "&&", "(", "strpos", "(", "$", "name", ",", "'_'", ")", "===", "0", "||", "$", "th...
Stop the named timer @param string $name @return $this
[ "Stop", "the", "named", "timer" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Debugger.php#L292-L299
train
Stop a timer
[ 30522, 2270, 3853, 2644, 7292, 2099, 1006, 1002, 2171, 1007, 1063, 2065, 1006, 1032, 1999, 1035, 9140, 1006, 1002, 2171, 1010, 1002, 2023, 1011, 1028, 25309, 2015, 1010, 2995, 1007, 1004, 1004, 1006, 2358, 14536, 2891, 1006, 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...
symfony/symfony
src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php
PhpArrayAdapter.get
public function get(string $key, callable $callback, float $beta = null, array &$metadata = null) { if (null === $this->values) { $this->initialize(); } if (!isset($this->keys[$key])) { get_from_pool: if ($this->pool instanceof CacheInterface) { ...
php
public function get(string $key, callable $callback, float $beta = null, array &$metadata = null) { if (null === $this->values) { $this->initialize(); } if (!isset($this->keys[$key])) { get_from_pool: if ($this->pool instanceof CacheInterface) { ...
[ "public", "function", "get", "(", "string", "$", "key", ",", "callable", "$", "callback", ",", "float", "$", "beta", "=", "null", ",", "array", "&", "$", "metadata", "=", "null", ")", "{", "if", "(", "null", "===", "$", "this", "->", "values", ")",...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php#L85-L113
train
Get value from cache
[ 30522, 2270, 3853, 2131, 1006, 5164, 1002, 3145, 1010, 2655, 3085, 1002, 2655, 5963, 1010, 14257, 1002, 8247, 1027, 19701, 1010, 9140, 1004, 1002, 27425, 1027, 19701, 30524, 1033, 1007, 1007, 1063, 2131, 1035, 2013, 1035, 4770, 1024, 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...
laravel/framework
src/Illuminate/Mail/Mailable.php
Mailable.addressesToArray
protected function addressesToArray($address, $name) { if (! is_array($address) && ! $address instanceof Collection) { $address = is_string($name) ? [['name' => $name, 'email' => $address]] : [$address]; } return $address; }
php
protected function addressesToArray($address, $name) { if (! is_array($address) && ! $address instanceof Collection) { $address = is_string($name) ? [['name' => $name, 'email' => $address]] : [$address]; } return $address; }
[ "protected", "function", "addressesToArray", "(", "$", "address", ",", "$", "name", ")", "{", "if", "(", "!", "is_array", "(", "$", "address", ")", "&&", "!", "$", "address", "instanceof", "Collection", ")", "{", "$", "address", "=", "is_string", "(", ...
Convert the given recipient arguments to an array. @param object|array|string $address @param string|null $name @return array
[ "Convert", "the", "given", "recipient", "arguments", "to", "an", "array", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Mail/Mailable.php#L598-L605
train
Get addresses to array
[ 30522, 5123, 3853, 11596, 3406, 2906, 9447, 1006, 1002, 4769, 1010, 1002, 2171, 1007, 1063, 2065, 1006, 999, 2003, 1035, 9140, 1006, 1002, 4769, 1007, 1004, 1004, 999, 1002, 4769, 6013, 11253, 3074, 1007, 1063, 1002, 4769, 1027, 2003, 103...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Validator/Mapping/Loader/XmlFileLoader.php
XmlFileLoader.parseConstraints
protected function parseConstraints(\SimpleXMLElement $nodes) { $constraints = []; foreach ($nodes as $node) { if (\count($node) > 0) { if (\count($node->value) > 0) { $options = $this->parseValues($node->value); } elseif (\count($node...
php
protected function parseConstraints(\SimpleXMLElement $nodes) { $constraints = []; foreach ($nodes as $node) { if (\count($node) > 0) { if (\count($node->value) > 0) { $options = $this->parseValues($node->value); } elseif (\count($node...
[ "protected", "function", "parseConstraints", "(", "\\", "SimpleXMLElement", "$", "nodes", ")", "{", "$", "constraints", "=", "[", "]", ";", "foreach", "(", "$", "nodes", "as", "$", "node", ")", "{", "if", "(", "\\", "count", "(", "$", "node", ")", ">...
Parses a collection of "constraint" XML nodes. @param \SimpleXMLElement $nodes The XML nodes @return array The Constraint instances
[ "Parses", "a", "collection", "of", "constraint", "XML", "nodes", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Validator/Mapping/Loader/XmlFileLoader.php#L73-L98
train
Parse constraints from XML nodes
[ 30522, 5123, 3853, 11968, 3366, 8663, 20528, 18447, 2015, 1006, 1032, 3722, 2595, 19968, 12260, 3672, 1002, 14164, 1007, 1063, 1002, 14679, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1002, 14164, 2004, 1002, 13045, 1007, 1063, 2065, 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...
octobercms/october
modules/system/classes/MediaLibrary.php
MediaLibrary.getFolderItemCount
protected function getFolderItemCount($path) { $folderItems = array_merge( $this->getStorageDisk()->files($path), $this->getStorageDisk()->directories($path) ); $size = 0; foreach ($folderItems as $folderItem) { if ($this->isVisible($folderItem)) ...
php
protected function getFolderItemCount($path) { $folderItems = array_merge( $this->getStorageDisk()->files($path), $this->getStorageDisk()->directories($path) ); $size = 0; foreach ($folderItems as $folderItem) { if ($this->isVisible($folderItem)) ...
[ "protected", "function", "getFolderItemCount", "(", "$", "path", ")", "{", "$", "folderItems", "=", "array_merge", "(", "$", "this", "->", "getStorageDisk", "(", ")", "->", "files", "(", "$", "path", ")", ",", "$", "this", "->", "getStorageDisk", "(", ")...
Returns a number of items on a folder. @param string $path Specifies the folder path relative to the storage disk root. @return integer Returns the number of items in the folder.
[ "Returns", "a", "number", "of", "items", "on", "a", "folder", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/classes/MediaLibrary.php#L633-L648
train
Get Folder Items Count
[ 30522, 5123, 3853, 2131, 10371, 11124, 18532, 3597, 16671, 1006, 1002, 4130, 1007, 1063, 1002, 19622, 4221, 5244, 1027, 9140, 1035, 13590, 1006, 1002, 2023, 1011, 1028, 4152, 4263, 18655, 20573, 1006, 1007, 1011, 1028, 6764, 1006, 1002, 413...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
slimphp/Slim
Slim/CallableResolverAwareTrait.php
CallableResolverAwareTrait.resolveCallable
protected function resolveCallable($callable) { if (!$this->container instanceof ContainerInterface) { return $callable; } /** @var CallableResolverInterface $resolver */ $resolver = $this->container->get('callableResolver'); return $resolver->resolve($callable)...
php
protected function resolveCallable($callable) { if (!$this->container instanceof ContainerInterface) { return $callable; } /** @var CallableResolverInterface $resolver */ $resolver = $this->container->get('callableResolver'); return $resolver->resolve($callable)...
[ "protected", "function", "resolveCallable", "(", "$", "callable", ")", "{", "if", "(", "!", "$", "this", "->", "container", "instanceof", "ContainerInterface", ")", "{", "return", "$", "callable", ";", "}", "/** @var CallableResolverInterface $resolver */", "$", "...
Resolve a string of the format 'class:method' into a closure that the router can dispatch. @param callable|string $callable @return Closure @throws RuntimeException If the string cannot be resolved as a callable
[ "Resolve", "a", "string", "of", "the", "format", "class", ":", "method", "into", "a", "closure", "that", "the", "router", "can", "dispatch", "." ]
ccef5f7d8bcd469d59cbe64f6210d83764f91543
https://github.com/slimphp/Slim/blob/ccef5f7d8bcd469d59cbe64f6210d83764f91543/Slim/CallableResolverAwareTrait.php#L32-L42
train
Resolve callable.
[ 30522, 5123, 3853, 10663, 9289, 20470, 2571, 1006, 1002, 2655, 3085, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 11661, 6013, 11253, 11661, 18447, 2121, 12172, 1007, 1063, 2709, 1002, 2655, 3085, 1025, 1065, 1013, 1008, 1008, 1030,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Db/Statement/Oracle.php
Zend_Db_Statement_Oracle.rowCount
public function rowCount() { if (!$this->_stmt) { return false; } $num_rows = oci_num_rows($this->_stmt); if ($num_rows === false) { /** * @see Zend_Db_Adapter_Oracle_Exception */ // require_once 'Zend/Db/Statement/Oracl...
php
public function rowCount() { if (!$this->_stmt) { return false; } $num_rows = oci_num_rows($this->_stmt); if ($num_rows === false) { /** * @see Zend_Db_Adapter_Oracle_Exception */ // require_once 'Zend/Db/Statement/Oracl...
[ "public", "function", "rowCount", "(", ")", "{", "if", "(", "!", "$", "this", "->", "_stmt", ")", "{", "return", "false", ";", "}", "$", "num_rows", "=", "oci_num_rows", "(", "$", "this", "->", "_stmt", ")", ";", "if", "(", "$", "num_rows", "===", ...
Returns the number of rows affected by the execution of the last INSERT, DELETE, or UPDATE statement executed by this statement object. @return int The number of rows affected. @throws Zend_Db_Statement_Exception
[ "Returns", "the", "number", "of", "rows", "affected", "by", "the", "execution", "of", "the", "last", "INSERT", "DELETE", "or", "UPDATE", "statement", "executed", "by", "this", "statement", "object", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Statement/Oracle.php#L558-L575
train
Return the number of rows in the result set
[ 30522, 2270, 3853, 5216, 3597, 16671, 1006, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 1035, 2358, 20492, 1007, 1063, 2709, 6270, 1025, 1065, 1002, 16371, 2213, 1035, 10281, 1027, 1051, 6895, 1035, 16371, 2213, 1035, 10281, 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...
z-song/laravel-admin
src/Grid/Column.php
Column.displayUsing
public function displayUsing($abstract, $arguments = []) { $grid = $this->grid; $column = $this; return $this->display(function ($value) use ($grid, $column, $abstract, $arguments) { /** @var AbstractDisplayer $displayer */ $displayer = new $abstract($value, $grid, ...
php
public function displayUsing($abstract, $arguments = []) { $grid = $this->grid; $column = $this; return $this->display(function ($value) use ($grid, $column, $abstract, $arguments) { /** @var AbstractDisplayer $displayer */ $displayer = new $abstract($value, $grid, ...
[ "public", "function", "displayUsing", "(", "$", "abstract", ",", "$", "arguments", "=", "[", "]", ")", "{", "$", "grid", "=", "$", "this", "->", "grid", ";", "$", "column", "=", "$", "this", ";", "return", "$", "this", "->", "display", "(", "functi...
Display using display abstract. @param string $abstract @param array $arguments @return Column
[ "Display", "using", "display", "abstract", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Grid/Column.php#L345-L357
train
Display using abstract
[ 30522, 2270, 3853, 4653, 18161, 1006, 1002, 10061, 1010, 1002, 9918, 1027, 1031, 1033, 1007, 1063, 1002, 8370, 1027, 1002, 2023, 1011, 1028, 8370, 1025, 1002, 5930, 1027, 1002, 2023, 1025, 2709, 1002, 2023, 1011, 1028, 4653, 1006, 3853, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php
ProfilerController.getTemplateManager
protected function getTemplateManager() { if (null === $this->templateManager) { $this->templateManager = new TemplateManager($this->profiler, $this->twig, $this->templates); } return $this->templateManager; }
php
protected function getTemplateManager() { if (null === $this->templateManager) { $this->templateManager = new TemplateManager($this->profiler, $this->twig, $this->templates); } return $this->templateManager; }
[ "protected", "function", "getTemplateManager", "(", ")", "{", "if", "(", "null", "===", "$", "this", "->", "templateManager", ")", "{", "$", "this", "->", "templateManager", "=", "new", "TemplateManager", "(", "$", "this", "->", "profiler", ",", "$", "this...
Gets the Template Manager. @return TemplateManager The Template Manager
[ "Gets", "the", "Template", "Manager", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php#L365-L372
train
Get the template manager
[ 30522, 5123, 3853, 2131, 18532, 15725, 24805, 4590, 1006, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 1027, 1002, 2023, 1011, 1028, 23561, 24805, 4590, 1007, 1063, 1002, 2023, 1011, 1028, 23561, 24805, 4590, 1027, 2047, 23561, 24805, 4590, 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/Debugger.php
Debugger.getData
public function getData() { if (!$this->enabled()) { return null; } $this->addDeprecations(); $this->timers = []; return $this->debugbar->getData(); }
php
public function getData() { if (!$this->enabled()) { return null; } $this->addDeprecations(); $this->timers = []; return $this->debugbar->getData(); }
[ "public", "function", "getData", "(", ")", "{", "if", "(", "!", "$", "this", "->", "enabled", "(", ")", ")", "{", "return", "null", ";", "}", "$", "this", "->", "addDeprecations", "(", ")", ";", "$", "this", "->", "timers", "=", "[", "]", ";", ...
Returns collected debugger data. @return array
[ "Returns", "collected", "debugger", "data", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Debugger.php#L255-L265
train
Get the data of the debugbar
[ 30522, 2270, 3853, 2131, 2850, 2696, 1006, 1007, 1063, 2065, 1006, 999, 30524, 2709, 19701, 1025, 1065, 1002, 2023, 1011, 1028, 5587, 3207, 28139, 10719, 2015, 1006, 1007, 1025, 1002, 2023, 1011, 1028, 25309, 2015, 1027, 1031, 1033, 1025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Twig/TwigExtension.php
TwigExtension.translateLanguage
public function translateLanguage($args, array $languages = null, $array_support = false, $html_out = false) { /** @var Language $language */ $language = $this->grav['language']; return $language->translate($args, $languages, $array_support, $html_out); }
php
public function translateLanguage($args, array $languages = null, $array_support = false, $html_out = false) { /** @var Language $language */ $language = $this->grav['language']; return $language->translate($args, $languages, $array_support, $html_out); }
[ "public", "function", "translateLanguage", "(", "$", "args", ",", "array", "$", "languages", "=", "null", ",", "$", "array_support", "=", "false", ",", "$", "html_out", "=", "false", ")", "{", "/** @var Language $language */", "$", "language", "=", "$", "thi...
Translate Strings @param string|array $args @param array|null $languages @param bool $array_support @param bool $html_out @return string
[ "Translate", "Strings" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Twig/TwigExtension.php#L772-L778
train
Translates the language
[ 30522, 2270, 3853, 17637, 25023, 6692, 3351, 1006, 1002, 12098, 5620, 1010, 9140, 1002, 4155, 1027, 19701, 1010, 1002, 9140, 1035, 2490, 1027, 6270, 1010, 1002, 16129, 1035, 2041, 1027, 6270, 1007, 1063, 1013, 1008, 1008, 1030, 13075, 2653,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php
XmlDescriptor.describeContainerTags
protected function describeContainerTags(ContainerBuilder $builder, array $options = []) { $this->writeDocument($this->getContainerTagsDocument($builder, isset($options['show_hidden']) && $options['show_hidden'])); }
php
protected function describeContainerTags(ContainerBuilder $builder, array $options = []) { $this->writeDocument($this->getContainerTagsDocument($builder, isset($options['show_hidden']) && $options['show_hidden'])); }
[ "protected", "function", "describeContainerTags", "(", "ContainerBuilder", "$", "builder", ",", "array", "$", "options", "=", "[", "]", ")", "{", "$", "this", "->", "writeDocument", "(", "$", "this", "->", "getContainerTagsDocument", "(", "$", "builder", ",", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php#L61-L64
train
Describes the container tags for the given builder.
[ 30522, 5123, 3853, 6235, 8663, 18249, 8743, 26454, 1006, 11661, 8569, 23891, 2099, 1002, 12508, 1010, 9140, 1002, 7047, 1027, 1031, 1033, 1007, 1063, 1002, 2023, 1011, 1028, 4339, 3527, 24894, 4765, 1006, 1002, 2023, 1011, 1028, 2131, 8663,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Foundation/Console/AppNameCommand.php
AppNameCommand.setAppConfigNamespaces
protected function setAppConfigNamespaces() { $search = [ $this->currentRoot.'\\Providers', $this->currentRoot.'\\Http\\Controllers\\', ]; $replace = [ $this->argument('name').'\\Providers', $this->argument('name').'\\Http\\Controllers\\', ...
php
protected function setAppConfigNamespaces() { $search = [ $this->currentRoot.'\\Providers', $this->currentRoot.'\\Http\\Controllers\\', ]; $replace = [ $this->argument('name').'\\Providers', $this->argument('name').'\\Http\\Controllers\\', ...
[ "protected", "function", "setAppConfigNamespaces", "(", ")", "{", "$", "search", "=", "[", "$", "this", "->", "currentRoot", ".", "'\\\\Providers'", ",", "$", "this", "->", "currentRoot", ".", "'\\\\Http\\\\Controllers\\\\'", ",", "]", ";", "$", "replace", "="...
Set the application provider namespaces. @return void
[ "Set", "the", "application", "provider", "namespaces", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Console/AppNameCommand.php#L162-L175
train
Set application namespace in config file
[ 30522, 5123, 3853, 2275, 29098, 8663, 8873, 16989, 7834, 15327, 2015, 1006, 1007, 1063, 1002, 3945, 1027, 1031, 1002, 2023, 1011, 1028, 2783, 3217, 4140, 1012, 1005, 1032, 1032, 11670, 1005, 1010, 1002, 2023, 30524, 1002, 5672, 1027, 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...
octobercms/october
modules/cms/controllers/Index.php
Index.onSave
public function onSave() { $this->validateRequestTheme(); $type = Request::input('templateType'); $templatePath = trim(Request::input('templatePath')); $template = $templatePath ? $this->loadTemplate($type, $templatePath) : $this->createTemplate($type); $formWidget = $this->m...
php
public function onSave() { $this->validateRequestTheme(); $type = Request::input('templateType'); $templatePath = trim(Request::input('templatePath')); $template = $templatePath ? $this->loadTemplate($type, $templatePath) : $this->createTemplate($type); $formWidget = $this->m...
[ "public", "function", "onSave", "(", ")", "{", "$", "this", "->", "validateRequestTheme", "(", ")", ";", "$", "type", "=", "Request", "::", "input", "(", "'templateType'", ")", ";", "$", "templatePath", "=", "trim", "(", "Request", "::", "input", "(", ...
Saves the template currently open @return array
[ "Saves", "the", "template", "currently", "open" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/controllers/Index.php#L158-L242
train
Saves the template
[ 30522, 2270, 3853, 2006, 3736, 3726, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 9398, 24932, 2063, 15500, 10760, 4168, 1006, 1007, 1025, 1002, 2828, 1027, 5227, 1024, 1024, 7953, 1006, 1005, 23561, 13874, 1005, 1007, 1025, 1002, 23561, 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...
laravel/framework
src/Illuminate/Cache/Repository.php
Repository.many
public function many(array $keys) { $values = $this->store->many(collect($keys)->map(function ($value, $key) { return is_string($key) ? $key : $value; })->values()->all()); return collect($values)->map(function ($value, $key) use ($keys) { return $this->handleManyRes...
php
public function many(array $keys) { $values = $this->store->many(collect($keys)->map(function ($value, $key) { return is_string($key) ? $key : $value; })->values()->all()); return collect($values)->map(function ($value, $key) use ($keys) { return $this->handleManyRes...
[ "public", "function", "many", "(", "array", "$", "keys", ")", "{", "$", "values", "=", "$", "this", "->", "store", "->", "many", "(", "collect", "(", "$", "keys", ")", "->", "map", "(", "function", "(", "$", "value", ",", "$", "key", ")", "{", ...
Retrieve multiple items from the cache by key. Items not found in the cache will have a null value. @param array $keys @return array
[ "Retrieve", "multiple", "items", "from", "the", "cache", "by", "key", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Cache/Repository.php#L121-L130
train
Many entries in the cache
[ 30522, 2270, 3853, 2116, 1006, 9140, 1002, 6309, 1007, 1063, 1002, 5300, 1027, 1002, 2023, 1011, 1028, 3573, 1011, 1028, 2116, 1006, 8145, 1006, 1002, 6309, 1007, 1011, 1028, 4949, 1006, 3853, 1006, 1002, 3643, 1010, 1002, 3145, 1007, 106...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Twig/Node/TwigNodeSwitch.php
TwigNodeSwitch.compile
public function compile(Compiler $compiler) { $compiler ->addDebugInfo($this) ->write('switch (') ->subcompile($this->getNode('value')) ->raw(") {\n") ->indent(); foreach ($this->getNode('cases') as $case) { if (!$case->hasNode...
php
public function compile(Compiler $compiler) { $compiler ->addDebugInfo($this) ->write('switch (') ->subcompile($this->getNode('value')) ->raw(") {\n") ->indent(); foreach ($this->getNode('cases') as $case) { if (!$case->hasNode...
[ "public", "function", "compile", "(", "Compiler", "$", "compiler", ")", "{", "$", "compiler", "->", "addDebugInfo", "(", "$", "this", ")", "->", "write", "(", "'switch ('", ")", "->", "subcompile", "(", "$", "this", "->", "getNode", "(", "'value'", ")", ...
Compiles the node to PHP. @param Compiler $compiler A Twig_Compiler instance
[ "Compiles", "the", "node", "to", "PHP", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Twig/Node/TwigNodeSwitch.php#L41-L84
train
Compiles the node into PHP code
[ 30522, 2270, 3853, 4012, 22090, 1006, 21624, 1002, 21624, 1007, 1063, 1002, 21624, 1011, 1028, 5587, 3207, 8569, 11528, 14876, 1006, 1002, 2023, 1007, 1011, 1028, 4339, 1006, 1005, 6942, 1006, 1005, 1007, 1011, 1028, 4942, 9006, 22090, 1006...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/View/Compilers/BladeCompiler.php
BladeCompiler.compileExtensions
protected function compileExtensions($value) { foreach ($this->extensions as $compiler) { $value = call_user_func($compiler, $value, $this); } return $value; }
php
protected function compileExtensions($value) { foreach ($this->extensions as $compiler) { $value = call_user_func($compiler, $value, $this); } return $value; }
[ "protected", "function", "compileExtensions", "(", "$", "value", ")", "{", "foreach", "(", "$", "this", "->", "extensions", "as", "$", "compiler", ")", "{", "$", "value", "=", "call_user_func", "(", "$", "compiler", ",", "$", "value", ",", "$", "this", ...
Execute the user defined extensions. @param string $value @return string
[ "Execute", "the", "user", "defined", "extensions", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/View/Compilers/BladeCompiler.php#L326-L333
train
Compile extensions into a single value
[ 30522, 5123, 3853, 4012, 22090, 10288, 29048, 2015, 1006, 1002, 3643, 1007, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 14305, 2004, 1002, 21624, 1007, 1063, 1002, 3643, 1027, 2655, 1035, 5310, 1035, 4569, 2278, 1006, 1002, 21624, 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/Config/Repository.php
Repository.prepend
public function prepend($key, $value) { $array = $this->get($key); array_unshift($array, $value); $this->set($key, $array); }
php
public function prepend($key, $value) { $array = $this->get($key); array_unshift($array, $value); $this->set($key, $array); }
[ "public", "function", "prepend", "(", "$", "key", ",", "$", "value", ")", "{", "$", "array", "=", "$", "this", "->", "get", "(", "$", "key", ")", ";", "array_unshift", "(", "$", "array", ",", "$", "value", ")", ";", "$", "this", "->", "set", "(...
Prepend a value onto an array configuration value. @param string $key @param mixed $value @return void
[ "Prepend", "a", "value", "onto", "an", "array", "configuration", "value", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Config/Repository.php#L100-L107
train
Prepends a value to the beginning of the array
[ 30522, 2270, 3853, 17463, 10497, 1006, 1002, 3145, 1010, 1002, 3643, 1007, 1063, 1002, 9140, 1027, 1002, 2023, 1011, 1028, 2131, 1006, 1002, 3145, 1007, 1025, 9140, 1035, 4895, 6182, 6199, 1006, 1002, 9140, 1010, 1002, 3643, 1007, 1025, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Form/Field.php
Field.variables
public function variables() { return array_merge($this->variables, [ 'id' => $this->id, 'name' => $this->elementName ?: $this->formatName($this->column), 'help' => $this->help, 'class' => $this->getElementClassString(), ...
php
public function variables() { return array_merge($this->variables, [ 'id' => $this->id, 'name' => $this->elementName ?: $this->formatName($this->column), 'help' => $this->help, 'class' => $this->getElementClassString(), ...
[ "public", "function", "variables", "(", ")", "{", "return", "array_merge", "(", "$", "this", "->", "variables", ",", "[", "'id'", "=>", "$", "this", "->", "id", ",", "'name'", "=>", "$", "this", "->", "elementName", "?", ":", "$", "this", "->", "form...
Get the view variables of this field. @return array
[ "Get", "the", "view", "variables", "of", "this", "field", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Form/Field.php#L1112-L1127
train
Return the variables of the element
[ 30522, 2270, 3853, 10857, 1006, 1007, 1063, 2709, 9140, 1035, 13590, 1006, 1002, 2023, 1011, 1028, 10857, 1010, 1031, 1005, 8909, 1005, 1027, 1028, 1002, 2023, 1011, 1028, 8909, 1010, 1005, 2171, 1005, 1027, 1028, 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...
getgrav/grav
system/src/Grav/Common/Page/Medium/Medium.php
Medium.querystring
public function querystring($querystring = null, $withQuestionmark = true) { if (null !== $querystring) { $this->medium_querystring[] = ltrim($querystring, '?&'); foreach ($this->alternatives as $alt) { $alt->querystring($querystring, $withQuestionmark); }...
php
public function querystring($querystring = null, $withQuestionmark = true) { if (null !== $querystring) { $this->medium_querystring[] = ltrim($querystring, '?&'); foreach ($this->alternatives as $alt) { $alt->querystring($querystring, $withQuestionmark); }...
[ "public", "function", "querystring", "(", "$", "querystring", "=", "null", ",", "$", "withQuestionmark", "=", "true", ")", "{", "if", "(", "null", "!==", "$", "querystring", ")", "{", "$", "this", "->", "medium_querystring", "[", "]", "=", "ltrim", "(", ...
Get/set querystring for the file's url @param string $querystring @param bool $withQuestionmark @return string
[ "Get", "/", "set", "querystring", "for", "the", "file", "s", "url" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Page/Medium/Medium.php#L288-L309
train
Returns the querystring of all the alternatives and the medium strings
[ 30522, 2270, 3853, 23032, 3367, 4892, 1006, 1002, 23032, 3367, 4892, 1027, 19701, 1010, 1002, 2007, 15500, 3258, 10665, 1027, 2995, 1007, 1063, 2065, 1006, 19701, 999, 1027, 1027, 1002, 23032, 3367, 4892, 1007, 1063, 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/FileStore.php
FileStore.forget
public function forget($key) { if ($this->files->exists($file = $this->path($key))) { return $this->files->delete($file); } return false; }
php
public function forget($key) { if ($this->files->exists($file = $this->path($key))) { return $this->files->delete($file); } return false; }
[ "public", "function", "forget", "(", "$", "key", ")", "{", "if", "(", "$", "this", "->", "files", "->", "exists", "(", "$", "file", "=", "$", "this", "->", "path", "(", "$", "key", ")", ")", ")", "{", "return", "$", "this", "->", "files", "->",...
Remove an item from the cache. @param string $key @return bool
[ "Remove", "an", "item", "from", "the", "cache", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Cache/FileStore.php#L130-L137
train
Forget a key from the cache
[ 30522, 2270, 3853, 5293, 1006, 1002, 3145, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 6764, 1011, 1028, 6526, 1006, 1002, 5371, 1027, 1002, 2023, 1011, 1028, 4130, 1006, 1002, 3145, 1007, 1007, 1007, 1063, 2709, 1002, 2023, 1011, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
overtrue/wechat
src/OfficialAccount/ShakeAround/DeviceClient.php
DeviceClient.bindThirdPoi
public function bindThirdPoi(array $deviceIdentifier, int $poiId, string $appId) { $params = [ 'device_identifier' => $deviceIdentifier, 'poi_id' => $poiId, 'type' => 2, 'poi_appid' => $appId, ]; return $this->httpPostJson('shakearound/device/...
php
public function bindThirdPoi(array $deviceIdentifier, int $poiId, string $appId) { $params = [ 'device_identifier' => $deviceIdentifier, 'poi_id' => $poiId, 'type' => 2, 'poi_appid' => $appId, ]; return $this->httpPostJson('shakearound/device/...
[ "public", "function", "bindThirdPoi", "(", "array", "$", "deviceIdentifier", ",", "int", "$", "poiId", ",", "string", "$", "appId", ")", "{", "$", "params", "=", "[", "'device_identifier'", "=>", "$", "deviceIdentifier", ",", "'poi_id'", "=>", "$", "poiId", ...
@param array $deviceIdentifier @param int $poiId @param string $appId @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string
[ "@param", "array", "$deviceIdentifier", "@param", "int", "$poiId", "@param", "string", "$appId" ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/ShakeAround/DeviceClient.php#L95-L105
train
Bind Third Poi
[ 30522, 2270, 3853, 14187, 15222, 4103, 6873, 2072, 1006, 9140, 1002, 5080, 5178, 16778, 8873, 2121, 1010, 20014, 1002, 13433, 6137, 2094, 1010, 5164, 1002, 10439, 3593, 1007, 1063, 1002, 11498, 5244, 1027, 1031, 1005, 5080, 1035, 8909, 4765...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Static.php
Zend_Cache_Backend_Static.clean
public function clean($mode = Zend_Cache::CLEANING_MODE_ALL, $tags = array()) { $result = false; switch ($mode) { case Zend_Cache::CLEANING_MODE_MATCHING_TAG: case Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG: if (empty($tags)) { throw new Ze...
php
public function clean($mode = Zend_Cache::CLEANING_MODE_ALL, $tags = array()) { $result = false; switch ($mode) { case Zend_Cache::CLEANING_MODE_MATCHING_TAG: case Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG: if (empty($tags)) { throw new Ze...
[ "public", "function", "clean", "(", "$", "mode", "=", "Zend_Cache", "::", "CLEANING_MODE_ALL", ",", "$", "tags", "=", "array", "(", ")", ")", "{", "$", "result", "=", "false", ";", "switch", "(", "$", "mode", ")", "{", "case", "Zend_Cache", "::", "CL...
Clean some cache records Available modes are : Zend_Cache::CLEANING_MODE_ALL (default) => remove all cache entries ($tags is not used) Zend_Cache::CLEANING_MODE_OLD => remove too old cache entries ($tags is not used) Zend_Cache::CLEANING_MODE_MATCHING_TAG => remove cache entries matching all given ...
[ "Clean", "some", "cache", "records" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Cache/Backend/Static.php#L383-L455
train
Clean the entire cache
[ 30522, 2270, 3853, 4550, 1006, 1002, 5549, 1027, 16729, 2094, 1035, 17053, 1024, 1024, 9344, 1035, 5549, 1035, 2035, 1010, 1002, 22073, 1027, 9140, 1006, 1007, 1007, 1063, 1002, 2765, 1027, 6270, 1025, 6942, 1006, 1002, 5549, 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
core/DataTable/Renderer/Csv.php
Csv.formatValue
protected function formatValue($value) { if (is_string($value) && !is_numeric($value) ) { $value = html_entity_decode($value, ENT_COMPAT, 'UTF-8'); } elseif ($value === false) { $value = 0; } $value = $this->formatFormulas($value); ...
php
protected function formatValue($value) { if (is_string($value) && !is_numeric($value) ) { $value = html_entity_decode($value, ENT_COMPAT, 'UTF-8'); } elseif ($value === false) { $value = 0; } $value = $this->formatFormulas($value); ...
[ "protected", "function", "formatValue", "(", "$", "value", ")", "{", "if", "(", "is_string", "(", "$", "value", ")", "&&", "!", "is_numeric", "(", "$", "value", ")", ")", "{", "$", "value", "=", "html_entity_decode", "(", "$", "value", ",", "ENT_COMPAT...
Formats/Escapes the given value @param mixed $value @return string
[ "Formats", "/", "Escapes", "the", "given", "value" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataTable/Renderer/Csv.php#L239-L266
train
Formats the value of the attribute
[ 30522, 5123, 3853, 4289, 10175, 5657, 1006, 1002, 3643, 1007, 1063, 2065, 1006, 2003, 1035, 5164, 1006, 1002, 3643, 1007, 1004, 1004, 999, 2003, 1035, 16371, 25531, 1006, 1002, 3643, 1007, 1007, 1063, 1002, 3643, 1027, 16129, 1035, 9178, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/ProfessionalServices/Advertising.php
Advertising.getPromoUrlForProfessionalServices
public function getPromoUrlForProfessionalServices($campaignMedium, $campaignContent = '') { $url = 'https://matomo.org/support/?'; $campaign = $this->getCampaignParametersForPromoUrl( $name = self::CAMPAIGN_NAME_PROFESSIONAL_SERVICES, $campaignMedium, $campaignC...
php
public function getPromoUrlForProfessionalServices($campaignMedium, $campaignContent = '') { $url = 'https://matomo.org/support/?'; $campaign = $this->getCampaignParametersForPromoUrl( $name = self::CAMPAIGN_NAME_PROFESSIONAL_SERVICES, $campaignMedium, $campaignC...
[ "public", "function", "getPromoUrlForProfessionalServices", "(", "$", "campaignMedium", ",", "$", "campaignContent", "=", "''", ")", "{", "$", "url", "=", "'https://matomo.org/support/?'", ";", "$", "campaign", "=", "$", "this", "->", "getCampaignParametersForPromoUrl...
Get URL for promoting Professional Services for Piwik @param string $campaignMedium @param string $campaignContent @return string
[ "Get", "URL", "for", "promoting", "Professional", "Services", "for", "Piwik" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/ProfessionalServices/Advertising.php#L56-L67
train
Get URL for Professional Services
[ 30522, 2270, 3853, 2131, 21572, 20360, 10270, 2953, 21572, 7959, 28231, 9777, 2121, 7903, 2229, 1006, 1002, 3049, 7583, 5007, 1010, 1002, 3049, 8663, 6528, 2102, 1027, 1005, 1005, 1007, 1063, 1002, 24471, 2140, 1027, 1005, 16770, 30524, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Finder/Finder.php
Finder.size
public function size($sizes) { foreach ((array) $sizes as $size) { $this->sizes[] = new Comparator\NumberComparator($size); } return $this; }
php
public function size($sizes) { foreach ((array) $sizes as $size) { $this->sizes[] = new Comparator\NumberComparator($size); } return $this; }
[ "public", "function", "size", "(", "$", "sizes", ")", "{", "foreach", "(", "(", "array", ")", "$", "sizes", "as", "$", "size", ")", "{", "$", "this", "->", "sizes", "[", "]", "=", "new", "Comparator", "\\", "NumberComparator", "(", "$", "size", ")"...
Adds tests for file sizes. $finder->size('> 10K'); $finder->size('<= 1Ki'); $finder->size(4); $finder->size(['> 10K', '< 20K']) @param string|int|string[]|int[] $sizes A size range string or an integer or an array of size ranges @return $this @see SizeRangeFilterIterator @see NumberComparator
[ "Adds", "tests", "for", "file", "sizes", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Finder/Finder.php#L305-L312
train
Add size to array
[ 30522, 2270, 3853, 2946, 1006, 1002, 10826, 1007, 1063, 18921, 6776, 1006, 1006, 9140, 1007, 1002, 10826, 2004, 1002, 2946, 1007, 1063, 1002, 2023, 1011, 1028, 10826, 1031, 1033, 1027, 2047, 4012, 28689, 4263, 1032, 2193, 9006, 28689, 4263,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.valid
public function valid() { if (! $this->messages) { $this->passes(); } return array_diff_key( $this->data, $this->attributesThatHaveMessages() ); }
php
public function valid() { if (! $this->messages) { $this->passes(); } return array_diff_key( $this->data, $this->attributesThatHaveMessages() ); }
[ "public", "function", "valid", "(", ")", "{", "if", "(", "!", "$", "this", "->", "messages", ")", "{", "$", "this", "->", "passes", "(", ")", ";", "}", "return", "array_diff_key", "(", "$", "this", "->", "data", ",", "$", "this", "->", "attributesT...
Returns the data which was valid. @return array
[ "Returns", "the", "data", "which", "was", "valid", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Validator.php#L636-L645
train
Return array of all attributes that have messages
[ 30522, 2270, 3853, 9398, 1006, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 7696, 1007, 1063, 1002, 2023, 1011, 1028, 5235, 1006, 1007, 1025, 1065, 2709, 9140, 1035, 4487, 4246, 1035, 3145, 1006, 1002, 2023, 1011, 1028, 2951, 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...
matomo-org/matomo
libs/Zend/Db/Table/Row/Abstract.php
Zend_Db_Table_Row_Abstract.setTable
public function setTable(Zend_Db_Table_Abstract $table = null) { if ($table == null) { $this->_table = null; $this->_connected = false; return false; } $tableClass = get_class($table); if (! $table instanceof $this->_tableClass) { // r...
php
public function setTable(Zend_Db_Table_Abstract $table = null) { if ($table == null) { $this->_table = null; $this->_connected = false; return false; } $tableClass = get_class($table); if (! $table instanceof $this->_tableClass) { // r...
[ "public", "function", "setTable", "(", "Zend_Db_Table_Abstract", "$", "table", "=", "null", ")", "{", "if", "(", "$", "table", "==", "null", ")", "{", "$", "this", "->", "_table", "=", "null", ";", "$", "this", "->", "_connected", "=", "false", ";", ...
Set the table object, to re-establish a live connection to the database for a Row that has been de-serialized. @param Zend_Db_Table_Abstract $table @return boolean @throws Zend_Db_Table_Row_Exception
[ "Set", "the", "table", "object", "to", "re", "-", "establish", "a", "live", "connection", "to", "the", "database", "for", "a", "Row", "that", "has", "been", "de", "-", "serialized", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Table/Row/Abstract.php#L335-L367
train
Set the table object
[ 30522, 2270, 3853, 2275, 10880, 1006, 16729, 2094, 1035, 16962, 1035, 2795, 1035, 10061, 1002, 2795, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 2795, 1027, 1027, 19701, 1007, 1063, 1002, 2023, 1011, 1028, 1035, 2795, 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...
symfony/symfony
src/Symfony/Component/Cache/Psr16Cache.php
Psr16Cache.setMultiple
public function setMultiple($values, $ttl = null) { $valuesIsArray = \is_array($values); if (!$valuesIsArray && !$values instanceof \Traversable) { throw new InvalidArgumentException(sprintf('Cache values must be array or Traversable, "%s" given', \is_object($values) ? \get_class($values...
php
public function setMultiple($values, $ttl = null) { $valuesIsArray = \is_array($values); if (!$valuesIsArray && !$values instanceof \Traversable) { throw new InvalidArgumentException(sprintf('Cache values must be array or Traversable, "%s" given', \is_object($values) ? \get_class($values...
[ "public", "function", "setMultiple", "(", "$", "values", ",", "$", "ttl", "=", "null", ")", "{", "$", "valuesIsArray", "=", "\\", "is_array", "(", "$", "values", ")", ";", "if", "(", "!", "$", "valuesIsArray", "&&", "!", "$", "values", "instanceof", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Cache/Psr16Cache.php#L182-L228
train
Set multiple cache items
[ 30522, 2270, 3853, 2275, 12274, 7096, 11514, 2571, 1006, 1002, 5300, 1010, 1002, 23746, 2140, 1027, 19701, 1007, 1063, 1002, 5300, 14268, 11335, 2100, 1027, 1032, 2003, 1035, 9140, 1006, 1002, 5300, 1007, 1025, 2065, 1006, 999, 1002, 5300, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Security/Core/Authentication/Token/AnonymousToken.php
AnonymousToken.__unserialize
public function __unserialize(array $data): void { [$this->secret, $parentData] = $data; parent::__unserialize($parentData); }
php
public function __unserialize(array $data): void { [$this->secret, $parentData] = $data; parent::__unserialize($parentData); }
[ "public", "function", "__unserialize", "(", "array", "$", "data", ")", ":", "void", "{", "[", "$", "this", "->", "secret", ",", "$", "parentData", "]", "=", "$", "data", ";", "parent", "::", "__unserialize", "(", "$", "parentData", ")", ";", "}" ]
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Security/Core/Authentication/Token/AnonymousToken.php#L66-L70
train
Unserialize the data array
[ 30522, 2270, 3853, 1035, 1035, 4895, 8043, 4818, 4697, 1006, 9140, 1002, 2951, 1007, 1024, 11675, 1063, 1031, 1002, 2023, 30524, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Support/Collection.php
Collection.times
public static function times($number, callable $callback = null) { if ($number < 1) { return new static; } if (is_null($callback)) { return new static(range(1, $number)); } return (new static(range(1, $number)))->map($callback); }
php
public static function times($number, callable $callback = null) { if ($number < 1) { return new static; } if (is_null($callback)) { return new static(range(1, $number)); } return (new static(range(1, $number)))->map($callback); }
[ "public", "static", "function", "times", "(", "$", "number", ",", "callable", "$", "callback", "=", "null", ")", "{", "if", "(", "$", "number", "<", "1", ")", "{", "return", "new", "static", ";", "}", "if", "(", "is_null", "(", "$", "callback", ")"...
Create a new collection by invoking the callback a given amount of times. @param int $number @param callable $callback @return static
[ "Create", "a", "new", "collection", "by", "invoking", "the", "callback", "a", "given", "amount", "of", "times", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Support/Collection.php#L115-L126
train
Returns a sequence of times
[ 30522, 2270, 10763, 3853, 2335, 1006, 1002, 2193, 1010, 2655, 3085, 1002, 2655, 5963, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 2193, 1026, 1015, 1007, 1063, 2709, 2047, 10763, 1025, 1065, 2065, 1006, 2003, 1035, 19701, 1006, 1002, 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...
laravel/framework
src/Illuminate/Validation/Concerns/ValidatesAttributes.php
ValidatesAttributes.getExtraConditions
protected function getExtraConditions(array $segments) { $extra = []; $count = count($segments); for ($i = 0; $i < $count; $i += 2) { $extra[$segments[$i]] = $segments[$i + 1]; } return $extra; }
php
protected function getExtraConditions(array $segments) { $extra = []; $count = count($segments); for ($i = 0; $i < $count; $i += 2) { $extra[$segments[$i]] = $segments[$i + 1]; } return $extra; }
[ "protected", "function", "getExtraConditions", "(", "array", "$", "segments", ")", "{", "$", "extra", "=", "[", "]", ";", "$", "count", "=", "count", "(", "$", "segments", ")", ";", "for", "(", "$", "i", "=", "0", ";", "$", "i", "<", "$", "count"...
Get the extra conditions for a unique / exists rule. @param array $segments @return array
[ "Get", "the", "extra", "conditions", "for", "a", "unique", "/", "exists", "rule", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L833-L844
train
Get extra conditions
[ 30522, 5123, 3853, 2131, 10288, 6494, 8663, 20562, 2015, 1006, 9140, 1002, 9214, 1007, 1063, 1002, 4469, 1027, 1031, 1033, 1025, 1002, 4175, 1027, 4175, 1006, 1002, 9214, 1007, 1025, 2005, 1006, 1002, 1045, 1027, 1014, 1025, 1002, 1045, 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/Security/Core/Authorization/TraceableAccessDecisionManager.php
TraceableAccessDecisionManager.decide
public function decide(TokenInterface $token, array $attributes, $object = null) { $currentDecisionLog = [ 'attributes' => $attributes, 'object' => $object, 'voterDetails' => [], ]; $this->currentLog[] = &$currentDecisionLog; $result = $this->man...
php
public function decide(TokenInterface $token, array $attributes, $object = null) { $currentDecisionLog = [ 'attributes' => $attributes, 'object' => $object, 'voterDetails' => [], ]; $this->currentLog[] = &$currentDecisionLog; $result = $this->man...
[ "public", "function", "decide", "(", "TokenInterface", "$", "token", ",", "array", "$", "attributes", ",", "$", "object", "=", "null", ")", "{", "$", "currentDecisionLog", "=", "[", "'attributes'", "=>", "$", "attributes", ",", "'object'", "=>", "$", "obje...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Security/Core/Authorization/TraceableAccessDecisionManager.php#L51-L68
train
Decides a token
[ 30522, 2270, 3853, 5630, 1006, 19204, 18447, 2121, 12172, 1002, 19204, 1010, 9140, 1002, 12332, 1010, 1002, 4874, 1027, 19701, 1007, 1063, 1002, 2783, 3207, 28472, 21197, 1027, 1031, 1005, 12332, 1005, 1027, 1028, 1002, 12332, 1010, 1005, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Framework/File/DataFile.php
DataFile.load
public function load() { $raw = parent::load(); try { return $raw !== false ? $this->formatter->decode($raw) : false; } catch (RuntimeException $e) { throw new RuntimeException(sprintf("Failed to load file '%s': %s", $this->getFilePath(), $e->getMessage()), $e->getCo...
php
public function load() { $raw = parent::load(); try { return $raw !== false ? $this->formatter->decode($raw) : false; } catch (RuntimeException $e) { throw new RuntimeException(sprintf("Failed to load file '%s': %s", $this->getFilePath(), $e->getMessage()), $e->getCo...
[ "public", "function", "load", "(", ")", "{", "$", "raw", "=", "parent", "::", "load", "(", ")", ";", "try", "{", "return", "$", "raw", "!==", "false", "?", "$", "this", "->", "formatter", "->", "decode", "(", "$", "raw", ")", ":", "false", ";", ...
{@inheritdoc} @see FileInterface::load()
[ "{" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Framework/File/DataFile.php#L38-L47
train
Load the language file into an array
[ 30522, 2270, 3853, 7170, 1006, 1007, 1063, 1002, 6315, 1027, 6687, 1024, 1024, 7170, 1006, 1007, 1025, 3046, 1063, 2709, 1002, 6315, 999, 1027, 1027, 6270, 1029, 1002, 2023, 1011, 1028, 4289, 3334, 1011, 1028, 21933, 3207, 1006, 1002, 631...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.apiResource
public function apiResource($name, $controller, array $options = []) { $only = ['index', 'show', 'store', 'update', 'destroy']; if (isset($options['except'])) { $only = array_diff($only, (array) $options['except']); } return $this->resource($name, $controller, array_mer...
php
public function apiResource($name, $controller, array $options = []) { $only = ['index', 'show', 'store', 'update', 'destroy']; if (isset($options['except'])) { $only = array_diff($only, (array) $options['except']); } return $this->resource($name, $controller, array_mer...
[ "public", "function", "apiResource", "(", "$", "name", ",", "$", "controller", ",", "array", "$", "options", "=", "[", "]", ")", "{", "$", "only", "=", "[", "'index'", ",", "'show'", ",", "'store'", ",", "'update'", ",", "'destroy'", "]", ";", "if", ...
Route an API resource to a controller. @param string $name @param string $controller @param array $options @return \Illuminate\Routing\PendingResourceRegistration
[ "Route", "an", "API", "resource", "to", "a", "controller", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/Router.php#L346-L357
train
Returns a response for the api resource
[ 30522, 2270, 3853, 17928, 6072, 8162, 3401, 1006, 1002, 2171, 1010, 1002, 11486, 1010, 9140, 1002, 7047, 1027, 1031, 1033, 1007, 1063, 1002, 2069, 1027, 1031, 1005, 5950, 1005, 1010, 1005, 2265, 1005, 1010, 1005, 3573, 1005, 1010, 1005, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/system/classes/PluginManager.php
PluginManager.getVendorAndPluginNames
public function getVendorAndPluginNames() { $plugins = []; $dirPath = plugins_path(); if (!File::isDirectory($dirPath)) { return $plugins; } $it = new RecursiveIteratorIterator( new RecursiveDirectoryIterator($dirPath, RecursiveDirectoryIterator::FOL...
php
public function getVendorAndPluginNames() { $plugins = []; $dirPath = plugins_path(); if (!File::isDirectory($dirPath)) { return $plugins; } $it = new RecursiveIteratorIterator( new RecursiveDirectoryIterator($dirPath, RecursiveDirectoryIterator::FOL...
[ "public", "function", "getVendorAndPluginNames", "(", ")", "{", "$", "plugins", "=", "[", "]", ";", "$", "dirPath", "=", "plugins_path", "(", ")", ";", "if", "(", "!", "File", "::", "isDirectory", "(", "$", "dirPath", ")", ")", "{", "return", "$", "p...
Returns a 2 dimensional array of vendors and their plugins.
[ "Returns", "a", "2", "dimensional", "array", "of", "vendors", "and", "their", "plugins", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/classes/PluginManager.php#L390-L417
train
Get vendor and plugin names
[ 30522, 2270, 3853, 2131, 8159, 24562, 4859, 24759, 15916, 23111, 14074, 2015, 1006, 1007, 1063, 1002, 13354, 7076, 1027, 1031, 1033, 1025, 1002, 16101, 15069, 1027, 13354, 7076, 1035, 4130, 1006, 1007, 1025, 2065, 1006, 999, 5371, 1024, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/MobileMessaging/API.php
API.getActivatedPhoneNumbers
public function getActivatedPhoneNumbers() { Piwik::checkUserIsNotAnonymous(); $phoneNumbers = $this->retrievePhoneNumbers(); $activatedPhoneNumbers = array(); foreach ($phoneNumbers as $phoneNumber => $verificationCode) { if (self::isActivated($verificationCode)) { ...
php
public function getActivatedPhoneNumbers() { Piwik::checkUserIsNotAnonymous(); $phoneNumbers = $this->retrievePhoneNumbers(); $activatedPhoneNumbers = array(); foreach ($phoneNumbers as $phoneNumber => $verificationCode) { if (self::isActivated($verificationCode)) { ...
[ "public", "function", "getActivatedPhoneNumbers", "(", ")", "{", "Piwik", "::", "checkUserIsNotAnonymous", "(", ")", ";", "$", "phoneNumbers", "=", "$", "this", "->", "retrievePhoneNumbers", "(", ")", ";", "$", "activatedPhoneNumbers", "=", "array", "(", ")", ...
get activated phone number list @return array $phoneNumber @ignore
[ "get", "activated", "phone", "number", "list" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/MobileMessaging/API.php#L320-L334
train
Returns the activated phone numbers
[ 30522, 2270, 3853, 2131, 18908, 21967, 9864, 19172, 17198, 1006, 1007, 1063, 14255, 9148, 2243, 1024, 1024, 4638, 20330, 2483, 17048, 6761, 4890, 27711, 1006, 1007, 1025, 1002, 3042, 19172, 17198, 1027, 1002, 2023, 1011, 1028, 12850, 9864, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/View/Compilers/BladeCompiler.php
BladeCompiler.compileString
public function compileString($value) { if (strpos($value, '@verbatim') !== false) { $value = $this->storeVerbatimBlocks($value); } $this->footer = []; if (strpos($value, '@php') !== false) { $value = $this->storePhpBlocks($value); } $result...
php
public function compileString($value) { if (strpos($value, '@verbatim') !== false) { $value = $this->storeVerbatimBlocks($value); } $this->footer = []; if (strpos($value, '@php') !== false) { $value = $this->storePhpBlocks($value); } $result...
[ "public", "function", "compileString", "(", "$", "value", ")", "{", "if", "(", "strpos", "(", "$", "value", ",", "'@verbatim'", ")", "!==", "false", ")", "{", "$", "value", "=", "$", "this", "->", "storeVerbatimBlocks", "(", "$", "value", ")", ";", "...
Compile the given Blade template contents. @param string $value @return string
[ "Compile", "the", "given", "Blade", "template", "contents", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/View/Compilers/BladeCompiler.php#L187-L220
train
Compiles a string into a valid PHP string.
[ 30522, 2270, 3853, 4012, 22090, 3367, 4892, 1006, 1002, 3643, 1007, 1063, 2065, 1006, 2358, 14536, 2891, 1006, 1002, 3643, 1010, 1005, 1030, 12034, 10450, 2213, 1005, 1007, 999, 1027, 1027, 6270, 1007, 1063, 1002, 3643, 1027, 1002, 2023, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Support/Collection.php
Collection.each
public function each(callable $callback) { foreach ($this->items as $key => $item) { if ($callback($item, $key) === false) { break; } } return $this; }
php
public function each(callable $callback) { foreach ($this->items as $key => $item) { if ($callback($item, $key) === false) { break; } } return $this; }
[ "public", "function", "each", "(", "callable", "$", "callback", ")", "{", "foreach", "(", "$", "this", "->", "items", "as", "$", "key", "=>", "$", "item", ")", "{", "if", "(", "$", "callback", "(", "$", "item", ",", "$", "key", ")", "===", "false...
Execute a callback over each item. @param callable $callback @return $this
[ "Execute", "a", "callback", "over", "each", "item", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Support/Collection.php#L472-L481
train
Iterate over the items and call the callback for each item
[ 30522, 2270, 3853, 2169, 1006, 2655, 3085, 1002, 2655, 5963, 1007, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 5167, 2004, 1002, 3145, 1027, 1028, 1002, 8875, 1007, 1063, 2065, 1006, 1002, 2655, 5963, 1006, 1002, 8875, 1010, 1002, 31...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Widgets/Form.php
Form.setWidth
public function setWidth($fieldWidth = 8, $labelWidth = 2) { collect($this->fields)->each(function ($field) use ($fieldWidth, $labelWidth) { /* @var Field $field */ $field->setWidth($fieldWidth, $labelWidth); }); // set this width $this->width = [ ...
php
public function setWidth($fieldWidth = 8, $labelWidth = 2) { collect($this->fields)->each(function ($field) use ($fieldWidth, $labelWidth) { /* @var Field $field */ $field->setWidth($fieldWidth, $labelWidth); }); // set this width $this->width = [ ...
[ "public", "function", "setWidth", "(", "$", "fieldWidth", "=", "8", ",", "$", "labelWidth", "=", "2", ")", "{", "collect", "(", "$", "this", "->", "fields", ")", "->", "each", "(", "function", "(", "$", "field", ")", "use", "(", "$", "fieldWidth", ...
Set field and label width in current form. @param int $fieldWidth @param int $labelWidth @return $this
[ "Set", "field", "and", "label", "width", "in", "current", "form", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Widgets/Form.php#L210-L224
train
Set width of the field and label
[ 30522, 2270, 3853, 2275, 9148, 11927, 2232, 1006, 1002, 2492, 9148, 11927, 2232, 1027, 1022, 1010, 1002, 3830, 9148, 11927, 2232, 1027, 1016, 1007, 1063, 8145, 1006, 1002, 2023, 1011, 1028, 4249, 1007, 1011, 1028, 2169, 1006, 3853, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Page/Medium/Medium.php
Medium.thumbnailExists
public function thumbnailExists($type = 'page') { $thumbs = $this->get('thumbnails'); if (isset($thumbs[$type])) { return true; } return false; }
php
public function thumbnailExists($type = 'page') { $thumbs = $this->get('thumbnails'); if (isset($thumbs[$type])) { return true; } return false; }
[ "public", "function", "thumbnailExists", "(", "$", "type", "=", "'page'", ")", "{", "$", "thumbs", "=", "$", "this", "->", "get", "(", "'thumbnails'", ")", ";", "if", "(", "isset", "(", "$", "thumbs", "[", "$", "type", "]", ")", ")", "{", "return",...
Helper method to determine if this media item has a thumbnail or not @param string $type; @return bool
[ "Helper", "method", "to", "determine", "if", "this", "media", "item", "has", "a", "thumbnail", "or", "not" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Page/Medium/Medium.php#L502-L509
train
Check if thumbnail exists
[ 30522, 2270, 3853, 7639, 25464, 10288, 5130, 1006, 1002, 2828, 1027, 1005, 3931, 1005, 1007, 1063, 1002, 16784, 1027, 1002, 2023, 1011, 1028, 2131, 1006, 1005, 7639, 25464, 2015, 1005, 1007, 1025, 2065, 1006, 26354, 3388, 1006, 1002, 16784,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Application.php
Application.run
public function run(InputInterface $input = null, OutputInterface $output = null) { $commandName = $this->getCommandName( $input = $input ?: new ArgvInput ); $this->events->dispatch( new Events\CommandStarting( $commandName, $input, $output = $output ...
php
public function run(InputInterface $input = null, OutputInterface $output = null) { $commandName = $this->getCommandName( $input = $input ?: new ArgvInput ); $this->events->dispatch( new Events\CommandStarting( $commandName, $input, $output = $output ...
[ "public", "function", "run", "(", "InputInterface", "$", "input", "=", "null", ",", "OutputInterface", "$", "output", "=", "null", ")", "{", "$", "commandName", "=", "$", "this", "->", "getCommandName", "(", "$", "input", "=", "$", "input", "?", ":", "...
{@inheritdoc}
[ "{" ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Console/Application.php#L78-L97
train
Runs the command
[ 30522, 2270, 3853, 2448, 1006, 7953, 18447, 2121, 12172, 1002, 7953, 1027, 19701, 1010, 6434, 18447, 2121, 12172, 1002, 6434, 1027, 19701, 1007, 1063, 1002, 3094, 18442, 1027, 1002, 2023, 1011, 1028, 2131, 9006, 2386, 28911, 4168, 1006, 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...
overtrue/wechat
src/OfficialAccount/ShakeAround/GroupClient.php
GroupClient.removeDevices
public function removeDevices(int $groupId, array $deviceIdentifiers) { $params = [ 'group_id' => $groupId, 'device_identifiers' => $deviceIdentifiers, ]; return $this->httpPostJson('shakearound/device/group/deletedevice', $params); }
php
public function removeDevices(int $groupId, array $deviceIdentifiers) { $params = [ 'group_id' => $groupId, 'device_identifiers' => $deviceIdentifiers, ]; return $this->httpPostJson('shakearound/device/group/deletedevice', $params); }
[ "public", "function", "removeDevices", "(", "int", "$", "groupId", ",", "array", "$", "deviceIdentifiers", ")", "{", "$", "params", "=", "[", "'group_id'", "=>", "$", "groupId", ",", "'device_identifiers'", "=>", "$", "deviceIdentifiers", ",", "]", ";", "ret...
Remove one or more devices from a device group. @param int $groupId @param array $deviceIdentifiers @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
[ "Remove", "one", "or", "more", "devices", "from", "a", "device", "group", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/ShakeAround/GroupClient.php#L137-L145
train
Remove devices from a device group
[ 30522, 2270, 3853, 3718, 17726, 2229, 1006, 20014, 1002, 2177, 3593, 1010, 9140, 1002, 5080, 5178, 16778, 8873, 2545, 1007, 1063, 1002, 11498, 5244, 1027, 1031, 1005, 2177, 1035, 8909, 1005, 1027, 1028, 1002, 2177, 3593, 1010, 1005, 5080, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/GD.php
GD.polygon
public function polygon($points, $color, $width = null, $style = null, $fill = false) { // Scale each point by the AA factor and DPI foreach (array_keys($points) as $i) { $points[$i] = $this->_upscale($points[$i]); } $c = $this->_allocate_color($color); // Conv...
php
public function polygon($points, $color, $width = null, $style = null, $fill = false) { // Scale each point by the AA factor and DPI foreach (array_keys($points) as $i) { $points[$i] = $this->_upscale($points[$i]); } $c = $this->_allocate_color($color); // Conv...
[ "public", "function", "polygon", "(", "$", "points", ",", "$", "color", ",", "$", "width", "=", "null", ",", "$", "style", "=", "null", ",", "$", "fill", "=", "false", ")", "{", "// Scale each point by the AA factor and DPI", "foreach", "(", "array_keys", ...
Draws a polygon The polygon is formed by joining all the points stored in the $points array. $points has the following structure: <code> array(0 => x1, 1 => y1, 2 => x2, 3 => y2, ... ); </code> See {@link Style::munge_color()} for the format of the color array. See {@link Cpdf::setLineStyle()} for a description of t...
[ "Draws", "a", "polygon" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/Adapter/GD.php#L621-L654
train
Perform a polygon
[ 30522, 2270, 3853, 26572, 7446, 1006, 1002, 2685, 1010, 1002, 3609, 1010, 1002, 9381, 1027, 19701, 1010, 1002, 2806, 1027, 19701, 1010, 1002, 6039, 1027, 6270, 1007, 1063, 1013, 1013, 4094, 2169, 2391, 2011, 1996, 9779, 5387, 1998, 1040, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpFoundation/Session/Storage/Handler/RedisSessionHandler.php
RedisSessionHandler.updateTimestamp
public function updateTimestamp($sessionId, $data) { return (bool) $this->redis->expire($this->prefix.$sessionId, (int) ini_get('session.gc_maxlifetime')); }
php
public function updateTimestamp($sessionId, $data) { return (bool) $this->redis->expire($this->prefix.$sessionId, (int) ini_get('session.gc_maxlifetime')); }
[ "public", "function", "updateTimestamp", "(", "$", "sessionId", ",", "$", "data", ")", "{", "return", "(", "bool", ")", "$", "this", "->", "redis", "->", "expire", "(", "$", "this", "->", "prefix", ".", "$", "sessionId", ",", "(", "int", ")", "ini_ge...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/RedisSessionHandler.php#L110-L113
train
Update the session timestamp
[ 30522, 2270, 3853, 10651, 7292, 9153, 8737, 1006, 1002, 5219, 3593, 1010, 1002, 2951, 1007, 1063, 2709, 1006, 22017, 2140, 1007, 1002, 2023, 1011, 1028, 2417, 2483, 1011, 1028, 4654, 20781, 1006, 1002, 2023, 1011, 1028, 17576, 1012, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Support/Composer.php
Composer.dumpAutoloads
public function dumpAutoloads($extra = '') { $extra = $extra ? (array) $extra : []; $command = array_merge($this->findComposer(), ['dump-autoload'], $extra); $this->getProcess($command)->run(); }
php
public function dumpAutoloads($extra = '') { $extra = $extra ? (array) $extra : []; $command = array_merge($this->findComposer(), ['dump-autoload'], $extra); $this->getProcess($command)->run(); }
[ "public", "function", "dumpAutoloads", "(", "$", "extra", "=", "''", ")", "{", "$", "extra", "=", "$", "extra", "?", "(", "array", ")", "$", "extra", ":", "[", "]", ";", "$", "command", "=", "array_merge", "(", "$", "this", "->", "findComposer", "(...
Regenerate the Composer autoloader files. @param string|array $extra @return void
[ "Regenerate", "the", "Composer", "autoloader", "files", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Support/Composer.php#L44-L51
train
Dump all autoloader
[ 30522, 2270, 3853, 15653, 4887, 3406, 11066, 2015, 1006, 1002, 4469, 1027, 30524, 1027, 1002, 4469, 1029, 1006, 9140, 1007, 1002, 4469, 1024, 1031, 1033, 1025, 1002, 3094, 1027, 9140, 1035, 13590, 1006, 1002, 2023, 1011, 1028, 2424, 9006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Data/BlueprintSchema.php
BlueprintSchema.validate
public function validate(array $data) { try { $messages = $this->validateArray($data, $this->nested); } catch (\RuntimeException $e) { throw (new ValidationException($e->getMessage(), $e->getCode(), $e))->setMessages(); } if (!empty($messages)) { ...
php
public function validate(array $data) { try { $messages = $this->validateArray($data, $this->nested); } catch (\RuntimeException $e) { throw (new ValidationException($e->getMessage(), $e->getCode(), $e))->setMessages(); } if (!empty($messages)) { ...
[ "public", "function", "validate", "(", "array", "$", "data", ")", "{", "try", "{", "$", "messages", "=", "$", "this", "->", "validateArray", "(", "$", "data", ",", "$", "this", "->", "nested", ")", ";", "}", "catch", "(", "\\", "RuntimeException", "$...
Validate data against blueprints. @param array $data @throws \RuntimeException
[ "Validate", "data", "against", "blueprints", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Data/BlueprintSchema.php#L53-L65
train
Validate an array of data
[ 30522, 2270, 3853, 9398, 3686, 1006, 9140, 1002, 2951, 1007, 1063, 3046, 1063, 1002, 7696, 1027, 1002, 2023, 1011, 1028, 9398, 3686, 2906, 9447, 1006, 1002, 2951, 1010, 1002, 2023, 1011, 1028, 9089, 2098, 1007, 1025, 1065, 4608, 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...
octobercms/october
modules/backend/widgets/Lists.php
Lists.getVisibleColumns
public function getVisibleColumns() { $definitions = $this->defineListColumns(); $columns = []; /* * Supplied column list */ if ($this->columnOverride === null) { $this->columnOverride = $this->getSession('visible', null); } if ($this->...
php
public function getVisibleColumns() { $definitions = $this->defineListColumns(); $columns = []; /* * Supplied column list */ if ($this->columnOverride === null) { $this->columnOverride = $this->getSession('visible', null); } if ($this->...
[ "public", "function", "getVisibleColumns", "(", ")", "{", "$", "definitions", "=", "$", "this", "->", "defineListColumns", "(", ")", ";", "$", "columns", "=", "[", "]", ";", "/*\n * Supplied column list\n */", "if", "(", "$", "this", "->", "col...
Returns the list columns that are visible by list settings or default
[ "Returns", "the", "list", "columns", "that", "are", "visible", "by", "list", "settings", "or", "default" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/widgets/Lists.php#L708-L750
train
Returns all visible columns
[ 30522, 2270, 3853, 2131, 11365, 7028, 25778, 2819, 3619, 1006, 1007, 1063, 1002, 15182, 1027, 1002, 2023, 1011, 1028, 9375, 9863, 25778, 2819, 3619, 1006, 1007, 1025, 1002, 7753, 1027, 1031, 1033, 1025, 1013, 1008, 1008, 8127, 5930, 2862, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...