repo
stringclasses
21 values
path
stringlengths
10
105
func_name
stringlengths
6
64
original_string
stringlengths
105
15.6k
language
stringclasses
1 value
code
stringlengths
105
15.6k
code_tokens
listlengths
29
2.15k
docstring
stringlengths
11
2.85k
docstring_tokens
listlengths
1
290
sha
stringclasses
21 values
url
stringlengths
100
194
partition
stringclasses
1 value
summary
stringlengths
8
319
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
matomo-org/matomo
core/DataTable/Renderer/Php.php
Php.renderTable
protected function renderTable($table) { $array = array(); foreach ($table->getRows() as $id => $row) { $newRow = array( 'columns' => $row->getColumns(), 'metadata' => $row->getMetadata(), 'idsubdatatable' => $row->getIdSubDat...
php
protected function renderTable($table) { $array = array(); foreach ($table->getRows() as $id => $row) { $newRow = array( 'columns' => $row->getColumns(), 'metadata' => $row->getMetadata(), 'idsubdatatable' => $row->getIdSubDat...
[ "protected", "function", "renderTable", "(", "$", "table", ")", "{", "$", "array", "=", "array", "(", ")", ";", "foreach", "(", "$", "table", "->", "getRows", "(", ")", "as", "$", "id", "=>", "$", "row", ")", "{", "$", "newRow", "=", "array", "("...
Converts the given data table to an array @param DataTable $table @return array
[ "Converts", "the", "given", "data", "table", "to", "an", "array" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataTable/Renderer/Php.php#L194-L229
train
Render the table
[ 30522, 5123, 3853, 17552, 10880, 1006, 1002, 2795, 1007, 1063, 1002, 9140, 1027, 9140, 1006, 1007, 1025, 18921, 6776, 1006, 1002, 2795, 1011, 1028, 2131, 10524, 2015, 1006, 1007, 2004, 1002, 8909, 1027, 1028, 1002, 5216, 1007, 1063, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Console/Scheduling/Event.php
Event.expressionPasses
protected function expressionPasses() { $date = Carbon::now(); if ($this->timezone) { $date->setTimezone($this->timezone); } return CronExpression::factory($this->expression)->isDue($date->toDateTimeString()); }
php
protected function expressionPasses() { $date = Carbon::now(); if ($this->timezone) { $date->setTimezone($this->timezone); } return CronExpression::factory($this->expression)->isDue($date->toDateTimeString()); }
[ "protected", "function", "expressionPasses", "(", ")", "{", "$", "date", "=", "Carbon", "::", "now", "(", ")", ";", "if", "(", "$", "this", "->", "timezone", ")", "{", "$", "date", "->", "setTimezone", "(", "$", "this", "->", "timezone", ")", ";", ...
Determine if the Cron expression passes. @return bool
[ "Determine", "if", "the", "Cron", "expression", "passes", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Console/Scheduling/Event.php#L303-L312
train
Checks if the expression passes
[ 30522, 5123, 3853, 3670, 15194, 2229, 1006, 1007, 1063, 1002, 3058, 1027, 6351, 1024, 1024, 2085, 1006, 1007, 1025, 2065, 1006, 1002, 2023, 1011, 1028, 2051, 15975, 1007, 1063, 1002, 3058, 1011, 1028, 2275, 7292, 15975, 1006, 1002, 2023, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/HttpClient/Response/NativeResponse.php
NativeResponse.perform
private static function perform(NativeClientState $multi, array &$responses = null): void { // List of native handles for stream_select() if (null !== $responses) { $multi->handles = []; } foreach ($multi->openHandles as $i => [$h, $buffer, $inflate, $content, $onProgres...
php
private static function perform(NativeClientState $multi, array &$responses = null): void { // List of native handles for stream_select() if (null !== $responses) { $multi->handles = []; } foreach ($multi->openHandles as $i => [$h, $buffer, $inflate, $content, $onProgres...
[ "private", "static", "function", "perform", "(", "NativeClientState", "$", "multi", ",", "array", "&", "$", "responses", "=", "null", ")", ":", "void", "{", "// List of native handles for stream_select()", "if", "(", "null", "!==", "$", "responses", ")", "{", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpClient/Response/NativeResponse.php#L198-L306
train
Perform the connection
[ 30522, 2797, 10763, 3853, 4685, 1006, 3128, 20464, 11638, 9153, 2618, 1002, 4800, 1010, 9140, 1004, 1002, 10960, 1027, 19701, 1007, 1024, 11675, 1063, 1013, 1013, 2862, 1997, 3128, 16024, 2005, 5460, 1035, 7276, 1006, 1007, 2065, 1006, 1970...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Config/Setup.php
Setup.getStreams
public function getStreams() { $schemes = []; foreach ((array) $this->get('streams.schemes') as $scheme => $config) { $type = $config['type'] ?? 'ReadOnlyStream'; if ($type[0] !== '\\') { $type = '\\RocketTheme\\Toolbox\\StreamWrapper\\' . $type; }...
php
public function getStreams() { $schemes = []; foreach ((array) $this->get('streams.schemes') as $scheme => $config) { $type = $config['type'] ?? 'ReadOnlyStream'; if ($type[0] !== '\\') { $type = '\\RocketTheme\\Toolbox\\StreamWrapper\\' . $type; }...
[ "public", "function", "getStreams", "(", ")", "{", "$", "schemes", "=", "[", "]", ";", "foreach", "(", "(", "array", ")", "$", "this", "->", "get", "(", "'streams.schemes'", ")", "as", "$", "scheme", "=>", "$", "config", ")", "{", "$", "type", "=",...
Get available streams and their types from the configuration. @return array
[ "Get", "available", "streams", "and", "their", "types", "from", "the", "configuration", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Config/Setup.php#L265-L278
train
Get streams from configuration
[ 30522, 2270, 3853, 4152, 25379, 2015, 1006, 1007, 1063, 1002, 11683, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1006, 9140, 1007, 1002, 2023, 1011, 1028, 2131, 1006, 1005, 9199, 1012, 11683, 1005, 1007, 2004, 1002, 5679, 1027, 1028, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Eloquent/Relations/Concerns/AsPivot.php
AsPivot.fromRawAttributes
public static function fromRawAttributes(Model $parent, $attributes, $table, $exists = false) { $instance = static::fromAttributes($parent, [], $table, $exists); $instance->timestamps = $instance->hasTimestampAttributes($attributes); $instance->setRawAttributes($attributes, true); ...
php
public static function fromRawAttributes(Model $parent, $attributes, $table, $exists = false) { $instance = static::fromAttributes($parent, [], $table, $exists); $instance->timestamps = $instance->hasTimestampAttributes($attributes); $instance->setRawAttributes($attributes, true); ...
[ "public", "static", "function", "fromRawAttributes", "(", "Model", "$", "parent", ",", "$", "attributes", ",", "$", "table", ",", "$", "exists", "=", "false", ")", "{", "$", "instance", "=", "static", "::", "fromAttributes", "(", "$", "parent", ",", "[",...
Create a new pivot model from raw values returned from a query. @param \Illuminate\Database\Eloquent\Model $parent @param array $attributes @param string $table @param bool $exists @return static
[ "Create", "a", "new", "pivot", "model", "from", "raw", "values", "returned", "from", "a", "query", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Relations/Concerns/AsPivot.php#L74-L83
train
Create a new instance from attributes of the parent model.
[ 30522, 2270, 10763, 3853, 2013, 2527, 24281, 18886, 8569, 4570, 1006, 2944, 1002, 6687, 1010, 1002, 12332, 1010, 1002, 2795, 1010, 1002, 6526, 1027, 6270, 1007, 1063, 1002, 6013, 1027, 10763, 1024, 1024, 2013, 19321, 3089, 8569, 4570, 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/Validation/Concerns/ValidatesAttributes.php
ValidatesAttributes.validateAfterOrEqual
public function validateAfterOrEqual($attribute, $value, $parameters) { $this->requireParameterCount(1, $parameters, 'after_or_equal'); return $this->compareDates($attribute, $value, $parameters, '>='); }
php
public function validateAfterOrEqual($attribute, $value, $parameters) { $this->requireParameterCount(1, $parameters, 'after_or_equal'); return $this->compareDates($attribute, $value, $parameters, '>='); }
[ "public", "function", "validateAfterOrEqual", "(", "$", "attribute", ",", "$", "value", ",", "$", "parameters", ")", "{", "$", "this", "->", "requireParameterCount", "(", "1", ",", "$", "parameters", ",", "'after_or_equal'", ")", ";", "return", "$", "this", ...
Validate the date is equal or after a given date. @param string $attribute @param mixed $value @param array $parameters @return bool
[ "Validate", "the", "date", "is", "equal", "or", "after", "a", "given", "date", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L131-L136
train
Validate that an attribute is after or equal to a given date
[ 30522, 2270, 3853, 9398, 3686, 10354, 3334, 5686, 26426, 1006, 1002, 17961, 1010, 1002, 3643, 1010, 1002, 11709, 1007, 1063, 1002, 2023, 1011, 1028, 5478, 28689, 22828, 3597, 16671, 1006, 1015, 1010, 1002, 11709, 1010, 1005, 2044, 1035, 203...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Grid/Column.php
Column.view
public function view($view) { return $this->display(function ($value) use ($view) { $model = $this; return view($view, compact('model', 'value'))->render(); }); }
php
public function view($view) { return $this->display(function ($value) use ($view) { $model = $this; return view($view, compact('model', 'value'))->render(); }); }
[ "public", "function", "view", "(", "$", "view", ")", "{", "return", "$", "this", "->", "display", "(", "function", "(", "$", "value", ")", "use", "(", "$", "view", ")", "{", "$", "model", "=", "$", "this", ";", "return", "view", "(", "$", "view",...
Render this column with the given view. @param string $view @return $this
[ "Render", "this", "column", "with", "the", "given", "view", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Grid/Column.php#L385-L392
train
View the value of the field
[ 30522, 2270, 3853, 3193, 1006, 1002, 3193, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 4653, 1006, 3853, 1006, 1002, 3643, 1007, 2224, 1006, 1002, 3193, 1007, 1063, 1002, 2944, 1027, 1002, 2023, 1025, 2709, 3193, 1006, 1002, 3193, 1010, 923...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Tracker/Model.php
Model.getIdsAction
public function getIdsAction($actionsNameAndType) { $sql = "SELECT MIN(idaction) as idaction, type, name FROM " . Common::prefixTable('log_action') . " WHERE"; $bind = array(); $i = 0; foreach ($actionsNameAndType as $actionNameType) { $name = $actionNameTyp...
php
public function getIdsAction($actionsNameAndType) { $sql = "SELECT MIN(idaction) as idaction, type, name FROM " . Common::prefixTable('log_action') . " WHERE"; $bind = array(); $i = 0; foreach ($actionsNameAndType as $actionNameType) { $name = $actionNameTyp...
[ "public", "function", "getIdsAction", "(", "$", "actionsNameAndType", ")", "{", "$", "sql", "=", "\"SELECT MIN(idaction) as idaction, type, name FROM \"", ".", "Common", "::", "prefixTable", "(", "'log_action'", ")", ".", "\" WHERE\"", ";", "$", "bind", "=", "array"...
Returns the IDs for multiple actions based on name + type values. @param array $actionsNameAndType Array like `array( array('name' => '...', 'type' => 1), ... )` @return array|false Array of DB rows w/ columns: **idaction**, **type**, **name**.
[ "Returns", "the", "IDs", "for", "multiple", "actions", "based", "on", "name", "+", "type", "values", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Tracker/Model.php#L216-L252
train
Get all actions that match the given name and type
[ 30522, 2270, 3853, 2131, 9821, 18908, 3258, 1006, 1002, 4506, 18442, 5685, 13874, 1007, 1063, 1002, 29296, 1027, 1000, 7276, 8117, 1006, 16096, 7542, 1007, 2004, 16096, 7542, 30524, 1035, 2895, 1005, 1007, 1012, 1000, 2073, 1000, 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...
octobercms/october
modules/cms/classes/Theme.php
Theme.getActiveTheme
public static function getActiveTheme() { if (self::$activeThemeCache !== false) { return self::$activeThemeCache; } $theme = static::load(static::getActiveThemeCode()); if (!File::isDirectory($theme->getPath())) { return self::$activeThemeCache = null; ...
php
public static function getActiveTheme() { if (self::$activeThemeCache !== false) { return self::$activeThemeCache; } $theme = static::load(static::getActiveThemeCode()); if (!File::isDirectory($theme->getPath())) { return self::$activeThemeCache = null; ...
[ "public", "static", "function", "getActiveTheme", "(", ")", "{", "if", "(", "self", "::", "$", "activeThemeCache", "!==", "false", ")", "{", "return", "self", "::", "$", "activeThemeCache", ";", "}", "$", "theme", "=", "static", "::", "load", "(", "stati...
Returns the active theme object. @return \Cms\Classes\Theme Returns the loaded theme object. If the theme doesn't exist, returns null.
[ "Returns", "the", "active", "theme", "object", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/classes/Theme.php#L202-L215
train
Returns the active theme
[ 30522, 2270, 10763, 3853, 2131, 19620, 10760, 4168, 1006, 1007, 1063, 2065, 1006, 2969, 1024, 1024, 1002, 3161, 10760, 4168, 3540, 5403, 999, 1027, 1027, 6270, 1007, 1063, 2709, 2969, 1024, 1024, 1002, 3161, 10760, 4168, 3540, 5403, 1025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/DomCrawler/AbstractUriElement.php
AbstractUriElement.cleanupQuery
private function cleanupQuery(string $uri): string { if (false !== $pos = strpos($uri, '?')) { return substr($uri, 0, $pos); } return $uri; }
php
private function cleanupQuery(string $uri): string { if (false !== $pos = strpos($uri, '?')) { return substr($uri, 0, $pos); } return $uri; }
[ "private", "function", "cleanupQuery", "(", "string", "$", "uri", ")", ":", "string", "{", "if", "(", "false", "!==", "$", "pos", "=", "strpos", "(", "$", "uri", ",", "'?'", ")", ")", "{", "return", "substr", "(", "$", "uri", ",", "0", ",", "$", ...
Remove the query string from the uri.
[ "Remove", "the", "query", "string", "from", "the", "uri", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DomCrawler/AbstractUriElement.php#L182-L189
train
Remove the query part of the URI
[ 30522, 2797, 3853, 27686, 4226, 2854, 1006, 5164, 1002, 24471, 2072, 1007, 1024, 5164, 1063, 2065, 1006, 6270, 999, 1027, 1027, 1002, 13433, 2015, 1027, 2358, 14536, 2891, 1006, 1002, 24471, 2072, 1010, 1005, 1029, 1005, 1007, 1007, 1063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Cache/Frontend/Page.php
Zend_Cache_Frontend_Page._makePartialId
protected function _makePartialId($arrayName, $bool1, $bool2) { switch ($arrayName) { case 'Get': $var = $_GET; break; case 'Post': $var = $_POST; break; case 'Session': if (isset($_SESSION)) { $var = $_SESSI...
php
protected function _makePartialId($arrayName, $bool1, $bool2) { switch ($arrayName) { case 'Get': $var = $_GET; break; case 'Post': $var = $_POST; break; case 'Session': if (isset($_SESSION)) { $var = $_SESSI...
[ "protected", "function", "_makePartialId", "(", "$", "arrayName", ",", "$", "bool1", ",", "$", "bool2", ")", "{", "switch", "(", "$", "arrayName", ")", "{", "case", "'Get'", ":", "$", "var", "=", "$", "_GET", ";", "break", ";", "case", "'Post'", ":",...
Make a partial id depending on options @param string $arrayName Superglobal array name @param bool $bool1 If true, cache is still on even if there are some variables in the superglobal array @param bool $bool2 If true, we have to use the content of the superglobal array to make a partial id @return mixe...
[ "Make", "a", "partial", "id", "depending", "on", "options" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Cache/Frontend/Page.php#L363-L402
train
This method is used to make partial ID
[ 30522, 5123, 3853, 1035, 2191, 19362, 20925, 3593, 1006, 1002, 9140, 18442, 1010, 1002, 22017, 2140, 2487, 1010, 1002, 22017, 2140, 2475, 1007, 1063, 6942, 1006, 1002, 9140, 18442, 1007, 1063, 2553, 1005, 2131, 1005, 1024, 1002, 13075, 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...
symfony/symfony
src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php
FileProfilerStorage.write
public function write(Profile $profile) { $file = $this->getFilename($profile->getToken()); $profileIndexed = is_file($file); if (!$profileIndexed) { // Create directory $dir = \dirname($file); if (!is_dir($dir) && false === @mkdir($dir, 0777, true) && !i...
php
public function write(Profile $profile) { $file = $this->getFilename($profile->getToken()); $profileIndexed = is_file($file); if (!$profileIndexed) { // Create directory $dir = \dirname($file); if (!is_dir($dir) && false === @mkdir($dir, 0777, true) && !i...
[ "public", "function", "write", "(", "Profile", "$", "profile", ")", "{", "$", "file", "=", "$", "this", "->", "getFilename", "(", "$", "profile", "->", "getToken", "(", ")", ")", ";", "$", "profileIndexed", "=", "is_file", "(", "$", "file", ")", ";",...
{@inheritdoc} @throws \RuntimeException
[ "{", "@inheritdoc", "}" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php#L130-L187
train
Write profile to file
[ 30522, 2270, 3853, 4339, 1006, 6337, 1002, 6337, 1007, 1063, 1002, 5371, 1027, 1002, 2023, 1011, 1028, 2131, 8873, 20844, 4168, 1006, 1002, 6337, 1011, 1028, 2131, 18715, 2368, 1006, 1007, 1007, 1025, 1002, 6337, 22254, 10288, 2098, 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...
symfony/symfony
src/Symfony/Component/EventDispatcher/EventDispatcher.php
EventDispatcher.optimizeListeners
private function optimizeListeners(string $eventName): array { krsort($this->listeners[$eventName]); $this->optimized[$eventName] = []; foreach ($this->listeners[$eventName] as &$listeners) { foreach ($listeners as &$listener) { $closure = &$this->optimized[$even...
php
private function optimizeListeners(string $eventName): array { krsort($this->listeners[$eventName]); $this->optimized[$eventName] = []; foreach ($this->listeners[$eventName] as &$listeners) { foreach ($listeners as &$listener) { $closure = &$this->optimized[$even...
[ "private", "function", "optimizeListeners", "(", "string", "$", "eventName", ")", ":", "array", "{", "krsort", "(", "$", "this", "->", "listeners", "[", "$", "eventName", "]", ")", ";", "$", "this", "->", "optimized", "[", "$", "eventName", "]", "=", "...
Optimizes the internal list of listeners for the given event by priority.
[ "Optimizes", "the", "internal", "list", "of", "listeners", "for", "the", "given", "event", "by", "priority", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/EventDispatcher/EventDispatcher.php#L285-L307
train
Optimizes the listeners for an event
[ 30522, 2797, 3853, 23569, 27605, 12638, 27870, 16912, 1006, 5164, 1002, 2724, 18442, 1007, 1024, 9140, 1063, 1047, 25301, 5339, 1006, 1002, 2023, 1011, 1028, 13810, 1031, 1002, 2724, 18442, 1033, 1007, 1025, 1002, 2023, 1011, 1028, 23569, 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/DataTable/Filter/AddColumnsProcessedMetrics.php
AddColumnsProcessedMetrics.filter
public function filter($table) { if ($this->deleteRowsWithNoVisit) { $this->deleteRowsWithNoVisit($table); } $extraProcessedMetrics = $table->getMetadata(DataTable::EXTRA_PROCESSED_METRICS_METADATA_NAME); $extraProcessedMetrics[] = new ConversionRate(); $extraPr...
php
public function filter($table) { if ($this->deleteRowsWithNoVisit) { $this->deleteRowsWithNoVisit($table); } $extraProcessedMetrics = $table->getMetadata(DataTable::EXTRA_PROCESSED_METRICS_METADATA_NAME); $extraProcessedMetrics[] = new ConversionRate(); $extraPr...
[ "public", "function", "filter", "(", "$", "table", ")", "{", "if", "(", "$", "this", "->", "deleteRowsWithNoVisit", ")", "{", "$", "this", "->", "deleteRowsWithNoVisit", "(", "$", "table", ")", ";", "}", "$", "extraProcessedMetrics", "=", "$", "table", "...
Adds the processed metrics. See {@link AddColumnsProcessedMetrics} for more information. @param DataTable $table
[ "Adds", "the", "processed", "metrics", ".", "See", "{", "@link", "AddColumnsProcessedMetrics", "}", "for", "more", "information", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataTable/Filter/AddColumnsProcessedMetrics.php#L65-L79
train
Filter the table so that it can be processed.
[ 30522, 2270, 3853, 11307, 1006, 1002, 2795, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 3972, 15141, 15568, 24415, 16693, 17417, 2102, 1007, 1063, 1002, 2023, 1011, 1028, 3972, 15141, 15568, 24415, 16693, 17417, 2102, 1006, 1002, 2795, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/UserCountry/LocationProvider.php
LocationProvider.getProviderById
public static function getProviderById($providerId) { foreach (self::getAllProviders() as $provider) { if ($provider->getId() == $providerId && $provider->isAvailable()) { return $provider; } } return null; }
php
public static function getProviderById($providerId) { foreach (self::getAllProviders() as $provider) { if ($provider->getId() == $providerId && $provider->isAvailable()) { return $provider; } } return null; }
[ "public", "static", "function", "getProviderById", "(", "$", "providerId", ")", "{", "foreach", "(", "self", "::", "getAllProviders", "(", ")", "as", "$", "provider", ")", "{", "if", "(", "$", "provider", "->", "getId", "(", ")", "==", "$", "providerId",...
Returns a provider instance by ID or false if the ID is invalid or unavailable. @param string $providerId @return \Piwik\Plugins\UserCountry\LocationProvider|null
[ "Returns", "a", "provider", "instance", "by", "ID", "or", "false", "if", "the", "ID", "is", "invalid", "or", "unavailable", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/UserCountry/LocationProvider.php#L354-L363
train
Get provider by id
[ 30522, 2270, 10763, 3853, 2131, 21572, 17258, 2121, 3762, 3593, 1006, 1002, 10802, 3593, 1007, 1063, 18921, 6776, 1006, 2969, 1024, 1024, 2131, 8095, 21572, 17258, 2545, 1006, 1007, 2004, 1002, 10802, 1007, 1063, 2065, 1006, 1002, 10802, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/SitesManager/API.php
API.setGlobalExcludedIps
public function setGlobalExcludedIps($excludedIps) { Piwik::checkUserHasSuperUserAccess(); $excludedIps = $this->checkAndReturnExcludedIps($excludedIps); Option::set(self::OPTION_EXCLUDED_IPS_GLOBAL, $excludedIps); Cache::deleteTrackerCache(); return true; }
php
public function setGlobalExcludedIps($excludedIps) { Piwik::checkUserHasSuperUserAccess(); $excludedIps = $this->checkAndReturnExcludedIps($excludedIps); Option::set(self::OPTION_EXCLUDED_IPS_GLOBAL, $excludedIps); Cache::deleteTrackerCache(); return true; }
[ "public", "function", "setGlobalExcludedIps", "(", "$", "excludedIps", ")", "{", "Piwik", "::", "checkUserHasSuperUserAccess", "(", ")", ";", "$", "excludedIps", "=", "$", "this", "->", "checkAndReturnExcludedIps", "(", "$", "excludedIps", ")", ";", "Option", ":...
Sets IPs to be excluded from all websites. IPs can contain wildcards. Will also apply to websites created in the future. @param string $excludedIps Comma separated list of IPs to exclude from being tracked (allows wildcards) @return bool
[ "Sets", "IPs", "to", "be", "excluded", "from", "all", "websites", ".", "IPs", "can", "contain", "wildcards", ".", "Will", "also", "apply", "to", "websites", "created", "in", "the", "future", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/SitesManager/API.php#L968-L975
train
Set excluded IPs for all users
[ 30522, 2270, 3853, 2275, 23296, 16429, 9453, 2595, 20464, 13936, 11514, 2015, 1006, 1002, 12421, 11514, 2015, 1007, 1063, 14255, 9148, 2243, 1024, 1024, 4638, 20330, 14949, 6342, 4842, 20330, 6305, 9623, 2015, 1006, 1007, 1025, 1002, 12421, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
barryvdh/laravel-debugbar
src/DataCollector/QueryCollector.php
QueryCollector.normalizeFilename
protected function normalizeFilename($path) { if (file_exists($path)) { $path = realpath($path); } return str_replace(base_path(), '', $path); }
php
protected function normalizeFilename($path) { if (file_exists($path)) { $path = realpath($path); } return str_replace(base_path(), '', $path); }
[ "protected", "function", "normalizeFilename", "(", "$", "path", ")", "{", "if", "(", "file_exists", "(", "$", "path", ")", ")", "{", "$", "path", "=", "realpath", "(", "$", "path", ")", ";", "}", "return", "str_replace", "(", "base_path", "(", ")", "...
Shorten the path by removing the relative links and base dir @param string $path @return string
[ "Shorten", "the", "path", "by", "removing", "the", "relative", "links", "and", "base", "dir" ]
2d195779ea4f809f69764a795e2ec371dbb76a96
https://github.com/barryvdh/laravel-debugbar/blob/2d195779ea4f809f69764a795e2ec371dbb76a96/src/DataCollector/QueryCollector.php#L362-L368
train
Normalize filename.
[ 30522, 5123, 3853, 3671, 4697, 8873, 20844, 4168, 1006, 1002, 4130, 1007, 1063, 2065, 1006, 5371, 1035, 6526, 1006, 1002, 4130, 1007, 1007, 1063, 1002, 4130, 1027, 2613, 15069, 1006, 1002, 4130, 1007, 1025, 1065, 2709, 2358, 2099, 1035, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/API/Request.php
Request.getRawSegmentFromRequest
public static function getRawSegmentFromRequest() { // we need the URL encoded segment parameter, we fetch it from _SERVER['QUERY_STRING'] instead of default URL decoded _GET $segmentRaw = false; $segment = Common::getRequestVar('segment', '', 'string'); if (!empty($segment)) { ...
php
public static function getRawSegmentFromRequest() { // we need the URL encoded segment parameter, we fetch it from _SERVER['QUERY_STRING'] instead of default URL decoded _GET $segmentRaw = false; $segment = Common::getRequestVar('segment', '', 'string'); if (!empty($segment)) { ...
[ "public", "static", "function", "getRawSegmentFromRequest", "(", ")", "{", "// we need the URL encoded segment parameter, we fetch it from _SERVER['QUERY_STRING'] instead of default URL decoded _GET", "$", "segmentRaw", "=", "false", ";", "$", "segment", "=", "Common", "::", "get...
Returns the segment query parameter from the original request, without modifications. @return array|bool
[ "Returns", "the", "segment", "query", "parameter", "from", "the", "original", "request", "without", "modifications", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/API/Request.php#L591-L603
train
Returns the raw segment parameter from the request
[ 30522, 2270, 10763, 3853, 2131, 2527, 9333, 13910, 3672, 19699, 5358, 2890, 15500, 1006, 1007, 1063, 1013, 1013, 2057, 2342, 1996, 24471, 2140, 12359, 6903, 16381, 1010, 2057, 18584, 2009, 2013, 1035, 8241, 1031, 1005, 23032, 1035, 5164, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/system/ServiceProvider.php
ServiceProvider.registerErrorHandler
protected function registerErrorHandler() { Event::listen('exception.beforeRender', function ($exception, $httpCode, $request) { $handler = new ErrorHandler; return $handler->handleException($exception); }); }
php
protected function registerErrorHandler() { Event::listen('exception.beforeRender', function ($exception, $httpCode, $request) { $handler = new ErrorHandler; return $handler->handleException($exception); }); }
[ "protected", "function", "registerErrorHandler", "(", ")", "{", "Event", "::", "listen", "(", "'exception.beforeRender'", ",", "function", "(", "$", "exception", ",", "$", "httpCode", ",", "$", "request", ")", "{", "$", "handler", "=", "new", "ErrorHandler", ...
/* Error handling for uncaught Exceptions
[ "/", "*", "Error", "handling", "for", "uncaught", "Exceptions" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/ServiceProvider.php#L252-L258
train
Register ErrorHandler.
[ 30522, 5123, 3853, 4236, 2121, 29165, 11774, 3917, 1006, 1007, 1063, 2724, 1024, 1024, 4952, 1006, 1005, 6453, 1012, 2077, 7389, 4063, 1005, 1010, 3853, 1006, 1002, 6453, 1010, 1002, 8299, 16044, 1010, 1002, 5227, 1007, 1063, 1002, 28213, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Db/Adapter/Pdo/Mysql.php
Mysql.getConnection
public function getConnection() { if ($this->_connection) { return $this->_connection; } $this->_connect(); /** * Before MySQL 5.1.17, server-side prepared statements * do not use the query cache. * @see http://dev.mysql.com/doc/refman/5.1/en/...
php
public function getConnection() { if ($this->_connection) { return $this->_connection; } $this->_connect(); /** * Before MySQL 5.1.17, server-side prepared statements * do not use the query cache. * @see http://dev.mysql.com/doc/refman/5.1/en/...
[ "public", "function", "getConnection", "(", ")", "{", "if", "(", "$", "this", "->", "_connection", ")", "{", "return", "$", "this", "->", "_connection", ";", "}", "$", "this", "->", "_connect", "(", ")", ";", "/**\n * Before MySQL 5.1.17, server-side p...
Returns connection handle @return resource
[ "Returns", "connection", "handle" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Db/Adapter/Pdo/Mysql.php#L68-L88
train
Get the connection
[ 30522, 2270, 3853, 2131, 8663, 2638, 7542, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 1035, 4434, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 1035, 4434, 1025, 1065, 1002, 2023, 1011, 1028, 1035, 7532, 1006, 1007, 1025, 1013, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Db/Adapter/Db2.php
Zend_Db_Adapter_Db2._determineI5
protected function _determineI5() { // first us the compiled flag. $this->_isI5 = (php_uname('s') == 'OS400') ? true : false; // if this is set, then us it if (isset($this->_config['os'])){ if (strtolower($this->_config['os']) === 'i5') { $this->_isI5 = t...
php
protected function _determineI5() { // first us the compiled flag. $this->_isI5 = (php_uname('s') == 'OS400') ? true : false; // if this is set, then us it if (isset($this->_config['os'])){ if (strtolower($this->_config['os']) === 'i5') { $this->_isI5 = t...
[ "protected", "function", "_determineI5", "(", ")", "{", "// first us the compiled flag.", "$", "this", "->", "_isI5", "=", "(", "php_uname", "(", "'s'", ")", "==", "'OS400'", ")", "?", "true", ":", "false", ";", "// if this is set, then us it", "if", "(", "iss...
Check the connection parameters according to verify type of used OS @return void
[ "Check", "the", "connection", "parameters", "according", "to", "verify", "type", "of", "used", "OS" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Adapter/Db2.php#L761-L776
train
determine I5 if the OS is i5
[ 30522, 5123, 3853, 1035, 5646, 2072, 2629, 1006, 1007, 1063, 1013, 1013, 2034, 2149, 1996, 9227, 5210, 1012, 1002, 2023, 1011, 1028, 1035, 2003, 2072, 2629, 1027, 1006, 25718, 1035, 14477, 4168, 1006, 1005, 1055, 1005, 1007, 1027, 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...
laravel/framework
src/Illuminate/Validation/Validator.php
Validator.setData
public function setData(array $data) { $this->data = $this->parseData($data); $this->setRules($this->initialRules); return $this; }
php
public function setData(array $data) { $this->data = $this->parseData($data); $this->setRules($this->initialRules); return $this; }
[ "public", "function", "setData", "(", "array", "$", "data", ")", "{", "$", "this", "->", "data", "=", "$", "this", "->", "parseData", "(", "$", "data", ")", ";", "$", "this", "->", "setRules", "(", "$", "this", "->", "initialRules", ")", ";", "retu...
Set the data under validation. @param array $data @return $this
[ "Set", "the", "data", "under", "validation", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Validator.php#L781-L788
train
setData - Set the data of the current page
[ 30522, 2270, 3853, 2275, 2850, 2696, 1006, 9140, 1002, 2951, 1007, 1063, 1002, 2023, 1011, 1028, 2951, 1027, 1002, 2023, 1011, 1028, 11968, 6924, 6790, 1006, 1002, 2951, 1007, 1025, 1002, 2023, 1011, 1028, 2275, 6820, 4244, 1006, 1002, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Serializer/Encoder/XmlEncoder.php
XmlEncoder.appendNode
private function appendNode(\DOMNode $parentNode, $data, string $nodeName, string $key = null): bool { $node = $this->dom->createElement($nodeName); if (null !== $key) { $node->setAttribute('key', $key); } $appendNode = $this->selectNodeType($node, $data); // we m...
php
private function appendNode(\DOMNode $parentNode, $data, string $nodeName, string $key = null): bool { $node = $this->dom->createElement($nodeName); if (null !== $key) { $node->setAttribute('key', $key); } $appendNode = $this->selectNodeType($node, $data); // we m...
[ "private", "function", "appendNode", "(", "\\", "DOMNode", "$", "parentNode", ",", "$", "data", ",", "string", "$", "nodeName", ",", "string", "$", "key", "=", "null", ")", ":", "bool", "{", "$", "node", "=", "$", "this", "->", "dom", "->", "createEl...
Selects the type of node to create and appends it to the parent. @param array|object $data
[ "Selects", "the", "type", "of", "node", "to", "create", "and", "appends", "it", "to", "the", "parent", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php#L477-L490
train
append node to parent node
[ 30522, 2797, 3853, 10439, 10497, 3630, 3207, 1006, 1032, 14383, 3630, 3207, 1002, 6687, 3630, 3207, 1010, 1002, 2951, 1010, 5164, 1002, 13045, 18442, 1010, 5164, 1002, 3145, 1027, 19701, 1007, 1024, 22017, 2140, 1063, 1002, 13045, 1027, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/formwidgets/CodeEditor.php
CodeEditor.prepareVars
public function prepareVars() { $this->vars['fontSize'] = $this->fontSize; $this->vars['wordWrap'] = $this->wordWrap; $this->vars['codeFolding'] = $this->codeFolding; $this->vars['autoClosing'] = $this->autoClosing; $this->vars['tabSize'] = $this->tabSize; $this->vars...
php
public function prepareVars() { $this->vars['fontSize'] = $this->fontSize; $this->vars['wordWrap'] = $this->wordWrap; $this->vars['codeFolding'] = $this->codeFolding; $this->vars['autoClosing'] = $this->autoClosing; $this->vars['tabSize'] = $this->tabSize; $this->vars...
[ "public", "function", "prepareVars", "(", ")", "{", "$", "this", "->", "vars", "[", "'fontSize'", "]", "=", "$", "this", "->", "fontSize", ";", "$", "this", "->", "vars", "[", "'wordWrap'", "]", "=", "$", "this", "->", "wordWrap", ";", "$", "this", ...
Prepares the widget data
[ "Prepares", "the", "widget", "data" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/formwidgets/CodeEditor.php#L158-L183
train
Prepare form field variables
[ 30522, 2270, 3853, 7374, 10755, 2015, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 13075, 2015, 1031, 1005, 15489, 5332, 4371, 1005, 1033, 1027, 1002, 2023, 1011, 1028, 15489, 5332, 4371, 1025, 1002, 2023, 1011, 1028, 13075, 2015, 1031, 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
libs/Zend/Cache/Manager.php
Zend_Cache_Manager.setCacheTemplate
public function setCacheTemplate($name, $options) { if ($options instanceof Zend_Config) { $options = $options->toArray(); } elseif (!is_array($options)) { // require_once 'Zend/Cache/Exception.php'; throw new Zend_Cache_Exception('Options passed must be in' ...
php
public function setCacheTemplate($name, $options) { if ($options instanceof Zend_Config) { $options = $options->toArray(); } elseif (!is_array($options)) { // require_once 'Zend/Cache/Exception.php'; throw new Zend_Cache_Exception('Options passed must be in' ...
[ "public", "function", "setCacheTemplate", "(", "$", "name", ",", "$", "options", ")", "{", "if", "(", "$", "options", "instanceof", "Zend_Config", ")", "{", "$", "options", "=", "$", "options", "->", "toArray", "(", ")", ";", "}", "elseif", "(", "!", ...
Set a named configuration template from which a cache object can later be lazy loaded @param string $name @param array $options @return Zend_Cache_Manager
[ "Set", "a", "named", "configuration", "template", "from", "which", "a", "cache", "object", "can", "later", "be", "lazy", "loaded" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Cache/Manager.php#L203-L214
train
Set a cache template
[ 30522, 2270, 3853, 2275, 3540, 20318, 6633, 15725, 1006, 1002, 2171, 1010, 1002, 7047, 1007, 1063, 2065, 1006, 1002, 7047, 6013, 11253, 16729, 2094, 1035, 9530, 8873, 2290, 1007, 1063, 1002, 7047, 1027, 1002, 7047, 1011, 1028, 2000, 2906, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Config/Definition/PrototypedArrayNode.php
PrototypedArrayNode.normalizeValue
protected function normalizeValue($value) { if (false === $value) { return $value; } $value = $this->remapXml($value); $isAssoc = array_keys($value) !== range(0, \count($value) - 1); $normalized = []; foreach ($value as $k => $v) { if (null !...
php
protected function normalizeValue($value) { if (false === $value) { return $value; } $value = $this->remapXml($value); $isAssoc = array_keys($value) !== range(0, \count($value) - 1); $normalized = []; foreach ($value as $k => $v) { if (null !...
[ "protected", "function", "normalizeValue", "(", "$", "value", ")", "{", "if", "(", "false", "===", "$", "value", ")", "{", "return", "$", "value", ";", "}", "$", "value", "=", "$", "this", "->", "remapXml", "(", "$", "value", ")", ";", "$", "isAsso...
Normalizes the value. @param mixed $value The value to normalize @return mixed The normalized value @throws InvalidConfigurationException @throws DuplicateKeyException
[ "Normalizes", "the", "value", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php#L220-L278
train
Normalizes the value of the attribute
[ 30522, 5123, 3853, 3671, 4697, 10175, 5657, 1006, 1002, 3643, 1007, 1063, 2065, 1006, 6270, 1027, 1027, 1027, 1002, 3643, 1007, 1063, 2709, 1002, 3643, 1025, 1065, 1002, 3643, 1027, 1002, 2023, 1011, 1028, 2128, 2863, 2361, 2595, 19968, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Routing/UrlGenerator.php
UrlGenerator.formatParameters
public function formatParameters($parameters) { $parameters = Arr::wrap($parameters); foreach ($parameters as $key => $parameter) { if ($parameter instanceof UrlRoutable) { $parameters[$key] = $parameter->getRouteKey(); } } return $parameters...
php
public function formatParameters($parameters) { $parameters = Arr::wrap($parameters); foreach ($parameters as $key => $parameter) { if ($parameter instanceof UrlRoutable) { $parameters[$key] = $parameter->getRouteKey(); } } return $parameters...
[ "public", "function", "formatParameters", "(", "$", "parameters", ")", "{", "$", "parameters", "=", "Arr", "::", "wrap", "(", "$", "parameters", ")", ";", "foreach", "(", "$", "parameters", "as", "$", "key", "=>", "$", "parameter", ")", "{", "if", "(",...
Format the array of URL parameters. @param mixed|array $parameters @return array
[ "Format", "the", "array", "of", "URL", "parameters", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/UrlGenerator.php#L452-L463
train
Formats the parameters array
[ 30522, 2270, 3853, 4289, 28689, 22828, 2015, 1006, 1002, 11709, 1007, 1063, 1002, 11709, 1027, 12098, 2099, 1024, 1024, 10236, 1006, 1002, 11709, 1007, 1025, 18921, 6776, 1006, 1002, 11709, 2004, 1002, 3145, 1027, 1028, 1002, 16381, 1007, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Tracker/PageUrl.php
PageUrl.excludeQueryParametersFromUrl
public static function excludeQueryParametersFromUrl($originalUrl, $idSite) { $originalUrl = self::cleanupUrl($originalUrl); $parsedUrl = @parse_url($originalUrl); $parsedUrl = self::cleanupHostAndHashTag($parsedUrl, $idSite); $parametersToExclude = self::getQueryParametersToExclude...
php
public static function excludeQueryParametersFromUrl($originalUrl, $idSite) { $originalUrl = self::cleanupUrl($originalUrl); $parsedUrl = @parse_url($originalUrl); $parsedUrl = self::cleanupHostAndHashTag($parsedUrl, $idSite); $parametersToExclude = self::getQueryParametersToExclude...
[ "public", "static", "function", "excludeQueryParametersFromUrl", "(", "$", "originalUrl", ",", "$", "idSite", ")", "{", "$", "originalUrl", "=", "self", "::", "cleanupUrl", "(", "$", "originalUrl", ")", ";", "$", "parsedUrl", "=", "@", "parse_url", "(", "$",...
Given the Input URL, will exclude all query parameters set for this site @static @param $originalUrl @param $idSite @return bool|string Returned URL is HTML entities decoded
[ "Given", "the", "Input", "URL", "will", "exclude", "all", "query", "parameters", "set", "for", "this", "site" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Tracker/PageUrl.php#L39-L65
train
Exclude query parameters from the URL
[ 30522, 2270, 10763, 3853, 23329, 4226, 2854, 28689, 22828, 22747, 21716, 3126, 2140, 1006, 1002, 2434, 3126, 2140, 1010, 1002, 8909, 28032, 2063, 1007, 1063, 1002, 2434, 3126, 2140, 1027, 2969, 1024, 1024, 27686, 3126, 2140, 1006, 1002, 243...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/thrift
lib/php/lib/Transport/TBufferedTransport.php
TBufferedTransport.write
public function write($buf) { $this->wBuf_ .= $buf; if (TStringFuncFactory::create()->strlen($this->wBuf_) >= $this->wBufSize_) { $out = $this->wBuf_; // Note that we clear the internal wBuf_ prior to the underlying write // to ensure we're in a sane state (i.e. ...
php
public function write($buf) { $this->wBuf_ .= $buf; if (TStringFuncFactory::create()->strlen($this->wBuf_) >= $this->wBufSize_) { $out = $this->wBuf_; // Note that we clear the internal wBuf_ prior to the underlying write // to ensure we're in a sane state (i.e. ...
[ "public", "function", "write", "(", "$", "buf", ")", "{", "$", "this", "->", "wBuf_", ".=", "$", "buf", ";", "if", "(", "TStringFuncFactory", "::", "create", "(", ")", "->", "strlen", "(", "$", "this", "->", "wBuf_", ")", ">=", "$", "this", "->", ...
@inheritdoc @param string $buf @throws TTransportException
[ "@inheritdoc" ]
acdd4226c210336e9e15eb812e5932a645fcd5ce
https://github.com/apache/thrift/blob/acdd4226c210336e9e15eb812e5932a645fcd5ce/lib/php/lib/Transport/TBufferedTransport.php#L174-L186
train
Write the buffer to the transport
[ 30522, 2270, 3853, 4339, 1006, 1002, 20934, 2546, 1007, 1063, 1002, 2023, 1011, 1028, 25610, 16093, 1035, 1012, 1027, 1002, 20934, 2546, 1025, 2065, 1006, 24529, 18886, 3070, 11263, 12273, 21450, 1024, 1024, 3443, 1006, 1007, 1011, 1028, 23...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php
ControllerTrait.stream
protected function stream(string $view, array $parameters = [], StreamedResponse $response = null): StreamedResponse { if ($this->container->has('templating')) { @trigger_error('Using the "templating" service is deprecated since version 4.3 and will be removed in 5.0; use Twig instead.', E_USER_...
php
protected function stream(string $view, array $parameters = [], StreamedResponse $response = null): StreamedResponse { if ($this->container->has('templating')) { @trigger_error('Using the "templating" service is deprecated since version 4.3 and will be removed in 5.0; use Twig instead.', E_USER_...
[ "protected", "function", "stream", "(", "string", "$", "view", ",", "array", "$", "parameters", "=", "[", "]", ",", "StreamedResponse", "$", "response", "=", "null", ")", ":", "StreamedResponse", "{", "if", "(", "$", "this", "->", "container", "->", "has...
Streams a view. @final
[ "Streams", "a", "view", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php#L252-L279
train
Streams the view with the given parameters
[ 30522, 5123, 3853, 5460, 1006, 5164, 1002, 3193, 1010, 9140, 1002, 11709, 1027, 1031, 1033, 1010, 18498, 6072, 26029, 3366, 1002, 3433, 1027, 19701, 1007, 1024, 18498, 6072, 26029, 3366, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 11661, 1011...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/LanguagesManager/TranslationWriter/Validate/CoreTranslations.php
CoreTranslations.isValid
public function isValid($translations) { $this->message = null; if (empty($translations['General']['Locale'])) { $this->message = self::ERRORSTATE_LOCALEREQUIRED; return false; } if (empty($translations['General']['TranslatorName'])) { $this->mes...
php
public function isValid($translations) { $this->message = null; if (empty($translations['General']['Locale'])) { $this->message = self::ERRORSTATE_LOCALEREQUIRED; return false; } if (empty($translations['General']['TranslatorName'])) { $this->mes...
[ "public", "function", "isValid", "(", "$", "translations", ")", "{", "$", "this", "->", "message", "=", "null", ";", "if", "(", "empty", "(", "$", "translations", "[", "'General'", "]", "[", "'Locale'", "]", ")", ")", "{", "$", "this", "->", "message...
Validates the given translations * There need to be more than 250 translations present * Locale and TranslatorName needs to be set in plugin General * Locale must be valid (format, language & country) @param array $translations @return boolean
[ "Validates", "the", "given", "translations", "*", "There", "need", "to", "be", "more", "than", "250", "translations", "present", "*", "Locale", "and", "TranslatorName", "needs", "to", "be", "set", "in", "plugin", "General", "*", "Locale", "must", "be", "vali...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/LanguagesManager/TranslationWriter/Validate/CoreTranslations.php#L49-L87
train
Check if the translation array is valid
[ 30522, 2270, 3853, 2003, 10175, 3593, 1006, 1002, 11913, 1007, 1063, 1002, 2023, 1011, 1028, 4471, 1027, 19701, 1025, 2065, 1006, 4064, 1006, 1002, 11913, 1031, 1005, 2236, 1005, 1033, 1031, 1005, 2334, 2063, 1005, 1033, 1007, 1007, 1063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Foundation/Console/ServeCommand.php
ServeCommand.handle
public function handle() { chdir(public_path()); $this->line("<info>Laravel development server started:</info> <http://{$this->host()}:{$this->port()}>"); passthru($this->serverCommand(), $status); if ($status && $this->canTryAnotherPort()) { $this->portOffset += 1; ...
php
public function handle() { chdir(public_path()); $this->line("<info>Laravel development server started:</info> <http://{$this->host()}:{$this->port()}>"); passthru($this->serverCommand(), $status); if ($status && $this->canTryAnotherPort()) { $this->portOffset += 1; ...
[ "public", "function", "handle", "(", ")", "{", "chdir", "(", "public_path", "(", ")", ")", ";", "$", "this", "->", "line", "(", "\"<info>Laravel development server started:</info> <http://{$this->host()}:{$this->port()}>\"", ")", ";", "passthru", "(", "$", "this", "...
Execute the console command. @return int @throws \Exception
[ "Execute", "the", "console", "command", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Console/ServeCommand.php#L40-L55
train
Runs the development server and returns the status
[ 30522, 2270, 3853, 5047, 1006, 1007, 1063, 10381, 4305, 2099, 1006, 2270, 1035, 4130, 1006, 1007, 1007, 1025, 1002, 2023, 1011, 1028, 2240, 1006, 1000, 1026, 18558, 1028, 13679, 15985, 2458, 8241, 2318, 1024, 1026, 1013, 18558, 1028, 1026, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Lock/Store/StoreFactory.php
StoreFactory.createStore
public static function createStore($connection) { if ( $connection instanceof \Redis || $connection instanceof \RedisArray || $connection instanceof \RedisCluster || $connection instanceof \Predis\Client || $connection instanceof RedisProxy || ...
php
public static function createStore($connection) { if ( $connection instanceof \Redis || $connection instanceof \RedisArray || $connection instanceof \RedisCluster || $connection instanceof \Predis\Client || $connection instanceof RedisProxy || ...
[ "public", "static", "function", "createStore", "(", "$", "connection", ")", "{", "if", "(", "$", "connection", "instanceof", "\\", "Redis", "||", "$", "connection", "instanceof", "\\", "RedisArray", "||", "$", "connection", "instanceof", "\\", "RedisCluster", ...
@param \Redis|\RedisArray|\RedisCluster|\Predis\Client|\Memcached|\Zookeeper|string $connection Connection or DSN or Store short name @return StoreInterface
[ "@param", "\\", "Redis|", "\\", "RedisArray|", "\\", "RedisCluster|", "\\", "Predis", "\\", "Client|", "\\", "Memcached|", "\\", "Zookeeper|string", "$connection", "Connection", "or", "DSN", "or", "Store", "short", "name" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Lock/Store/StoreFactory.php#L32-L66
train
Create a store from a connection
[ 30522, 2270, 10763, 3853, 9005, 19277, 1006, 1002, 4434, 1007, 1063, 2065, 1006, 1002, 4434, 6013, 11253, 1032, 2417, 2483, 1064, 1064, 1002, 4434, 6013, 11253, 1032, 2417, 14268, 11335, 2100, 1064, 1064, 1002, 4434, 6013, 11253, 1032, 2417...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Foundation/Exceptions/Handler.php
Handler.convertExceptionToResponse
protected function convertExceptionToResponse(Exception $e) { return SymfonyResponse::create( $this->renderExceptionContent($e), $this->isHttpException($e) ? $e->getStatusCode() : 500, $this->isHttpException($e) ? $e->getHeaders() : [] ); }
php
protected function convertExceptionToResponse(Exception $e) { return SymfonyResponse::create( $this->renderExceptionContent($e), $this->isHttpException($e) ? $e->getStatusCode() : 500, $this->isHttpException($e) ? $e->getHeaders() : [] ); }
[ "protected", "function", "convertExceptionToResponse", "(", "Exception", "$", "e", ")", "{", "return", "SymfonyResponse", "::", "create", "(", "$", "this", "->", "renderExceptionContent", "(", "$", "e", ")", ",", "$", "this", "->", "isHttpException", "(", "$",...
Create a Symfony response for the given exception. @param \Exception $e @return \Symfony\Component\HttpFoundation\Response
[ "Create", "a", "Symfony", "response", "for", "the", "given", "exception", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Exceptions/Handler.php#L299-L306
train
Convert Exception to Symfony Response
[ 30522, 5123, 3853, 10463, 10288, 24422, 19277, 13102, 5644, 2063, 1006, 6453, 1002, 1041, 1007, 1063, 2709, 25353, 2213, 30524, 1011, 1028, 17552, 10288, 24422, 8663, 6528, 2102, 1006, 1002, 1041, 1007, 1010, 1002, 2023, 1011, 1028, 2003, 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/Cache/Repository.php
Repository.get
public function get($key, $default = null) { if (is_array($key)) { return $this->many($key); } $value = $this->store->get($this->itemKey($key)); // If we could not find the cache value, we will fire the missed event and get // the default value for this cache va...
php
public function get($key, $default = null) { if (is_array($key)) { return $this->many($key); } $value = $this->store->get($this->itemKey($key)); // If we could not find the cache value, we will fire the missed event and get // the default value for this cache va...
[ "public", "function", "get", "(", "$", "key", ",", "$", "default", "=", "null", ")", "{", "if", "(", "is_array", "(", "$", "key", ")", ")", "{", "return", "$", "this", "->", "many", "(", "$", "key", ")", ";", "}", "$", "value", "=", "$", "thi...
Retrieve an item from the cache by key. @param string $key @param mixed $default @return mixed
[ "Retrieve", "an", "item", "from", "the", "cache", "by", "key", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Cache/Repository.php#L91-L111
train
Get the value of the cache item
[ 30522, 2270, 3853, 2131, 1006, 1002, 3145, 1010, 1002, 12398, 1027, 19701, 1007, 1063, 2065, 1006, 2003, 1035, 9140, 1006, 1002, 3145, 1007, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 2116, 1006, 1002, 3145, 1007, 1025, 1065, 1002, 3643, 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/Login/PasswordResetter.php
PasswordResetter.isTokenValid
public function isTokenValid($token, $user, $keySuffix) { $now = time(); // token valid for 24 hrs (give or take, due to the coarse granularity in our strftime format string) for ($i = 0; $i <= 24; $i++) { $generatedToken = $this->generatePasswordResetToken($user, $keySuffix, $n...
php
public function isTokenValid($token, $user, $keySuffix) { $now = time(); // token valid for 24 hrs (give or take, due to the coarse granularity in our strftime format string) for ($i = 0; $i <= 24; $i++) { $generatedToken = $this->generatePasswordResetToken($user, $keySuffix, $n...
[ "public", "function", "isTokenValid", "(", "$", "token", ",", "$", "user", ",", "$", "keySuffix", ")", "{", "$", "now", "=", "time", "(", ")", ";", "// token valid for 24 hrs (give or take, due to the coarse granularity in our strftime format string)", "for", "(", "$"...
Returns true if a reset token is valid, false if otherwise. A reset token is valid if it exists and has not expired. @param string $token The reset token to check. @param array $user The user information returned by the UsersManager API. @param string $keySuffix The suffix used in generating a token. @return bool true...
[ "Returns", "true", "if", "a", "reset", "token", "is", "valid", "false", "if", "otherwise", ".", "A", "reset", "token", "is", "valid", "if", "it", "exists", "and", "has", "not", "expired", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Login/PasswordResetter.php#L246-L260
train
Returns true if the token is valid for 24hrs
[ 30522, 2270, 3853, 21541, 11045, 2078, 10175, 30524, 16093, 8873, 2595, 1007, 1063, 1002, 2085, 1027, 2051, 1006, 1007, 1025, 1013, 1013, 19204, 9398, 2005, 2484, 17850, 2015, 1006, 2507, 2030, 2202, 1010, 2349, 2000, 1996, 20392, 12604, 79...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Config/Definition/Builder/NormalizationBuilder.php
NormalizationBuilder.before
public function before(\Closure $closure = null) { if (null !== $closure) { $this->before[] = $closure; return $this; } return $this->before[] = new ExprBuilder($this->node); }
php
public function before(\Closure $closure = null) { if (null !== $closure) { $this->before[] = $closure; return $this; } return $this->before[] = new ExprBuilder($this->node); }
[ "public", "function", "before", "(", "\\", "Closure", "$", "closure", "=", "null", ")", "{", "if", "(", "null", "!==", "$", "closure", ")", "{", "$", "this", "->", "before", "[", "]", "=", "$", "closure", ";", "return", "$", "this", ";", "}", "re...
Registers a closure to run before the normalization or an expression builder to build it if null is provided. @return ExprBuilder|$this
[ "Registers", "a", "closure", "to", "run", "before", "the", "normalization", "or", "an", "expression", "builder", "to", "build", "it", "if", "null", "is", "provided", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Config/Definition/Builder/NormalizationBuilder.php#L50-L59
train
Add a closure to the before array
[ 30522, 2270, 3853, 2077, 1006, 1032, 8503, 1002, 8503, 1027, 19701, 1007, 1063, 2065, 1006, 19701, 999, 1027, 1027, 1002, 8503, 1007, 1063, 1002, 2023, 1011, 1028, 2077, 1031, 1033, 1027, 1002, 8503, 1025, 2709, 1002, 2023, 1025, 1065, 27...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php
MarkdownDescriptor.describeContainerParameters
protected function describeContainerParameters(ParameterBag $parameters, array $options = []) { $this->write("Container parameters\n====================\n"); foreach ($this->sortParameters($parameters) as $key => $value) { $this->write(sprintf("\n- `%s`: `%s`", $key, $this->formatParamet...
php
protected function describeContainerParameters(ParameterBag $parameters, array $options = []) { $this->write("Container parameters\n====================\n"); foreach ($this->sortParameters($parameters) as $key => $value) { $this->write(sprintf("\n- `%s`: `%s`", $key, $this->formatParamet...
[ "protected", "function", "describeContainerParameters", "(", "ParameterBag", "$", "parameters", ",", "array", "$", "options", "=", "[", "]", ")", "{", "$", "this", "->", "write", "(", "\"Container parameters\\n====================\\n\"", ")", ";", "foreach", "(", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php#L77-L83
train
Describes container parameters
[ 30522, 5123, 3853, 6235, 8663, 18249, 2121, 28689, 22828, 2015, 1006, 16381, 16078, 1002, 11709, 1010, 9140, 1002, 7047, 1027, 1031, 1033, 1007, 1063, 1002, 2023, 1011, 1028, 4339, 1006, 1000, 11661, 11709, 1032, 1050, 1027, 1027, 1027, 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
libs/Zend/Db/Statement/Pdo.php
Zend_Db_Statement_Pdo.setAttribute
public function setAttribute($key, $val) { try { return $this->_stmt->setAttribute($key, $val); } catch (PDOException $e) { // require_once 'Zend/Db/Statement/Exception.php'; throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e); } ...
php
public function setAttribute($key, $val) { try { return $this->_stmt->setAttribute($key, $val); } catch (PDOException $e) { // require_once 'Zend/Db/Statement/Exception.php'; throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e); } ...
[ "public", "function", "setAttribute", "(", "$", "key", ",", "$", "val", ")", "{", "try", "{", "return", "$", "this", "->", "_stmt", "->", "setAttribute", "(", "$", "key", ",", "$", "val", ")", ";", "}", "catch", "(", "PDOException", "$", "e", ")", ...
Set a statement attribute. @param string $key Attribute name. @param mixed $val Attribute value. @return bool @throws Zend_Db_Statement_Exception
[ "Set", "a", "statement", "attribute", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Statement/Pdo.php#L411-L419
train
Set attribute in statement
[ 30522, 2270, 3853, 2275, 19321, 3089, 8569, 2618, 1006, 1002, 3145, 1010, 1002, 11748, 1007, 1063, 3046, 1063, 2709, 1002, 2023, 1011, 1028, 1035, 2358, 20492, 1011, 1028, 2275, 19321, 3089, 8569, 2618, 1006, 1002, 3145, 1010, 1002, 11748, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.get
public function get($path) { $path = self::validatePath($path); $fullPath = $this->getMediaPath($path); return $this->getStorageDisk()->get($fullPath); }
php
public function get($path) { $path = self::validatePath($path); $fullPath = $this->getMediaPath($path); return $this->getStorageDisk()->get($fullPath); }
[ "public", "function", "get", "(", "$", "path", ")", "{", "$", "path", "=", "self", "::", "validatePath", "(", "$", "path", ")", ";", "$", "fullPath", "=", "$", "this", "->", "getMediaPath", "(", "$", "path", ")", ";", "return", "$", "this", "->", ...
Returns a file contents. @param string $path Specifies the file path relative the the Library root. @return string Returns the file contents
[ "Returns", "a", "file", "contents", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/classes/MediaLibrary.php#L309-L314
train
Get a file from the cache
[ 30522, 2270, 3853, 2131, 1006, 1002, 4130, 1007, 1063, 1002, 4130, 1027, 2969, 1024, 1024, 9398, 3686, 15069, 1006, 1002, 4130, 1007, 1025, 1002, 2440, 15069, 1027, 1002, 2023, 1011, 1028, 2131, 16969, 15069, 1006, 1002, 4130, 1007, 1025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/DataTable/Map.php
Map.mergeChildren
public function mergeChildren() { $firstChild = reset($this->array); if ($firstChild instanceof Map) { $result = $firstChild->getEmptyClone(); /** @var $subDataTableMap Map */ foreach ($this->getDataTables() as $label => $subDataTableMap) { forea...
php
public function mergeChildren() { $firstChild = reset($this->array); if ($firstChild instanceof Map) { $result = $firstChild->getEmptyClone(); /** @var $subDataTableMap Map */ foreach ($this->getDataTables() as $label => $subDataTableMap) { forea...
[ "public", "function", "mergeChildren", "(", ")", "{", "$", "firstChild", "=", "reset", "(", "$", "this", "->", "array", ")", ";", "if", "(", "$", "firstChild", "instanceof", "Map", ")", "{", "$", "result", "=", "$", "firstChild", "->", "getEmptyClone", ...
Merges the rows of every child {@link DataTable} into a new one and returns it. This function will also set the label of the merged rows to the label of the {@link DataTable} they were originally from. The result of this function is determined by the type of DataTable this instance holds. If this DataTable\Map instanc...
[ "Merges", "the", "rows", "of", "every", "child", "{", "@link", "DataTable", "}", "into", "a", "new", "one", "and", "returns", "it", ".", "This", "function", "will", "also", "set", "the", "label", "of", "the", "merged", "rows", "to", "the", "label", "of...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataTable/Map.php#L393-L425
train
Merges all children of this table and returns the result
[ 30522, 2270, 3853, 13590, 19339, 7389, 1006, 1007, 1063, 1002, 2034, 19339, 1027, 25141, 1006, 1002, 2023, 1011, 1028, 9140, 1007, 1025, 2065, 1006, 1002, 2034, 19339, 6013, 11253, 4949, 1007, 1063, 1002, 2765, 1027, 1002, 2034, 19339, 1011...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Db.php
Db.get
public static function get() { if (SettingsServer::isTrackerApiRequest()) { return Tracker::getDatabase(); } if (!self::hasDatabaseObject()) { self::createDatabaseObject(); } return self::$connection; }
php
public static function get() { if (SettingsServer::isTrackerApiRequest()) { return Tracker::getDatabase(); } if (!self::hasDatabaseObject()) { self::createDatabaseObject(); } return self::$connection; }
[ "public", "static", "function", "get", "(", ")", "{", "if", "(", "SettingsServer", "::", "isTrackerApiRequest", "(", ")", ")", "{", "return", "Tracker", "::", "getDatabase", "(", ")", ";", "}", "if", "(", "!", "self", "::", "hasDatabaseObject", "(", ")",...
Returns the database connection and creates it if it hasn't been already. @return \Piwik\Tracker\Db|\Piwik\Db\AdapterInterface|\Piwik\Db
[ "Returns", "the", "database", "connection", "and", "creates", "it", "if", "it", "hasn", "t", "been", "already", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Db.php#L47-L58
train
Get the current database connection
[ 30522, 2270, 10763, 3853, 2131, 1006, 1007, 1063, 2065, 1006, 10906, 8043, 6299, 1024, 1024, 21541, 30524, 20614, 1006, 1007, 1007, 1063, 2969, 1024, 1024, 2580, 6790, 15058, 16429, 20614, 1006, 1007, 1025, 1065, 2709, 2969, 1024, 1024, 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/Templating/PhpEngine.php
PhpEngine.initializeEscapers
protected function initializeEscapers() { $flags = ENT_QUOTES | ENT_SUBSTITUTE; $this->escapers = [ 'html' => /** * Runs the PHP function htmlspecialchars on the value passed. * * @param string $value The value to escape...
php
protected function initializeEscapers() { $flags = ENT_QUOTES | ENT_SUBSTITUTE; $this->escapers = [ 'html' => /** * Runs the PHP function htmlspecialchars on the value passed. * * @param string $value The value to escape...
[ "protected", "function", "initializeEscapers", "(", ")", "{", "$", "flags", "=", "ENT_QUOTES", "|", "ENT_SUBSTITUTE", ";", "$", "this", "->", "escapers", "=", "[", "'html'", "=>", "/**\n * Runs the PHP function htmlspecialchars on the value passed.\n ...
Initializes the built-in escapers. Each function specifies a way for applying a transformation to a string passed to it. The purpose is for the string to be "escaped" so it is suitable for the format it is being displayed in. For example, the string: "It's required that you enter a username & password.\n" If this wer...
[ "Initializes", "the", "built", "-", "in", "escapers", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Templating/PhpEngine.php#L418-L478
train
Initializes the escape sequence for the attribute values
[ 30522, 5123, 3853, 3988, 4697, 2229, 19464, 2869, 1006, 1007, 1063, 1002, 9245, 1027, 4372, 2102, 1035, 16614, 1064, 4372, 2102, 1035, 7681, 1025, 1002, 2023, 1011, 1028, 4019, 2869, 1027, 1031, 1005, 16129, 1005, 1027, 1028, 1013, 1008, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/EventDispatcher/EventDispatcher.php
EventDispatcher.removeListener
public function removeListener($eventName, $listener) { if (empty($this->listeners[$eventName])) { return; } if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure) { $listener[0] = $listener[0](); } foreach ($this->liste...
php
public function removeListener($eventName, $listener) { if (empty($this->listeners[$eventName])) { return; } if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure) { $listener[0] = $listener[0](); } foreach ($this->liste...
[ "public", "function", "removeListener", "(", "$", "eventName", ",", "$", "listener", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "listeners", "[", "$", "eventName", "]", ")", ")", "{", "return", ";", "}", "if", "(", "\\", "is_array", "(", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/EventDispatcher/EventDispatcher.php#L162-L186
train
Remove listener for an event
[ 30522, 2270, 3853, 6366, 9863, 24454, 1006, 1002, 2724, 18442, 1010, 1002, 19373, 1007, 1063, 2065, 1006, 4064, 1006, 1002, 2023, 1011, 1028, 13810, 1031, 1002, 2724, 18442, 1033, 1007, 1007, 1063, 2709, 1025, 1065, 2065, 1006, 1032, 2003, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Console/Style/SymfonyStyle.php
SymfonyStyle.choice
public function choice($question, array $choices, $default = null) { if (null !== $default) { $values = array_flip($choices); $default = $values[$default]; } return $this->askQuestion(new ChoiceQuestion($question, $choices, $default)); }
php
public function choice($question, array $choices, $default = null) { if (null !== $default) { $values = array_flip($choices); $default = $values[$default]; } return $this->askQuestion(new ChoiceQuestion($question, $choices, $default)); }
[ "public", "function", "choice", "(", "$", "question", ",", "array", "$", "choices", ",", "$", "default", "=", "null", ")", "{", "if", "(", "null", "!==", "$", "default", ")", "{", "$", "values", "=", "array_flip", "(", "$", "choices", ")", ";", "$"...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Style/SymfonyStyle.php#L228-L236
train
Ask the user for a choice
[ 30522, 2270, 3853, 3601, 1006, 1002, 3160, 1010, 9140, 1002, 9804, 1010, 1002, 12398, 1027, 19701, 1007, 1063, 2065, 1006, 19701, 999, 1027, 1027, 1002, 12398, 1007, 1063, 1002, 5300, 1027, 9140, 1035, 11238, 1006, 1002, 9804, 1007, 1025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/HTML/QuickForm2/Element/Select.php
HTML_QuickForm2_Element_Select.loadOptions
public function loadOptions(array $options) { $this->possibleValues = array(); $this->optionContainer = new HTML_QuickForm2_Element_Select_OptionContainer( $this->values, $this->possibleValues ); $this->loadOptionsFromArr...
php
public function loadOptions(array $options) { $this->possibleValues = array(); $this->optionContainer = new HTML_QuickForm2_Element_Select_OptionContainer( $this->values, $this->possibleValues ); $this->loadOptionsFromArr...
[ "public", "function", "loadOptions", "(", "array", "$", "options", ")", "{", "$", "this", "->", "possibleValues", "=", "array", "(", ")", ";", "$", "this", "->", "optionContainer", "=", "new", "HTML_QuickForm2_Element_Select_OptionContainer", "(", "$", "this", ...
Loads <option>s (and <optgroup>s) for select element The method expects a array of options and optgroups: <pre> array( 'option value 1' => 'option text 1', ... 'option value N' => 'option text N', 'optgroup label 1' => array( 'option value' => 'option text', ... ), ... ) </pre> If value is a scalar, then array key is ...
[ "Loads", "<option", ">", "s", "(", "and", "<optgroup", ">", "s", ")", "for", "select", "element" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Element/Select.php#L496-L504
train
Load options from an array
[ 30522, 2270, 3853, 7170, 7361, 9285, 1006, 9140, 1002, 7047, 1007, 1063, 1002, 2023, 1011, 1028, 2825, 10175, 15808, 1027, 9140, 1006, 1007, 1025, 1002, 2023, 1011, 1028, 5724, 8663, 18249, 2121, 1027, 2047, 16129, 1035, 4248, 14192, 2475, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/system/console/ThemeRemove.php
ThemeRemove.handle
public function handle() { $themeManager = ThemeManager::instance(); $themeName = $this->argument('name'); $themeExists = Theme::exists($themeName); if (!$themeExists) { $themeName = strtolower(str_replace('.', '-', $themeName)); $themeExists = Theme::exists(...
php
public function handle() { $themeManager = ThemeManager::instance(); $themeName = $this->argument('name'); $themeExists = Theme::exists($themeName); if (!$themeExists) { $themeName = strtolower(str_replace('.', '-', $themeName)); $themeExists = Theme::exists(...
[ "public", "function", "handle", "(", ")", "{", "$", "themeManager", "=", "ThemeManager", "::", "instance", "(", ")", ";", "$", "themeName", "=", "$", "this", "->", "argument", "(", "'name'", ")", ";", "$", "themeExists", "=", "Theme", "::", "exists", "...
Execute the console command. @return void
[ "Execute", "the", "console", "command", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/console/ThemeRemove.php#L39-L66
train
Delete theme action
[ 30522, 2270, 3853, 5047, 1006, 1007, 1063, 1002, 4323, 24805, 4590, 1027, 4323, 24805, 4590, 1024, 1024, 6013, 1006, 1007, 1025, 1002, 4323, 18442, 1027, 1002, 2023, 1011, 1028, 6685, 1006, 1005, 2171, 1005, 1007, 1025, 1002, 4323, 10288, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/MailManager.php
MailManager.registerMailPartials
public function registerMailPartials(array $definitions) { if (!$this->registeredPartials) { $this->registeredPartials = []; } $this->registeredPartials = $definitions + $this->registeredPartials; }
php
public function registerMailPartials(array $definitions) { if (!$this->registeredPartials) { $this->registeredPartials = []; } $this->registeredPartials = $definitions + $this->registeredPartials; }
[ "public", "function", "registerMailPartials", "(", "array", "$", "definitions", ")", "{", "if", "(", "!", "$", "this", "->", "registeredPartials", ")", "{", "$", "this", "->", "registeredPartials", "=", "[", "]", ";", "}", "$", "this", "->", "registeredPar...
Registers mail views and manageable layouts.
[ "Registers", "mail", "views", "and", "manageable", "layouts", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/classes/MailManager.php#L438-L445
train
Register the partials for the mail
[ 30522, 2270, 3853, 4236, 21397, 19362, 20925, 2015, 1006, 9140, 1002, 15182, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 5068, 19362, 20925, 2015, 1007, 1063, 1002, 2023, 1011, 1028, 5068, 19362, 20925, 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/Framework/Flex/FlexCollection.php
FlexCollection.withKeyField
public function withKeyField(string $keyField = null) { $keyField = $keyField ?: 'key'; if ($keyField === $this->getKeyField()) { return $this; } $entries = []; foreach ($this as $key => $object) { // TODO: remove hardcoded logic if ($keyF...
php
public function withKeyField(string $keyField = null) { $keyField = $keyField ?: 'key'; if ($keyField === $this->getKeyField()) { return $this; } $entries = []; foreach ($this as $key => $object) { // TODO: remove hardcoded logic if ($keyF...
[ "public", "function", "withKeyField", "(", "string", "$", "keyField", "=", "null", ")", "{", "$", "keyField", "=", "$", "keyField", "?", ":", "'key'", ";", "if", "(", "$", "keyField", "===", "$", "this", "->", "getKeyField", "(", ")", ")", "{", "retu...
{@inheritdoc} @see FlexCollectionInterface::withKeyField()
[ "{" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Framework/Flex/FlexCollection.php#L229-L249
train
Return an array with all the key entries with the specified field
[ 30522, 2270, 3853, 2007, 14839, 3790, 1006, 5164, 1002, 3145, 3790, 1027, 19701, 1007, 1063, 1002, 3145, 3790, 1027, 1002, 3145, 3790, 1029, 1024, 1005, 3145, 1005, 1025, 2065, 1006, 1002, 3145, 3790, 1027, 1027, 1027, 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...
matomo-org/matomo
libs/Zend/Db/Adapter/Abstract.php
Zend_Db_Adapter_Abstract._quoteIdentifier
protected function _quoteIdentifier($value, $auto=false) { if ($auto === false || $this->_autoQuoteIdentifiers === true) { $q = $this->getQuoteIdentifierSymbol(); return ($q . str_replace("$q", "$q$q", $value) . $q); } return $value; }
php
protected function _quoteIdentifier($value, $auto=false) { if ($auto === false || $this->_autoQuoteIdentifiers === true) { $q = $this->getQuoteIdentifierSymbol(); return ($q . str_replace("$q", "$q$q", $value) . $q); } return $value; }
[ "protected", "function", "_quoteIdentifier", "(", "$", "value", ",", "$", "auto", "=", "false", ")", "{", "if", "(", "$", "auto", "===", "false", "||", "$", "this", "->", "_autoQuoteIdentifiers", "===", "true", ")", "{", "$", "q", "=", "$", "this", "...
Quote an identifier. @param string $value The identifier or expression. @param boolean $auto If true, heed the AUTO_QUOTE_IDENTIFIERS config option. @return string The quoted identifier and alias.
[ "Quote", "an", "identifier", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Adapter/Abstract.php#L1044-L1051
train
Quote identifier for use in the template
[ 30522, 5123, 3853, 1035, 14686, 5178, 16778, 8873, 2121, 1006, 1002, 3643, 1010, 1002, 8285, 1027, 6270, 1007, 1063, 2065, 1006, 1002, 8285, 1027, 1027, 1027, 6270, 1064, 1064, 1002, 2023, 1011, 1028, 1035, 8285, 28940, 12184, 5178, 16778, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/ValidateEnvPlaceholdersPass.php
ValidateEnvPlaceholdersPass.process
public function process(ContainerBuilder $container) { $this->extensionConfig = []; if (!class_exists(BaseNode::class) || !$extensions = $container->getExtensions()) { return; } $resolvingBag = $container->getParameterBag(); if (!$resolvingBag instanceof EnvPlac...
php
public function process(ContainerBuilder $container) { $this->extensionConfig = []; if (!class_exists(BaseNode::class) || !$extensions = $container->getExtensions()) { return; } $resolvingBag = $container->getParameterBag(); if (!$resolvingBag instanceof EnvPlac...
[ "public", "function", "process", "(", "ContainerBuilder", "$", "container", ")", "{", "$", "this", "->", "extensionConfig", "=", "[", "]", ";", "if", "(", "!", "class_exists", "(", "BaseNode", "::", "class", ")", "||", "!", "$", "extensions", "=", "$", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/Compiler/ValidateEnvPlaceholdersPass.php#L36-L93
train
Process the container builder
[ 30522, 2270, 3853, 2832, 1006, 11661, 8569, 23891, 2099, 1002, 11661, 1007, 1063, 1002, 2023, 1011, 1028, 5331, 8663, 8873, 2290, 1027, 1031, 1033, 1025, 2065, 1006, 999, 2465, 1035, 6526, 1006, 2918, 3630, 3207, 1024, 1024, 2465, 1007, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/HTML/QuickForm2/Element/Date.php
HTML_QuickForm2_Element_Date.setValue
public function setValue($value) { if (empty($value)) { $value = array(); } elseif (is_scalar($value)) { if (!is_numeric($value)) { $value = strtotime($value); } // might be a unix epoch, then we fill all possible values $ar...
php
public function setValue($value) { if (empty($value)) { $value = array(); } elseif (is_scalar($value)) { if (!is_numeric($value)) { $value = strtotime($value); } // might be a unix epoch, then we fill all possible values $ar...
[ "public", "function", "setValue", "(", "$", "value", ")", "{", "if", "(", "empty", "(", "$", "value", ")", ")", "{", "$", "value", "=", "array", "(", ")", ";", "}", "elseif", "(", "is_scalar", "(", "$", "value", ")", ")", "{", "if", "(", "!", ...
Tries to convert the given value to a usable date before setting the element value @param int|string|array A timestamp, a string compatible with strtotime() or an array that fits the element names
[ "Tries", "to", "convert", "the", "given", "value", "to", "a", "usable", "date", "before", "setting", "the", "element", "value" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Element/Date.php#L272-L304
train
Set the value of the field value
[ 30522, 2270, 3853, 2275, 10175, 5657, 1006, 1002, 3643, 1007, 1063, 2065, 1006, 4064, 1006, 1002, 3643, 1007, 1007, 1063, 1002, 3643, 1027, 9140, 1006, 1007, 1025, 1065, 2842, 10128, 1006, 2003, 1035, 26743, 2099, 1006, 1002, 3643, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/ArchiveProcessor.php
ArchiveProcessor.processDependentArchive
public function processDependentArchive($plugin, $segment) { $params = $this->getParams(); if (!$params->isRootArchiveRequest()) { // prevent all recursion return; } $idSites = [$params->getSite()->getId()]; $newSegment = Segment::combine($params->getSegment()->...
php
public function processDependentArchive($plugin, $segment) { $params = $this->getParams(); if (!$params->isRootArchiveRequest()) { // prevent all recursion return; } $idSites = [$params->getSite()->getId()]; $newSegment = Segment::combine($params->getSegment()->...
[ "public", "function", "processDependentArchive", "(", "$", "plugin", ",", "$", "segment", ")", "{", "$", "params", "=", "$", "this", "->", "getParams", "(", ")", ";", "if", "(", "!", "$", "params", "->", "isRootArchiveRequest", "(", ")", ")", "{", "// ...
Initiate archiving for a plugin during an ongoing archiving. The plugin can be another plugin or the same plugin. This method should be called during archiving when one plugin uses the report of another plugin with a segment. It will ensure reports for that segment & plugin will be archived without initiating archivin...
[ "Initiate", "archiving", "for", "a", "plugin", "during", "an", "ongoing", "archiving", ".", "The", "plugin", "can", "be", "another", "plugin", "or", "the", "same", "plugin", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/ArchiveProcessor.php#L608-L634
train
Process dependent archives
[ 30522, 2270, 3853, 2832, 3207, 11837, 16454, 2906, 5428, 3726, 1006, 1002, 13354, 2378, 1010, 1002, 6903, 1007, 1063, 1002, 11498, 5244, 1027, 1002, 2023, 1011, 1028, 2131, 28689, 5244, 1006, 1007, 1025, 2065, 1006, 999, 1002, 11498, 5244, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Console.php
Console.renderDataTableMap
protected function renderDataTableMap(DataTable\Map $map, $prefix) { $output = "Set<hr />"; $prefix = $prefix . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'; foreach ($map->getDataTables() as $descTable => $table) { $output .= $prefix . "<b>" . $descTable . "</b><br />"; $o...
php
protected function renderDataTableMap(DataTable\Map $map, $prefix) { $output = "Set<hr />"; $prefix = $prefix . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'; foreach ($map->getDataTables() as $descTable => $table) { $output .= $prefix . "<b>" . $descTable . "</b><br />"; $o...
[ "protected", "function", "renderDataTableMap", "(", "DataTable", "\\", "Map", "$", "map", ",", "$", "prefix", ")", "{", "$", "output", "=", "\"Set<hr />\"", ";", "$", "prefix", "=", "$", "prefix", ".", "'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'", ";", "foreach", ...
Computes the output of the given array of data tables @param DataTable\Map $map data tables to render @param string $prefix prefix to output before table data @return string
[ "Computes", "the", "output", "of", "the", "given", "array", "of", "data", "tables" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataTable/Renderer/Console.php#L53-L63
train
Render a DataTable \ Map
[ 30522, 5123, 3853, 17552, 2850, 29336, 3085, 2863, 2361, 1006, 2951, 10880, 1032, 4949, 1002, 4949, 1010, 1002, 17576, 1007, 30524, 1027, 1002, 17576, 1012, 1005, 1004, 1050, 5910, 2361, 1025, 1004, 1050, 5910, 2361, 1025, 1004, 1050, 5910,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php
ValidatorTypeGuesser.guessType
public function guessType($class, $property) { return $this->guess($class, $property, function (Constraint $constraint) { return $this->guessTypeForConstraint($constraint); }); }
php
public function guessType($class, $property) { return $this->guess($class, $property, function (Constraint $constraint) { return $this->guessTypeForConstraint($constraint); }); }
[ "public", "function", "guessType", "(", "$", "class", ",", "$", "property", ")", "{", "return", "$", "this", "->", "guess", "(", "$", "class", ",", "$", "property", ",", "function", "(", "Constraint", "$", "constraint", ")", "{", "return", "$", "this",...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php#L34-L39
train
Guesses the type of a property.
[ 30522, 2270, 3853, 3984, 13874, 1006, 1002, 2465, 1010, 1002, 3200, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 3984, 1006, 1002, 2465, 1010, 1002, 3200, 1010, 3853, 1006, 27142, 1002, 27142, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 3984, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Concerns/CompilesLoops.php
CompilesLoops.compileForelse
protected function compileForelse($expression) { $empty = '$__empty_'.++$this->forElseCounter; preg_match('/\( *(.*) +as *(.*)\)$/is', $expression, $matches); $iteratee = trim($matches[1]); $iteration = trim($matches[2]); $initLoop = "\$__currentLoopData = {$iteratee}; \$...
php
protected function compileForelse($expression) { $empty = '$__empty_'.++$this->forElseCounter; preg_match('/\( *(.*) +as *(.*)\)$/is', $expression, $matches); $iteratee = trim($matches[1]); $iteration = trim($matches[2]); $initLoop = "\$__currentLoopData = {$iteratee}; \$...
[ "protected", "function", "compileForelse", "(", "$", "expression", ")", "{", "$", "empty", "=", "'$__empty_'", ".", "++", "$", "this", "->", "forElseCounter", ";", "preg_match", "(", "'/\\( *(.*) +as *(.*)\\)$/is'", ",", "$", "expression", ",", "$", "matches", ...
Compile the for-else statements into valid PHP. @param string $expression @return string
[ "Compile", "the", "for", "-", "else", "statements", "into", "valid", "PHP", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/View/Compilers/Concerns/CompilesLoops.php#L20-L35
train
Compiles the foreach statements into valid PHP.
[ 30522, 5123, 3853, 4012, 22090, 29278, 9050, 2063, 1006, 1002, 3670, 1007, 1063, 1002, 4064, 1027, 1005, 1002, 1035, 1035, 4064, 1035, 1005, 1012, 1009, 1009, 1002, 2023, 1011, 1028, 18921, 4877, 8586, 21723, 2121, 1025, 3653, 2290, 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...
getgrav/grav
system/src/Grav/Common/Page/Page.php
Page.visible
public function visible($var = null) { if ($var !== null) { $this->visible = (bool)$var; } if ($this->visible === null) { // Set item visibility in menu if folder is different from slug // eg folder = 01.Home and slug = Home if (preg_match(PAG...
php
public function visible($var = null) { if ($var !== null) { $this->visible = (bool)$var; } if ($this->visible === null) { // Set item visibility in menu if folder is different from slug // eg folder = 01.Home and slug = Home if (preg_match(PAG...
[ "public", "function", "visible", "(", "$", "var", "=", "null", ")", "{", "if", "(", "$", "var", "!==", "null", ")", "{", "$", "this", "->", "visible", "=", "(", "bool", ")", "$", "var", ";", "}", "if", "(", "$", "this", "->", "visible", "===", ...
Gets and Sets whether or not this Page is visible for navigation @param bool $var true if the page is visible @return bool true if the page is visible
[ "Gets", "and", "Sets", "whether", "or", "not", "this", "Page", "is", "visible", "for", "navigation" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Page/Page.php#L1538-L1555
train
Get visibility of item
[ 30522, 2270, 3853, 5710, 1006, 1002, 13075, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 13075, 999, 1027, 1027, 19701, 1007, 1063, 1002, 2023, 1011, 1028, 5710, 1027, 1006, 22017, 2140, 1007, 1002, 13075, 1025, 1065, 2065, 1006, 1002, 2023, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/system/classes/MediaLibrary.php
MediaLibrary.exists
public function exists($path) { $path = self::validatePath($path); $fullPath = $this->getMediaPath($path); return $this->getStorageDisk()->exists($fullPath); }
php
public function exists($path) { $path = self::validatePath($path); $fullPath = $this->getMediaPath($path); return $this->getStorageDisk()->exists($fullPath); }
[ "public", "function", "exists", "(", "$", "path", ")", "{", "$", "path", "=", "self", "::", "validatePath", "(", "$", "path", ")", ";", "$", "fullPath", "=", "$", "this", "->", "getMediaPath", "(", "$", "path", ")", ";", "return", "$", "this", "->"...
Determines if a file with the specified path exists in the library. @param string $path Specifies the file path relative the the Library root. @return boolean Returns TRUE if the file exists.
[ "Determines", "if", "a", "file", "with", "the", "specified", "path", "exists", "in", "the", "library", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/classes/MediaLibrary.php#L237-L243
train
Checks if a file exists in the current context
[ 30522, 2270, 3853, 6526, 1006, 1002, 4130, 1007, 1063, 1002, 4130, 1027, 2969, 1024, 1024, 9398, 3686, 15069, 1006, 1002, 4130, 1007, 1025, 1002, 2440, 15069, 1027, 1002, 2023, 1011, 1028, 2131, 16969, 15069, 1006, 1002, 4130, 1007, 1025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
z-song/laravel-admin
src/Grid.php
Grid.visibleColumnNames
public function visibleColumnNames() { $visible = array_filter(explode(',', request(Tools\ColumnSelector::SELECT_COLUMN_NAME))); if (empty($visible)) { return $this->columnNames; } array_push($visible, '__row_selector__', '__actions__'); return collect($this->c...
php
public function visibleColumnNames() { $visible = array_filter(explode(',', request(Tools\ColumnSelector::SELECT_COLUMN_NAME))); if (empty($visible)) { return $this->columnNames; } array_push($visible, '__row_selector__', '__actions__'); return collect($this->c...
[ "public", "function", "visibleColumnNames", "(", ")", "{", "$", "visible", "=", "array_filter", "(", "explode", "(", "','", ",", "request", "(", "Tools", "\\", "ColumnSelector", "::", "SELECT_COLUMN_NAME", ")", ")", ")", ";", "if", "(", "empty", "(", "$", ...
Get all visible column names. @return array|static
[ "Get", "all", "visible", "column", "names", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Grid.php#L375-L388
train
Return all visible column names
[ 30522, 2270, 3853, 5710, 25778, 2819, 9516, 7834, 1006, 1007, 1063, 1002, 5710, 1027, 9140, 1035, 11307, 1006, 15044, 1006, 1005, 1010, 1005, 1010, 5227, 1006, 5906, 1032, 7753, 12260, 16761, 1024, 1024, 7276, 1035, 5930, 1035, 2171, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Mail/Mailable.php
Mailable.render
public function render() { return $this->withLocale($this->locale, function () { Container::getInstance()->call([$this, 'build']); return Container::getInstance()->make('mailer')->render( $this->buildView(), $this->buildViewData() ); }); }
php
public function render() { return $this->withLocale($this->locale, function () { Container::getInstance()->call([$this, 'build']); return Container::getInstance()->make('mailer')->render( $this->buildView(), $this->buildViewData() ); }); }
[ "public", "function", "render", "(", ")", "{", "return", "$", "this", "->", "withLocale", "(", "$", "this", "->", "locale", ",", "function", "(", ")", "{", "Container", "::", "getInstance", "(", ")", "->", "call", "(", "[", "$", "this", ",", "'build'...
Render the mailable into a view. @return \Illuminate\View\View @throws \ReflectionException
[ "Render", "the", "mailable", "into", "a", "view", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Mail/Mailable.php#L209-L218
train
Render the message.
[ 30522, 2270, 3853, 17552, 1006, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 2007, 4135, 9289, 2063, 1006, 1002, 2023, 1011, 1028, 2334, 2063, 1010, 3853, 1006, 1007, 1063, 11661, 1024, 1024, 2131, 7076, 26897, 1006, 1007, 1011, 1028, 2655, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dompdf/dompdf
src/Css/Stylesheet.php
Stylesheet._image
protected function _image($val) { $DEBUGCSS = $this->_dompdf->getOptions()->getDebugCss(); $parsed_url = "none"; if (mb_strpos($val, "url") === false) { $path = "none"; //Don't resolve no image -> otherwise would prefix path and no longer recognize as none } else { ...
php
protected function _image($val) { $DEBUGCSS = $this->_dompdf->getOptions()->getDebugCss(); $parsed_url = "none"; if (mb_strpos($val, "url") === false) { $path = "none"; //Don't resolve no image -> otherwise would prefix path and no longer recognize as none } else { ...
[ "protected", "function", "_image", "(", "$", "val", ")", "{", "$", "DEBUGCSS", "=", "$", "this", "->", "_dompdf", "->", "getOptions", "(", ")", "->", "getDebugCss", "(", ")", ";", "$", "parsed_url", "=", "\"none\"", ";", "if", "(", "mb_strpos", "(", ...
See also style.cls Style::_image(), refactoring?, works also for imported css files @param $val @return string
[ "See", "also", "style", ".", "cls", "Style", "::", "_image", "()", "refactoring?", "works", "also", "for", "imported", "css", "files" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/Css/Stylesheet.php#L1400-L1442
train
Return the path to an image
[ 30522, 5123, 3853, 1035, 3746, 1006, 1002, 11748, 1007, 1063, 1002, 2139, 8569, 18195, 4757, 1027, 1002, 2023, 1011, 1028, 1035, 14383, 30524, 3904, 1000, 1025, 2065, 1006, 16914, 1035, 2358, 14536, 2891, 1006, 1002, 11748, 1010, 1000, 2447...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.ARC4_init
function ARC4_init($key = '') { $this->arc4 = ''; // setup the control array if (mb_strlen($key, '8bit') == 0) { return; } $k = ''; while (mb_strlen($k, '8bit') < 256) { $k .= $key; } $k = substr($k, 0, 256); for ($i ...
php
function ARC4_init($key = '') { $this->arc4 = ''; // setup the control array if (mb_strlen($key, '8bit') == 0) { return; } $k = ''; while (mb_strlen($k, '8bit') < 256) { $k .= $key; } $k = substr($k, 0, 256); for ($i ...
[ "function", "ARC4_init", "(", "$", "key", "=", "''", ")", "{", "$", "this", "->", "arc4", "=", "''", ";", "// setup the control array", "if", "(", "mb_strlen", "(", "$", "key", ",", "'8bit'", ")", "==", "0", ")", "{", "return", ";", "}", "$", "k", ...
initialize the ARC4 encryption @param string $key
[ "initialize", "the", "ARC4", "encryption" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/lib/Cpdf.php#L2153-L2180
train
Initialize the control array
[ 30522, 3853, 8115, 2549, 1035, 1999, 4183, 1006, 1002, 3145, 1027, 1005, 1005, 1007, 1063, 1002, 2023, 1011, 1028, 8115, 2549, 1027, 1005, 1005, 1025, 1013, 1013, 16437, 1996, 2491, 9140, 2065, 1006, 16914, 1035, 2358, 20927, 2078, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/PrivacyManager/LogDataPurger.php
LogDataPurger.getDeleteTableLogTables
public static function getDeleteTableLogTables() { $provider = StaticContainer::get('Piwik\Plugin\LogTablesProvider'); $result = array(); foreach ($provider->getAllLogTables() as $logTable) { if ($logTable->getColumnToJoinOnIdVisit()) { $result[] = Common::prefi...
php
public static function getDeleteTableLogTables() { $provider = StaticContainer::get('Piwik\Plugin\LogTablesProvider'); $result = array(); foreach ($provider->getAllLogTables() as $logTable) { if ($logTable->getColumnToJoinOnIdVisit()) { $result[] = Common::prefi...
[ "public", "static", "function", "getDeleteTableLogTables", "(", ")", "{", "$", "provider", "=", "StaticContainer", "::", "get", "(", "'Piwik\\Plugin\\LogTablesProvider'", ")", ";", "$", "result", "=", "array", "(", ")", ";", "foreach", "(", "$", "provider", "-...
let's hardcode, since these are not dynamically created tables
[ "let", "s", "hardcode", "since", "these", "are", "not", "dynamically", "created", "tables" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/PrivacyManager/LogDataPurger.php#L172-L189
train
Returns an array of tables that should be deleted.
[ 30522, 2270, 10763, 3853, 2131, 9247, 12870, 10880, 21197, 10880, 2015, 1006, 1007, 1063, 1002, 10802, 1027, 10763, 8663, 18249, 2121, 1024, 1024, 2131, 1006, 1005, 14255, 9148, 2243, 1032, 13354, 2378, 1032, 8833, 10880, 13102, 12298, 18688,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Select.php
Zend_Db_Select._where
protected function _where($condition, $value = null, $type = null, $bool = true) { if (count($this->_parts[self::UNION])) { // require_once 'Zend/Db/Select/Exception.php'; throw new Zend_Db_Select_Exception("Invalid use of where clause with " . self::SQL_UNION); } if...
php
protected function _where($condition, $value = null, $type = null, $bool = true) { if (count($this->_parts[self::UNION])) { // require_once 'Zend/Db/Select/Exception.php'; throw new Zend_Db_Select_Exception("Invalid use of where clause with " . self::SQL_UNION); } if...
[ "protected", "function", "_where", "(", "$", "condition", ",", "$", "value", "=", "null", ",", "$", "type", "=", "null", ",", "$", "bool", "=", "true", ")", "{", "if", "(", "count", "(", "$", "this", "->", "_parts", "[", "self", "::", "UNION", "]...
Internal function for creating the where clause @param string $condition @param mixed $value optional @param string $type optional @param boolean $bool true = AND, false = OR @return string clause
[ "Internal", "function", "for", "creating", "the", "where", "clause" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Select.php#L992-L1013
train
Create where clause
[ 30522, 5123, 3853, 1035, 2073, 1006, 1002, 4650, 1010, 1002, 3643, 1027, 19701, 1010, 1002, 2828, 1027, 19701, 1010, 1002, 22017, 2140, 1027, 2995, 1007, 1063, 2065, 1006, 4175, 1006, 1002, 2023, 1011, 1028, 1035, 3033, 1031, 2969, 1024, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Cache/Traits/PdoTrait.php
PdoTrait.doFetch
protected function doFetch(array $ids) { $now = time(); $expired = []; $sql = str_pad('', (\count($ids) << 1) - 1, '?,'); $sql = "SELECT $this->idCol, CASE WHEN $this->lifetimeCol IS NULL OR $this->lifetimeCol + $this->timeCol > ? THEN $this->dataCol ELSE NULL END FROM $this->table ...
php
protected function doFetch(array $ids) { $now = time(); $expired = []; $sql = str_pad('', (\count($ids) << 1) - 1, '?,'); $sql = "SELECT $this->idCol, CASE WHEN $this->lifetimeCol IS NULL OR $this->lifetimeCol + $this->timeCol > ? THEN $this->dataCol ELSE NULL END FROM $this->table ...
[ "protected", "function", "doFetch", "(", "array", "$", "ids", ")", "{", "$", "now", "=", "time", "(", ")", ";", "$", "expired", "=", "[", "]", ";", "$", "sql", "=", "str_pad", "(", "''", ",", "(", "\\", "count", "(", "$", "ids", ")", "<<", "1...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Cache/Traits/PdoTrait.php#L178-L210
train
Do Fetches the result set
[ 30522, 5123, 3853, 2079, 7959, 10649, 1006, 9140, 1002, 8909, 2015, 1007, 1063, 1002, 2085, 1027, 2051, 1006, 1007, 1025, 1002, 13735, 1027, 1031, 1033, 1025, 1002, 29296, 1027, 2358, 2099, 1035, 11687, 1006, 1005, 1005, 1010, 1006, 1032, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Metrics/Sorter.php
Sorter.getSecondaryColumnToSort
public function getSecondaryColumnToSort(Row $row, $primaryColumnToSort) { $defaultSecondaryColumn = array(Metrics::INDEX_NB_VISITS, 'nb_visits'); if (in_array($primaryColumnToSort, $defaultSecondaryColumn)) { // if sorted by visits, then sort by label as a secondary column ...
php
public function getSecondaryColumnToSort(Row $row, $primaryColumnToSort) { $defaultSecondaryColumn = array(Metrics::INDEX_NB_VISITS, 'nb_visits'); if (in_array($primaryColumnToSort, $defaultSecondaryColumn)) { // if sorted by visits, then sort by label as a secondary column ...
[ "public", "function", "getSecondaryColumnToSort", "(", "Row", "$", "row", ",", "$", "primaryColumnToSort", ")", "{", "$", "defaultSecondaryColumn", "=", "array", "(", "Metrics", "::", "INDEX_NB_VISITS", ",", "'nb_visits'", ")", ";", "if", "(", "in_array", "(", ...
Detect the secondary sort column to be used for sorting @param Row $row @param int|string $primaryColumnToSort @return int
[ "Detect", "the", "secondary", "sort", "column", "to", "be", "used", "for", "sorting" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Metrics/Sorter.php#L167-L193
train
Get secondary column to sort
[ 30522, 2270, 3853, 4152, 8586, 29067, 2854, 25778, 2819, 13663, 21748, 2102, 1006, 5216, 1002, 5216, 1010, 1002, 3078, 25778, 2819, 13663, 21748, 2102, 1007, 1063, 1002, 12398, 3366, 8663, 7662, 2100, 25778, 2819, 2078, 1027, 9140, 1006, 12...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Eloquent/Builder.php
Builder.forceCreate
public function forceCreate(array $attributes) { return $this->model->unguarded(function () use ($attributes) { return $this->newModelInstance()->create($attributes); }); }
php
public function forceCreate(array $attributes) { return $this->model->unguarded(function () use ($attributes) { return $this->newModelInstance()->create($attributes); }); }
[ "public", "function", "forceCreate", "(", "array", "$", "attributes", ")", "{", "return", "$", "this", "->", "model", "->", "unguarded", "(", "function", "(", ")", "use", "(", "$", "attributes", ")", "{", "return", "$", "this", "->", "newModelInstance", ...
Save a new model and return the instance. Allow mass-assignment. @param array $attributes @return \Illuminate\Database\Eloquent\Model|$this
[ "Save", "a", "new", "model", "and", "return", "the", "instance", ".", "Allow", "mass", "-", "assignment", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Builder.php#L803-L808
train
Create a new record in the database and return the new record
[ 30522, 2270, 3853, 2486, 16748, 3686, 1006, 9140, 1002, 12332, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 2944, 1011, 1028, 4895, 18405, 2098, 1006, 3853, 1006, 1007, 2224, 1006, 1002, 12332, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 2047, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/ContainerBuilder.php
ContainerBuilder.removeBindings
public function removeBindings($id) { if ($this->hasDefinition($id)) { foreach ($this->getDefinition($id)->getBindings() as $key => $binding) { list(, $bindingId) = $binding->getValues(); $this->removedBindingIds[(int) $bindingId] = true; } } ...
php
public function removeBindings($id) { if ($this->hasDefinition($id)) { foreach ($this->getDefinition($id)->getBindings() as $key => $binding) { list(, $bindingId) = $binding->getValues(); $this->removedBindingIds[(int) $bindingId] = true; } } ...
[ "public", "function", "removeBindings", "(", "$", "id", ")", "{", "if", "(", "$", "this", "->", "hasDefinition", "(", "$", "id", ")", ")", "{", "foreach", "(", "$", "this", "->", "getDefinition", "(", "$", "id", ")", "->", "getBindings", "(", ")", ...
Removes bindings for a service. @param string $id The service identifier @internal
[ "Removes", "bindings", "for", "a", "service", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/ContainerBuilder.php#L1515-L1523
train
Remove all bindings of a definition
[ 30522, 2270, 3853, 6366, 8428, 4667, 2015, 1006, 1002, 8909, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 2038, 3207, 16294, 22753, 1006, 1002, 8909, 1007, 1007, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 2131, 3207, 16294, 22753, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
walkor/Workerman
Worker.php
Worker.initId
protected static function initId() { foreach (static::$_workers as $worker_id => $worker) { $new_id_map = array(); $worker->count = $worker->count <= 0 ? 1 : $worker->count; for($key = 0; $key < $worker->count; $key++) { $new_id_map[$key] = isset(static::$...
php
protected static function initId() { foreach (static::$_workers as $worker_id => $worker) { $new_id_map = array(); $worker->count = $worker->count <= 0 ? 1 : $worker->count; for($key = 0; $key < $worker->count; $key++) { $new_id_map[$key] = isset(static::$...
[ "protected", "static", "function", "initId", "(", ")", "{", "foreach", "(", "static", "::", "$", "_workers", "as", "$", "worker_id", "=>", "$", "worker", ")", "{", "$", "new_id_map", "=", "array", "(", ")", ";", "$", "worker", "->", "count", "=", "$"...
Init idMap. return void
[ "Init", "idMap", ".", "return", "void" ]
13649907f05014fcfffcfccaef01e63ad3339351
https://github.com/walkor/Workerman/blob/13649907f05014fcfffcfccaef01e63ad3339351/Worker.php#L683-L693
train
Init id map
[ 30522, 5123, 10763, 3853, 1999, 25090, 2094, 1006, 1007, 1063, 18921, 6776, 1006, 10763, 1024, 1024, 1002, 1035, 3667, 2004, 1002, 7309, 1035, 8909, 1027, 1028, 1002, 7309, 1007, 1063, 1002, 2047, 1035, 8909, 1035, 4949, 1027, 9140, 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/Form/NativeRequestHandler.php
NativeRequestHandler.getRequestMethod
private static function getRequestMethod() { $method = isset($_SERVER['REQUEST_METHOD']) ? strtoupper($_SERVER['REQUEST_METHOD']) : 'GET'; if ('POST' === $method && isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) { $method = strtoupper($_SERVER['HTTP_X_HTTP_METHO...
php
private static function getRequestMethod() { $method = isset($_SERVER['REQUEST_METHOD']) ? strtoupper($_SERVER['REQUEST_METHOD']) : 'GET'; if ('POST' === $method && isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) { $method = strtoupper($_SERVER['HTTP_X_HTTP_METHO...
[ "private", "static", "function", "getRequestMethod", "(", ")", "{", "$", "method", "=", "isset", "(", "$", "_SERVER", "[", "'REQUEST_METHOD'", "]", ")", "?", "strtoupper", "(", "$", "_SERVER", "[", "'REQUEST_METHOD'", "]", ")", ":", "'GET'", ";", "if", "...
Returns the method used to submit the request to the server. @return string The request method
[ "Returns", "the", "method", "used", "to", "submit", "the", "request", "to", "the", "server", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/NativeRequestHandler.php#L167-L178
train
Get the request method
[ 30522, 2797, 10763, 3853, 2131, 2890, 15500, 11368, 6806, 2094, 1006, 1007, 1063, 1002, 4118, 1027, 26354, 3388, 1006, 1002, 1035, 8241, 1031, 1005, 5227, 1035, 4118, 1005, 1033, 1007, 1029, 2358, 5339, 7140, 18620, 1006, 1002, 1035, 8241, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Translation/Catalogue/AbstractOperation.php
AbstractOperation.getMessages
public function getMessages($domain) { if (!\in_array($domain, $this->getDomains())) { throw new InvalidArgumentException(sprintf('Invalid domain: %s.', $domain)); } if (!isset($this->messages[$domain]['all'])) { $this->processDomain($domain); } retu...
php
public function getMessages($domain) { if (!\in_array($domain, $this->getDomains())) { throw new InvalidArgumentException(sprintf('Invalid domain: %s.', $domain)); } if (!isset($this->messages[$domain]['all'])) { $this->processDomain($domain); } retu...
[ "public", "function", "getMessages", "(", "$", "domain", ")", "{", "if", "(", "!", "\\", "in_array", "(", "$", "domain", ",", "$", "this", "->", "getDomains", "(", ")", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", "sprintf", "(", "'I...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Translation/Catalogue/AbstractOperation.php#L91-L102
train
Get messages for a domain
[ 30522, 2270, 3853, 2131, 7834, 3736, 8449, 1006, 1002, 5884, 1007, 1063, 2065, 1006, 999, 1032, 1999, 1035, 9140, 1006, 1002, 5884, 1010, 1002, 2023, 1011, 1028, 2131, 9527, 28247, 1006, 1007, 1007, 1007, 1063, 5466, 2047, 19528, 2906, 22...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/widgets/Table.php
Table.prepareVars
public function prepareVars() { $this->vars['columns'] = $this->prepareColumnsArray(); $this->vars['recordsKeyFrom'] = $this->recordsKeyFrom; $this->vars['recordsPerPage'] = $this->getConfig('recordsPerPage', false) ?: 'false'; $this->vars['postbackHandlerName'] = $this->getConfig('...
php
public function prepareVars() { $this->vars['columns'] = $this->prepareColumnsArray(); $this->vars['recordsKeyFrom'] = $this->recordsKeyFrom; $this->vars['recordsPerPage'] = $this->getConfig('recordsPerPage', false) ?: 'false'; $this->vars['postbackHandlerName'] = $this->getConfig('...
[ "public", "function", "prepareVars", "(", ")", "{", "$", "this", "->", "vars", "[", "'columns'", "]", "=", "$", "this", "->", "prepareColumnsArray", "(", ")", ";", "$", "this", "->", "vars", "[", "'recordsKeyFrom'", "]", "=", "$", "this", "->", "record...
Prepares the view data
[ "Prepares", "the", "view", "data" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/widgets/Table.php#L117-L142
train
Prepares the form variables
[ 30522, 2270, 3853, 7374, 10755, 2015, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 13075, 2015, 1031, 1005, 7753, 1005, 1033, 1027, 1002, 2023, 1011, 1028, 7374, 25778, 2819, 3619, 2906, 9447, 1006, 1007, 1025, 1002, 2023, 1011, 1028, 13075, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Validation/Rules/Unique.php
Unique.ignore
public function ignore($id, $idColumn = null) { if ($id instanceof Model) { return $this->ignoreModel($id, $idColumn); } $this->ignore = $id; $this->idColumn = $idColumn ?? 'id'; return $this; }
php
public function ignore($id, $idColumn = null) { if ($id instanceof Model) { return $this->ignoreModel($id, $idColumn); } $this->ignore = $id; $this->idColumn = $idColumn ?? 'id'; return $this; }
[ "public", "function", "ignore", "(", "$", "id", ",", "$", "idColumn", "=", "null", ")", "{", "if", "(", "$", "id", "instanceof", "Model", ")", "{", "return", "$", "this", "->", "ignoreModel", "(", "$", "id", ",", "$", "idColumn", ")", ";", "}", "...
Ignore the given ID during the unique check. @param mixed $id @param string|null $idColumn @return $this
[ "Ignore", "the", "given", "ID", "during", "the", "unique", "check", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Rules/Unique.php#L32-L42
train
Ignore a model or a record
[ 30522, 2270, 3853, 8568, 1006, 1002, 8909, 1010, 1002, 8909, 25778, 2819, 2078, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 8909, 6013, 11253, 2944, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 8568, 5302, 9247, 1006, 1002, 8909, 1010, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/Marketplace/UpdateCommunication.php
UpdateCommunication.canBeEnabled
public static function canBeEnabled() { $isEnabled = (bool) Config::getInstance()->General['enable_update_communication']; if($isEnabled === true && Marketplace::isMarketplaceEnabled() === true && SettingsPiwik::isInternetEnabled() === true){ return true; } retur...
php
public static function canBeEnabled() { $isEnabled = (bool) Config::getInstance()->General['enable_update_communication']; if($isEnabled === true && Marketplace::isMarketplaceEnabled() === true && SettingsPiwik::isInternetEnabled() === true){ return true; } retur...
[ "public", "static", "function", "canBeEnabled", "(", ")", "{", "$", "isEnabled", "=", "(", "bool", ")", "Config", "::", "getInstance", "(", ")", "->", "General", "[", "'enable_update_communication'", "]", ";", "if", "(", "$", "isEnabled", "===", "true", "&...
Checks whether a plugin update notification can be enabled or not. It cannot be enabled if for instance the Marketplace is disabled or if update notifications are disabled in general. @return bool
[ "Checks", "whether", "a", "plugin", "update", "notification", "can", "be", "enabled", "or", "not", ".", "It", "cannot", "be", "enabled", "if", "for", "instance", "the", "Marketplace", "is", "disabled", "or", "if", "update", "notifications", "are", "disabled", ...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Marketplace/UpdateCommunication.php#L57-L65
train
Check if update communication can be enabled
[ 30522, 2270, 10763, 3853, 2064, 11306, 22966, 2094, 1006, 1007, 1063, 1002, 2003, 8189, 23242, 1027, 1006, 22017, 2140, 1007, 9530, 8873, 2290, 1024, 1024, 2131, 7076, 26897, 1006, 1007, 1011, 1028, 2236, 1031, 1005, 9585, 1035, 10651, 1035...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Routing/RouteCollection.php
RouteCollection.add
public function add(Route $route) { $this->addToCollections($route); $this->addLookups($route); return $route; }
php
public function add(Route $route) { $this->addToCollections($route); $this->addLookups($route); return $route; }
[ "public", "function", "add", "(", "Route", "$", "route", ")", "{", "$", "this", "->", "addToCollections", "(", "$", "route", ")", ";", "$", "this", "->", "addLookups", "(", "$", "route", ")", ";", "return", "$", "route", ";", "}" ]
Add a Route instance to the collection. @param \Illuminate\Routing\Route $route @return \Illuminate\Routing\Route
[ "Add", "a", "Route", "instance", "to", "the", "collection", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/RouteCollection.php#L50-L57
train
Add a route to the collection and lookup table.
[ 30522, 2270, 3853, 5587, 1006, 2799, 1002, 2799, 1007, 1063, 1002, 2023, 1011, 1028, 5587, 3406, 26895, 18491, 2015, 1006, 1002, 2799, 1007, 1025, 1002, 2023, 1011, 1028, 5587, 4135, 21940, 4523, 1006, 1002, 2799, 1007, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Db.php
Db.fetchOne
public static function fetchOne($sql, $parameters = array()) { try { self::logSql(__FUNCTION__, $sql, $parameters); return self::get()->fetchOne($sql, $parameters); } catch (Exception $ex) { self::logExtraInfoIfDeadlock($ex); throw $ex; } ...
php
public static function fetchOne($sql, $parameters = array()) { try { self::logSql(__FUNCTION__, $sql, $parameters); return self::get()->fetchOne($sql, $parameters); } catch (Exception $ex) { self::logExtraInfoIfDeadlock($ex); throw $ex; } ...
[ "public", "static", "function", "fetchOne", "(", "$", "sql", ",", "$", "parameters", "=", "array", "(", ")", ")", "{", "try", "{", "self", "::", "logSql", "(", "__FUNCTION__", ",", "$", "sql", ",", "$", "parameters", ")", ";", "return", "self", "::",...
Executes an SQL `SELECT` statement and returns the first column value of the first row in the result set. @param string $sql The SQL query. @param array $parameters Parameters to bind in the query, eg, `array(param1 => value1, param2 => value2)`. @throws \Exception If there is a problem with the SQL or bind parameters...
[ "Executes", "an", "SQL", "SELECT", "statement", "and", "returns", "the", "first", "column", "value", "of", "the", "first", "row", "in", "the", "result", "set", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Db.php#L256-L266
train
Fetch one row from the result set
[ 30522, 2270, 10763, 3853, 18584, 5643, 1006, 1002, 29296, 1010, 1002, 11709, 1027, 9140, 1006, 1007, 1007, 1063, 3046, 1063, 2969, 1024, 1024, 15664, 4160, 2140, 1006, 1035, 1035, 3853, 1035, 1035, 1010, 1002, 29296, 1010, 1002, 11709, 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...
z-song/laravel-admin
src/Form/NestedForm.php
NestedForm.getKey
public function getKey() { if ($this->model) { $key = $this->model->getKey(); } if (!is_null($this->key)) { $key = $this->key; } if (isset($key)) { return $key; } return 'new_'.static::DEFAULT_KEY_NAME; }
php
public function getKey() { if ($this->model) { $key = $this->model->getKey(); } if (!is_null($this->key)) { $key = $this->key; } if (isset($key)) { return $key; } return 'new_'.static::DEFAULT_KEY_NAME; }
[ "public", "function", "getKey", "(", ")", "{", "if", "(", "$", "this", "->", "model", ")", "{", "$", "key", "=", "$", "this", "->", "model", "->", "getKey", "(", ")", ";", "}", "if", "(", "!", "is_null", "(", "$", "this", "->", "key", ")", ")...
Get the value of the model's primary key. @return mixed|null
[ "Get", "the", "value", "of", "the", "model", "s", "primary", "key", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Form/NestedForm.php#L130-L145
train
Get the key of the current model
[ 30522, 2270, 3853, 2131, 14839, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 2944, 1007, 1063, 1002, 3145, 1027, 1002, 2023, 1011, 1028, 2944, 1011, 1028, 2131, 14839, 1006, 1007, 1025, 1065, 2065, 1006, 999, 2003, 1035, 19701, 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/traits/ConfigMaker.php
ConfigMaker.guessConfigPathFrom
public function guessConfigPathFrom($class, $suffix = '') { $classFolder = strtolower(class_basename($class)); $classFile = realpath(dirname(File::fromClass($class))); return $classFile ? $classFile . '/' . $classFolder . $suffix : null; }
php
public function guessConfigPathFrom($class, $suffix = '') { $classFolder = strtolower(class_basename($class)); $classFile = realpath(dirname(File::fromClass($class))); return $classFile ? $classFile . '/' . $classFolder . $suffix : null; }
[ "public", "function", "guessConfigPathFrom", "(", "$", "class", ",", "$", "suffix", "=", "''", ")", "{", "$", "classFolder", "=", "strtolower", "(", "class_basename", "(", "$", "class", ")", ")", ";", "$", "classFile", "=", "realpath", "(", "dirname", "(...
Guess the package path from a specified class. @param string $class Class to guess path from. @param string $suffix An extra path to attach to the end @return string
[ "Guess", "the", "package", "path", "from", "a", "specified", "class", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/traits/ConfigMaker.php#L181-L186
train
Guess the path to the config file for a class
[ 30522, 2270, 3853, 3984, 8663, 8873, 21600, 8988, 19699, 5358, 1006, 1002, 2465, 1010, 1002, 16809, 1027, 1005, 1005, 1007, 1063, 1002, 2465, 10371, 2121, 1027, 2358, 5339, 12898, 13777, 1006, 2465, 1035, 2918, 18442, 1006, 1002, 2465, 1007...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Redis/Connections/PhpRedisConnection.php
PhpRedisConnection.exists
public function exists(...$keys) { $keys = collect($keys)->map(function ($key) { return $this->applyPrefix($key); })->all(); return $this->executeRaw(array_merge(['exists'], $keys)); }
php
public function exists(...$keys) { $keys = collect($keys)->map(function ($key) { return $this->applyPrefix($key); })->all(); return $this->executeRaw(array_merge(['exists'], $keys)); }
[ "public", "function", "exists", "(", "...", "$", "keys", ")", "{", "$", "keys", "=", "collect", "(", "$", "keys", ")", "->", "map", "(", "function", "(", "$", "key", ")", "{", "return", "$", "this", "->", "applyPrefix", "(", "$", "key", ")", ";",...
Determine if the given keys exist. @param dynamic $keys @return int
[ "Determine", "if", "the", "given", "keys", "exist", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Redis/Connections/PhpRedisConnection.php#L57-L64
train
Check if a key exists in the cache.
[ 30522, 2270, 3853, 6526, 1006, 1012, 1012, 1012, 1002, 6309, 1007, 1063, 1002, 6309, 1027, 8145, 1006, 1002, 6309, 1007, 1011, 1028, 4949, 1006, 3853, 1006, 1002, 3145, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 6611, 28139, 8873, 2595, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Eloquent/Model.php
Model.update
public function update(array $attributes = [], array $options = []) { if (! $this->exists) { return false; } return $this->fill($attributes)->save($options); }
php
public function update(array $attributes = [], array $options = []) { if (! $this->exists) { return false; } return $this->fill($attributes)->save($options); }
[ "public", "function", "update", "(", "array", "$", "attributes", "=", "[", "]", ",", "array", "$", "options", "=", "[", "]", ")", "{", "if", "(", "!", "$", "this", "->", "exists", ")", "{", "return", "false", ";", "}", "return", "$", "this", "->"...
Update the model in the database. @param array $attributes @param array $options @return bool
[ "Update", "the", "model", "in", "the", "database", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Model.php#L597-L604
train
Update the record
[ 30522, 2270, 3853, 10651, 1006, 9140, 1002, 12332, 1027, 1031, 1033, 1010, 9140, 1002, 7047, 1027, 1031, 1033, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 6526, 1007, 1063, 2709, 6270, 1025, 1065, 2709, 1002, 2023, 1011, 1028, 60...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Routing/Router.php
Router.setOptions
public function setOptions(array $options) { $this->options = [ 'cache_dir' => null, 'debug' => false, 'generator_class' => CompiledUrlGenerator::class, 'generator_base_class' => UrlGenerator::class, // deprecated 'generator_dumper_class' => Compil...
php
public function setOptions(array $options) { $this->options = [ 'cache_dir' => null, 'debug' => false, 'generator_class' => CompiledUrlGenerator::class, 'generator_base_class' => UrlGenerator::class, // deprecated 'generator_dumper_class' => Compil...
[ "public", "function", "setOptions", "(", "array", "$", "options", ")", "{", "$", "this", "->", "options", "=", "[", "'cache_dir'", "=>", "null", ",", "'debug'", "=>", "false", ",", "'generator_class'", "=>", "CompiledUrlGenerator", "::", "class", ",", "'gene...
Sets options. Available options: * cache_dir: The cache directory (or null to disable caching) * debug: Whether to enable debugging or not (false by default) * generator_class: The name of a UrlGeneratorInterface implementation * generator_dumper_class: The name of a GeneratorDump...
[ "Sets", "options", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Routing/Router.php#L134-L165
train
Set the options for the router
[ 30522, 2270, 3853, 2275, 7361, 9285, 1006, 9140, 1002, 7047, 1007, 1063, 1002, 2023, 1011, 1028, 7047, 1027, 1031, 1005, 17053, 1035, 16101, 1005, 1027, 1028, 19701, 1010, 1005, 2139, 8569, 2290, 1005, 1027, 1028, 6270, 1010, 1005, 13103, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Console/Seeds/SeedCommand.php
SeedCommand.getSeeder
protected function getSeeder() { $class = $this->laravel->make($this->input->getOption('class')); return $class->setContainer($this->laravel)->setCommand($this); }
php
protected function getSeeder() { $class = $this->laravel->make($this->input->getOption('class')); return $class->setContainer($this->laravel)->setCommand($this); }
[ "protected", "function", "getSeeder", "(", ")", "{", "$", "class", "=", "$", "this", "->", "laravel", "->", "make", "(", "$", "this", "->", "input", "->", "getOption", "(", "'class'", ")", ")", ";", "return", "$", "class", "->", "setContainer", "(", ...
Get a seeder instance from the container. @return \Illuminate\Database\Seeder
[ "Get", "a", "seeder", "instance", "from", "the", "container", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Console/Seeds/SeedCommand.php#L74-L79
train
Get the seeder for the command.
[ 30522, 5123, 3853, 4152, 13089, 2121, 1006, 1007, 1063, 1002, 2465, 1027, 1002, 2023, 1011, 1028, 13679, 15985, 1011, 1028, 2191, 1006, 1002, 2023, 1011, 1028, 7953, 1011, 1028, 2131, 7361, 3508, 1006, 1005, 2465, 1005, 1007, 1007, 1025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dompdf/dompdf
src/Adapter/PDFLib.php
PDFLib.page_line
public function page_line($x1, $y1, $x2, $y2, $color, $width, $style = array()) { $_t = 'line'; $this->_page_text[] = compact('_t', 'x1', 'y1', 'x2', 'y2', 'color', 'width', 'style'); }
php
public function page_line($x1, $y1, $x2, $y2, $color, $width, $style = array()) { $_t = 'line'; $this->_page_text[] = compact('_t', 'x1', 'y1', 'x2', 'y2', 'color', 'width', 'style'); }
[ "public", "function", "page_line", "(", "$", "x1", ",", "$", "y1", ",", "$", "x2", ",", "$", "y2", ",", "$", "color", ",", "$", "width", ",", "$", "style", "=", "array", "(", ")", ")", "{", "$", "_t", "=", "'line'", ";", "$", "this", "->", ...
Draw line at the specified coordinates on every page. See {@link Style::munge_color()} for the format of the colour array. @param float $x1 @param float $y1 @param float $x2 @param float $y2 @param array $color @param float $width @param array $style optional
[ "Draw", "line", "at", "the", "specified", "coordinates", "on", "every", "page", "." ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/Adapter/PDFLib.php#L889-L893
train
Page Line - related stuff
[ 30522, 2270, 3853, 3931, 1035, 2240, 1006, 1002, 1060, 2487, 1010, 1002, 1061, 2487, 1010, 1002, 1060, 2475, 1010, 1002, 1061, 2475, 1010, 1002, 3609, 1010, 1002, 9381, 1010, 1002, 2806, 1027, 9140, 1006, 1007, 1007, 1063, 1002, 1035, 105...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Sqlite.php
Zend_Cache_Backend_Sqlite.clean
public function clean($mode = Zend_Cache::CLEANING_MODE_ALL, $tags = array()) { $this->_checkAndBuildStructure(); $return = $this->_clean($mode, $tags); $this->_automaticVacuum(); return $return; }
php
public function clean($mode = Zend_Cache::CLEANING_MODE_ALL, $tags = array()) { $this->_checkAndBuildStructure(); $return = $this->_clean($mode, $tags); $this->_automaticVacuum(); return $return; }
[ "public", "function", "clean", "(", "$", "mode", "=", "Zend_Cache", "::", "CLEANING_MODE_ALL", ",", "$", "tags", "=", "array", "(", ")", ")", "{", "$", "this", "->", "_checkAndBuildStructure", "(", ")", ";", "$", "return", "=", "$", "this", "->", "_cle...
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/Sqlite.php#L218-L224
train
Clean the 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, 30524, 1035, 4550, 1006, 1002, 5549, 1010, 1002, 22073, 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...
php-ai/php-ml
src/Association/Apriori.php
Apriori.apriori
public function apriori(): array { $L = []; $items = $this->frequent($this->items()); for ($k = 1; isset($items[0]); ++$k) { $L[$k] = $items; $items = $this->frequent($this->candidates($items)); } return $L; }
php
public function apriori(): array { $L = []; $items = $this->frequent($this->items()); for ($k = 1; isset($items[0]); ++$k) { $L[$k] = $items; $items = $this->frequent($this->candidates($items)); } return $L; }
[ "public", "function", "apriori", "(", ")", ":", "array", "{", "$", "L", "=", "[", "]", ";", "$", "items", "=", "$", "this", "->", "frequent", "(", "$", "this", "->", "items", "(", ")", ")", ";", "for", "(", "$", "k", "=", "1", ";", "isset", ...
Generates frequent item sets. @return mixed[][][]
[ "Generates", "frequent", "item", "sets", "." ]
f6aa1a59b0525b8fca3d2786d661ab3e70904016
https://github.com/php-ai/php-ml/blob/f6aa1a59b0525b8fca3d2786d661ab3e70904016/src/Association/Apriori.php#L87-L98
train
Return the list of all the candidates in the list
[ 30522, 2270, 3853, 19804, 25346, 2072, 1006, 1007, 1024, 9140, 1063, 1002, 1048, 1027, 1031, 1033, 1025, 1002, 5167, 1027, 1002, 2023, 1011, 1028, 6976, 1006, 1002, 2023, 1011, 1028, 5167, 1006, 1007, 1007, 1025, 2005, 1006, 1002, 1047, 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/DomCrawler/Form.php
Form.getUri
public function getUri() { $uri = parent::getUri(); if (!\in_array($this->getMethod(), ['POST', 'PUT', 'DELETE', 'PATCH'])) { $query = parse_url($uri, PHP_URL_QUERY); $currentParameters = []; if ($query) { parse_str($query, $currentParameters); ...
php
public function getUri() { $uri = parent::getUri(); if (!\in_array($this->getMethod(), ['POST', 'PUT', 'DELETE', 'PATCH'])) { $query = parse_url($uri, PHP_URL_QUERY); $currentParameters = []; if ($query) { parse_str($query, $currentParameters); ...
[ "public", "function", "getUri", "(", ")", "{", "$", "uri", "=", "parent", "::", "getUri", "(", ")", ";", "if", "(", "!", "\\", "in_array", "(", "$", "this", "->", "getMethod", "(", ")", ",", "[", "'POST'", ",", "'PUT'", ",", "'DELETE'", ",", "'PA...
Gets the URI of the form. The returned URI is not the same as the form "action" attribute. This method merges the value if the method is GET to mimics browser behavior. @return string The URI
[ "Gets", "the", "URI", "of", "the", "form", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DomCrawler/Form.php#L201-L220
train
Get URI of this request
[ 30522, 2270, 3853, 2131, 9496, 1006, 1007, 1063, 1002, 24471, 2072, 1027, 6687, 1024, 1024, 2131, 9496, 1006, 1007, 1025, 2065, 1006, 999, 1032, 1999, 1035, 9140, 1006, 1002, 2023, 1011, 1028, 2131, 11368, 6806, 2094, 1006, 1007, 1010, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/ArchiveProcessor/PluginsArchiver.php
PluginsArchiver.shouldProcessReportsForPlugin
protected function shouldProcessReportsForPlugin($pluginName) { if ($this->params->getRequestedPlugin() == $pluginName) { return true; } if ($this->params->shouldOnlyArchiveRequestedPlugin()) { return false; } if (Rules::shouldProcessReportsAllPlugin...
php
protected function shouldProcessReportsForPlugin($pluginName) { if ($this->params->getRequestedPlugin() == $pluginName) { return true; } if ($this->params->shouldOnlyArchiveRequestedPlugin()) { return false; } if (Rules::shouldProcessReportsAllPlugin...
[ "protected", "function", "shouldProcessReportsForPlugin", "(", "$", "pluginName", ")", "{", "if", "(", "$", "this", "->", "params", "->", "getRequestedPlugin", "(", ")", "==", "$", "pluginName", ")", "{", "return", "true", ";", "}", "if", "(", "$", "this",...
Whether the specified plugin's reports should be archived @param string $pluginName @return bool
[ "Whether", "the", "specified", "plugin", "s", "reports", "should", "be", "archived" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/ArchiveProcessor/PluginsArchiver.php#L245-L266
train
Returns true if the plugin should be processed.
[ 30522, 5123, 3853, 2323, 21572, 9623, 21338, 13699, 11589, 22747, 2953, 24759, 15916, 2378, 1006, 1002, 13354, 23111, 30524, 15916, 2378, 1006, 1007, 1027, 1027, 1002, 13354, 23111, 14074, 1007, 1063, 2709, 2995, 1025, 1065, 2065, 1006, 1002,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/HTML/QuickForm2/Element/Date.php
HTML_QuickForm2_Element_Date.trimLeadingZeros
protected function trimLeadingZeros($str) { if (0 == strcmp($str, $this->data['emptyOptionValue'])) { return $str; } $trimmed = ltrim($str, '0'); return strlen($trimmed)? $trimmed: '0'; }
php
protected function trimLeadingZeros($str) { if (0 == strcmp($str, $this->data['emptyOptionValue'])) { return $str; } $trimmed = ltrim($str, '0'); return strlen($trimmed)? $trimmed: '0'; }
[ "protected", "function", "trimLeadingZeros", "(", "$", "str", ")", "{", "if", "(", "0", "==", "strcmp", "(", "$", "str", ",", "$", "this", "->", "data", "[", "'emptyOptionValue'", "]", ")", ")", "{", "return", "$", "str", ";", "}", "$", "trimmed", ...
Trims leading zeros from the (numeric) string @param string A numeric string, possibly with leading zeros @return string String with leading zeros removed
[ "Trims", "leading", "zeros", "from", "the", "(", "numeric", ")", "string" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/QuickForm2/Element/Date.php#L256-L263
train
Trims leading zeros from the string
[ 30522, 5123, 3853, 12241, 19738, 4667, 6290, 2891, 1006, 1002, 2358, 2099, 1007, 1063, 2065, 1006, 1014, 1027, 1027, 2358, 11890, 8737, 1006, 1002, 2358, 2099, 1010, 1002, 2023, 1011, 1028, 2951, 1031, 1005, 4064, 7361, 3508, 10175, 5657, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Eloquent/Relations/Relation.php
Relation.getKeys
protected function getKeys(array $models, $key = null) { return collect($models)->map(function ($value) use ($key) { return $key ? $value->getAttribute($key) : $value->getKey(); })->values()->unique(null, true)->sort()->all(); }
php
protected function getKeys(array $models, $key = null) { return collect($models)->map(function ($value) use ($key) { return $key ? $value->getAttribute($key) : $value->getKey(); })->values()->unique(null, true)->sort()->all(); }
[ "protected", "function", "getKeys", "(", "array", "$", "models", ",", "$", "key", "=", "null", ")", "{", "return", "collect", "(", "$", "models", ")", "->", "map", "(", "function", "(", "$", "value", ")", "use", "(", "$", "key", ")", "{", "return",...
Get all of the primary keys for an array of models. @param array $models @param string $key @return array
[ "Get", "all", "of", "the", "primary", "keys", "for", "an", "array", "of", "models", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Relations/Relation.php#L223-L228
train
Get all the keys of the model
[ 30522, 5123, 3853, 2131, 14839, 2015, 1006, 9140, 1002, 4275, 1010, 1002, 3145, 1027, 19701, 1007, 1063, 2709, 8145, 1006, 1002, 4275, 1007, 1011, 1028, 4949, 1006, 3853, 1006, 1002, 3643, 1007, 2224, 1006, 1002, 3145, 1007, 1063, 2709, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Tracker/Db/Mysqli.php
Mysqli.query
public function query($query, $parameters = array()) { if (is_null($this->connection)) { return false; } try { if (self::$profiling) { $timer = $this->initProfiler(); } $query = $this->prepare($query, $parameters); ...
php
public function query($query, $parameters = array()) { if (is_null($this->connection)) { return false; } try { if (self::$profiling) { $timer = $this->initProfiler(); } $query = $this->prepare($query, $parameters); ...
[ "public", "function", "query", "(", "$", "query", ",", "$", "parameters", "=", "array", "(", ")", ")", "{", "if", "(", "is_null", "(", "$", "this", "->", "connection", ")", ")", "{", "return", "false", ";", "}", "try", "{", "if", "(", "self", "::...
Executes a query, using optional bound parameters. @param string $query Query @param array|string $parameters Parameters to bind array('idsite'=> 1) @return bool|resource false if failed @throws DbException if an exception occurred
[ "Executes", "a", "query", "using", "optional", "bound", "parameters", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Tracker/Db/Mysqli.php#L235-L261
train
Queries the database and returns the result
[ 30522, 2270, 3853, 23032, 1006, 1002, 23032, 1010, 1002, 11709, 1027, 9140, 1006, 1007, 1007, 1063, 2065, 1006, 2003, 1035, 19701, 1006, 1002, 2023, 1011, 1028, 4434, 1007, 1007, 1063, 2709, 6270, 1025, 1065, 3046, 1063, 2065, 1006, 2969, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Lock/Store/CombinedStore.php
CombinedStore.save
public function save(Key $key) { $successCount = 0; $failureCount = 0; $storesCount = \count($this->stores); foreach ($this->stores as $store) { try { $store->save($key); ++$successCount; } catch (\Exception $e) { ...
php
public function save(Key $key) { $successCount = 0; $failureCount = 0; $storesCount = \count($this->stores); foreach ($this->stores as $store) { try { $store->save($key); ++$successCount; } catch (\Exception $e) { ...
[ "public", "function", "save", "(", "Key", "$", "key", ")", "{", "$", "successCount", "=", "0", ";", "$", "failureCount", "=", "0", ";", "$", "storesCount", "=", "\\", "count", "(", "$", "this", "->", "stores", ")", ";", "foreach", "(", "$", "this",...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Lock/Store/CombinedStore.php#L61-L91
train
Save the lock
[ 30522, 2270, 3853, 3828, 1006, 3145, 1002, 3145, 1007, 1063, 1002, 3112, 3597, 16671, 1027, 1014, 1025, 1002, 4945, 3597, 16671, 1027, 1014, 1025, 1002, 5324, 3597, 16671, 1027, 1032, 4175, 1006, 1002, 2023, 1011, 1028, 5324, 1007, 1025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Cache/Traits/RedisTrait.php
RedisTrait.createConnection
public static function createConnection($dsn, array $options = []) { if (0 === strpos($dsn, 'redis:')) { $scheme = 'redis'; } elseif (0 === strpos($dsn, 'rediss:')) { $scheme = 'rediss'; } else { throw new InvalidArgumentException(sprintf('Invalid Redis DS...
php
public static function createConnection($dsn, array $options = []) { if (0 === strpos($dsn, 'redis:')) { $scheme = 'redis'; } elseif (0 === strpos($dsn, 'rediss:')) { $scheme = 'rediss'; } else { throw new InvalidArgumentException(sprintf('Invalid Redis DS...
[ "public", "static", "function", "createConnection", "(", "$", "dsn", ",", "array", "$", "options", "=", "[", "]", ")", "{", "if", "(", "0", "===", "strpos", "(", "$", "dsn", ",", "'redis:'", ")", ")", "{", "$", "scheme", "=", "'redis'", ";", "}", ...
Creates a Redis connection using a DSN configuration. Example DSN: - redis://localhost - redis://example.com:1234 - redis://secret@example.com/13 - redis:///var/run/redis.sock - redis://secret@/var/run/redis.sock/13 @param string $dsn @param array $options See self::$defaultConnectionOptions @throws InvalidArgument...
[ "Creates", "a", "Redis", "connection", "using", "a", "DSN", "configuration", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Cache/Traits/RedisTrait.php#L81-L278
train
Creates a new Redis connection.
[ 30522, 2270, 10763, 3853, 3443, 8663, 2638, 7542, 1006, 1002, 16233, 2078, 1010, 9140, 1002, 7047, 1027, 1031, 1033, 1007, 1063, 2065, 1006, 1014, 1027, 1027, 1027, 2358, 14536, 2891, 1006, 1002, 16233, 2078, 1010, 1005, 2417, 2483, 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/Database/Schema/Blueprint.php
Blueprint.timestampsTz
public function timestampsTz($precision = 0) { $this->timestampTz('created_at', $precision)->nullable(); $this->timestampTz('updated_at', $precision)->nullable(); }
php
public function timestampsTz($precision = 0) { $this->timestampTz('created_at', $precision)->nullable(); $this->timestampTz('updated_at', $precision)->nullable(); }
[ "public", "function", "timestampsTz", "(", "$", "precision", "=", "0", ")", "{", "$", "this", "->", "timestampTz", "(", "'created_at'", ",", "$", "precision", ")", "->", "nullable", "(", ")", ";", "$", "this", "->", "timestampTz", "(", "'updated_at'", ",...
Add creation and update timestampTz columns to the table. @param int $precision @return void
[ "Add", "creation", "and", "update", "timestampTz", "columns", "to", "the", "table", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Blueprint.php#L1008-L1013
train
Create the created and updated timestamps TZ
[ 30522, 2270, 3853, 2335, 15464, 4523, 5753, 1006, 1002, 11718, 1027, 1014, 1007, 1063, 1002, 2023, 1011, 1028, 2335, 15464, 13876, 2480, 1006, 1005, 2580, 1035, 2012, 1005, 1010, 1002, 11718, 1007, 1011, 1028, 19701, 3085, 1006, 1007, 1025,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Console/Cli/ClearCacheCommand.php
ClearCacheCommand.cleanPaths
private function cleanPaths() { $this->output->writeln(''); if ($this->input->getOption('purge')) { $this->output->writeln('<magenta>Purging old cache</magenta>'); $this->output->writeln(''); $msg = Cache::purgeJob(); $this->output->writeln($msg); ...
php
private function cleanPaths() { $this->output->writeln(''); if ($this->input->getOption('purge')) { $this->output->writeln('<magenta>Purging old cache</magenta>'); $this->output->writeln(''); $msg = Cache::purgeJob(); $this->output->writeln($msg); ...
[ "private", "function", "cleanPaths", "(", ")", "{", "$", "this", "->", "output", "->", "writeln", "(", "''", ")", ";", "if", "(", "$", "this", "->", "input", "->", "getOption", "(", "'purge'", ")", ")", "{", "$", "this", "->", "output", "->", "writ...
loops over the array of paths and deletes the files/folders
[ "loops", "over", "the", "array", "of", "paths", "and", "deletes", "the", "files", "/", "folders" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Console/Cli/ClearCacheCommand.php#L43-L78
train
Cleans paths of cache
[ 30522, 2797, 3853, 4550, 15069, 2015, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 6434, 1011, 1028, 4339, 19666, 1006, 1005, 1005, 1007, 1025, 2065, 1006, 1002, 2023, 1011, 1028, 7953, 1011, 1028, 2131, 7361, 3508, 1006, 1005, 24694, 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...
barryvdh/laravel-debugbar
src/JavascriptRenderer.php
JavascriptRenderer.makeUriRelativeTo
protected function makeUriRelativeTo($uri, $root) { if (!$root) { return $uri; } if (is_array($uri)) { $uris = []; foreach ($uri as $u) { $uris[] = $this->makeUriRelativeTo($u, $root); } return $uris; } ...
php
protected function makeUriRelativeTo($uri, $root) { if (!$root) { return $uri; } if (is_array($uri)) { $uris = []; foreach ($uri as $u) { $uris[] = $this->makeUriRelativeTo($u, $root); } return $uris; } ...
[ "protected", "function", "makeUriRelativeTo", "(", "$", "uri", ",", "$", "root", ")", "{", "if", "(", "!", "$", "root", ")", "{", "return", "$", "uri", ";", "}", "if", "(", "is_array", "(", "$", "uri", ")", ")", "{", "$", "uris", "=", "[", "]",...
Makes a URI relative to another @param string|array $uri @param string $root @return string
[ "Makes", "a", "URI", "relative", "to", "another" ]
2d195779ea4f809f69764a795e2ec371dbb76a96
https://github.com/barryvdh/laravel-debugbar/blob/2d195779ea4f809f69764a795e2ec371dbb76a96/src/JavascriptRenderer.php#L123-L141
train
Make the URI relative to the root
[ 30522, 5123, 3853, 2191, 9496, 16570, 8082, 3406, 1006, 1002, 24471, 2072, 1010, 1002, 7117, 1007, 1063, 2065, 1006, 999, 1002, 7117, 1007, 1063, 2709, 1002, 24471, 2072, 1025, 1065, 2065, 1006, 2003, 1035, 9140, 1006, 1002, 24471, 2072, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.dumpLine
protected function dumpLine($depth, $endOfValue = false) { if ($this->colors) { $this->line = sprintf("\033[%sm%s\033[m", $this->styles['default'], $this->line); } parent::dumpLine($depth); }
php
protected function dumpLine($depth, $endOfValue = false) { if ($this->colors) { $this->line = sprintf("\033[%sm%s\033[m", $this->styles['default'], $this->line); } parent::dumpLine($depth); }
[ "protected", "function", "dumpLine", "(", "$", "depth", ",", "$", "endOfValue", "=", "false", ")", "{", "if", "(", "$", "this", "->", "colors", ")", "{", "$", "this", "->", "line", "=", "sprintf", "(", "\"\\033[%sm%s\\033[m\"", ",", "$", "this", "->", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/VarDumper/Dumper/CliDumper.php#L544-L550
train
Dump line to terminal
[ 30522, 5123, 3853, 15653, 4179, 1006, 1002, 5995, 1010, 1002, 2203, 11253, 10175, 5657, 1027, 6270, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 6087, 1007, 1063, 1002, 2023, 1011, 1028, 2240, 1027, 9043, 2546, 1006, 1000, 1032, 6021, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Row.php
Row.formatHtmlAttribute
private function formatHtmlAttribute($attributes = []) { $attrArr = []; foreach ($attributes as $name => $val) { $attrArr[] = "$name=\"$val\""; } return implode(' ', $attrArr); }
php
private function formatHtmlAttribute($attributes = []) { $attrArr = []; foreach ($attributes as $name => $val) { $attrArr[] = "$name=\"$val\""; } return implode(' ', $attrArr); }
[ "private", "function", "formatHtmlAttribute", "(", "$", "attributes", "=", "[", "]", ")", "{", "$", "attrArr", "=", "[", "]", ";", "foreach", "(", "$", "attributes", "as", "$", "name", "=>", "$", "val", ")", "{", "$", "attrArr", "[", "]", "=", "\"$...
Format attributes to html. @param array $attributes @return string
[ "Format", "attributes", "to", "html", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Grid/Row.php#L90-L98
train
Formats the HTML attributes
[ 30522, 2797, 3853, 4289, 11039, 19968, 19321, 3089, 8569, 2618, 1006, 1002, 12332, 1027, 1031, 1033, 1007, 1063, 1002, 2012, 6494, 12171, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1002, 12332, 2004, 1002, 2171, 1027, 1028, 1002, 11748, 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/HttpKernel/Fragment/HIncludeFragmentRenderer.php
HIncludeFragmentRenderer.render
public function render($uri, Request $request, array $options = []) { if ($uri instanceof ControllerReference) { if (null === $this->signer) { throw new \LogicException('You must use a proper URI when using the Hinclude rendering strategy or set a URL signer.'); } ...
php
public function render($uri, Request $request, array $options = []) { if ($uri instanceof ControllerReference) { if (null === $this->signer) { throw new \LogicException('You must use a proper URI when using the Hinclude rendering strategy or set a URL signer.'); } ...
[ "public", "function", "render", "(", "$", "uri", ",", "Request", "$", "request", ",", "array", "$", "options", "=", "[", "]", ")", "{", "if", "(", "$", "uri", "instanceof", "ControllerReference", ")", "{", "if", "(", "null", "===", "$", "this", "->",...
{@inheritdoc} Additional available options: * default: The default content (it can be a template name or the content) * id: An optional hx:include tag id attribute * attributes: An optional array of hx:include tag attributes
[ "{", "@inheritdoc", "}" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpKernel/Fragment/HIncludeFragmentRenderer.php#L88-L126
train
Render the Hinclude
[ 30522, 2270, 3853, 17552, 1006, 1002, 24471, 2072, 1010, 5227, 1002, 5227, 1010, 9140, 1002, 7047, 1027, 1031, 1033, 1007, 1063, 2065, 1006, 1002, 24471, 2072, 6013, 11253, 11486, 2890, 25523, 1007, 1063, 2065, 1006, 19701, 1027, 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...
matomo-org/matomo
libs/Zend/Validate/File/Size.php
Zend_Validate_File_Size._toByteString
protected function _toByteString($size) { $sizes = array('B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'); for ($i=0; $size >= 1024 && $i < 9; $i++) { $size /= 1024; } return round($size, 2) . $sizes[$i]; }
php
protected function _toByteString($size) { $sizes = array('B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'); for ($i=0; $size >= 1024 && $i < 9; $i++) { $size /= 1024; } return round($size, 2) . $sizes[$i]; }
[ "protected", "function", "_toByteString", "(", "$", "size", ")", "{", "$", "sizes", "=", "array", "(", "'B'", ",", "'kB'", ",", "'MB'", ",", "'GB'", ",", "'TB'", ",", "'PB'", ",", "'EB'", ",", "'ZB'", ",", "'YB'", ")", ";", "for", "(", "$", "i", ...
Returns the formatted size @param integer $size @return string
[ "Returns", "the", "formatted", "size" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Validate/File/Size.php#L327-L335
train
Convert size in bytes to string
[ 30522, 5123, 3853, 1035, 11291, 22199, 4892, 1006, 1002, 2946, 1007, 1063, 1002, 10826, 1027, 9140, 1006, 1005, 1038, 1005, 1010, 1005, 21677, 1005, 1010, 1005, 16914, 1005, 1010, 1005, 16351, 1005, 1010, 1005, 26419, 1005, 1010, 1005, 1052...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Piwik.php
Piwik.checkUserHasSuperUserAccessOrIsTheUser
public static function checkUserHasSuperUserAccessOrIsTheUser($theUser) { try { if (Piwik::getCurrentUserLogin() !== $theUser) { // or to the Super User Piwik::checkUserHasSuperUserAccess(); } } catch (NoAccessException $e) { throw ...
php
public static function checkUserHasSuperUserAccessOrIsTheUser($theUser) { try { if (Piwik::getCurrentUserLogin() !== $theUser) { // or to the Super User Piwik::checkUserHasSuperUserAccess(); } } catch (NoAccessException $e) { throw ...
[ "public", "static", "function", "checkUserHasSuperUserAccessOrIsTheUser", "(", "$", "theUser", ")", "{", "try", "{", "if", "(", "Piwik", "::", "getCurrentUserLogin", "(", ")", "!==", "$", "theUser", ")", "{", "// or to the Super User", "Piwik", "::", "checkUserHas...
Check that the current user is either the specified user or the superuser. @param string $theUser A username. @throws NoAccessException If the user is neither the Super User nor the user `$theUser`. @api
[ "Check", "that", "the", "current", "user", "is", "either", "the", "specified", "user", "or", "the", "superuser", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Piwik.php#L253-L263
train
Check if the current user has Super User access or is the user
[ 30522, 2270, 10763, 3853, 4638, 20330, 14949, 6342, 4842, 20330, 6305, 9623, 21748, 2923, 5369, 20330, 1006, 1002, 1996, 20330, 1007, 1063, 3046, 1063, 2065, 1006, 14255, 9148, 2243, 1024, 1024, 2131, 10841, 14343, 3372, 20330, 21197, 2378, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...