repo
stringclasses
21 values
path
stringlengths
10
100
func_name
stringlengths
6
71
original_string
stringlengths
115
97k
language
stringclasses
1 value
code
stringlengths
115
97k
code_tokens
listlengths
27
7.5k
docstring
stringlengths
6
1.88k
docstring_tokens
listlengths
1
177
sha
stringclasses
21 values
url
stringlengths
100
189
partition
stringclasses
1 value
summary
stringlengths
9
340
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
symfony/symfony
src/Symfony/Component/Intl/ResourceBundle/LocaleBundle.php
LocaleBundle.getLocaleName
public function getLocaleName($locale, $displayLocale = null) { try { return $this->getName($locale, $displayLocale); } catch (MissingResourceException $e) { return; } }
php
public function getLocaleName($locale, $displayLocale = null) { try { return $this->getName($locale, $displayLocale); } catch (MissingResourceException $e) { return; } }
[ "public", "function", "getLocaleName", "(", "$", "locale", ",", "$", "displayLocale", "=", "null", ")", "{", "try", "{", "return", "$", "this", "->", "getName", "(", "$", "locale", ",", "$", "displayLocale", ")", ";", "}", "catch", "(", "MissingResourceE...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Intl/ResourceBundle/LocaleBundle.php#L41-L48
train
Get Locale Name
[ 30522, 2270, 3853, 2131, 4135, 9289, 8189, 4168, 1006, 1002, 2334, 2063, 1010, 1002, 4653, 4135, 9289, 2063, 1027, 19701, 1007, 1063, 3046, 1063, 2709, 1002, 2023, 1011, 1028, 2131, 18442, 1006, 1002, 2334, 2063, 1010, 1002, 4653, 4135, 9...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
overtrue/wechat
src/Kernel/Log/LogManager.php
LogManager.formatter
protected function formatter() { $formatter = new LineFormatter(null, null, true, true); $formatter->includeStacktraces(); return $formatter; }
php
protected function formatter() { $formatter = new LineFormatter(null, null, true, true); $formatter->includeStacktraces(); return $formatter; }
[ "protected", "function", "formatter", "(", ")", "{", "$", "formatter", "=", "new", "LineFormatter", "(", "null", ",", "null", ",", "true", ",", "true", ")", ";", "$", "formatter", "->", "includeStacktraces", "(", ")", ";", "return", "$", "formatter", ";"...
Get a Monolog formatter instance. @return \Monolog\Formatter\FormatterInterface
[ "Get", "a", "Monolog", "formatter", "instance", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Kernel/Log/LogManager.php#L328-L334
train
Returns LineFormatter instance
[ 30522, 5123, 3853, 4289, 3334, 1006, 1007, 1063, 1002, 4289, 3334, 1027, 2047, 2240, 14192, 20097, 1006, 19701, 1010, 19701, 1010, 2995, 1010, 2995, 1007, 1025, 1002, 4289, 3334, 1011, 1028, 2950, 2696, 3600, 6494, 9623, 1006, 1007, 1025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Db/Statement/Pdo.php
Zend_Db_Statement_Pdo.closeCursor
public function closeCursor() { try { return $this->_stmt->closeCursor(); } catch (PDOException $e) { // require_once 'Zend/Db/Statement/Exception.php'; throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e); } }
php
public function closeCursor() { try { return $this->_stmt->closeCursor(); } catch (PDOException $e) { // require_once 'Zend/Db/Statement/Exception.php'; throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e); } }
[ "public", "function", "closeCursor", "(", ")", "{", "try", "{", "return", "$", "this", "->", "_stmt", "->", "closeCursor", "(", ")", ";", "}", "catch", "(", "PDOException", "$", "e", ")", "{", "// require_once 'Zend/Db/Statement/Exception.php';", "throw", "new...
Closes the cursor, allowing the statement to be executed again. @return bool @throws Zend_Db_Statement_Exception
[ "Closes", "the", "cursor", "allowing", "the", "statement", "to", "be", "executed", "again", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Statement/Pdo.php#L156-L164
train
Close cursor and return true if statement was executed successfully
[ 30522, 2270, 3853, 2485, 10841, 25301, 2099, 1006, 1007, 1063, 3046, 1063, 2709, 1002, 2023, 1011, 1028, 1035, 2358, 20492, 1011, 1028, 2485, 10841, 25301, 2099, 1006, 1007, 1025, 1065, 4608, 1006, 22851, 8913, 2595, 24422, 1002, 1041, 1007...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Concerns/ManagesTransactions.php
ManagesTransactions.rollBack
public function rollBack($toLevel = null) { // We allow developers to rollback to a certain transaction level. We will verify // that this given transaction level is valid before attempting to rollback to // that level. If it's not we will just return out and not attempt anything. $t...
php
public function rollBack($toLevel = null) { // We allow developers to rollback to a certain transaction level. We will verify // that this given transaction level is valid before attempting to rollback to // that level. If it's not we will just return out and not attempt anything. $t...
[ "public", "function", "rollBack", "(", "$", "toLevel", "=", "null", ")", "{", "// We allow developers to rollback to a certain transaction level. We will verify", "// that this given transaction level is valid before attempting to rollback to", "// that level. If it's not we will just return...
Rollback the active database transaction. @param int|null $toLevel @return void @throws \Exception
[ "Rollback", "the", "active", "database", "transaction", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Concerns/ManagesTransactions.php#L173-L198
train
Rollbacks the current transaction to a specific level.
[ 30522, 2270, 3853, 4897, 5963, 1006, 1002, 2000, 20414, 2884, 1027, 19701, 1007, 1063, 1013, 1013, 2057, 3499, 9797, 2000, 4897, 5963, 2000, 1037, 3056, 12598, 2504, 1012, 2057, 2097, 20410, 1013, 1013, 2008, 2023, 2445, 12598, 2504, 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...
z-song/laravel-admin
src/Console/ResourceGenerator.php
ResourceGenerator.getTableColumns
protected function getTableColumns() { if (!$this->model->getConnection()->isDoctrineAvailable()) { throw new \Exception( 'You need to require doctrine/dbal: ~2.3 in your own composer.json to get database columns. ' ); } $table = $this->model->getConn...
php
protected function getTableColumns() { if (!$this->model->getConnection()->isDoctrineAvailable()) { throw new \Exception( 'You need to require doctrine/dbal: ~2.3 in your own composer.json to get database columns. ' ); } $table = $this->model->getConn...
[ "protected", "function", "getTableColumns", "(", ")", "{", "if", "(", "!", "$", "this", "->", "model", "->", "getConnection", "(", ")", "->", "isDoctrineAvailable", "(", ")", ")", "{", "throw", "new", "\\", "Exception", "(", "'You need to require doctrine/dbal...
Get columns of a giving model. @throws \Exception @return \Doctrine\DBAL\Schema\Column[]
[ "Get", "columns", "of", "a", "giving", "model", "." ]
3e65086f806b54699145f58af53843e5dbbb7994
https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Console/ResourceGenerator.php#L214-L241
train
Get table columns
[ 30522, 5123, 3853, 2131, 10880, 25778, 2819, 3619, 1006, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 2944, 1011, 1028, 2131, 8663, 2638, 7542, 1006, 1007, 1011, 1028, 2003, 3527, 6593, 11467, 12462, 11733, 3468, 1006, 1007, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/DataTable/Filter/Pattern.php
Pattern.filterArray
public function filterArray($array) { $newArray = array(); foreach ($array as $key => $row) { foreach ($this->columnToFilter as $column) { if (!array_key_exists($column, $row)) { continue; } if (self::match($this->patt...
php
public function filterArray($array) { $newArray = array(); foreach ($array as $key => $row) { foreach ($this->columnToFilter as $column) { if (!array_key_exists($column, $row)) { continue; } if (self::match($this->patt...
[ "public", "function", "filterArray", "(", "$", "array", ")", "{", "$", "newArray", "=", "array", "(", ")", ";", "foreach", "(", "$", "array", "as", "$", "key", "=>", "$", "row", ")", "{", "foreach", "(", "$", "this", "->", "columnToFilter", "as", "...
See {@link Pattern}. @param array $array @return array
[ "See", "{", "@link", "Pattern", "}", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataTable/Filter/Pattern.php#L106-L124
train
Filter array by column to filter
[ 30522, 2270, 3853, 11307, 2906, 9447, 1006, 1002, 9140, 1007, 1063, 1002, 2047, 2906, 9447, 1027, 9140, 1006, 1007, 1025, 18921, 6776, 1006, 1002, 9140, 2004, 1002, 3145, 1027, 1028, 1002, 5216, 1007, 1063, 18921, 6776, 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...
matomo-org/matomo
libs/Zend/Db/Statement/Oracle.php
Zend_Db_Statement_Oracle.closeCursor
public function closeCursor() { if (!$this->_stmt) { return false; } oci_free_statement($this->_stmt); $this->_stmt = false; return true; }
php
public function closeCursor() { if (!$this->_stmt) { return false; } oci_free_statement($this->_stmt); $this->_stmt = false; return true; }
[ "public", "function", "closeCursor", "(", ")", "{", "if", "(", "!", "$", "this", "->", "_stmt", ")", "{", "return", "false", ";", "}", "oci_free_statement", "(", "$", "this", "->", "_stmt", ")", ";", "$", "this", "->", "_stmt", "=", "false", ";", "...
Closes the cursor, allowing the statement to be executed again. @return bool
[ "Closes", "the", "cursor", "allowing", "the", "statement", "to", "be", "executed", "again", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Statement/Oracle.php#L140-L149
train
Closes the cursor and frees the statement
[ 30522, 2270, 3853, 2485, 10841, 25301, 2099, 1006, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 1035, 2358, 20492, 1007, 1063, 2709, 6270, 1025, 1065, 1051, 6895, 1035, 2489, 1035, 4861, 1006, 1002, 2023, 1011, 1028, 1035, 2358, 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...
laravel/framework
src/Illuminate/Database/Eloquent/Model.php
Model.finishSave
protected function finishSave(array $options) { $this->fireModelEvent('saved', false); if ($this->isDirty() && ($options['touch'] ?? true)) { $this->touchOwners(); } $this->syncOriginal(); }
php
protected function finishSave(array $options) { $this->fireModelEvent('saved', false); if ($this->isDirty() && ($options['touch'] ?? true)) { $this->touchOwners(); } $this->syncOriginal(); }
[ "protected", "function", "finishSave", "(", "array", "$", "options", ")", "{", "$", "this", "->", "fireModelEvent", "(", "'saved'", ",", "false", ")", ";", "if", "(", "$", "this", "->", "isDirty", "(", ")", "&&", "(", "$", "options", "[", "'touch'", ...
Perform any actions that are necessary after the model is saved. @param array $options @return void
[ "Perform", "any", "actions", "that", "are", "necessary", "after", "the", "model", "is", "saved", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Model.php#L702-L711
train
Finish save.
[ 30522, 5123, 3853, 3926, 3736, 3726, 1006, 9140, 1002, 7047, 1007, 1063, 1002, 2023, 1011, 1028, 2543, 5302, 9247, 18697, 3372, 1006, 1005, 5552, 1005, 1010, 6270, 1007, 1025, 2065, 1006, 1002, 2023, 1011, 1028, 2003, 4305, 5339, 2100, 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/Routing/PendingResourceRegistration.php
PendingResourceRegistration.register
public function register() { $this->registered = true; return $this->registrar->register( $this->name, $this->controller, $this->options ); }
php
public function register() { $this->registered = true; return $this->registrar->register( $this->name, $this->controller, $this->options ); }
[ "public", "function", "register", "(", ")", "{", "$", "this", "->", "registered", "=", "true", ";", "return", "$", "this", "->", "registrar", "->", "register", "(", "$", "this", "->", "name", ",", "$", "this", "->", "controller", ",", "$", "this", "-...
Register the resource route. @return \Illuminate\Routing\RouteCollection
[ "Register", "the", "resource", "route", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/PendingResourceRegistration.php#L161-L168
train
Register the controller and options into the Registrar
[ 30522, 2270, 3853, 4236, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 5068, 1027, 2995, 1025, 2709, 1002, 2023, 1011, 1028, 24580, 1011, 1028, 4236, 1006, 1002, 2023, 1011, 1028, 2171, 1010, 1002, 2023, 1011, 1028, 11486, 1010, 1002, 2023, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Cache/Console/ClearCommand.php
ClearCommand.cache
protected function cache() { $cache = $this->cache->store($this->argument('store')); return empty($this->tags()) ? $cache : $cache->tags($this->tags()); }
php
protected function cache() { $cache = $this->cache->store($this->argument('store')); return empty($this->tags()) ? $cache : $cache->tags($this->tags()); }
[ "protected", "function", "cache", "(", ")", "{", "$", "cache", "=", "$", "this", "->", "cache", "->", "store", "(", "$", "this", "->", "argument", "(", "'store'", ")", ")", ";", "return", "empty", "(", "$", "this", "->", "tags", "(", ")", ")", "?...
Get the cache instance for the command. @return \Illuminate\Cache\Repository
[ "Get", "the", "cache", "instance", "for", "the", "command", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Cache/Console/ClearCommand.php#L105-L110
train
Cache the result of the current request
[ 30522, 5123, 3853, 17053, 1006, 1007, 1063, 1002, 17053, 1027, 1002, 2023, 1011, 1028, 17053, 1011, 1028, 3573, 1006, 1002, 2023, 1011, 1028, 6685, 1006, 1005, 3573, 1005, 1007, 1007, 1025, 2709, 4064, 1006, 1002, 2023, 1011, 1028, 22073, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/Annotations/API.php
API.save
public function save($idSite, $idNote, $date = null, $note = null, $starred = null) { $this->checkSingleIdSite($idSite, $extraMessage = "Note: Cannot modify more than one note at a time."); $this->checkDateIsValid($date, $canBeNull = true); // get the annotations for the site $annot...
php
public function save($idSite, $idNote, $date = null, $note = null, $starred = null) { $this->checkSingleIdSite($idSite, $extraMessage = "Note: Cannot modify more than one note at a time."); $this->checkDateIsValid($date, $canBeNull = true); // get the annotations for the site $annot...
[ "public", "function", "save", "(", "$", "idSite", ",", "$", "idNote", ",", "$", "date", "=", "null", ",", "$", "note", "=", "null", ",", "$", "starred", "=", "null", ")", "{", "$", "this", "->", "checkSingleIdSite", "(", "$", "idSite", ",", "$", ...
Modifies an annotation for a site and returns the modified annotation and its ID. If the current user is not allowed to modify an annotation, an exception will be thrown. A user can modify a note if: - the user has admin access for the site, OR - the user has view access, is not the anonymous user and is the user that...
[ "Modifies", "an", "annotation", "for", "a", "site", "and", "returns", "the", "modified", "annotation", "and", "its", "ID", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Annotations/API.php#L79-L95
train
Save an annotation
[ 30522, 2270, 3853, 3828, 1006, 1002, 8909, 28032, 2063, 1010, 1002, 8909, 22074, 1010, 1002, 3058, 1027, 19701, 1010, 1002, 3602, 1027, 19701, 1010, 1002, 5652, 1027, 19701, 1007, 1063, 1002, 2023, 1011, 1028, 14148, 2075, 23057, 5104, 4221...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/classes/Controller.php
Controller.run
public function run($action = null, $params = []) { $this->action = $action; $this->params = $params; /* * Check security token. */ if (!$this->verifyCsrfToken()) { return Response::make(Lang::get('backend::lang.page.invalid_token.label'), 403); ...
php
public function run($action = null, $params = []) { $this->action = $action; $this->params = $params; /* * Check security token. */ if (!$this->verifyCsrfToken()) { return Response::make(Lang::get('backend::lang.page.invalid_token.label'), 403); ...
[ "public", "function", "run", "(", "$", "action", "=", "null", ",", "$", "params", "=", "[", "]", ")", "{", "$", "this", "->", "action", "=", "$", "action", ";", "$", "this", "->", "params", "=", "$", "params", ";", "/*\n * Check security token....
Execute the controller action. @param string $action The action name. @param array $params Routing parameters to pass to the action. @return mixed The action result.
[ "Execute", "the", "controller", "action", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/classes/Controller.php#L166-L253
train
Runs the action
[ 30522, 2270, 3853, 2448, 1006, 1002, 2895, 1027, 19701, 1010, 1002, 11498, 5244, 1027, 1031, 1033, 1007, 1063, 1002, 2023, 1011, 1028, 2895, 1027, 1002, 2895, 1025, 1002, 2023, 1011, 1028, 11498, 5244, 1027, 1002, 11498, 5244, 1025, 1013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Http/Concerns/InteractsWithContentTypes.php
InteractsWithContentTypes.acceptsAnyContentType
public function acceptsAnyContentType() { $acceptable = $this->getAcceptableContentTypes(); return count($acceptable) === 0 || ( isset($acceptable[0]) && ($acceptable[0] === '*/*' || $acceptable[0] === '*') ); }
php
public function acceptsAnyContentType() { $acceptable = $this->getAcceptableContentTypes(); return count($acceptable) === 0 || ( isset($acceptable[0]) && ($acceptable[0] === '*/*' || $acceptable[0] === '*') ); }
[ "public", "function", "acceptsAnyContentType", "(", ")", "{", "$", "acceptable", "=", "$", "this", "->", "getAcceptableContentTypes", "(", ")", ";", "return", "count", "(", "$", "acceptable", ")", "===", "0", "||", "(", "isset", "(", "$", "acceptable", "["...
Determine if the current request accepts any content type. @return bool
[ "Determine", "if", "the", "current", "request", "accepts", "any", "content", "type", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Http/Concerns/InteractsWithContentTypes.php#L126-L133
train
Returns true if the request accepts any content type
[ 30522, 2270, 3853, 13385, 19092, 8663, 6528, 15353, 5051, 1006, 1007, 1063, 1002, 11701, 1027, 1002, 2023, 1011, 1028, 2131, 6305, 3401, 22799, 3468, 8663, 6528, 15353, 10374, 1006, 1007, 1025, 2709, 4175, 1006, 1002, 11701, 1007, 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
core/Plugin/Metric.php
Metric.getMetric
public static function getMetric($row, $columnName, $mappingNameToId = null) { if ($row instanceof Row) { $value = $row->getColumn($columnName); if ($value === false) { if (empty($mappingNameToId)) { $mappingNameToId = Metrics::getMappingFromNameT...
php
public static function getMetric($row, $columnName, $mappingNameToId = null) { if ($row instanceof Row) { $value = $row->getColumn($columnName); if ($value === false) { if (empty($mappingNameToId)) { $mappingNameToId = Metrics::getMappingFromNameT...
[ "public", "static", "function", "getMetric", "(", "$", "row", ",", "$", "columnName", ",", "$", "mappingNameToId", "=", "null", ")", "{", "if", "(", "$", "row", "instanceof", "Row", ")", "{", "$", "value", "=", "$", "row", "->", "getColumn", "(", "$"...
Helper method that will access a metric in a {@link Piwik\DataTable\Row} or array either by its name or by its special numerical index value. @param Row|array $row @param string $columnName @param int[]|null $mappingNameToId A custom mapping of metric names to special index values. By default {@link Metrics::getMappin...
[ "Helper", "method", "that", "will", "access", "a", "metric", "in", "a", "{", "@link", "Piwik", "\\", "DataTable", "\\", "Row", "}", "or", "array", "either", "by", "its", "name", "or", "by", "its", "special", "numerical", "index", "value", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Plugin/Metric.php#L119-L154
train
Returns the value of a column in the row
[ 30522, 2270, 10763, 3853, 2131, 12589, 1006, 1002, 5216, 1010, 1002, 5930, 18442, 1010, 1002, 12375, 18442, 3406, 3593, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 5216, 6013, 11253, 5216, 1007, 1063, 1002, 3643, 1027, 1002, 5216, 1011, 1028...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/HTML/Common2.php
HTML_Common2.getAttributesString
protected static function getAttributesString($attributes) { $str = ''; if (is_array($attributes)) { $charset = self::getOption('charset'); foreach ($attributes as $key => $value) { $str .= ' ' . $key . '="' . htmlspecialchars($value, ENT_QUOTES, $charset) . '...
php
protected static function getAttributesString($attributes) { $str = ''; if (is_array($attributes)) { $charset = self::getOption('charset'); foreach ($attributes as $key => $value) { $str .= ' ' . $key . '="' . htmlspecialchars($value, ENT_QUOTES, $charset) . '...
[ "protected", "static", "function", "getAttributesString", "(", "$", "attributes", ")", "{", "$", "str", "=", "''", ";", "if", "(", "is_array", "(", "$", "attributes", ")", ")", "{", "$", "charset", "=", "self", "::", "getOption", "(", "'charset'", ")", ...
Creates HTML attribute string from array @param array Attribute array @return string Attribute string
[ "Creates", "HTML", "attribute", "string", "from", "array" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/HTML/Common2.php#L213-L223
train
Returns the attributes string
[ 30522, 5123, 10763, 3853, 2131, 19321, 3089, 8569, 4570, 3367, 4892, 1006, 1002, 12332, 1007, 1063, 1002, 2358, 2099, 1027, 1005, 1005, 1025, 2065, 1006, 2003, 1035, 9140, 1006, 1002, 12332, 1007, 1007, 1063, 1002, 25869, 13462, 1027, 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/Security/Core/Authentication/AuthenticationTrustResolver.php
AuthenticationTrustResolver.isRememberMe
public function isRememberMe(TokenInterface $token = null) { if (null === $token) { return false; } if (null !== $this->rememberMeClass) { return $token instanceof $this->rememberMeClass; } return $token instanceof RememberMeToken; }
php
public function isRememberMe(TokenInterface $token = null) { if (null === $token) { return false; } if (null !== $this->rememberMeClass) { return $token instanceof $this->rememberMeClass; } return $token instanceof RememberMeToken; }
[ "public", "function", "isRememberMe", "(", "TokenInterface", "$", "token", "=", "null", ")", "{", "if", "(", "null", "===", "$", "token", ")", "{", "return", "false", ";", "}", "if", "(", "null", "!==", "$", "this", "->", "rememberMeClass", ")", "{", ...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Security/Core/Authentication/AuthenticationTrustResolver.php#L61-L72
train
Checks if the token is a RememberMeToken
[ 30522, 2270, 3853, 2003, 28578, 6633, 5677, 4168, 1006, 19204, 18447, 2121, 12172, 1002, 19204, 1027, 19701, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 1027, 1002, 19204, 1007, 1063, 2709, 6270, 1025, 1065, 2065, 1006, 19701, 999, 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
plugins/UsersManager/API.php
API.getUsersLogin
public function getUsersLogin() { Piwik::checkUserHasSomeAdminAccess(); $logins = $this->model->getUsersLogin(); $logins = $this->userFilter->filterLogins($logins); return $logins; }
php
public function getUsersLogin() { Piwik::checkUserHasSomeAdminAccess(); $logins = $this->model->getUsersLogin(); $logins = $this->userFilter->filterLogins($logins); return $logins; }
[ "public", "function", "getUsersLogin", "(", ")", "{", "Piwik", "::", "checkUserHasSomeAdminAccess", "(", ")", ";", "$", "logins", "=", "$", "this", "->", "model", "->", "getUsersLogin", "(", ")", ";", "$", "logins", "=", "$", "this", "->", "userFilter", ...
Returns the list of all the users login @return array the list of all the users login
[ "Returns", "the", "list", "of", "all", "the", "users", "login" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/UsersManager/API.php#L384-L392
train
Returns the users login
[ 30522, 2270, 30524, 9148, 2243, 1024, 1024, 4638, 20330, 14949, 14045, 4215, 22311, 9468, 7971, 1006, 1007, 1025, 1002, 8833, 7076, 1027, 1002, 2023, 1011, 1028, 2944, 1011, 1028, 2131, 20330, 14540, 8649, 2378, 1006, 1007, 1025, 1002, 8833...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Notifications/Messages/MailMessage.php
MailMessage.bcc
public function bcc($address, $name = null) { if ($this->arrayOfAddresses($address)) { $this->bcc += $this->parseAddresses($address); } else { $this->bcc[] = [$address, $name]; } return $this; }
php
public function bcc($address, $name = null) { if ($this->arrayOfAddresses($address)) { $this->bcc += $this->parseAddresses($address); } else { $this->bcc[] = [$address, $name]; } return $this; }
[ "public", "function", "bcc", "(", "$", "address", ",", "$", "name", "=", "null", ")", "{", "if", "(", "$", "this", "->", "arrayOfAddresses", "(", "$", "address", ")", ")", "{", "$", "this", "->", "bcc", "+=", "$", "this", "->", "parseAddresses", "(...
Set the bcc address for the mail message. @param array|string $address @param string|null $name @return $this
[ "Set", "the", "bcc", "address", "for", "the", "mail", "message", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Notifications/Messages/MailMessage.php#L187-L196
train
Add BCC Address
[ 30522, 2270, 3853, 4647, 2278, 1006, 1002, 4769, 1010, 1002, 2171, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 9140, 11253, 4215, 16200, 11393, 2015, 1006, 1002, 4769, 1007, 1007, 1063, 1002, 2023, 1011, 1028, 4647, 2278, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/RemoveUnusedDefinitionsPass.php
RemoveUnusedDefinitionsPass.process
public function process(ContainerBuilder $container) { try { $this->enableExpressionProcessing(); $this->container = $container; $connectedIds = []; $aliases = $container->getAliases(); foreach ($aliases as $id => $alias) { if ($al...
php
public function process(ContainerBuilder $container) { try { $this->enableExpressionProcessing(); $this->container = $container; $connectedIds = []; $aliases = $container->getAliases(); foreach ($aliases as $id => $alias) { if ($al...
[ "public", "function", "process", "(", "ContainerBuilder", "$", "container", ")", "{", "try", "{", "$", "this", "->", "enableExpressionProcessing", "(", ")", ";", "$", "this", "->", "container", "=", "$", "container", ";", "$", "connectedIds", "=", "[", "]"...
Processes the ContainerBuilder to remove unused definitions.
[ "Processes", "the", "ContainerBuilder", "to", "remove", "unused", "definitions", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/Compiler/RemoveUnusedDefinitionsPass.php#L38-L81
train
Processes the container builder
[ 30522, 2270, 3853, 2832, 1006, 11661, 8569, 23891, 2099, 1002, 11661, 1007, 1063, 3046, 1063, 1002, 2023, 1011, 1028, 9585, 10288, 20110, 3258, 21572, 9623, 7741, 1006, 1007, 1025, 1002, 2023, 1011, 1028, 11661, 1027, 1002, 11661, 1025, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Connectors/ConnectionFactory.php
ConnectionFactory.getReadWriteConfig
protected function getReadWriteConfig(array $config, $type) { return isset($config[$type][0]) ? Arr::random($config[$type]) : $config[$type]; }
php
protected function getReadWriteConfig(array $config, $type) { return isset($config[$type][0]) ? Arr::random($config[$type]) : $config[$type]; }
[ "protected", "function", "getReadWriteConfig", "(", "array", "$", "config", ",", "$", "type", ")", "{", "return", "isset", "(", "$", "config", "[", "$", "type", "]", "[", "0", "]", ")", "?", "Arr", "::", "random", "(", "$", "config", "[", "$", "typ...
Get a read / write level configuration. @param array $config @param string $type @return array
[ "Get", "a", "read", "/", "write", "level", "configuration", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Connectors/ConnectionFactory.php#L137-L142
train
Get read write config
[ 30522, 5123, 3853, 2131, 16416, 2094, 26373, 8663, 8873, 2290, 1006, 9140, 1002, 9530, 8873, 2290, 1010, 1002, 2828, 1007, 1063, 2709, 26354, 3388, 1006, 1002, 9530, 8873, 2290, 1031, 1002, 2828, 1033, 1031, 1014, 1033, 1007, 1029, 12098, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Actions/Archiver.php
Archiver.archiveDayExitActions
protected function archiveDayExitActions($rankingQueryLimit) { $rankingQuery = false; if ($rankingQueryLimit > 0) { $rankingQuery = new RankingQuery($rankingQueryLimit); $rankingQuery->setOthersLabel(DataTable::LABEL_SUMMARY_ROW); $rankingQuery->addLabelColumn('id...
php
protected function archiveDayExitActions($rankingQueryLimit) { $rankingQuery = false; if ($rankingQueryLimit > 0) { $rankingQuery = new RankingQuery($rankingQueryLimit); $rankingQuery->setOthersLabel(DataTable::LABEL_SUMMARY_ROW); $rankingQuery->addLabelColumn('id...
[ "protected", "function", "archiveDayExitActions", "(", "$", "rankingQueryLimit", ")", "{", "$", "rankingQuery", "=", "false", ";", "if", "(", "$", "rankingQueryLimit", ">", "0", ")", "{", "$", "rankingQuery", "=", "new", "RankingQuery", "(", "$", "rankingQuery...
Exit actions
[ "Exit", "actions" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Actions/Archiver.php#L328-L367
train
Archives all exit actions for the day
[ 30522, 5123, 3853, 9749, 4710, 10288, 6590, 22014, 1006, 1002, 5464, 4226, 23320, 27605, 2102, 1007, 1063, 1002, 5464, 4226, 2854, 1027, 6270, 1025, 2065, 1006, 1002, 5464, 4226, 23320, 27605, 2102, 1028, 1014, 1007, 1063, 1002, 5464, 4226,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.folderExists
public function folderExists($path) { $folderName = basename($path); $folderPath = dirname($path); $path = self::validatePath($folderPath); $fullPath = $this->getMediaPath($path); $folders = $this->getStorageDisk()->directories($fullPath); foreach ($folders as $fold...
php
public function folderExists($path) { $folderName = basename($path); $folderPath = dirname($path); $path = self::validatePath($folderPath); $fullPath = $this->getMediaPath($path); $folders = $this->getStorageDisk()->directories($fullPath); foreach ($folders as $fold...
[ "public", "function", "folderExists", "(", "$", "path", ")", "{", "$", "folderName", "=", "basename", "(", "$", "path", ")", ";", "$", "folderPath", "=", "dirname", "(", "$", "path", ")", ";", "$", "path", "=", "self", "::", "validatePath", "(", "$",...
Determines if a folder with the specified path exists in the library. @param string $path Specifies the folder path relative the the Library root. @return boolean Returns TRUE if the folder exists.
[ "Determines", "if", "a", "folder", "with", "the", "specified", "path", "exists", "in", "the", "library", "." ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/classes/MediaLibrary.php#L250-L266
train
Checks if a folder exists in the media folder
[ 30522, 2270, 3853, 19622, 10288, 5130, 1006, 1002, 4130, 1007, 1063, 1002, 19622, 18442, 1027, 2918, 18442, 1006, 1002, 4130, 1007, 1025, 1002, 19622, 15069, 1027, 16101, 18442, 1006, 1002, 4130, 1007, 1025, 1002, 4130, 1027, 2969, 1024, 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/Archive/ArchiveInvalidator.php
ArchiveInvalidator.buildRememberArchivedReportIdProcessSafe
private function buildRememberArchivedReportIdProcessSafe($idSite, $date) { $id = $this->buildRememberArchivedReportIdForSiteAndDate($idSite, $date); $id .= '_' . getmypid(); return $id; }
php
private function buildRememberArchivedReportIdProcessSafe($idSite, $date) { $id = $this->buildRememberArchivedReportIdForSiteAndDate($idSite, $date); $id .= '_' . getmypid(); return $id; }
[ "private", "function", "buildRememberArchivedReportIdProcessSafe", "(", "$", "idSite", ",", "$", "date", ")", "{", "$", "id", "=", "$", "this", "->", "buildRememberArchivedReportIdForSiteAndDate", "(", "$", "idSite", ",", "$", "date", ")", ";", "$", "id", ".="...
This version is multi process safe on the insert of a new date to invalidate.
[ "This", "version", "is", "multi", "process", "safe", "on", "the", "insert", "of", "a", "new", "date", "to", "invalidate", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Archive/ArchiveInvalidator.php#L122-L127
train
Build a report id for the given site and date
[ 30522, 2797, 3853, 3857, 28578, 6633, 5677, 2906, 5428, 7178, 2890, 6442, 3593, 21572, 9623, 11488, 7959, 1006, 1002, 8909, 28032, 2063, 1010, 1002, 3058, 1007, 1063, 1002, 8909, 1027, 1002, 2023, 1011, 1028, 3857, 28578, 6633, 5677, 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...
matomo-org/matomo
plugins/PrivacyManager/ReportsPurger.php
ReportsPurger.make
public static function make($settings, $metricsToKeep) { return new ReportsPurger( $settings['delete_reports_older_than'], $settings['delete_reports_keep_basic_metrics'] == 1, self::getReportPeriodsToKeep($settings), $settings['delete_reports_keep_segment_repo...
php
public static function make($settings, $metricsToKeep) { return new ReportsPurger( $settings['delete_reports_older_than'], $settings['delete_reports_keep_basic_metrics'] == 1, self::getReportPeriodsToKeep($settings), $settings['delete_reports_keep_segment_repo...
[ "public", "static", "function", "make", "(", "$", "settings", ",", "$", "metricsToKeep", ")", "{", "return", "new", "ReportsPurger", "(", "$", "settings", "[", "'delete_reports_older_than'", "]", ",", "$", "settings", "[", "'delete_reports_keep_basic_metrics'", "]...
Utility function. Creates a new instance of ReportsPurger with the supplied array of settings. $settings must contain the following keys: -'delete_reports_older_than': The number of months after which reports/metrics are considered old. -'delete_reports_keep_basic_metrics': 1 if basic metrics should be kept, 0 if othe...
[ "Utility", "function", ".", "Creates", "a", "new", "instance", "of", "ReportsPurger", "with", "the", "supplied", "array", "of", "settings", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/PrivacyManager/ReportsPurger.php#L359-L369
train
Create a new ReportsPurger
[ 30522, 2270, 10763, 3853, 2191, 1006, 1002, 10906, 1010, 1002, 12046, 16033, 20553, 2361, 1007, 1063, 2709, 2047, 4311, 5311, 4590, 1006, 1002, 10906, 1031, 1005, 3972, 12870, 1035, 4311, 1035, 3080, 1035, 2084, 1005, 1033, 1010, 1002, 1090...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Collection/ArrayCollection.php
ArrayCollection.shuffle
public function shuffle() { $keys = $this->getKeys(); shuffle($keys); return $this->createFrom(array_replace(array_flip($keys), $this->toArray())); }
php
public function shuffle() { $keys = $this->getKeys(); shuffle($keys); return $this->createFrom(array_replace(array_flip($keys), $this->toArray())); }
[ "public", "function", "shuffle", "(", ")", "{", "$", "keys", "=", "$", "this", "->", "getKeys", "(", ")", ";", "shuffle", "(", "$", "keys", ")", ";", "return", "$", "this", "->", "createFrom", "(", "array_replace", "(", "array_flip", "(", "$", "keys"...
Shuffle items. @return static
[ "Shuffle", "items", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Framework/Collection/ArrayCollection.php#L36-L42
train
Shuffle the array and return a new array with the keys of the array
[ 30522, 2270, 3853, 23046, 1006, 1007, 1063, 1002, 6309, 1027, 1002, 2023, 1011, 1028, 2131, 14839, 2015, 1006, 1007, 1025, 23046, 1006, 1002, 6309, 1007, 1025, 2709, 1002, 2023, 1011, 30524, 6309, 1007, 1010, 1002, 2023, 1011, 1028, 2000, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Mail/Protocol/Smtp/Auth/Crammd5.php
Zend_Mail_Protocol_Smtp_Auth_Crammd5._hmacMd5
protected function _hmacMd5($key, $data, $block = 64) { if (strlen($key) > 64) { $key = pack('H32', md5($key)); } elseif (strlen($key) < 64) { $key = str_pad($key, $block, "\0"); } $k_ipad = substr($key, 0, 64) ^ str_repeat(chr(0x36), 64); $k_opad = s...
php
protected function _hmacMd5($key, $data, $block = 64) { if (strlen($key) > 64) { $key = pack('H32', md5($key)); } elseif (strlen($key) < 64) { $key = str_pad($key, $block, "\0"); } $k_ipad = substr($key, 0, 64) ^ str_repeat(chr(0x36), 64); $k_opad = s...
[ "protected", "function", "_hmacMd5", "(", "$", "key", ",", "$", "data", ",", "$", "block", "=", "64", ")", "{", "if", "(", "strlen", "(", "$", "key", ")", ">", "64", ")", "{", "$", "key", "=", "pack", "(", "'H32'", ",", "md5", "(", "$", "key"...
Prepare CRAM-MD5 response to server's ticket @param string $key Challenge key (usually password) @param string $data Challenge data @param string $block Length of blocks @return string
[ "Prepare", "CRAM", "-", "MD5", "response", "to", "server", "s", "ticket" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail/Protocol/Smtp/Auth/Crammd5.php#L92-L107
train
HMAC MD5 - Fucking
[ 30522, 5123, 3853, 1035, 20287, 6305, 26876, 2629, 1006, 1002, 3145, 1010, 1002, 2951, 1010, 1002, 3796, 1027, 4185, 1007, 1063, 2065, 1006, 2358, 20927, 2078, 1006, 1002, 3145, 1007, 1028, 4185, 1007, 1063, 1002, 3145, 1027, 5308, 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/Actions/API.php
API.getSiteSearchCategories
public function getSiteSearchCategories($idSite, $period, $date, $segment = false) { Piwik::checkUserHasViewAccess($idSite); Actions::checkCustomVariablesPluginEnabled(); $customVariables = APICustomVariables::getInstance()->getCustomVariables($idSite, $period, $date, $segment, $expanded = ...
php
public function getSiteSearchCategories($idSite, $period, $date, $segment = false) { Piwik::checkUserHasViewAccess($idSite); Actions::checkCustomVariablesPluginEnabled(); $customVariables = APICustomVariables::getInstance()->getCustomVariables($idSite, $period, $date, $segment, $expanded = ...
[ "public", "function", "getSiteSearchCategories", "(", "$", "idSite", ",", "$", "period", ",", "$", "date", ",", "$", "segment", "=", "false", ")", "{", "Piwik", "::", "checkUserHasViewAccess", "(", "$", "idSite", ")", ";", "Actions", "::", "checkCustomVariab...
@param int $idSite @param string $period @param Date $date @param bool $segment @return DataTable|DataTable\Map
[ "@param", "int", "$idSite", "@param", "string", "$period", "@param", "Date", "$date", "@param", "bool", "$segment" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Actions/API.php#L351-L392
train
Returns all categories in the search table for the given site & period
[ 30522, 2270, 3853, 4152, 7616, 14644, 2818, 16280, 20255, 3111, 1006, 1002, 8909, 28032, 2063, 1010, 1002, 2558, 1010, 1002, 3058, 1010, 1002, 6903, 1027, 6270, 1007, 1063, 14255, 9148, 2243, 1024, 1024, 4638, 20330, 14949, 8584, 6305, 9623...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Archive/Chunk.php
Chunk.getRecordNameWithoutChunkAppendix
public function getRecordNameWithoutChunkAppendix($recordName) { if (!$this->isRecordNameAChunk($recordName)) { return $recordName; } $posAppendix = $this->getStartPosOfChunkAppendix($recordName); if (false === $posAppendix) { return $recordName; } ...
php
public function getRecordNameWithoutChunkAppendix($recordName) { if (!$this->isRecordNameAChunk($recordName)) { return $recordName; } $posAppendix = $this->getStartPosOfChunkAppendix($recordName); if (false === $posAppendix) { return $recordName; } ...
[ "public", "function", "getRecordNameWithoutChunkAppendix", "(", "$", "recordName", ")", "{", "if", "(", "!", "$", "this", "->", "isRecordNameAChunk", "(", "$", "recordName", ")", ")", "{", "return", "$", "recordName", ";", "}", "$", "posAppendix", "=", "$", ...
When having a record like 'Actions_ActionUrls_chunk_0_99" it will return the raw recordName 'Actions_ActionUrls'. @param string $recordName @return string
[ "When", "having", "a", "record", "like", "Actions_ActionUrls_chunk_0_99", "it", "will", "return", "the", "raw", "recordName", "Actions_ActionUrls", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Archive/Chunk.php#L104-L117
train
Get Record Name without Chunk Appendix
[ 30522, 2270, 3853, 2131, 2890, 27108, 28911, 4168, 24415, 5833, 20760, 25804, 21512, 16089, 2595, 1006, 1002, 2501, 18442, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 2003, 2890, 27108, 28911, 4168, 6776, 16814, 1006, 1002, 2501, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Plugin/SettingsProvider.php
SettingsProvider.getAllMeasurableSettings
public function getAllMeasurableSettings($idSite, $idMeasurableType = null) { $pluginNames = $this->pluginManager->getActivatedPlugins(); $byPluginName = array(); foreach ($pluginNames as $plugin) { $component = $this->getMeasurableSettings($plugin, $idSite, $idMeasurableType); ...
php
public function getAllMeasurableSettings($idSite, $idMeasurableType = null) { $pluginNames = $this->pluginManager->getActivatedPlugins(); $byPluginName = array(); foreach ($pluginNames as $plugin) { $component = $this->getMeasurableSettings($plugin, $idSite, $idMeasurableType); ...
[ "public", "function", "getAllMeasurableSettings", "(", "$", "idSite", ",", "$", "idMeasurableType", "=", "null", ")", "{", "$", "pluginNames", "=", "$", "this", "->", "pluginManager", "->", "getActivatedPlugins", "(", ")", ";", "$", "byPluginName", "=", "array...
@api Get all available measurable settings implemented by loaded and activated plugins. @param int $idSite The ID of a site. If a site is about to be created pass idSite = 0. @param string|null $idMeasurableType If null, idType will be detected automatically if the site already exists. Only needed to set ...
[ "@api" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Plugin/SettingsProvider.php#L179-L193
train
Get all the measurable settings for a specific site
[ 30522, 2270, 3853, 2131, 8095, 4168, 28329, 21678, 8613, 1006, 1002, 8909, 28032, 2063, 1010, 1002, 8909, 4168, 28329, 13874, 1027, 19701, 1007, 1063, 1002, 13354, 23111, 14074, 2015, 1027, 1002, 2023, 1011, 1028, 13354, 2378, 24805, 4590, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
PHPMailer/PHPMailer
src/PHPMailer.php
PHPMailer.clearQueuedAddresses
public function clearQueuedAddresses($kind) { $this->RecipientsQueue = array_filter( $this->RecipientsQueue, function ($params) use ($kind) { return $params[0] != $kind; } ); }
php
public function clearQueuedAddresses($kind) { $this->RecipientsQueue = array_filter( $this->RecipientsQueue, function ($params) use ($kind) { return $params[0] != $kind; } ); }
[ "public", "function", "clearQueuedAddresses", "(", "$", "kind", ")", "{", "$", "this", "->", "RecipientsQueue", "=", "array_filter", "(", "$", "this", "->", "RecipientsQueue", ",", "function", "(", "$", "params", ")", "use", "(", "$", "kind", ")", "{", "...
Clear queued addresses of given kind. @param string $kind 'to', 'cc', or 'bcc'
[ "Clear", "queued", "addresses", "of", "given", "kind", "." ]
3d7132341659a8a201adbc3ba11b1e202ee2857c
https://github.com/PHPMailer/PHPMailer/blob/3d7132341659a8a201adbc3ba11b1e202ee2857c/src/PHPMailer.php#L3504-L3512
train
Clear all recipients that are queued for a certain kind
[ 30522, 2270, 3853, 3154, 4226, 5657, 14697, 16200, 11393, 2015, 1006, 1002, 2785, 1007, 1063, 1002, 2023, 1011, 1028, 15991, 4226, 5657, 1027, 9140, 1035, 11307, 1006, 1002, 2023, 1011, 1028, 15991, 30524, 1002, 11498, 5244, 1007, 2224, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/DataAccess/RawLogDao.php
RawLogDao.forAllLogs
public function forAllLogs($logTable, $fields, $conditions, $iterationStep, $callback) { $idField = $this->getIdFieldForLogTable($logTable); list($query, $bind) = $this->createLogIterationQuery($logTable, $idField, $fields, $conditions, $iterationStep); $lastId = 0; do { ...
php
public function forAllLogs($logTable, $fields, $conditions, $iterationStep, $callback) { $idField = $this->getIdFieldForLogTable($logTable); list($query, $bind) = $this->createLogIterationQuery($logTable, $idField, $fields, $conditions, $iterationStep); $lastId = 0; do { ...
[ "public", "function", "forAllLogs", "(", "$", "logTable", ",", "$", "fields", ",", "$", "conditions", ",", "$", "iterationStep", ",", "$", "callback", ")", "{", "$", "idField", "=", "$", "this", "->", "getIdFieldForLogTable", "(", "$", "logTable", ")", "...
Iterates over logs in a log table in chunks. Parameters to this function are as backend agnostic as possible w/o dramatically increasing code complexity. @param string $logTable The log table name. Unprefixed, eg, `log_visit`. @param array[] $conditions An array describing the conditions logs must match in the query. ...
[ "Iterates", "over", "logs", "in", "a", "log", "table", "in", "chunks", ".", "Parameters", "to", "this", "function", "are", "as", "backend", "agnostic", "as", "possible", "w", "/", "o", "dramatically", "increasing", "code", "complexity", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataAccess/RawLogDao.php#L107-L121
train
This method is used to iterate over all logs in the hierarchy.
[ 30522, 2270, 3853, 2005, 8095, 21197, 2015, 1006, 1002, 8833, 10880, 1010, 1002, 4249, 1010, 1002, 3785, 1010, 1002, 27758, 13473, 2361, 1010, 1002, 2655, 5963, 1007, 1063, 1002, 24011, 12891, 1027, 1002, 2023, 1011, 1028, 2131, 3593, 3790,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Console/Helper/Table.php
Table.setStyleDefinition
public static function setStyleDefinition($name, TableStyle $style) { if (!self::$styles) { self::$styles = self::initStyles(); } self::$styles[$name] = $style; }
php
public static function setStyleDefinition($name, TableStyle $style) { if (!self::$styles) { self::$styles = self::initStyles(); } self::$styles[$name] = $style; }
[ "public", "static", "function", "setStyleDefinition", "(", "$", "name", ",", "TableStyle", "$", "style", ")", "{", "if", "(", "!", "self", "::", "$", "styles", ")", "{", "self", "::", "$", "styles", "=", "self", "::", "initStyles", "(", ")", ";", "}"...
Sets a style definition. @param string $name The style name @param TableStyle $style A TableStyle instance
[ "Sets", "a", "style", "definition", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Helper/Table.php#L108-L115
train
Set a table style definition
[ 30522, 2270, 10763, 3853, 4520, 27983, 3207, 16294, 22753, 1006, 1002, 2171, 1010, 7251, 27983, 1002, 2806, 1007, 1063, 2065, 1006, 999, 2969, 1024, 1024, 1002, 6782, 1007, 1063, 2969, 1024, 1024, 1002, 6782, 1027, 2969, 1024, 1024, 1999, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Routing/Route.php
Route.where
public function where($name, $expression = null) { foreach ($this->parseWhere($name, $expression) as $name => $expression) { $this->wheres[$name] = $expression; } return $this; }
php
public function where($name, $expression = null) { foreach ($this->parseWhere($name, $expression) as $name => $expression) { $this->wheres[$name] = $expression; } return $this; }
[ "public", "function", "where", "(", "$", "name", ",", "$", "expression", "=", "null", ")", "{", "foreach", "(", "$", "this", "->", "parseWhere", "(", "$", "name", ",", "$", "expression", ")", "as", "$", "name", "=>", "$", "expression", ")", "{", "$...
Set a regular expression requirement on the route. @param array|string $name @param string $expression @return $this
[ "Set", "a", "regular", "expression", "requirement", "on", "the", "route", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/Route.php#L495-L502
train
Adds a where clause to the list of where clauses
[ 30522, 2270, 3853, 2073, 1006, 1002, 2171, 1010, 1002, 3670, 1027, 19701, 1007, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 11968, 3366, 2860, 5886, 2063, 1006, 1002, 2171, 1010, 1002, 3670, 1007, 2004, 1002, 2171, 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...
matomo-org/matomo
core/Archive.php
Archive.factory
public static function factory(Segment $segment, array $periods, array $idSites, $idSiteIsAll = false, $isMultipleDate = false) { return StaticContainer::get(ArchiveQueryFactory::class)->factory($segment, $periods, $idSites, $idSiteIsAll, $isMultipleDate); ...
php
public static function factory(Segment $segment, array $periods, array $idSites, $idSiteIsAll = false, $isMultipleDate = false) { return StaticContainer::get(ArchiveQueryFactory::class)->factory($segment, $periods, $idSites, $idSiteIsAll, $isMultipleDate); ...
[ "public", "static", "function", "factory", "(", "Segment", "$", "segment", ",", "array", "$", "periods", ",", "array", "$", "idSites", ",", "$", "idSiteIsAll", "=", "false", ",", "$", "isMultipleDate", "=", "false", ")", "{", "return", "StaticContainer", "...
Returns a new Archive instance that will query archive data for the given set of sites and periods, using an optional segment. This method uses an array of Period instances and a Segment instance, instead of strings like {@link build()}. If you want to create an Archive instance using data found in query parameters, ...
[ "Returns", "a", "new", "Archive", "instance", "that", "will", "query", "archive", "data", "for", "the", "given", "set", "of", "sites", "and", "periods", "using", "an", "optional", "segment", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Archive.php#L237-L242
train
Create a new archive query instance
[ 30522, 2270, 10763, 3853, 4713, 1006, 6903, 1002, 6903, 1010, 9140, 1002, 6993, 1010, 9140, 1002, 8909, 28032, 2229, 1010, 1002, 8909, 28032, 17580, 8095, 1027, 6270, 1010, 1002, 2003, 12274, 7096, 11514, 3709, 3686, 1027, 6270, 1007, 1063,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
opencart/opencart
upload/system/engine/loader.php
Loader.model
public function model($route) { // Sanitize the call $route = preg_replace('/[^a-zA-Z0-9_\/]/', '', (string)$route); if (!$this->registry->has('model_' . str_replace('/', '_', $route))) { $file = DIR_APPLICATION . 'model/' . $route . '.php'; $class = 'Model' . preg_replace('/[^a-zA-Z0-9]/', '', $route); ...
php
public function model($route) { // Sanitize the call $route = preg_replace('/[^a-zA-Z0-9_\/]/', '', (string)$route); if (!$this->registry->has('model_' . str_replace('/', '_', $route))) { $file = DIR_APPLICATION . 'model/' . $route . '.php'; $class = 'Model' . preg_replace('/[^a-zA-Z0-9]/', '', $route); ...
[ "public", "function", "model", "(", "$", "route", ")", "{", "// Sanitize the call", "$", "route", "=", "preg_replace", "(", "'/[^a-zA-Z0-9_\\/]/'", ",", "''", ",", "(", "string", ")", "$", "route", ")", ";", "if", "(", "!", "$", "this", "->", "registry",...
Model @param string $route
[ "Model" ]
e7933b56ba05aafb3655c6b490c9733cd18b5c69
https://github.com/opencart/opencart/blob/e7933b56ba05aafb3655c6b490c9733cd18b5c69/upload/system/engine/loader.php#L71-L97
train
Load the model
[ 30522, 2270, 3853, 2944, 1006, 1002, 2799, 1007, 1063, 1013, 1013, 2624, 25090, 4371, 1996, 2655, 1002, 2799, 1027, 3653, 2290, 1035, 5672, 1006, 1005, 1013, 1031, 1034, 1037, 1011, 23564, 1011, 1062, 2692, 1011, 1023, 1035, 1032, 1013, 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/Messenger/Transport/RedisExt/RedisSender.php
RedisSender.send
public function send(Envelope $envelope): Envelope { $encodedMessage = $this->serializer->encode($envelope); $this->connection->add($encodedMessage['body'], $encodedMessage['headers'] ?? []); return $envelope; }
php
public function send(Envelope $envelope): Envelope { $encodedMessage = $this->serializer->encode($envelope); $this->connection->add($encodedMessage['body'], $encodedMessage['headers'] ?? []); return $envelope; }
[ "public", "function", "send", "(", "Envelope", "$", "envelope", ")", ":", "Envelope", "{", "$", "encodedMessage", "=", "$", "this", "->", "serializer", "->", "encode", "(", "$", "envelope", ")", ";", "$", "this", "->", "connection", "->", "add", "(", "...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Messenger/Transport/RedisExt/RedisSender.php#L38-L45
train
Send an Envelope to the server
[ 30522, 2270, 3853, 4604, 1006, 11255, 1002, 11255, 1007, 1024, 11255, 1063, 1002, 12359, 7834, 3736, 3351, 1027, 1002, 2023, 1011, 1028, 7642, 17629, 1011, 1028, 4372, 16044, 1006, 1002, 11255, 1007, 1025, 1002, 2023, 1011, 1028, 4434, 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...
octobercms/october
modules/backend/behaviors/UserPreferencesModel.php
UserPreferencesModel.instance
public function instance() { if (isset(self::$instances[$this->recordCode])) { return self::$instances[$this->recordCode]; } if (!$item = $this->getSettingsRecord()) { $this->model->initSettingsData(); $item = $this->model; } return self:...
php
public function instance() { if (isset(self::$instances[$this->recordCode])) { return self::$instances[$this->recordCode]; } if (!$item = $this->getSettingsRecord()) { $this->model->initSettingsData(); $item = $this->model; } return self:...
[ "public", "function", "instance", "(", ")", "{", "if", "(", "isset", "(", "self", "::", "$", "instances", "[", "$", "this", "->", "recordCode", "]", ")", ")", "{", "return", "self", "::", "$", "instances", "[", "$", "this", "->", "recordCode", "]", ...
Create an instance of the settings model, intended as a static method
[ "Create", "an", "instance", "of", "the", "settings", "model", "intended", "as", "a", "static", "method" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/behaviors/UserPreferencesModel.php#L37-L49
train
Return the instance of the record
[ 30522, 2270, 3853, 6013, 1006, 1007, 1063, 2065, 1006, 26354, 3388, 1006, 2969, 1024, 1024, 1002, 12107, 1031, 1002, 2023, 1011, 1028, 2501, 16044, 1033, 1007, 1007, 1063, 2709, 2969, 1024, 1024, 1002, 12107, 1031, 1002, 2023, 1011, 1028, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Eloquent/Builder.php
Builder.hydrate
public function hydrate(array $items) { $instance = $this->newModelInstance(); return $instance->newCollection(array_map(function ($item) use ($instance) { return $instance->newFromBuilder($item); }, $items)); }
php
public function hydrate(array $items) { $instance = $this->newModelInstance(); return $instance->newCollection(array_map(function ($item) use ($instance) { return $instance->newFromBuilder($item); }, $items)); }
[ "public", "function", "hydrate", "(", "array", "$", "items", ")", "{", "$", "instance", "=", "$", "this", "->", "newModelInstance", "(", ")", ";", "return", "$", "instance", "->", "newCollection", "(", "array_map", "(", "function", "(", "$", "item", ")",...
Create a collection of models from plain arrays. @param array $items @return \Illuminate\Database\Eloquent\Collection
[ "Create", "a", "collection", "of", "models", "from", "plain", "arrays", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Builder.php#L293-L300
train
Hydrate an array of taxonomy items into a taxonomy object
[ 30522, 2270, 3853, 26018, 2618, 1006, 9140, 1002, 5167, 1007, 1063, 1002, 6013, 1027, 1002, 2023, 1011, 1028, 2047, 5302, 9247, 7076, 26897, 1006, 1007, 1025, 2709, 1002, 6013, 1011, 1028, 2047, 26895, 18491, 1006, 9140, 1035, 4949, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/Page/Collection.php
Collection.routable
public function routable() { $routable = []; foreach ($this->items as $path => $slug) { $page = $this->pages->get($path); if ($page !== null && $page->routable()) { $routable[$path] = $slug; } } $this->items = $routable; ...
php
public function routable() { $routable = []; foreach ($this->items as $path => $slug) { $page = $this->pages->get($path); if ($page !== null && $page->routable()) { $routable[$path] = $slug; } } $this->items = $routable; ...
[ "public", "function", "routable", "(", ")", "{", "$", "routable", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "items", "as", "$", "path", "=>", "$", "slug", ")", "{", "$", "page", "=", "$", "this", "->", "pages", "->", "get", "(", "$...
Creates new collection with only routable pages @return Collection The collection with only routable pages
[ "Creates", "new", "collection", "with", "only", "routable", "pages" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Page/Collection.php#L479-L494
train
Return all pages that are routable
[ 30522, 2270, 3853, 20996, 23056, 1006, 1007, 1063, 1002, 20996, 23056, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 5167, 2004, 1002, 4130, 1027, 1028, 1002, 23667, 1007, 1063, 1002, 3931, 1027, 1002, 2023, 1011, 1028,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php
AccessDecisionManager.decideAffirmative
private function decideAffirmative(TokenInterface $token, array $attributes, $object = null) { $deny = 0; foreach ($this->voters as $voter) { $result = $voter->vote($token, $object, $attributes); switch ($result) { case VoterInterface::ACCESS_GRANTED: ...
php
private function decideAffirmative(TokenInterface $token, array $attributes, $object = null) { $deny = 0; foreach ($this->voters as $voter) { $result = $voter->vote($token, $object, $attributes); switch ($result) { case VoterInterface::ACCESS_GRANTED: ...
[ "private", "function", "decideAffirmative", "(", "TokenInterface", "$", "token", ",", "array", "$", "attributes", ",", "$", "object", "=", "null", ")", "{", "$", "deny", "=", "0", ";", "foreach", "(", "$", "this", "->", "voters", "as", "$", "voter", ")...
Grants access if any voter returns an affirmative response. If all voters abstained from voting, the decision will be based on the allowIfAllAbstainDecisions property value (defaults to false).
[ "Grants", "access", "if", "any", "voter", "returns", "an", "affirmative", "response", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php#L69-L93
train
Decides whether the user is affirmative
[ 30522, 2797, 3853, 5630, 10354, 27972, 8082, 1006, 19204, 18447, 2121, 12172, 1002, 19204, 1010, 9140, 1002, 12332, 1010, 1002, 4874, 1027, 19701, 1007, 1063, 1002, 9772, 1027, 1014, 1025, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 7206, 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/Form/FormConfigBuilder.php
FormConfigBuilder.setPropertyPath
public function setPropertyPath($propertyPath) { if ($this->locked) { throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); } if (null !== $propertyPath && !$propertyPath instance...
php
public function setPropertyPath($propertyPath) { if ($this->locked) { throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); } if (null !== $propertyPath && !$propertyPath instance...
[ "public", "function", "setPropertyPath", "(", "$", "propertyPath", ")", "{", "if", "(", "$", "this", "->", "locked", ")", "{", "throw", "new", "BadMethodCallException", "(", "'FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInt...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/FormConfigBuilder.php#L568-L581
train
Set the property path
[ 30522, 2270, 3853, 2275, 21572, 4842, 3723, 15069, 1006, 1002, 3200, 15069, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 5299, 1007, 1063, 5466, 2047, 2919, 11368, 6806, 16409, 24164, 2595, 24422, 1006, 1005, 2433, 8663, 8873, 18259, 192...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Security/Guard/GuardAuthenticatorHandler.php
GuardAuthenticatorHandler.authenticateWithToken
public function authenticateWithToken(TokenInterface $token, Request $request, string $providerKey = null) { $this->migrateSession($request, $token, $providerKey); $this->tokenStorage->setToken($token); if (null !== $this->dispatcher) { $loginEvent = new InteractiveLoginEvent($r...
php
public function authenticateWithToken(TokenInterface $token, Request $request, string $providerKey = null) { $this->migrateSession($request, $token, $providerKey); $this->tokenStorage->setToken($token); if (null !== $this->dispatcher) { $loginEvent = new InteractiveLoginEvent($r...
[ "public", "function", "authenticateWithToken", "(", "TokenInterface", "$", "token", ",", "Request", "$", "request", ",", "string", "$", "providerKey", "=", "null", ")", "{", "$", "this", "->", "migrateSession", "(", "$", "request", ",", "$", "token", ",", ...
Authenticates the given token in the system. @param string $providerKey The name of the provider/firewall being used for authentication
[ "Authenticates", "the", "given", "token", "in", "the", "system", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Security/Guard/GuardAuthenticatorHandler.php#L58-L67
train
Authenticate with a token
[ 30522, 2270, 3853, 14469, 3686, 24415, 18715, 2368, 1006, 19204, 18447, 2121, 12172, 1002, 19204, 1010, 5227, 1002, 5227, 1010, 5164, 1002, 10802, 14839, 1027, 19701, 1007, 1063, 1002, 2023, 1011, 1028, 22806, 8583, 10992, 1006, 1002, 5227, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/behaviors/FormController.php
FormController.initForm
public function initForm($model, $context = null) { if ($context !== null) { $this->context = $context; } $context = $this->formGetContext(); /* * Each page can supply a unique form definition, if desired */ $formFields = $this->getConfig("{$co...
php
public function initForm($model, $context = null) { if ($context !== null) { $this->context = $context; } $context = $this->formGetContext(); /* * Each page can supply a unique form definition, if desired */ $formFields = $this->getConfig("{$co...
[ "public", "function", "initForm", "(", "$", "model", ",", "$", "context", "=", "null", ")", "{", "if", "(", "$", "context", "!==", "null", ")", "{", "$", "this", "->", "context", "=", "$", "context", ";", "}", "$", "context", "=", "$", "this", "-...
Initialize the form configuration against a model and context value. This will process the configuration found in the `$formConfig` property and prepare the Form widget, which is the underlying tool used for actually rendering the form. The model used by this form is passed to this behavior via this method as the first...
[ "Initialize", "the", "form", "configuration", "against", "a", "model", "and", "context", "value", ".", "This", "will", "process", "the", "configuration", "found", "in", "the", "$formConfig", "property", "and", "prepare", "the", "Form", "widget", "which", "is", ...
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/behaviors/FormController.php#L119-L179
train
Initializes the form
[ 30522, 2270, 3853, 1999, 4183, 14192, 1006, 1002, 2944, 1010, 1002, 6123, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 6123, 999, 1027, 1027, 19701, 1007, 1063, 1002, 2023, 1011, 1028, 6123, 1027, 1002, 6123, 1025, 1065, 1002, 6123, 1027, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Updates/2.6.0-b1.php
Updates_2_6_0_b1.doUpdate
public function doUpdate(Updater $updater) { $config = Config::getInstance(); $config->Plugins_Tracker = array(); $config->forceSave(); }
php
public function doUpdate(Updater $updater) { $config = Config::getInstance(); $config->Plugins_Tracker = array(); $config->forceSave(); }
[ "public", "function", "doUpdate", "(", "Updater", "$", "updater", ")", "{", "$", "config", "=", "Config", "::", "getInstance", "(", ")", ";", "$", "config", "->", "Plugins_Tracker", "=", "array", "(", ")", ";", "$", "config", "->", "forceSave", "(", ")...
Here you can define any action that should be performed during the update. For instance executing SQL statements, renaming config entries, updating files, etc.
[ "Here", "you", "can", "define", "any", "action", "that", "should", "be", "performed", "during", "the", "update", ".", "For", "instance", "executing", "SQL", "statements", "renaming", "config", "entries", "updating", "files", "etc", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Updates/2.6.0-b1.php#L25-L30
train
This method is called by the update method. It will force the update of the plugin list.
[ 30522, 2270, 3853, 2079, 6279, 13701, 1006, 10651, 2099, 1002, 10651, 2099, 1007, 1063, 1002, 9530, 8873, 2290, 1027, 9530, 8873, 2290, 1024, 1024, 2131, 7076, 26897, 1006, 1007, 1025, 1002, 9530, 8873, 2290, 1011, 1028, 13354, 7076, 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...
symfony/symfony
src/Symfony/Component/HttpKernel/HttpKernelBrowser.php
HttpKernelBrowser.filterResponse
protected function filterResponse($response) { // this is needed to support StreamedResponse ob_start(); $response->sendContent(); $content = ob_get_clean(); return new DomResponse($content, $response->getStatusCode(), $response->headers->all()); }
php
protected function filterResponse($response) { // this is needed to support StreamedResponse ob_start(); $response->sendContent(); $content = ob_get_clean(); return new DomResponse($content, $response->getStatusCode(), $response->headers->all()); }
[ "protected", "function", "filterResponse", "(", "$", "response", ")", "{", "// this is needed to support StreamedResponse", "ob_start", "(", ")", ";", "$", "response", "->", "sendContent", "(", ")", ";", "$", "content", "=", "ob_get_clean", "(", ")", ";", "retur...
Converts the HttpKernel response to a BrowserKit response. @return DomResponse A DomResponse instance
[ "Converts", "the", "HttpKernel", "response", "to", "a", "BrowserKit", "response", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpKernel/HttpKernelBrowser.php#L195-L203
train
Filter the response to DomResponse
[ 30522, 5123, 3853, 11307, 6072, 26029, 3366, 1006, 1002, 3433, 1007, 1063, 1013, 1013, 2023, 2003, 2734, 2000, 2490, 18498, 6072, 26029, 3366, 27885, 1035, 2707, 1006, 1007, 1025, 1002, 3433, 1011, 1028, 4604, 8663, 6528, 2102, 1006, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/User/DataUser/UserCollection.php
UserCollection.find
public function find($query, $fields = ['username', 'email']): UserInterface { $fields = (array)$fields; $account_dir = Grav::instance()['locator']->findResource('account://'); $files = $account_dir ? array_diff(scandir($account_dir), ['.', '..']) : []; // Try with username first, ...
php
public function find($query, $fields = ['username', 'email']): UserInterface { $fields = (array)$fields; $account_dir = Grav::instance()['locator']->findResource('account://'); $files = $account_dir ? array_diff(scandir($account_dir), ['.', '..']) : []; // Try with username first, ...
[ "public", "function", "find", "(", "$", "query", ",", "$", "fields", "=", "[", "'username'", ",", "'email'", "]", ")", ":", "UserInterface", "{", "$", "fields", "=", "(", "array", ")", "$", "fields", ";", "$", "account_dir", "=", "Grav", "::", "insta...
Find a user by username, email, etc @param string $query the query to search for @param array $fields the fields to search @return UserInterface
[ "Find", "a", "user", "by", "username", "email", "etc" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/User/DataUser/UserCollection.php#L77-L106
train
Find user by username or email
[ 30522, 2270, 3853, 2424, 1006, 1002, 23032, 1010, 1002, 4249, 1027, 1031, 1005, 5310, 18442, 1005, 1010, 1005, 10373, 1005, 1033, 1007, 1024, 5310, 18447, 2121, 12172, 1063, 1002, 4249, 1027, 1006, 9140, 1007, 1002, 4249, 1025, 1002, 4070, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/CoreVisualizations/Visualizations/Sparklines/Config.php
Config.addSparkline
public function addSparkline($requestParamsForSparkline, $value, $description, $evolution = null, $order = null) { $metrics = array(); if (is_array($value)) { $values = $value; } else { $values = array($value); } if (!is_array($description)) { ...
php
public function addSparkline($requestParamsForSparkline, $value, $description, $evolution = null, $order = null) { $metrics = array(); if (is_array($value)) { $values = $value; } else { $values = array($value); } if (!is_array($description)) { ...
[ "public", "function", "addSparkline", "(", "$", "requestParamsForSparkline", ",", "$", "value", ",", "$", "description", ",", "$", "evolution", "=", "null", ",", "$", "order", "=", "null", ")", "{", "$", "metrics", "=", "array", "(", ")", ";", "if", "(...
Add a new sparkline to be displayed to the view. Each sparkline can consist of one or multiple metrics. One metric consists of a value and a description. By default the value is shown first, then the description. The description can optionally contain a '%s' in case the value shall be displayed within the description....
[ "Add", "a", "new", "sparkline", "to", "be", "displayed", "to", "the", "view", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/CoreVisualizations/Visualizations/Sparklines/Config.php#L199-L269
train
Add a sparkline to the database
[ 30522, 2270, 3853, 9909, 14432, 4179, 1006, 1002, 5227, 28689, 5244, 29278, 27694, 2243, 4179, 1010, 1002, 3643, 1010, 1002, 6412, 1010, 1002, 6622, 1027, 19701, 1010, 1002, 2344, 1027, 19701, 1007, 1063, 1002, 12046, 2015, 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/Finder/Finder.php
Finder.in
public function in($dirs) { $resolvedDirs = []; foreach ((array) $dirs as $dir) { if (is_dir($dir)) { $resolvedDirs[] = $this->normalizeDir($dir); } elseif ($glob = glob($dir, (\defined('GLOB_BRACE') ? GLOB_BRACE : 0) | GLOB_ONLYDIR)) { $resol...
php
public function in($dirs) { $resolvedDirs = []; foreach ((array) $dirs as $dir) { if (is_dir($dir)) { $resolvedDirs[] = $this->normalizeDir($dir); } elseif ($glob = glob($dir, (\defined('GLOB_BRACE') ? GLOB_BRACE : 0) | GLOB_ONLYDIR)) { $resol...
[ "public", "function", "in", "(", "$", "dirs", ")", "{", "$", "resolvedDirs", "=", "[", "]", ";", "foreach", "(", "(", "array", ")", "$", "dirs", "as", "$", "dir", ")", "{", "if", "(", "is_dir", "(", "$", "dir", ")", ")", "{", "$", "resolvedDirs...
Searches files and directories which match defined rules. @param string|array $dirs A directory path or an array of directories @return $this @throws DirectoryNotFoundException if one of the directories does not exist
[ "Searches", "files", "and", "directories", "which", "match", "defined", "rules", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Finder/Finder.php#L591-L608
train
Adds directories to the list of directories to search for
[ 30522, 2270, 3853, 1999, 1006, 1002, 16101, 2015, 1007, 1063, 1002, 10395, 4305, 2869, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1006, 9140, 1007, 1002, 16101, 2015, 2004, 1002, 16101, 1007, 1063, 2065, 1006, 2003, 1035, 16101, 1006, 1002,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/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...
getgrav/grav
system/src/Grav/Common/Page/Collection.php
Collection.visible
public function visible() { $visible = []; foreach ($this->items as $path => $slug) { $page = $this->pages->get($path); if ($page !== null && $page->visible()) { $visible[$path] = $slug; } } $this->items = $visible; return...
php
public function visible() { $visible = []; foreach ($this->items as $path => $slug) { $page = $this->pages->get($path); if ($page !== null && $page->visible()) { $visible[$path] = $slug; } } $this->items = $visible; return...
[ "public", "function", "visible", "(", ")", "{", "$", "visible", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "items", "as", "$", "path", "=>", "$", "slug", ")", "{", "$", "page", "=", "$", "this", "->", "pages", "->", "get", "(", "$",...
Creates new collection with only visible pages @return Collection The collection with only visible pages
[ "Creates", "new", "collection", "with", "only", "visible", "pages" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Page/Collection.php#L359-L372
train
Return all visible pages
[ 30522, 2270, 3853, 5710, 1006, 1007, 1063, 1002, 5710, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 5167, 2004, 1002, 4130, 1027, 1028, 1002, 23667, 1007, 1063, 1002, 3931, 1027, 1002, 2023, 1011, 1028, 5530, 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...
getgrav/grav
system/src/Grav/Common/Page/Medium/StaticResizeTrait.php
StaticResizeTrait.resize
public function resize($width = null, $height = null) { $this->styleAttributes['width'] = $width . 'px'; $this->styleAttributes['height'] = $height . 'px'; return $this; }
php
public function resize($width = null, $height = null) { $this->styleAttributes['width'] = $width . 'px'; $this->styleAttributes['height'] = $height . 'px'; return $this; }
[ "public", "function", "resize", "(", "$", "width", "=", "null", ",", "$", "height", "=", "null", ")", "{", "$", "this", "->", "styleAttributes", "[", "'width'", "]", "=", "$", "width", ".", "'px'", ";", "$", "this", "->", "styleAttributes", "[", "'he...
Resize media by setting attributes @param int $width @param int $height @return $this
[ "Resize", "media", "by", "setting", "attributes" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Page/Medium/StaticResizeTrait.php#L21-L27
train
Resizes the page to the specified width and height
[ 30522, 2270, 3853, 24501, 4697, 1006, 1002, 9381, 1027, 19701, 1010, 1002, 4578, 1027, 19701, 1007, 1063, 1002, 2023, 1011, 1028, 2806, 19321, 3089, 8569, 4570, 1031, 1005, 9381, 1005, 1033, 1027, 1002, 9381, 1012, 1005, 1052, 2595, 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...
laravel/framework
src/Illuminate/Mail/Mailer.php
Mailer.sendMailable
protected function sendMailable(MailableContract $mailable) { return $mailable instanceof ShouldQueue ? $mailable->queue($this->queue) : $mailable->send($this); }
php
protected function sendMailable(MailableContract $mailable) { return $mailable instanceof ShouldQueue ? $mailable->queue($this->queue) : $mailable->send($this); }
[ "protected", "function", "sendMailable", "(", "MailableContract", "$", "mailable", ")", "{", "return", "$", "mailable", "instanceof", "ShouldQueue", "?", "$", "mailable", "->", "queue", "(", "$", "this", "->", "queue", ")", ":", "$", "mailable", "->", "send"...
Send the given mailable. @param \Illuminate\Contracts\Mail\Mailable $mailable @return mixed
[ "Send", "the", "given", "mailable", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Mail/Mailer.php#L271-L276
train
Send the given mailable to the queue
[ 30522, 5123, 3853, 4604, 21397, 3085, 1006, 5653, 3085, 8663, 6494, 6593, 1002, 5653, 3085, 1007, 1063, 2709, 1002, 5653, 3085, 6013, 11253, 2323, 4226, 5657, 1029, 1002, 5653, 3085, 1011, 1028, 24240, 1006, 1002, 2023, 1011, 1028, 24240, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/CompiledBase.php
CompiledBase.checksum
public function checksum() { if (null === $this->checksum) { $this->checksum = md5(json_encode($this->files) . $this->version); } return $this->checksum; }
php
public function checksum() { if (null === $this->checksum) { $this->checksum = md5(json_encode($this->files) . $this->version); } return $this->checksum; }
[ "public", "function", "checksum", "(", ")", "{", "if", "(", "null", "===", "$", "this", "->", "checksum", ")", "{", "$", "this", "->", "checksum", "=", "md5", "(", "json_encode", "(", "$", "this", "->", "files", ")", ".", "$", "this", "->", "versio...
Returns checksum from the configuration files. You can set $this->checksum = false to disable this check. @return bool|string
[ "Returns", "checksum", "from", "the", "configuration", "files", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Config/CompiledBase.php#L130-L137
train
checksum - Returns the checksum of the files
[ 30522, 2270, 3853, 14148, 2819, 1006, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 1027, 1002, 2023, 1011, 1028, 14148, 2819, 1007, 1063, 1002, 2023, 1011, 1028, 14148, 2819, 1027, 9108, 2629, 1006, 1046, 3385, 1035, 4372, 16044, 1006, 1002, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Contracts/Cache/CacheTrait.php
CacheTrait.get
public function get(string $key, callable $callback, float $beta = null, array &$metadata = null) { return $this->doGet($this, $key, $callback, $beta, $metadata); }
php
public function get(string $key, callable $callback, float $beta = null, array &$metadata = null) { return $this->doGet($this, $key, $callback, $beta, $metadata); }
[ "public", "function", "get", "(", "string", "$", "key", ",", "callable", "$", "callback", ",", "float", "$", "beta", "=", "null", ",", "array", "&", "$", "metadata", "=", "null", ")", "{", "return", "$", "this", "->", "doGet", "(", "$", "this", ","...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Contracts/Cache/CacheTrait.php#L28-L31
train
Get a value from the cache
[ 30522, 2270, 3853, 2131, 1006, 5164, 1002, 3145, 1010, 2655, 3085, 1002, 2655, 5963, 1010, 14257, 1002, 8247, 1027, 19701, 1010, 9140, 1004, 1002, 27425, 1027, 19701, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 3899, 3388, 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...
matomo-org/matomo
core/Archive/DataTableFactory.php
DataTableFactory.makeMerged
public function makeMerged($index, $resultIndices) { if (!$this->isNumericDataType()) { throw new \Exception('This method is supposed to work with non-numeric data types but it is not tested. To use it, remove this exception and write tests to be sure it works.'); } $hasSiteInde...
php
public function makeMerged($index, $resultIndices) { if (!$this->isNumericDataType()) { throw new \Exception('This method is supposed to work with non-numeric data types but it is not tested. To use it, remove this exception and write tests to be sure it works.'); } $hasSiteInde...
[ "public", "function", "makeMerged", "(", "$", "index", ",", "$", "resultIndices", ")", "{", "if", "(", "!", "$", "this", "->", "isNumericDataType", "(", ")", ")", "{", "throw", "new", "\\", "Exception", "(", "'This method is supposed to work with non-numeric dat...
Creates a merged DataTable|Map instance using an index of archive data similar to {@link make()}. Whereas {@link make()} creates a Map for each result index (period and|or site), this will only create a Map for a period result index and move all site related indices into one dataTable. This is the same as doing `$data...
[ "Creates", "a", "merged", "DataTable|Map", "instance", "using", "an", "index", "of", "archive", "data", "similar", "to", "{", "@link", "make", "()", "}", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Archive/DataTableFactory.php#L198-L223
train
Returns the merged data table
[ 30522, 2270, 3853, 2191, 5017, 5999, 1006, 1002, 5950, 1010, 1002, 2765, 22254, 23522, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 3475, 17897, 7277, 2850, 29336, 18863, 1006, 1007, 1007, 1063, 5466, 2047, 1032, 6453, 1006, 1005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Foundation/Console/RouteListCommand.php
RouteListCommand.sortRoutes
protected function sortRoutes($sort, array $routes) { return Arr::sort($routes, function ($route) use ($sort) { return $route[$sort]; }); }
php
protected function sortRoutes($sort, array $routes) { return Arr::sort($routes, function ($route) use ($sort) { return $route[$sort]; }); }
[ "protected", "function", "sortRoutes", "(", "$", "sort", ",", "array", "$", "routes", ")", "{", "return", "Arr", "::", "sort", "(", "$", "routes", ",", "function", "(", "$", "route", ")", "use", "(", "$", "sort", ")", "{", "return", "$", "route", "...
Sort the routes by a given element. @param string $sort @param array $routes @return array
[ "Sort", "the", "routes", "by", "a", "given", "element", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Console/RouteListCommand.php#L128-L133
train
Sort routes by given sort
[ 30522, 5123, 3853, 4066, 22494, 4570, 1006, 1002, 4066, 1010, 9140, 1002, 5847, 1007, 1063, 2709, 12098, 2099, 1024, 1024, 4066, 1006, 1002, 5847, 1010, 3853, 1006, 1002, 2799, 1007, 2224, 1006, 1002, 4066, 1007, 1063, 2709, 1002, 2799, 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/Validator/Constraints/AbstractComparisonValidator.php
AbstractComparisonValidator.validate
public function validate($value, Constraint $constraint) { if (!$constraint instanceof AbstractComparison) { throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\AbstractComparison'); } if (null === $value) { return; } if ($path = $constrai...
php
public function validate($value, Constraint $constraint) { if (!$constraint instanceof AbstractComparison) { throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\AbstractComparison'); } if (null === $value) { return; } if ($path = $constrai...
[ "public", "function", "validate", "(", "$", "value", ",", "Constraint", "$", "constraint", ")", "{", "if", "(", "!", "$", "constraint", "instanceof", "AbstractComparison", ")", "{", "throw", "new", "UnexpectedTypeException", "(", "$", "constraint", ",", "__NAM...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Validator/Constraints/AbstractComparisonValidator.php#L40-L87
train
Checks if the provided value is a valid comparison value
[ 30522, 2270, 3853, 9398, 3686, 1006, 1002, 3643, 1010, 27142, 1002, 27142, 1007, 1063, 2065, 1006, 999, 1002, 27142, 6013, 11253, 10061, 9006, 19362, 10929, 1007, 1063, 5466, 2047, 9223, 13874, 10288, 24422, 1006, 1002, 27142, 1010, 1035, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Common/File/CompiledFile.php
CompiledFile.content
public function content($var = null) { try { // If nothing has been loaded, attempt to get pre-compiled version of the file first. if ($var === null && $this->raw === null && $this->content === null) { $key = md5($this->filename); $file = PhpFile::inst...
php
public function content($var = null) { try { // If nothing has been loaded, attempt to get pre-compiled version of the file first. if ($var === null && $this->raw === null && $this->content === null) { $key = md5($this->filename); $file = PhpFile::inst...
[ "public", "function", "content", "(", "$", "var", "=", "null", ")", "{", "try", "{", "// If nothing has been loaded, attempt to get pre-compiled version of the file first.", "if", "(", "$", "var", "===", "null", "&&", "$", "this", "->", "raw", "===", "null", "&&",...
Get/set parsed file contents. @param mixed $var @return string
[ "Get", "/", "set", "parsed", "file", "contents", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/File/CompiledFile.php#L22-L85
train
Returns the compiled content of the file
[ 30522, 2270, 3853, 4180, 1006, 1002, 13075, 1027, 19701, 1007, 1063, 3046, 1063, 1013, 1013, 2065, 2498, 2038, 2042, 8209, 1010, 3535, 2000, 2131, 3653, 1011, 9227, 2544, 1997, 1996, 5371, 2034, 1012, 2065, 1006, 1002, 13075, 1027, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Auth/Access/Gate.php
Gate.has
public function has($ability) { $abilities = is_array($ability) ? $ability : func_get_args(); foreach ($abilities as $ability) { if (! isset($this->abilities[$ability])) { return false; } } return true; }
php
public function has($ability) { $abilities = is_array($ability) ? $ability : func_get_args(); foreach ($abilities as $ability) { if (! isset($this->abilities[$ability])) { return false; } } return true; }
[ "public", "function", "has", "(", "$", "ability", ")", "{", "$", "abilities", "=", "is_array", "(", "$", "ability", ")", "?", "$", "ability", ":", "func_get_args", "(", ")", ";", "foreach", "(", "$", "abilities", "as", "$", "ability", ")", "{", "if",...
Determine if a given ability has been defined. @param string|array $ability @return bool
[ "Determine", "if", "a", "given", "ability", "has", "been", "defined", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/Access/Gate.php#L105-L116
train
Has the terms of the given ability
[ 30522, 2270, 3853, 2038, 1006, 1002, 3754, 1007, 1063, 1002, 7590, 1027, 2003, 1035, 9140, 1006, 1002, 3754, 1007, 1029, 1002, 3754, 1024, 4569, 2278, 1035, 2131, 1035, 12098, 5620, 1006, 1007, 1025, 18921, 6776, 1006, 1002, 7590, 2004, 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/Installation/FormDatabaseSetup.php
Rule_checkUserPrivileges.getRequiredPrivileges
public static function getRequiredPrivileges() { return array( 'CREATE' => 'CREATE TABLE ' . self::TEST_TABLE_NAME . ' ( id INT AUTO_INCREMENT, value INT, PRIMARY KEY (id), ...
php
public static function getRequiredPrivileges() { return array( 'CREATE' => 'CREATE TABLE ' . self::TEST_TABLE_NAME . ' ( id INT AUTO_INCREMENT, value INT, PRIMARY KEY (id), ...
[ "public", "static", "function", "getRequiredPrivileges", "(", ")", "{", "return", "array", "(", "'CREATE'", "=>", "'CREATE TABLE '", ".", "self", "::", "TEST_TABLE_NAME", ".", "' (\n id INT AUTO_INCREMENT,\n value INT,\n...
Returns an array describing the database privileges required for Matomo to run. The array maps privilege names with one or more SQL queries that can be used to test if the current user has the privilege. NOTE: LOAD DATA INFILE & LOCK TABLES privileges are not **required** so they're not checked. @return array
[ "Returns", "an", "array", "describing", "the", "database", "privileges", "required", "for", "Matomo", "to", "run", ".", "The", "array", "maps", "privilege", "names", "with", "one", "or", "more", "SQL", "queries", "that", "can", "be", "used", "to", "test", ...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Installation/FormDatabaseSetup.php#L258-L279
train
Returns an array of required privileges
[ 30522, 2270, 10763, 3853, 2131, 2890, 15549, 5596, 18098, 12848, 9463, 8449, 1006, 1007, 1063, 2709, 9140, 1006, 1005, 3443, 1005, 1027, 1028, 1005, 3443, 2795, 1005, 1012, 2969, 1024, 1024, 3231, 1035, 2795, 1035, 2171, 1012, 1005, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/Archive/DataTableFactory.php
DataTableFactory.createDataTableMapFromIndex
private function createDataTableMapFromIndex($index, $resultIndices, $keyMetadata) { $result = new DataTable\Map(); $result->setKeyName(reset($resultIndices)); $resultIndex = key($resultIndices); array_shift($resultIndices); $hasIndices = !empty($resultIndices); fo...
php
private function createDataTableMapFromIndex($index, $resultIndices, $keyMetadata) { $result = new DataTable\Map(); $result->setKeyName(reset($resultIndices)); $resultIndex = key($resultIndices); array_shift($resultIndices); $hasIndices = !empty($resultIndices); fo...
[ "private", "function", "createDataTableMapFromIndex", "(", "$", "index", ",", "$", "resultIndices", ",", "$", "keyMetadata", ")", "{", "$", "result", "=", "new", "DataTable", "\\", "Map", "(", ")", ";", "$", "result", "->", "setKeyName", "(", "reset", "(",...
Creates a Set from an array index. @param array $index @see DataCollection @param array $resultIndices @see make @param array $keyMetadata The metadata to add to the table when it's created. @return DataTable\Map
[ "Creates", "a", "Set", "from", "an", "array", "index", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Archive/DataTableFactory.php#L316-L339
train
Create a DataTable \ Map from an index
[ 30522, 2797, 3853, 2580, 6790, 10880, 2863, 14376, 21716, 22254, 10288, 1006, 1002, 5950, 1010, 1002, 2765, 22254, 23522, 1010, 1002, 3145, 11368, 8447, 2696, 1007, 1063, 1002, 2765, 1027, 2047, 2951, 10880, 1032, 4949, 1006, 1007, 1025, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Form/FormErrorIterator.php
FormErrorIterator.offsetGet
public function offsetGet($position) { if (!isset($this->errors[$position])) { throw new OutOfBoundsException('The offset '.$position.' does not exist.'); } return $this->errors[$position]; }
php
public function offsetGet($position) { if (!isset($this->errors[$position])) { throw new OutOfBoundsException('The offset '.$position.' does not exist.'); } return $this->errors[$position]; }
[ "public", "function", "offsetGet", "(", "$", "position", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "errors", "[", "$", "position", "]", ")", ")", "{", "throw", "new", "OutOfBoundsException", "(", "'The offset '", ".", "$", "position", ...
Returns the element at a position in the iterator. @param int $position The position @return FormError|FormErrorIterator The element at the given position @throws OutOfBoundsException If the given position does not exist
[ "Returns", "the", "element", "at", "a", "position", "in", "the", "iterator", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/FormErrorIterator.php#L162-L169
train
Get the error at the given position
[ 30522, 2270, 3853, 16396, 18150, 1006, 1002, 2597, 1007, 1063, 2065, 1006, 999, 26354, 3388, 1006, 1002, 2023, 1011, 1028, 10697, 1031, 1002, 2597, 1033, 1007, 1007, 1063, 5466, 2047, 2041, 11253, 15494, 3366, 2595, 24422, 1006, 1005, 1996,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/API/API.php
API.getRowEvolution
public function getRowEvolution($idSite, $period, $date, $apiModule, $apiAction, $label = false, $segment = false, $column = false, $language = false, $idGoal = false, $legendAppendMetric = true, $labelUseAbsoluteUrl = true, $idDimension = false) { // check if site exists $idSite = (int) $idSite; ...
php
public function getRowEvolution($idSite, $period, $date, $apiModule, $apiAction, $label = false, $segment = false, $column = false, $language = false, $idGoal = false, $legendAppendMetric = true, $labelUseAbsoluteUrl = true, $idDimension = false) { // check if site exists $idSite = (int) $idSite; ...
[ "public", "function", "getRowEvolution", "(", "$", "idSite", ",", "$", "period", ",", "$", "date", ",", "$", "apiModule", ",", "$", "apiAction", ",", "$", "label", "=", "false", ",", "$", "segment", "=", "false", ",", "$", "column", "=", "false", ","...
Given an API report to query (eg. "Referrers.getKeywords", and a Label (eg. "free%20software"), this function will query the API for the previous days/weeks/etc. and will return a ready to use data structure containing the metrics for the requested Label, along with enriched information (min/max values, etc.) @param i...
[ "Given", "an", "API", "report", "to", "query", "(", "eg", ".", "Referrers", ".", "getKeywords", "and", "a", "Label", "(", "eg", ".", "free%20software", ")", "this", "function", "will", "query", "the", "API", "for", "the", "previous", "days", "/", "weeks"...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/API/API.php#L479-L508
train
This method is used to get the row evolution of the site
[ 30522, 2270, 3853, 2131, 10524, 6777, 4747, 13700, 1006, 1002, 8909, 28032, 2063, 1010, 1002, 2558, 1010, 1002, 3058, 1010, 1002, 17928, 5302, 8566, 2571, 1010, 1002, 17928, 18908, 3258, 1010, 1002, 3830, 1027, 6270, 1010, 1002, 6903, 1027,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/DataTable.php
DataTable.walkPath
public function walkPath($path, $missingRowColumns = false, $maxSubtableRows = 0) { $pathLength = count($path); $table = $this; $next = false; for ($i = 0; $i < $pathLength; ++$i) { $segment = $path[$i]; $next = $table->getRowFromLabel($segment); ...
php
public function walkPath($path, $missingRowColumns = false, $maxSubtableRows = 0) { $pathLength = count($path); $table = $this; $next = false; for ($i = 0; $i < $pathLength; ++$i) { $segment = $path[$i]; $next = $table->getRowFromLabel($segment); ...
[ "public", "function", "walkPath", "(", "$", "path", ",", "$", "missingRowColumns", "=", "false", ",", "$", "maxSubtableRows", "=", "0", ")", "{", "$", "pathLength", "=", "count", "(", "$", "path", ")", ";", "$", "table", "=", "$", "this", ";", "$", ...
Traverses a DataTable tree using an array of labels and returns the row it finds or `false` if it cannot find one. The number of path segments that were successfully walked is also returned. If `$missingRowColumns` is supplied, the specified path is created. When a subtable is encountered w/o the required label, a new...
[ "Traverses", "a", "DataTable", "tree", "using", "an", "array", "of", "labels", "and", "returns", "the", "row", "it", "finds", "or", "false", "if", "it", "cannot", "find", "one", ".", "The", "number", "of", "path", "segments", "that", "were", "successfully"...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataTable.php#L1693-L1746
train
Walks through the path and returns the next row
[ 30522, 2270, 3853, 3328, 15069, 1006, 1002, 4130, 1010, 1002, 4394, 10524, 25778, 2819, 3619, 1027, 6270, 1010, 1002, 4098, 6342, 19279, 3085, 10524, 2015, 1027, 1014, 1007, 1063, 1002, 4130, 7770, 13512, 2232, 1027, 4175, 1006, 1002, 4130,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Http/Middleware/CheckForMaintenanceMode.php
CheckForMaintenanceMode.handle
public function handle($request, Closure $next) { if ($this->app->isDownForMaintenance()) { $data = json_decode(file_get_contents($this->app->storagePath().'/framework/down'), true); if (isset($data['allowed']) && IpUtils::checkIp($request->ip(), (array) $data['allowed'])) { ...
php
public function handle($request, Closure $next) { if ($this->app->isDownForMaintenance()) { $data = json_decode(file_get_contents($this->app->storagePath().'/framework/down'), true); if (isset($data['allowed']) && IpUtils::checkIp($request->ip(), (array) $data['allowed'])) { ...
[ "public", "function", "handle", "(", "$", "request", ",", "Closure", "$", "next", ")", "{", "if", "(", "$", "this", "->", "app", "->", "isDownForMaintenance", "(", ")", ")", "{", "$", "data", "=", "json_decode", "(", "file_get_contents", "(", "$", "thi...
Handle an incoming request. @param \Illuminate\Http\Request $request @param \Closure $next @return mixed @throws \Symfony\Component\HttpKernel\Exception\HttpException
[ "Handle", "an", "incoming", "request", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php#L46-L63
train
Handle the request
[ 30522, 2270, 3853, 5047, 1006, 1002, 5227, 1010, 8503, 1002, 2279, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 10439, 1011, 1028, 2003, 7698, 14192, 22325, 8189, 5897, 1006, 1007, 1007, 1063, 1002, 2951, 1027, 1046, 3385, 1035, 21933, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/ViolationMapper/ViolationMapper.php
ViolationMapper.mapViolation
public function mapViolation(ConstraintViolation $violation, FormInterface $form, $allowNonSynchronized = false) { $this->allowNonSynchronized = $allowNonSynchronized; // The scope is the currently found most specific form that // an error should be mapped to. After setting the scope, the ...
php
public function mapViolation(ConstraintViolation $violation, FormInterface $form, $allowNonSynchronized = false) { $this->allowNonSynchronized = $allowNonSynchronized; // The scope is the currently found most specific form that // an error should be mapped to. After setting the scope, the ...
[ "public", "function", "mapViolation", "(", "ConstraintViolation", "$", "violation", ",", "FormInterface", "$", "form", ",", "$", "allowNonSynchronized", "=", "false", ")", "{", "$", "this", "->", "allowNonSynchronized", "=", "$", "allowNonSynchronized", ";", "// T...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapper.php#L35-L135
train
Map a constraint violation to the most specific form that the user has found.
[ 30522, 2270, 3853, 4949, 25500, 13490, 1006, 27142, 25500, 13490, 1002, 11371, 1010, 2433, 18447, 2121, 12172, 1002, 2433, 1010, 1002, 3499, 8540, 6508, 12680, 4948, 3550, 1027, 6270, 1007, 1063, 1002, 2023, 1011, 1028, 3499, 8540, 6508, 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...
matomo-org/matomo
plugins/CoreAdminHome/Model/DuplicateActionRemover.php
DuplicateActionRemover.getSitesAndDatesOfRowsUsingDuplicates
public function getSitesAndDatesOfRowsUsingDuplicates($table, $duplicateIdActions) { $idactionColumns = $this->getIdActionTableColumnsFromMetadata(); $idactionColumns = array_values($idactionColumns[$table]); $table = Common::prefixTable($table); $sql = "SELECT idsite, DATE(server_t...
php
public function getSitesAndDatesOfRowsUsingDuplicates($table, $duplicateIdActions) { $idactionColumns = $this->getIdActionTableColumnsFromMetadata(); $idactionColumns = array_values($idactionColumns[$table]); $table = Common::prefixTable($table); $sql = "SELECT idsite, DATE(server_t...
[ "public", "function", "getSitesAndDatesOfRowsUsingDuplicates", "(", "$", "table", ",", "$", "duplicateIdActions", ")", "{", "$", "idactionColumns", "=", "$", "this", "->", "getIdActionTableColumnsFromMetadata", "(", ")", ";", "$", "idactionColumns", "=", "array_values...
Returns the server time and idsite of rows in a log table that reference at least one action in a set. @param string $table @param int[] $duplicateIdActions @return array with two elements **idsite** and **server_time**. idsite is the site ID and server_time is the date of the log.
[ "Returns", "the", "server", "time", "and", "idsite", "of", "rows", "in", "a", "log", "table", "that", "reference", "at", "least", "one", "action", "in", "a", "set", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/CoreAdminHome/Model/DuplicateActionRemover.php#L142-L151
train
Returns the idsite and server_time of rows from a table that are not already in a duplicate action list.
[ 30522, 2270, 3853, 4152, 7616, 5685, 27122, 11253, 10524, 13203, 2075, 8566, 24759, 24695, 2015, 1006, 1002, 2795, 1010, 1002, 24473, 8524, 22014, 1007, 1063, 1002, 16096, 7542, 25778, 2819, 3619, 1027, 1002, 2023, 30524, 10880, 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...
getgrav/grav
system/src/Grav/Framework/File/Formatter/YamlFormatter.php
YamlFormatter.encode
public function encode($data, $inline = null, $indent = null): string { try { return YamlParser::dump( $data, $inline ? (int) $inline : $this->getInlineOption(), $indent ? (int) $indent : $this->getIndentOption(), YamlParser::DUMP_E...
php
public function encode($data, $inline = null, $indent = null): string { try { return YamlParser::dump( $data, $inline ? (int) $inline : $this->getInlineOption(), $indent ? (int) $indent : $this->getIndentOption(), YamlParser::DUMP_E...
[ "public", "function", "encode", "(", "$", "data", ",", "$", "inline", "=", "null", ",", "$", "indent", "=", "null", ")", ":", "string", "{", "try", "{", "return", "YamlParser", "::", "dump", "(", "$", "data", ",", "$", "inline", "?", "(", "int", ...
{@inheritdoc} @see FileFormatterInterface::encode()
[ "{" ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Framework/File/Formatter/YamlFormatter.php#L71-L83
train
Encodes data in YAML format
[ 30522, 2270, 3853, 4372, 16044, 1006, 1002, 2951, 1010, 1002, 23881, 1027, 19701, 1010, 1002, 27427, 4765, 1027, 19701, 1007, 1024, 5164, 1063, 3046, 1063, 2709, 8038, 19968, 19362, 8043, 1024, 1024, 15653, 1006, 1002, 2951, 1010, 1002, 238...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Goals/API.php
API.getDaysToConversion
public function getDaysToConversion($idSite, $period, $date, $segment = false, $idGoal = false) { $dataTable = $this->getGoalSpecificDataTable( Archiver::DAYS_UNTIL_CONV_RECORD_NAME, $idSite, $period, $date, $segment, $idGoal); $dataTable->queueFilter('Sort', array('label', 'asc', true,...
php
public function getDaysToConversion($idSite, $period, $date, $segment = false, $idGoal = false) { $dataTable = $this->getGoalSpecificDataTable( Archiver::DAYS_UNTIL_CONV_RECORD_NAME, $idSite, $period, $date, $segment, $idGoal); $dataTable->queueFilter('Sort', array('label', 'asc', true,...
[ "public", "function", "getDaysToConversion", "(", "$", "idSite", ",", "$", "period", ",", "$", "date", ",", "$", "segment", "=", "false", ",", "$", "idGoal", "=", "false", ")", "{", "$", "dataTable", "=", "$", "this", "->", "getGoalSpecificDataTable", "(...
Gets a DataTable that maps ranges of days to the number of conversions that occurred within those ranges, for the specified site, date range, segment and goal. @param int $idSite The site to select data from. @param string $period The period type. @param string $date The date type. @param string|bool $segment The segm...
[ "Gets", "a", "DataTable", "that", "maps", "ranges", "of", "days", "to", "the", "number", "of", "conversions", "that", "occurred", "within", "those", "ranges", "for", "the", "specified", "site", "date", "range", "segment", "and", "goal", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Goals/API.php#L674-L684
train
Returns the days to conversion table for the given site period date segment and goal.
[ 30522, 2270, 3853, 2131, 10259, 16033, 8663, 27774, 1006, 1002, 8909, 28032, 2063, 1010, 1002, 2558, 1010, 1002, 3058, 1010, 1002, 6903, 1027, 6270, 1010, 1002, 8909, 3995, 2389, 1027, 6270, 1007, 1063, 1002, 2951, 10880, 1027, 1002, 2023, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Support/Arr.php
Arr.prepend
public static function prepend($array, $value, $key = null) { if (is_null($key)) { array_unshift($array, $value); } else { $array = [$key => $value] + $array; } return $array; }
php
public static function prepend($array, $value, $key = null) { if (is_null($key)) { array_unshift($array, $value); } else { $array = [$key => $value] + $array; } return $array; }
[ "public", "static", "function", "prepend", "(", "$", "array", ",", "$", "value", ",", "$", "key", "=", "null", ")", "{", "if", "(", "is_null", "(", "$", "key", ")", ")", "{", "array_unshift", "(", "$", "array", ",", "$", "value", ")", ";", "}", ...
Push an item onto the beginning of an array. @param array $array @param mixed $value @param mixed $key @return array
[ "Push", "an", "item", "onto", "the", "beginning", "of", "an", "array", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Support/Arr.php#L428-L437
train
Prepends a value to the beginning of an array
[ 30522, 2270, 10763, 3853, 17463, 10497, 1006, 1002, 9140, 1010, 1002, 3643, 1010, 1002, 3145, 1027, 19701, 1007, 1063, 2065, 1006, 2003, 1035, 19701, 1006, 1002, 3145, 1007, 1007, 1063, 9140, 1035, 4895, 6182, 6199, 1006, 1002, 9140, 1010, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/Annotations/AnnotationList.php
AnnotationList.getAnnotationsForSite
private function getAnnotationsForSite() { $result = array(); foreach ($this->idSites as $id) { $optionName = self::getAnnotationCollectionOptionName($id); $serialized = Option::get($optionName); if ($serialized !== false) { $result[$id] = Common:...
php
private function getAnnotationsForSite() { $result = array(); foreach ($this->idSites as $id) { $optionName = self::getAnnotationCollectionOptionName($id); $serialized = Option::get($optionName); if ($serialized !== false) { $result[$id] = Common:...
[ "private", "function", "getAnnotationsForSite", "(", ")", "{", "$", "result", "=", "array", "(", ")", ";", "foreach", "(", "$", "this", "->", "idSites", "as", "$", "id", ")", "{", "$", "optionName", "=", "self", "::", "getAnnotationCollectionOptionName", "...
Retrieves annotations from the database for the sites supplied to the constructor. @return array Lists of annotations mapped by site ID.
[ "Retrieves", "annotations", "from", "the", "database", "for", "the", "sites", "supplied", "to", "the", "constructor", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Annotations/AnnotationList.php#L326-L344
train
Returns all annotations for all sites
[ 30522, 2797, 3853, 2131, 11639, 17287, 9285, 29278, 28032, 2063, 1006, 1007, 1063, 1002, 2765, 1027, 9140, 1006, 1007, 1025, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 8909, 28032, 2229, 2004, 1002, 8909, 1007, 1063, 1002, 5724, 18442, 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...
getgrav/grav
system/src/Grav/Common/Page/Pages.php
Pages.buildPages
protected function buildPages() { $this->sort = []; /** @var Config $config */ $config = $this->grav['config']; /** @var Language $language */ $language = $this->grav['language']; /** @var UniformResourceLocator $locator */ $locator = $this->grav['locator']...
php
protected function buildPages() { $this->sort = []; /** @var Config $config */ $config = $this->grav['config']; /** @var Language $language */ $language = $this->grav['language']; /** @var UniformResourceLocator $locator */ $locator = $this->grav['locator']...
[ "protected", "function", "buildPages", "(", ")", "{", "$", "this", "->", "sort", "=", "[", "]", ";", "/** @var Config $config */", "$", "config", "=", "$", "this", "->", "grav", "[", "'config'", "]", ";", "/** @var Language $language */", "$", "language", "=...
Builds pages. @internal
[ "Builds", "pages", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Page/Pages.php#L940-L995
train
Build pages from page locations
[ 30522, 5123, 3853, 3857, 13704, 2015, 1006, 1007, 1063, 1002, 2023, 1011, 1028, 4066, 1027, 1031, 1033, 1025, 1013, 1008, 1008, 1030, 13075, 9530, 8873, 2290, 1002, 9530, 8873, 2290, 1008, 1013, 1002, 9530, 8873, 2290, 1027, 1002, 2023, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
overtrue/wechat
src/Payment/Application.php
Application.scheme
public function scheme(string $productId): string { $params = [ 'appid' => $this['config']->app_id, 'mch_id' => $this['config']->mch_id, 'time_stamp' => time(), 'nonce_str' => uniqid(), 'product_id' => $productId, ]; $params['sign'...
php
public function scheme(string $productId): string { $params = [ 'appid' => $this['config']->app_id, 'mch_id' => $this['config']->mch_id, 'time_stamp' => time(), 'nonce_str' => uniqid(), 'product_id' => $productId, ]; $params['sign'...
[ "public", "function", "scheme", "(", "string", "$", "productId", ")", ":", "string", "{", "$", "params", "=", "[", "'appid'", "=>", "$", "this", "[", "'config'", "]", "->", "app_id", ",", "'mch_id'", "=>", "$", "this", "[", "'config'", "]", "->", "mc...
Build payment scheme for product. @param string $productId @return string
[ "Build", "payment", "scheme", "for", "product", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Payment/Application.php#L79-L92
train
Generate a URL to Bizpay.
[ 30522, 2270, 3853, 5679, 1006, 5164, 1002, 4031, 3593, 1007, 1024, 5164, 1063, 1002, 11498, 5244, 1027, 1031, 1005, 10439, 3593, 1005, 1027, 1028, 1002, 2023, 1031, 1005, 9530, 8873, 2290, 1005, 1033, 1011, 1028, 10439, 1035, 8909, 1010, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
core/DataAccess/LogAggregator.php
LogAggregator.queryEcommerceItems
public function queryEcommerceItems($dimension) { $query = $this->generateQuery( // SELECT ... implode( ', ', array( "log_action.name AS label", sprintf("log_conversion_item.%s AS labelIdAction", $dimension), ...
php
public function queryEcommerceItems($dimension) { $query = $this->generateQuery( // SELECT ... implode( ', ', array( "log_action.name AS label", sprintf("log_conversion_item.%s AS labelIdAction", $dimension), ...
[ "public", "function", "queryEcommerceItems", "(", "$", "dimension", ")", "{", "$", "query", "=", "$", "this", "->", "generateQuery", "(", "// SELECT ...", "implode", "(", "', '", ",", "array", "(", "\"log_action.name AS label\"", ",", "sprintf", "(", "\"log_conv...
Executes and returns a query aggregating ecommerce item data (everything stored in the **log\_conversion\_item** table) and returns a DB statement that can be used to iterate over the result <a name="queryEcommerceItems-result-set"></a> **Result Set** Each row of the result set represents an aggregated group of ecom...
[ "Executes", "and", "returns", "a", "query", "aggregating", "ecommerce", "item", "data", "(", "everything", "stored", "in", "the", "**", "log", "\\", "_conversion", "\\", "_item", "**", "table", ")", "and", "returns", "a", "DB", "statement", "that", "can", ...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataAccess/LogAggregator.php#L568-L639
train
Returns the query for ecommerce items
[ 30522, 2270, 3853, 23032, 8586, 5358, 5017, 3401, 4221, 5244, 1006, 1002, 9812, 1007, 1063, 1002, 23032, 1027, 1002, 2023, 1011, 1028, 9699, 4226, 2854, 1006, 1013, 1013, 7276, 1012, 1012, 1012, 17727, 4135, 3207, 1006, 1005, 1010, 1005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/CoreAdminHome/Controller.php
Controller.trackingCodeGenerator
public function trackingCodeGenerator() { Piwik::checkUserHasSomeViewAccess(); $view = new View('@CoreAdminHome/trackingCodeGenerator'); $this->setBasicVariablesView($view); $view->topMenu = MenuTop::getInstance()->getMenu(); $viewableIdSites = APISitesManager::get...
php
public function trackingCodeGenerator() { Piwik::checkUserHasSomeViewAccess(); $view = new View('@CoreAdminHome/trackingCodeGenerator'); $this->setBasicVariablesView($view); $view->topMenu = MenuTop::getInstance()->getMenu(); $viewableIdSites = APISitesManager::get...
[ "public", "function", "trackingCodeGenerator", "(", ")", "{", "Piwik", "::", "checkUserHasSomeViewAccess", "(", ")", ";", "$", "view", "=", "new", "View", "(", "'@CoreAdminHome/trackingCodeGenerator'", ")", ";", "$", "this", "->", "setBasicVariablesView", "(", "$"...
Renders and echo's an admin page that lets users generate custom JavaScript tracking code and custom image tracker links.
[ "Renders", "and", "echo", "s", "an", "admin", "page", "that", "lets", "users", "generate", "custom", "JavaScript", "tracking", "code", "and", "custom", "image", "tracker", "links", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/CoreAdminHome/Controller.php#L173-L215
train
Returns the tracking code generator
[ 30522, 2270, 3853, 9651, 16044, 6914, 6906, 4263, 1006, 1007, 1063, 14255, 9148, 2243, 1024, 1024, 4638, 20330, 14949, 14045, 8584, 6305, 9623, 2015, 1006, 1007, 1025, 1002, 3193, 1027, 2047, 3193, 1006, 1005, 1030, 4563, 4215, 10020, 23393...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/CacheWarmer/AbstractPhpFileCacheWarmer.php
AbstractPhpFileCacheWarmer.warmUp
public function warmUp($cacheDir) { $arrayAdapter = new ArrayAdapter(); spl_autoload_register([PhpArrayAdapter::class, 'throwOnRequiredClass']); try { if (!$this->doWarmUp($cacheDir, $arrayAdapter)) { return; } } finally { spl_auto...
php
public function warmUp($cacheDir) { $arrayAdapter = new ArrayAdapter(); spl_autoload_register([PhpArrayAdapter::class, 'throwOnRequiredClass']); try { if (!$this->doWarmUp($cacheDir, $arrayAdapter)) { return; } } finally { spl_auto...
[ "public", "function", "warmUp", "(", "$", "cacheDir", ")", "{", "$", "arrayAdapter", "=", "new", "ArrayAdapter", "(", ")", ";", "spl_autoload_register", "(", "[", "PhpArrayAdapter", "::", "class", ",", "'throwOnRequiredClass'", "]", ")", ";", "try", "{", "if...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/AbstractPhpFileCacheWarmer.php#L45-L64
train
Warms up the array adapter
[ 30522, 2270, 3853, 4010, 6279, 1006, 1002, 17053, 4305, 2099, 1007, 1063, 1002, 9140, 8447, 13876, 2121, 1027, 2047, 9140, 8447, 13876, 2121, 1006, 1007, 1025, 11867, 2140, 1035, 8285, 11066, 1035, 4236, 1006, 1031, 25718, 2906, 29539, 2850...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Mime.php
Zend_Mime._encodeQuotedPrintable
private static function _encodeQuotedPrintable($str) { $str = str_replace('=', '=3D', $str); $str = str_replace(self::$qpKeys, self::$qpReplaceValues, $str); $str = rtrim($str); return $str; }
php
private static function _encodeQuotedPrintable($str) { $str = str_replace('=', '=3D', $str); $str = str_replace(self::$qpKeys, self::$qpReplaceValues, $str); $str = rtrim($str); return $str; }
[ "private", "static", "function", "_encodeQuotedPrintable", "(", "$", "str", ")", "{", "$", "str", "=", "str_replace", "(", "'='", ",", "'=3D'", ",", "$", "str", ")", ";", "$", "str", "=", "str_replace", "(", "self", "::", "$", "qpKeys", ",", "self", ...
Converts a string into quoted printable format. @param string $str @return string
[ "Converts", "a", "string", "into", "quoted", "printable", "format", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mime.php#L166-L172
train
Encode a string with quoted - printable values.
[ 30522, 2797, 10763, 3853, 1035, 4372, 16044, 28940, 27428, 16550, 3085, 1006, 1002, 2358, 2099, 1007, 1063, 1002, 2358, 2099, 1027, 2358, 2099, 1035, 5672, 1006, 1005, 1027, 1005, 1010, 1005, 1027, 7605, 1005, 1010, 1002, 2358, 2099, 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...
dompdf/dompdf
src/Css/Stylesheet.php
Stylesheet._selector_an_plus_b
protected function _selector_an_plus_b($expr, $last = false) { $expr = preg_replace("/\s/", "", $expr); if (!preg_match("/^(?P<a>-?[0-9]*)?n(?P<b>[-+]?[0-9]+)?$/", $expr, $matches)) { return "false()"; } $a = ((isset($matches["a"]) && $matches["a"] !== "") ? intval($matc...
php
protected function _selector_an_plus_b($expr, $last = false) { $expr = preg_replace("/\s/", "", $expr); if (!preg_match("/^(?P<a>-?[0-9]*)?n(?P<b>[-+]?[0-9]+)?$/", $expr, $matches)) { return "false()"; } $a = ((isset($matches["a"]) && $matches["a"] !== "") ? intval($matc...
[ "protected", "function", "_selector_an_plus_b", "(", "$", "expr", ",", "$", "last", "=", "false", ")", "{", "$", "expr", "=", "preg_replace", "(", "\"/\\s/\"", ",", "\"\"", ",", "$", "expr", ")", ";", "if", "(", "!", "preg_match", "(", "\"/^(?P<a>-?[0-9]...
https://github.com/tenderlove/nokogiri/blob/master/lib/nokogiri/css/xpath_visitor.rb @param $expr @param bool $last @return string
[ "https", ":", "//", "github", ".", "com", "/", "tenderlove", "/", "nokogiri", "/", "blob", "/", "master", "/", "lib", "/", "nokogiri", "/", "css", "/", "xpath_visitor", ".", "rb" ]
75f13c700009be21a1965dc2c5b68a8708c22ba2
https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/Css/Stylesheet.php#L902-L924
train
Returns the selector for an + b
[ 30522, 5123, 3853, 1035, 27000, 1035, 2019, 1035, 4606, 1035, 1038, 1006, 1002, 4654, 18098, 1010, 1002, 2197, 1027, 6270, 1007, 1063, 1002, 4654, 18098, 1027, 3653, 2290, 1035, 5672, 1006, 1000, 1013, 1032, 1055, 1013, 1000, 1010, 1000, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Redis/Connections/PhpRedisConnection.php
PhpRedisConnection.subscribe
public function subscribe($channels, Closure $callback) { $this->client->subscribe((array) $channels, function ($redis, $channel, $message) use ($callback) { $callback($message, $channel); }); }
php
public function subscribe($channels, Closure $callback) { $this->client->subscribe((array) $channels, function ($redis, $channel, $message) use ($callback) { $callback($message, $channel); }); }
[ "public", "function", "subscribe", "(", "$", "channels", ",", "Closure", "$", "callback", ")", "{", "$", "this", "->", "client", "->", "subscribe", "(", "(", "array", ")", "$", "channels", ",", "function", "(", "$", "redis", ",", "$", "channel", ",", ...
Subscribe to a set of given channels for messages. @param array|string $channels @param \Closure $callback @return void
[ "Subscribe", "to", "a", "set", "of", "given", "channels", "for", "messages", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Redis/Connections/PhpRedisConnection.php#L357-L362
train
Subscribe to a list of channels
[ 30522, 2270, 3853, 4942, 29234, 1006, 1002, 6833, 1010, 8503, 1002, 2655, 5963, 1007, 1063, 1002, 2023, 1011, 1028, 7396, 1011, 1028, 4942, 29234, 1006, 1006, 9140, 1007, 1002, 6833, 1010, 3853, 1006, 1002, 2417, 2483, 1010, 1002, 3149, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Debug/ErrorHandler.php
ErrorHandler.throwAt
public function throwAt($levels, $replace = false) { $prev = $this->thrownErrors; $this->thrownErrors = ($levels | E_RECOVERABLE_ERROR | E_USER_ERROR) & ~E_USER_DEPRECATED & ~E_DEPRECATED; if (!$replace) { $this->thrownErrors |= $prev; } $this->reRegister($prev | ...
php
public function throwAt($levels, $replace = false) { $prev = $this->thrownErrors; $this->thrownErrors = ($levels | E_RECOVERABLE_ERROR | E_USER_ERROR) & ~E_USER_DEPRECATED & ~E_DEPRECATED; if (!$replace) { $this->thrownErrors |= $prev; } $this->reRegister($prev | ...
[ "public", "function", "throwAt", "(", "$", "levels", ",", "$", "replace", "=", "false", ")", "{", "$", "prev", "=", "$", "this", "->", "thrownErrors", ";", "$", "this", "->", "thrownErrors", "=", "(", "$", "levels", "|", "E_RECOVERABLE_ERROR", "|", "E_...
Sets the PHP error levels that throw an exception when a PHP error occurs. @param int $levels A bit field of E_* constants for thrown errors @param bool $replace Replace or amend the previous value @return int The previous value
[ "Sets", "the", "PHP", "error", "levels", "that", "throw", "an", "exception", "when", "a", "PHP", "error", "occurs", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Debug/ErrorHandler.php#L280-L290
train
Throw all errors at the specified levels
[ 30522, 2270, 3853, 5466, 4017, 1006, 1002, 3798, 1010, 1002, 5672, 1027, 6270, 1007, 1063, 1002, 3653, 2615, 1027, 1002, 2023, 1011, 1028, 6908, 2121, 29165, 2015, 1025, 1002, 2023, 1011, 1028, 6908, 2121, 29165, 2015, 1027, 1006, 1002, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Translation/Translator.php
Translator.addResource
public function addResource($format, $resource, $locale, $domain = null) { if (null === $domain) { $domain = 'messages'; } $this->assertValidLocale($locale); $this->resources[$locale][] = [$format, $resource, $domain]; if (\in_array($locale, $this->fallbackLoca...
php
public function addResource($format, $resource, $locale, $domain = null) { if (null === $domain) { $domain = 'messages'; } $this->assertValidLocale($locale); $this->resources[$locale][] = [$format, $resource, $domain]; if (\in_array($locale, $this->fallbackLoca...
[ "public", "function", "addResource", "(", "$", "format", ",", "$", "resource", ",", "$", "locale", ",", "$", "domain", "=", "null", ")", "{", "if", "(", "null", "===", "$", "domain", ")", "{", "$", "domain", "=", "'messages'", ";", "}", "$", "this"...
Adds a Resource. @param string $format The name of the loader (@see addLoader()) @param mixed $resource The resource name @param string $locale The locale @param string $domain The domain @throws InvalidArgumentException If the locale contains invalid characters
[ "Adds", "a", "Resource", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Translation/Translator.php#L129-L144
train
Adds a resource to the list of resources
[ 30522, 2270, 3853, 5587, 6072, 8162, 3401, 1006, 1002, 4289, 1010, 1002, 7692, 1010, 1002, 2334, 2063, 1010, 1002, 5884, 1027, 19701, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 1027, 1002, 5884, 1007, 1063, 1002, 5884, 1027, 1005, 7696, 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/HttpFoundation/Session/Storage/Proxy/SessionHandlerProxy.php
SessionHandlerProxy.updateTimestamp
public function updateTimestamp($sessionId, $data) { return $this->handler instanceof \SessionUpdateTimestampHandlerInterface ? $this->handler->updateTimestamp($sessionId, $data) : $this->write($sessionId, $data); }
php
public function updateTimestamp($sessionId, $data) { return $this->handler instanceof \SessionUpdateTimestampHandlerInterface ? $this->handler->updateTimestamp($sessionId, $data) : $this->write($sessionId, $data); }
[ "public", "function", "updateTimestamp", "(", "$", "sessionId", ",", "$", "data", ")", "{", "return", "$", "this", "->", "handler", "instanceof", "\\", "SessionUpdateTimestampHandlerInterface", "?", "$", "this", "->", "handler", "->", "updateTimestamp", "(", "$"...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/SessionHandlerProxy.php#L97-L100
train
Update the timestamp of the session
[ 30522, 2270, 3853, 10651, 7292, 9153, 8737, 1006, 1002, 5219, 3593, 1010, 1002, 2951, 1007, 1063, 2709, 1002, 2023, 1011, 1028, 28213, 6013, 11253, 1032, 5219, 6279, 13701, 7292, 9153, 8737, 11774, 3917, 18447, 2121, 12172, 1029, 1002, 2023...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Foundation/Console/VendorPublishCommand.php
VendorPublishCommand.createParentDirectory
protected function createParentDirectory($directory) { if (! $this->files->isDirectory($directory)) { $this->files->makeDirectory($directory, 0755, true); } }
php
protected function createParentDirectory($directory) { if (! $this->files->isDirectory($directory)) { $this->files->makeDirectory($directory, 0755, true); } }
[ "protected", "function", "createParentDirectory", "(", "$", "directory", ")", "{", "if", "(", "!", "$", "this", "->", "files", "->", "isDirectory", "(", "$", "directory", ")", ")", "{", "$", "this", "->", "files", "->", "makeDirectory", "(", "$", "direct...
Create the directory to house the published files if needed. @param string $directory @return void
[ "Create", "the", "directory", "to", "house", "the", "published", "files", "if", "needed", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Console/VendorPublishCommand.php#L252-L257
train
Create parent directory if not exists
[ 30522, 5123, 3853, 3443, 19362, 4765, 4305, 2890, 16761, 2100, 1006, 1002, 14176, 1007, 1063, 2065, 1006, 999, 1002, 2023, 1011, 1028, 6764, 1011, 1028, 2003, 4305, 2890, 16761, 2100, 1006, 1002, 14176, 1007, 1007, 1063, 1002, 2023, 1011, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
overtrue/wechat
src/OpenWork/Application.php
Application.work
public function work(string $authCorpId, string $permanentCode): Work { return new Work($authCorpId, $permanentCode, $this); }
php
public function work(string $authCorpId, string $permanentCode): Work { return new Work($authCorpId, $permanentCode, $this); }
[ "public", "function", "work", "(", "string", "$", "authCorpId", ",", "string", "$", "permanentCode", ")", ":", "Work", "{", "return", "new", "Work", "(", "$", "authCorpId", ",", "$", "permanentCode", ",", "$", "this", ")", ";", "}" ]
@param string $authCorpId 企业 corp_id @param string $permanentCode 企业永久授权码 @return Work
[ "@param", "string", "$authCorpId", "企业", "corp_id", "@param", "string", "$permanentCode", "企业永久授权码" ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OpenWork/Application.php#L55-L58
train
Work the page
[ 30522, 2270, 3853, 2147, 1006, 5164, 1002, 8740, 2705, 24586, 3593, 1010, 5164, 1002, 4568, 16044, 1007, 1024, 2147, 1063, 2709, 2047, 2147, 1006, 1002, 8740, 2705, 24586, 3593, 1010, 1002, 4568, 16044, 1010, 1002, 2023, 1007, 1025, 1065, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Framework/Flex/Storage/SimpleStorage.php
SimpleStorage.buildIndex
protected function buildIndex(): array { $file = $this->getFile($this->getStoragePath()); $modified = $file->modified(); $this->data = (array) $file->content(); $list = []; foreach ($this->data as $key => $info) { $list[$key] = [ 'storage_key' =>...
php
protected function buildIndex(): array { $file = $this->getFile($this->getStoragePath()); $modified = $file->modified(); $this->data = (array) $file->content(); $list = []; foreach ($this->data as $key => $info) { $list[$key] = [ 'storage_key' =>...
[ "protected", "function", "buildIndex", "(", ")", ":", "array", "{", "$", "file", "=", "$", "this", "->", "getFile", "(", "$", "this", "->", "getStoragePath", "(", ")", ")", ";", "$", "modified", "=", "$", "file", "->", "modified", "(", ")", ";", "$...
Returns list of all stored keys in [key => timestamp] pairs. @return array
[ "Returns", "list", "of", "all", "stored", "keys", "in", "[", "key", "=", ">", "timestamp", "]", "pairs", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Framework/Flex/Storage/SimpleStorage.php#L284-L300
train
Build the index array
[ 30522, 5123, 3853, 3857, 22254, 10288, 1006, 1007, 1024, 9140, 1063, 1002, 5371, 1027, 1002, 2023, 1011, 1028, 2131, 8873, 2571, 1006, 1002, 2023, 1011, 1028, 4152, 4263, 4270, 15069, 1006, 1007, 1007, 1025, 1002, 6310, 1027, 1002, 5371, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Form/Form.php
Form.getPropertyPath
public function getPropertyPath() { if ($this->propertyPath || $this->propertyPath = $this->config->getPropertyPath()) { return $this->propertyPath; } if (null === $this->name || '' === $this->name) { return null; } $parent = $this->parent; ...
php
public function getPropertyPath() { if ($this->propertyPath || $this->propertyPath = $this->config->getPropertyPath()) { return $this->propertyPath; } if (null === $this->name || '' === $this->name) { return null; } $parent = $this->parent; ...
[ "public", "function", "getPropertyPath", "(", ")", "{", "if", "(", "$", "this", "->", "propertyPath", "||", "$", "this", "->", "propertyPath", "=", "$", "this", "->", "config", "->", "getPropertyPath", "(", ")", ")", "{", "return", "$", "this", "->", "...
{@inheritdoc}
[ "{" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/Form.php#L214-L237
train
Get PropertyPath.
[ 30522, 2270, 3853, 2131, 21572, 4842, 3723, 15069, 1006, 1007, 1063, 2065, 1006, 1002, 2023, 1011, 1028, 3200, 15069, 1064, 1064, 1002, 2023, 1011, 1028, 3200, 15069, 1027, 1002, 2023, 1011, 1028, 9530, 8873, 2290, 1011, 1028, 2131, 21572, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Matcher/Dumper/StaticPrefixCollection.php
StaticPrefixCollection.populateCollection
public function populateCollection(RouteCollection $routes): RouteCollection { foreach ($this->items as $route) { if ($route instanceof self) { $route->populateCollection($routes); } else { $routes->add(...$route); } } retu...
php
public function populateCollection(RouteCollection $routes): RouteCollection { foreach ($this->items as $route) { if ($route instanceof self) { $route->populateCollection($routes); } else { $routes->add(...$route); } } retu...
[ "public", "function", "populateCollection", "(", "RouteCollection", "$", "routes", ")", ":", "RouteCollection", "{", "foreach", "(", "$", "this", "->", "items", "as", "$", "route", ")", "{", "if", "(", "$", "route", "instanceof", "self", ")", "{", "$", "...
Linearizes back a set of nested routes into a collection.
[ "Linearizes", "back", "a", "set", "of", "nested", "routes", "into", "a", "collection", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Routing/Matcher/Dumper/StaticPrefixCollection.php#L129-L140
train
Populates RouteCollection with Route objects
[ 30522, 2270, 3853, 3769, 9869, 26895, 18491, 1006, 2799, 26895, 18491, 1002, 5847, 1007, 1024, 2799, 26895, 30524, 1011, 1028, 5167, 2004, 1002, 2799, 1007, 1063, 2065, 1006, 1002, 2799, 6013, 11253, 2969, 1007, 1063, 1002, 2799, 1011, 1028...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
plugins/Insights/API.php
API.getInsights
public function getInsights( $idSite, $period, $date, $reportUniqueId, $segment = false, $limitIncreaser = 5, $limitDecreaser = 5, $filterBy = '', $minImpactPercent = 2, $minGrowthPercent = 20, $comparedToXPeriods = 1, $orderBy = 'absolute') { Piwik::checkUserHasViewAccess(array($idS...
php
public function getInsights( $idSite, $period, $date, $reportUniqueId, $segment = false, $limitIncreaser = 5, $limitDecreaser = 5, $filterBy = '', $minImpactPercent = 2, $minGrowthPercent = 20, $comparedToXPeriods = 1, $orderBy = 'absolute') { Piwik::checkUserHasViewAccess(array($idS...
[ "public", "function", "getInsights", "(", "$", "idSite", ",", "$", "period", ",", "$", "date", ",", "$", "reportUniqueId", ",", "$", "segment", "=", "false", ",", "$", "limitIncreaser", "=", "5", ",", "$", "limitDecreaser", "=", "5", ",", "$", "filterB...
Generates insights by comparing the report for a given date/period with a different date and calculating the difference. The API can exclude rows which growth is not good enough or did not have enough impact. @param int $idSite @param string $period @param string $date @param string $reportUniqueId eg 'Actions_getPa...
[ "Generates", "insights", "by", "comparing", "the", "report", "for", "a", "given", "date", "/", "period", "with", "a", "different", "date", "and", "calculating", "the", "difference", ".", "The", "API", "can", "exclude", "rows", "which", "growth", "is", "not",...
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Insights/API.php#L254-L308
train
Returns the list of all the insights for a report
[ 30522, 2270, 3853, 2131, 7076, 18743, 2015, 1006, 1002, 8909, 28032, 2063, 1010, 1002, 2558, 1010, 1002, 3058, 1010, 1002, 3189, 19496, 4226, 3593, 1010, 1002, 6903, 1027, 6270, 1010, 1002, 5787, 2378, 16748, 11022, 2099, 1027, 1019, 1010, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/backend/classes/FormField.php
FormField.resolveModelAttribute
public function resolveModelAttribute($model, $attribute = null) { if ($attribute === null) { $attribute = $this->valueFrom ?: $this->fieldName; } $parts = is_array($attribute) ? $attribute : HtmlHelper::nameToArray($attribute); $last = array_pop($parts); foreac...
php
public function resolveModelAttribute($model, $attribute = null) { if ($attribute === null) { $attribute = $this->valueFrom ?: $this->fieldName; } $parts = is_array($attribute) ? $attribute : HtmlHelper::nameToArray($attribute); $last = array_pop($parts); foreac...
[ "public", "function", "resolveModelAttribute", "(", "$", "model", ",", "$", "attribute", "=", "null", ")", "{", "if", "(", "$", "attribute", "===", "null", ")", "{", "$", "attribute", "=", "$", "this", "->", "valueFrom", "?", ":", "$", "this", "->", ...
Returns the final model and attribute name of a nested attribute. Eg: list($model, $attribute) = $this->resolveAttribute('person[phone]'); @param string $attribute. @return array
[ "Returns", "the", "final", "model", "and", "attribute", "name", "of", "a", "nested", "attribute", ".", "Eg", ":" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/classes/FormField.php#L653-L667
train
Resolves the value of the attribute of the model
[ 30522, 2270, 3853, 10663, 5302, 9247, 19321, 3089, 8569, 2618, 1006, 1002, 2944, 1010, 1002, 17961, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 17961, 1027, 1027, 1027, 19701, 1007, 1063, 1002, 17961, 1027, 1002, 2023, 1011, 1028, 3643, 1969...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/GeoIp2/LocationProvider/GeoIp2/Php.php
Php.getSupportedLocationInfo
public function getSupportedLocationInfo() { $result = array(); // country & continent info always available $result[self::CONTINENT_CODE_KEY] = true; $result[self::CONTINENT_NAME_KEY] = true; $result[self::COUNTRY_CODE_KEY] = true; $result[self::COUNTRY_NAME_KEY] = ...
php
public function getSupportedLocationInfo() { $result = array(); // country & continent info always available $result[self::CONTINENT_CODE_KEY] = true; $result[self::CONTINENT_NAME_KEY] = true; $result[self::COUNTRY_CODE_KEY] = true; $result[self::COUNTRY_NAME_KEY] = ...
[ "public", "function", "getSupportedLocationInfo", "(", ")", "{", "$", "result", "=", "array", "(", ")", ";", "// country & continent info always available", "$", "result", "[", "self", "::", "CONTINENT_CODE_KEY", "]", "=", "true", ";", "$", "result", "[", "self"...
Returns an array describing the types of location information this provider will return. The location info this provider supports depends on what GeoIP databases it can find. This provider will always support country & continent information. If a region database is found, then region code & name information will be ...
[ "Returns", "an", "array", "describing", "the", "types", "of", "location", "information", "this", "provider", "will", "return", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php#L221-L259
train
Returns the list of location information available in the database
[ 30522, 2270, 3853, 4152, 6279, 6442, 2098, 4135, 10719, 2378, 14876, 1006, 1007, 1063, 1002, 2765, 1027, 9140, 1006, 1007, 1025, 1013, 1013, 2406, 1004, 9983, 18558, 2467, 2800, 1002, 2765, 1031, 2969, 1024, 1024, 9983, 1035, 3642, 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/Auth/Access/Gate.php
Gate.callBeforeCallbacks
protected function callBeforeCallbacks($user, $ability, array $arguments) { foreach ($this->beforeCallbacks as $before) { if (! $this->canBeCalledWithUser($user, $before)) { continue; } if (! is_null($result = $before($user, $ability, $arguments))) { ...
php
protected function callBeforeCallbacks($user, $ability, array $arguments) { foreach ($this->beforeCallbacks as $before) { if (! $this->canBeCalledWithUser($user, $before)) { continue; } if (! is_null($result = $before($user, $ability, $arguments))) { ...
[ "protected", "function", "callBeforeCallbacks", "(", "$", "user", ",", "$", "ability", ",", "array", "$", "arguments", ")", "{", "foreach", "(", "$", "this", "->", "beforeCallbacks", "as", "$", "before", ")", "{", "if", "(", "!", "$", "this", "->", "ca...
Call all of the before callbacks and return if a result is given. @param \Illuminate\Contracts\Auth\Authenticatable|null $user @param string $ability @param array $arguments @return bool|null
[ "Call", "all", "of", "the", "before", "callbacks", "and", "return", "if", "a", "result", "is", "given", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/Access/Gate.php#L463-L474
train
Call all the before callbacks
[ 30522, 5123, 3853, 2655, 4783, 29278, 19281, 3363, 12221, 1006, 1002, 5310, 1010, 1002, 3754, 1010, 9140, 1002, 9918, 1007, 1063, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 2077, 9289, 20850, 8684, 2015, 2004, 1002, 2077, 1007, 1063, 2065, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
octobercms/october
modules/system/ServiceProvider.php
ServiceProvider.registerBackendNavigation
protected function registerBackendNavigation() { BackendMenu::registerCallback(function ($manager) { $manager->registerMenuItems('October.System', [ 'system' => [ 'label' => 'system::lang.settings.menu_label', 'icon' => 'icon-c...
php
protected function registerBackendNavigation() { BackendMenu::registerCallback(function ($manager) { $manager->registerMenuItems('October.System', [ 'system' => [ 'label' => 'system::lang.settings.menu_label', 'icon' => 'icon-c...
[ "protected", "function", "registerBackendNavigation", "(", ")", "{", "BackendMenu", "::", "registerCallback", "(", "function", "(", "$", "manager", ")", "{", "$", "manager", "->", "registerMenuItems", "(", "'October.System'", ",", "[", "'system'", "=>", "[", "'l...
/* Register navigation
[ "/", "*", "Register", "navigation" ]
3118660d834f161d513da08477be92281a2eb96a
https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/ServiceProvider.php#L341-L376
train
Register the backend navigation
[ 30522, 5123, 3853, 4236, 5963, 10497, 2532, 5737, 12540, 1006, 1007, 1063, 2067, 10497, 3549, 2226, 1024, 1024, 4236, 9289, 20850, 8684, 1006, 3853, 1006, 1002, 3208, 1007, 1063, 1002, 3208, 1011, 1028, 4236, 3549, 14663, 6633, 2015, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
symfony/symfony
src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php
RecursiveContextualValidator.validateEachObjectIn
private function validateEachObjectIn($collection, $propertyPath, array $groups, ExecutionContextInterface $context) { foreach ($collection as $key => $value) { if (\is_array($value)) { // Also traverse nested arrays $this->validateEachObjectIn( ...
php
private function validateEachObjectIn($collection, $propertyPath, array $groups, ExecutionContextInterface $context) { foreach ($collection as $key => $value) { if (\is_array($value)) { // Also traverse nested arrays $this->validateEachObjectIn( ...
[ "private", "function", "validateEachObjectIn", "(", "$", "collection", ",", "$", "propertyPath", ",", "array", "$", "groups", ",", "ExecutionContextInterface", "$", "context", ")", "{", "foreach", "(", "$", "collection", "as", "$", "key", "=>", "$", "value", ...
Validates each object in a collection against the constraints defined for their classes. Nested arrays are also iterated. @param iterable $collection The collection @param string $propertyPath The current property path @param (string|GroupSequence)[] $groups The validated ...
[ "Validates", "each", "object", "in", "a", "collection", "against", "the", "constraints", "defined", "for", "their", "classes", "." ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php#L363-L389
train
Validate each object in the collection
[ 30522, 2797, 3853, 9398, 3686, 5243, 9905, 2497, 20614, 2378, 1006, 1002, 3074, 1010, 1002, 3200, 15069, 1010, 9140, 1002, 2967, 1010, 7781, 8663, 18209, 18447, 2121, 12172, 1002, 6123, 1007, 1063, 18921, 6776, 1006, 1002, 3074, 2004, 1002,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Mail.php
Zend_Mail.addBcc
public function addBcc($email) { if (!is_array($email)) { $email = array($email); } foreach ($email as $recipient) { $this->_addRecipientAndHeader('Bcc', $recipient, ''); } return $this; }
php
public function addBcc($email) { if (!is_array($email)) { $email = array($email); } foreach ($email as $recipient) { $this->_addRecipientAndHeader('Bcc', $recipient, ''); } return $this; }
[ "public", "function", "addBcc", "(", "$", "email", ")", "{", "if", "(", "!", "is_array", "(", "$", "email", ")", ")", "{", "$", "email", "=", "array", "(", "$", "email", ")", ";", "}", "foreach", "(", "$", "email", "as", "$", "recipient", ")", ...
Adds Bcc recipient, $email can be an array, or a single string address @param string|array $email @return Zend_Mail Provides fluent interface
[ "Adds", "Bcc", "recipient", "$email", "can", "be", "an", "array", "or", "a", "single", "string", "address" ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail.php#L611-L622
train
Adds Bcc recipients to the message
[ 30522, 2270, 3853, 5587, 9818, 2278, 1006, 1002, 10373, 1007, 1063, 2065, 1006, 999, 2003, 1035, 9140, 1006, 1002, 10373, 1007, 1007, 1063, 1002, 10373, 1027, 9140, 1006, 1002, 10373, 1007, 1025, 1065, 18921, 6776, 1006, 1002, 10373, 2004, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getgrav/grav
system/src/Grav/Framework/Form/Traits/FormTrait.php
FormTrait.getFlash
public function getFlash(): FormFlash { if (null === $this->flash) { /** @var Grav $grav */ $grav = Grav::instance(); $id = null; $user = $grav['user'] ?? null; if (isset($user)) { $rememberState = $this->getBlueprint()->get('form/...
php
public function getFlash(): FormFlash { if (null === $this->flash) { /** @var Grav $grav */ $grav = Grav::instance(); $id = null; $user = $grav['user'] ?? null; if (isset($user)) { $rememberState = $this->getBlueprint()->get('form/...
[ "public", "function", "getFlash", "(", ")", ":", "FormFlash", "{", "if", "(", "null", "===", "$", "this", "->", "flash", ")", "{", "/** @var Grav $grav */", "$", "grav", "=", "Grav", "::", "instance", "(", ")", ";", "$", "id", "=", "null", ";", "$", ...
Get form flash object. @return FormFlash
[ "Get", "form", "flash", "object", "." ]
1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72
https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Framework/Form/Traits/FormTrait.php#L336-L366
train
Get FormFlash instance
[ 30522, 2270, 3853, 2131, 10258, 11823, 1006, 1007, 1024, 2433, 10258, 11823, 1063, 2065, 1006, 19701, 1027, 1027, 1027, 1002, 2023, 1011, 1028, 5956, 1007, 1063, 1013, 1008, 1008, 1030, 13075, 24665, 11431, 1002, 24665, 11431, 1008, 1013, 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/Workflow/Registry.php
Registry.all
public function all($subject): array { $matched = []; foreach ($this->workflows as list($workflow, $supportStrategy)) { if ($supportStrategy->supports($workflow, $subject)) { $matched[] = $workflow; } } return $matched; }
php
public function all($subject): array { $matched = []; foreach ($this->workflows as list($workflow, $supportStrategy)) { if ($supportStrategy->supports($workflow, $subject)) { $matched[] = $workflow; } } return $matched; }
[ "public", "function", "all", "(", "$", "subject", ")", ":", "array", "{", "$", "matched", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "workflows", "as", "list", "(", "$", "workflow", ",", "$", "supportStrategy", ")", ")", "{", "if", "(",...
@param object $subject @return Workflow[]
[ "@param", "object", "$subject" ]
b82b09eefb084e487997f4af753400d721edd0a8
https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Workflow/Registry.php#L74-L84
train
Returns all workflows that support the subject
[ 30522, 2270, 3853, 2035, 1006, 1002, 3395, 1007, 1024, 9140, 1063, 1002, 10349, 1027, 1031, 1033, 1025, 18921, 6776, 1006, 1002, 2023, 1011, 1028, 2147, 12314, 2015, 2004, 2862, 1006, 1002, 2147, 12314, 1010, 1002, 6753, 6494, 2618, 6292, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Database/Concerns/BuildsQueries.php
BuildsQueries.when
public function when($value, $callback, $default = null) { if ($value) { return $callback($this, $value) ?: $this; } elseif ($default) { return $default($this, $value) ?: $this; } return $this; }
php
public function when($value, $callback, $default = null) { if ($value) { return $callback($this, $value) ?: $this; } elseif ($default) { return $default($this, $value) ?: $this; } return $this; }
[ "public", "function", "when", "(", "$", "value", ",", "$", "callback", ",", "$", "default", "=", "null", ")", "{", "if", "(", "$", "value", ")", "{", "return", "$", "callback", "(", "$", "this", ",", "$", "value", ")", "?", ":", "$", "this", ";...
Apply the callback's query changes if the given "value" is true. @param mixed $value @param callable $callback @param callable $default @return mixed|$this
[ "Apply", "the", "callback", "s", "query", "changes", "if", "the", "given", "value", "is", "true", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Concerns/BuildsQueries.php#L88-L97
train
When - Callback - Callback
[ 30522, 2270, 3853, 2043, 1006, 1002, 3643, 1010, 1002, 2655, 5963, 1010, 1002, 12398, 1027, 19701, 1007, 1063, 2065, 1006, 1002, 3643, 1007, 1063, 2709, 1002, 2655, 5963, 1006, 1002, 2023, 1010, 1002, 3643, 1007, 1029, 1024, 1002, 2023, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
matomo-org/matomo
libs/Zend/Db/Table/Rowset/Abstract.php
Zend_Db_Table_Rowset_Abstract.setTable
public function setTable(Zend_Db_Table_Abstract $table) { $this->_table = $table; $this->_connected = false; // @todo This works only if we have iterated through // the result set once to instantiate the rows. foreach ($this as $row) { $connected = $row->setTable(...
php
public function setTable(Zend_Db_Table_Abstract $table) { $this->_table = $table; $this->_connected = false; // @todo This works only if we have iterated through // the result set once to instantiate the rows. foreach ($this as $row) { $connected = $row->setTable(...
[ "public", "function", "setTable", "(", "Zend_Db_Table_Abstract", "$", "table", ")", "{", "$", "this", "->", "_table", "=", "$", "table", ";", "$", "this", "->", "_connected", "=", "false", ";", "// @todo This works only if we have iterated through", "// the result s...
Set the table object, to re-establish a live connection to the database for a Rowset that has been de-serialized. @param Zend_Db_Table_Abstract $table @return boolean @throws Zend_Db_Table_Row_Exception
[ "Set", "the", "table", "object", "to", "re", "-", "establish", "a", "live", "connection", "to", "the", "database", "for", "a", "Rowset", "that", "has", "been", "de", "-", "serialized", "." ]
72df150735664275a60a7861e468c6ff3b152a14
https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Table/Rowset/Abstract.php#L196-L209
train
Set the table
[ 30522, 2270, 3853, 2275, 10880, 1006, 16729, 2094, 1035, 16962, 1035, 2795, 1035, 10061, 1002, 2795, 1007, 1063, 1002, 2023, 1011, 1028, 1035, 2795, 1027, 1002, 2795, 1025, 1002, 2023, 1011, 1028, 1035, 4198, 1027, 6270, 1025, 1013, 1013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
laravel/framework
src/Illuminate/Validation/Concerns/ValidatesAttributes.php
ValidatesAttributes.prepareUniqueId
protected function prepareUniqueId($id) { if (preg_match('/\[(.*)\]/', $id, $matches)) { $id = $this->getValue($matches[1]); } if (strtolower($id) === 'null') { $id = null; } if (filter_var($id, FILTER_VALIDATE_INT) !== false) { $id = (in...
php
protected function prepareUniqueId($id) { if (preg_match('/\[(.*)\]/', $id, $matches)) { $id = $this->getValue($matches[1]); } if (strtolower($id) === 'null') { $id = null; } if (filter_var($id, FILTER_VALIDATE_INT) !== false) { $id = (in...
[ "protected", "function", "prepareUniqueId", "(", "$", "id", ")", "{", "if", "(", "preg_match", "(", "'/\\[(.*)\\]/'", ",", "$", "id", ",", "$", "matches", ")", ")", "{", "$", "id", "=", "$", "this", "->", "getValue", "(", "$", "matches", "[", "1", ...
Prepare the given ID for querying. @param mixed $id @return int
[ "Prepare", "the", "given", "ID", "for", "querying", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L755-L770
train
Prepare Unique ID
[ 30522, 5123, 3853, 7374, 19496, 4226, 3593, 1006, 1002, 8909, 1007, 1063, 2065, 1006, 3653, 2290, 1035, 2674, 1006, 1005, 1013, 1032, 1031, 1006, 1012, 1008, 1007, 1032, 1033, 1013, 1005, 1010, 1002, 8909, 1010, 1002, 3503, 1007, 1007, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
guzzle/guzzle
src/Middleware.php
Middleware.tap
public static function tap(callable $before = null, callable $after = null) { return function (callable $handler) use ($before, $after) { return function ($request, array $options) use ($handler, $before, $after) { if ($before) { $before($request, $options); ...
php
public static function tap(callable $before = null, callable $after = null) { return function (callable $handler) use ($before, $after) { return function ($request, array $options) use ($handler, $before, $after) { if ($before) { $before($request, $options); ...
[ "public", "static", "function", "tap", "(", "callable", "$", "before", "=", "null", ",", "callable", "$", "after", "=", "null", ")", "{", "return", "function", "(", "callable", "$", "handler", ")", "use", "(", "$", "before", ",", "$", "after", ")", "...
Middleware that invokes a callback before and after sending a request. The provided listener cannot modify or alter the response. It simply "taps" into the chain to be notified before returning the promise. The before listener accepts a request and options array, and the after listener accepts a request, options array...
[ "Middleware", "that", "invokes", "a", "callback", "before", "and", "after", "sending", "a", "request", "." ]
bf595424e4d442a190582e088985dc835a789071
https://github.com/guzzle/guzzle/blob/bf595424e4d442a190582e088985dc835a789071/src/Middleware.php#L126-L140
train
Returns a closure that will be used to tap the request
[ 30522, 2270, 10763, 3853, 11112, 1006, 2655, 3085, 30524, 1010, 1002, 2077, 1010, 1002, 2044, 1007, 1063, 2065, 1006, 1002, 2077, 1007, 1063, 1002, 2077, 1006, 1002, 5227, 1010, 1002, 7047, 1007, 1025, 1065, 1002, 3433, 1027, 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...