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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
matomo-org/matomo | core/DataTable.php | DataTable.getSerialized | public function getSerialized($maximumRowsInDataTable = null,
$maximumRowsInSubDataTable = null,
$columnToSortByBeforeTruncation = null,
&$aSerializedDataTable = array())
{
static $depth = 0;
// mak... | php | public function getSerialized($maximumRowsInDataTable = null,
$maximumRowsInSubDataTable = null,
$columnToSortByBeforeTruncation = null,
&$aSerializedDataTable = array())
{
static $depth = 0;
// mak... | [
"public",
"function",
"getSerialized",
"(",
"$",
"maximumRowsInDataTable",
"=",
"null",
",",
"$",
"maximumRowsInSubDataTable",
"=",
"null",
",",
"$",
"columnToSortByBeforeTruncation",
"=",
"null",
",",
"&",
"$",
"aSerializedDataTable",
"=",
"array",
"(",
")",
")",... | Serializes an entire DataTable hierarchy and returns the array of serialized DataTables.
The first element in the returned array will be the serialized representation of this DataTable.
Every subsequent element will be a serialized subtable.
This DataTable and subtables can optionally be truncated before being serial... | [
"Serializes",
"an",
"entire",
"DataTable",
"hierarchy",
"and",
"returns",
"the",
"array",
"of",
"serialized",
"DataTables",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataTable.php#L1280-L1348 | train | Returns the serialized datatable | [
30522,
2270,
3853,
4152,
11610,
28931,
1006,
1002,
4555,
10524,
11493,
2850,
29336,
3085,
1027,
19701,
1010,
1002,
4555,
10524,
11493,
6342,
2497,
2850,
29336,
3085,
1027,
19701,
1010,
1002,
5930,
13122,
11589,
3762,
4783,
29278,
3388,
15532,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
symfony/symfony | src/Symfony/Component/OptionsResolver/OptionsResolver.php | OptionsResolver.setRequired | public function setRequired($optionNames)
{
if ($this->locked) {
throw new AccessException('Options cannot be made required from a lazy option or normalizer.');
}
foreach ((array) $optionNames as $option) {
$this->defined[$option] = true;
$this->required[... | php | public function setRequired($optionNames)
{
if ($this->locked) {
throw new AccessException('Options cannot be made required from a lazy option or normalizer.');
}
foreach ((array) $optionNames as $option) {
$this->defined[$option] = true;
$this->required[... | [
"public",
"function",
"setRequired",
"(",
"$",
"optionNames",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"locked",
")",
"{",
"throw",
"new",
"AccessException",
"(",
"'Options cannot be made required from a lazy option or normalizer.'",
")",
";",
"}",
"foreach",
"(",
... | Marks one or more options as required.
@param string|string[] $optionNames One or more option names
@return $this
@throws AccessException If called from a lazy option or normalizer | [
"Marks",
"one",
"or",
"more",
"options",
"as",
"required",
"."
] | b82b09eefb084e487997f4af753400d721edd0a8 | https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/OptionsResolver/OptionsResolver.php#L274-L286 | train | Set required options | [
30522,
2270,
3853,
2275,
2890,
15549,
5596,
1006,
1002,
5724,
18442,
2015,
1007,
1063,
2065,
1006,
1002,
2023,
1011,
1028,
5299,
1007,
1063,
5466,
2047,
3229,
10288,
24422,
1006,
1005,
7047,
3685,
2022,
2081,
3223,
2013,
1037,
13971,
5724,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.pageAction | public function pageAction()
{
if (!$this->action) {
return;
}
$this->suppressView = true;
$this->execPageAction($this->action, $this->params);
} | php | public function pageAction()
{
if (!$this->action) {
return;
}
$this->suppressView = true;
$this->execPageAction($this->action, $this->params);
} | [
"public",
"function",
"pageAction",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"action",
")",
"{",
"return",
";",
"}",
"$",
"this",
"->",
"suppressView",
"=",
"true",
";",
"$",
"this",
"->",
"execPageAction",
"(",
"$",
"this",
"->",
"action",
... | Invokes the current controller action without rendering a view,
used by AJAX handler that may rely on the logic inside the action. | [
"Invokes",
"the",
"current",
"controller",
"action",
"without",
"rendering",
"a",
"view",
"used",
"by",
"AJAX",
"handler",
"that",
"may",
"rely",
"on",
"the",
"logic",
"inside",
"the",
"action",
"."
] | 3118660d834f161d513da08477be92281a2eb96a | https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/classes/Controller.php#L321-L329 | train | Page Action - Execute action | [
30522,
2270,
3853,
3931,
18908,
3258,
1006,
30524,
1025,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/Migrations/Migrator.php | Migrator.runDown | protected function runDown($file, $migration, $pretend)
{
// First we will get the file name of the migration so we can resolve out an
// instance of the migration. Once we get an instance we can either run a
// pretend execution of the migration or we can run the real migration.
$in... | php | protected function runDown($file, $migration, $pretend)
{
// First we will get the file name of the migration so we can resolve out an
// instance of the migration. Once we get an instance we can either run a
// pretend execution of the migration or we can run the real migration.
$in... | [
"protected",
"function",
"runDown",
"(",
"$",
"file",
",",
"$",
"migration",
",",
"$",
"pretend",
")",
"{",
"// First we will get the file name of the migration so we can resolve out an",
"// instance of the migration. Once we get an instance we can either run a",
"// pretend executi... | Run "down" a migration instance.
@param string $file
@param object $migration
@param bool $pretend
@return void | [
"Run",
"down",
"a",
"migration",
"instance",
"."
] | 0e0a428a50fc8378e3f77d18f3caae76c19e8c7a | https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Migrations/Migrator.php#L343-L366 | train | Runs the down migration | [
30522,
5123,
3853,
2448,
7698,
1006,
1002,
5371,
1010,
1002,
9230,
1010,
1002,
9811,
1007,
1063,
1013,
1013,
2034,
2057,
2097,
2131,
1996,
5371,
2171,
1997,
1996,
9230,
2061,
2057,
2064,
10663,
2041,
2019,
1013,
1013,
6013,
1997,
1996,
92... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/Session/SaveHandler/DbTable.php | Zend_Session_SaveHandler_DbTable._getPrimary | protected function _getPrimary($id, $type = null)
{
$this->_setupPrimaryKey();
if ($type === null) {
$type = self::PRIMARY_TYPE_NUM;
}
$primaryArray = array();
foreach ($this->_primary as $index => $primary) {
switch ($this->_primaryAssignment[$inde... | php | protected function _getPrimary($id, $type = null)
{
$this->_setupPrimaryKey();
if ($type === null) {
$type = self::PRIMARY_TYPE_NUM;
}
$primaryArray = array();
foreach ($this->_primary as $index => $primary) {
switch ($this->_primaryAssignment[$inde... | [
"protected",
"function",
"_getPrimary",
"(",
"$",
"id",
",",
"$",
"type",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"_setupPrimaryKey",
"(",
")",
";",
"if",
"(",
"$",
"type",
"===",
"null",
")",
"{",
"$",
"type",
"=",
"self",
"::",
"PRIMARY_TYPE_NUM"... | Retrieve session table primary key values
@param string $id
@param string $type (optional; default: self::PRIMARY_TYPE_NUM)
@return array | [
"Retrieve",
"session",
"table",
"primary",
"key",
"values"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Session/SaveHandler/DbTable.php#L517-L562 | train | Returns array of session identifiers | [
30522,
5123,
3853,
1035,
2131,
18098,
9581,
2854,
1006,
1002,
8909,
1010,
1002,
2828,
1027,
19701,
1007,
1063,
1002,
2023,
1011,
1028,
1035,
16437,
18098,
9581,
2854,
14839,
1006,
1007,
1025,
2065,
1006,
1002,
2828,
1027,
1027,
1027,
19701,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
getgrav/grav | system/src/Grav/Common/Page/Medium/Medium.php | Medium.getThumbnail | protected function getThumbnail()
{
if (!$this->_thumbnail) {
$types = $this->thumbnailTypes;
if ($this->thumbnailType !== 'auto') {
array_unshift($types, $this->thumbnailType);
}
foreach ($types as $type) {
$thumb = $this->ge... | php | protected function getThumbnail()
{
if (!$this->_thumbnail) {
$types = $this->thumbnailTypes;
if ($this->thumbnailType !== 'auto') {
array_unshift($types, $this->thumbnailType);
}
foreach ($types as $type) {
$thumb = $this->ge... | [
"protected",
"function",
"getThumbnail",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_thumbnail",
")",
"{",
"$",
"types",
"=",
"$",
"this",
"->",
"thumbnailTypes",
";",
"if",
"(",
"$",
"this",
"->",
"thumbnailType",
"!==",
"'auto'",
")",
"{",
... | Get the thumbnail Medium object
@return ThumbnailImageMedium | [
"Get",
"the",
"thumbnail",
"Medium",
"object"
] | 1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72 | https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Page/Medium/Medium.php#L652-L677 | train | Get thumbnail image | [
30522,
5123,
3853,
2131,
2705,
25438,
25464,
1006,
1007,
1063,
2065,
1006,
999,
1002,
2023,
1011,
1028,
1035,
7639,
25464,
1007,
1063,
1002,
4127,
1027,
1002,
2023,
1011,
1028,
7639,
25464,
13874,
2015,
1025,
2065,
1006,
1002,
2023,
1011,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
matomo-org/matomo | libs/Zend/Cache/Backend/Sqlite.php | Zend_Cache_Backend_Sqlite.getIds | public function getIds()
{
$this->_checkAndBuildStructure();
$res = $this->_query("SELECT id FROM cache WHERE (expire=0 OR expire>" . time() . ")");
$result = array();
while ($id = @sqlite_fetch_single($res)) {
$result[] = $id;
}
return $result;
} | php | public function getIds()
{
$this->_checkAndBuildStructure();
$res = $this->_query("SELECT id FROM cache WHERE (expire=0 OR expire>" . time() . ")");
$result = array();
while ($id = @sqlite_fetch_single($res)) {
$result[] = $id;
}
return $result;
} | [
"public",
"function",
"getIds",
"(",
")",
"{",
"$",
"this",
"->",
"_checkAndBuildStructure",
"(",
")",
";",
"$",
"res",
"=",
"$",
"this",
"->",
"_query",
"(",
"\"SELECT id FROM cache WHERE (expire=0 OR expire>\"",
".",
"time",
"(",
")",
".",
"\")\"",
")",
";... | Return an array of stored cache ids
@return array array of stored cache ids (string) | [
"Return",
"an",
"array",
"of",
"stored",
"cache",
"ids"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Cache/Backend/Sqlite.php#L231-L240 | train | Get all the ids of the cache | [
30522,
2270,
3853,
2131,
9821,
1006,
1007,
1063,
1002,
2023,
1011,
1028,
1035,
4638,
5685,
8569,
4014,
5104,
18300,
5397,
1006,
1007,
1025,
1002,
24501,
1027,
1002,
2023,
1011,
1028,
1035,
23032,
1006,
1000,
7276,
8909,
2013,
17053,
2073,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
laravel/framework | src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php | MySqlGrammar.compileCreate | public function compileCreate(Blueprint $blueprint, Fluent $command, Connection $connection)
{
$sql = $this->compileCreateTable(
$blueprint, $command, $connection
);
// Once we have the primary SQL, we can add the encoding option to the SQL for
// the table. Then, we ca... | php | public function compileCreate(Blueprint $blueprint, Fluent $command, Connection $connection)
{
$sql = $this->compileCreateTable(
$blueprint, $command, $connection
);
// Once we have the primary SQL, we can add the encoding option to the SQL for
// the table. Then, we ca... | [
"public",
"function",
"compileCreate",
"(",
"Blueprint",
"$",
"blueprint",
",",
"Fluent",
"$",
"command",
",",
"Connection",
"$",
"connection",
")",
"{",
"$",
"sql",
"=",
"$",
"this",
"->",
"compileCreateTable",
"(",
"$",
"blueprint",
",",
"$",
"command",
... | Compile a create table command.
@param \Illuminate\Database\Schema\Blueprint $blueprint
@param \Illuminate\Support\Fluent $command
@param \Illuminate\Database\Connection $connection
@return string | [
"Compile",
"a",
"create",
"table",
"command",
"."
] | 0e0a428a50fc8378e3f77d18f3caae76c19e8c7a | https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php#L57-L76 | train | Compiles create table statement | [
30522,
2270,
3853,
4012,
22090,
16748,
3686,
1006,
2630,
16550,
1002,
2630,
16550,
1010,
19376,
1002,
3094,
1010,
4434,
1002,
4434,
1007,
1063,
1002,
29296,
1027,
1002,
2023,
1011,
1028,
4012,
22090,
16748,
3686,
10880,
1006,
1002,
2630,
16... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
laravel/framework | src/Illuminate/Database/Console/Migrations/RefreshCommand.php | RefreshCommand.runRollback | protected function runRollback($database, $path, $step)
{
$this->call('migrate:rollback', array_filter([
'--database' => $database,
'--path' => $path,
'--realpath' => $this->input->getOption('realpath'),
'--step' => $step,
'--force' => true,
... | php | protected function runRollback($database, $path, $step)
{
$this->call('migrate:rollback', array_filter([
'--database' => $database,
'--path' => $path,
'--realpath' => $this->input->getOption('realpath'),
'--step' => $step,
'--force' => true,
... | [
"protected",
"function",
"runRollback",
"(",
"$",
"database",
",",
"$",
"path",
",",
"$",
"step",
")",
"{",
"$",
"this",
"->",
"call",
"(",
"'migrate:rollback'",
",",
"array_filter",
"(",
"[",
"'--database'",
"=>",
"$",
"database",
",",
"'--path'",
"=>",
... | Run the rollback command.
@param string $database
@param string $path
@param int $step
@return void | [
"Run",
"the",
"rollback",
"command",
"."
] | 0e0a428a50fc8378e3f77d18f3caae76c19e8c7a | https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Console/Migrations/RefreshCommand.php#L79-L88 | train | Runs the rollback command on the next run | [
30522,
5123,
3853,
2448,
28402,
5963,
1006,
1002,
7809,
1010,
1002,
4130,
1010,
1002,
3357,
1007,
1063,
1002,
2023,
1011,
1028,
2655,
1006,
1005,
22806,
1024,
4897,
5963,
1005,
1010,
9140,
1035,
11307,
1006,
1031,
1005,
1011,
1011,
7809,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.php | Metrics.getUnit | public static function getUnit($column, $idSite)
{
$nameToUnit = array(
'_rate' => '%',
'revenue' => Site::getCurrencySymbolFor($idSite),
'_time_' => 's'
);
$unit = null;
/**
* Use this event to define units for custom metrics used in... | php | public static function getUnit($column, $idSite)
{
$nameToUnit = array(
'_rate' => '%',
'revenue' => Site::getCurrencySymbolFor($idSite),
'_time_' => 's'
);
$unit = null;
/**
* Use this event to define units for custom metrics used in... | [
"public",
"static",
"function",
"getUnit",
"(",
"$",
"column",
",",
"$",
"idSite",
")",
"{",
"$",
"nameToUnit",
"=",
"array",
"(",
"'_rate'",
"=>",
"'%'",
",",
"'revenue'",
"=>",
"Site",
"::",
"getCurrencySymbolFor",
"(",
"$",
"idSite",
")",
",",
"'_time... | Derive the unit name from a column name
@param $column
@param $idSite
@return string
@ignore | [
"Derive",
"the",
"unit",
"name",
"from",
"a",
"column",
"name"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Metrics.php#L236-L266 | train | Returns the unit name of the given column | [
30522,
2270,
10763,
3853,
2131,
19496,
2102,
1006,
1002,
5930,
1010,
1002,
8909,
28032,
2063,
1007,
1063,
1002,
2171,
24826,
3490,
2102,
1027,
9140,
1006,
1005,
1035,
3446,
1005,
1027,
1028,
1005,
1003,
1005,
1010,
1005,
6599,
1005,
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/Settings/Setting.php | Setting.setValue | public function setValue($value)
{
$this->checkHasEnoughWritePermission();
$config = $this->configureField();
$this->validateValue($value);
if ($config->transform && $config->transform instanceof \Closure) {
$value = call_user_func($config->transform, $value, $this);
... | php | public function setValue($value)
{
$this->checkHasEnoughWritePermission();
$config = $this->configureField();
$this->validateValue($value);
if ($config->transform && $config->transform instanceof \Closure) {
$value = call_user_func($config->transform, $value, $this);
... | [
"public",
"function",
"setValue",
"(",
"$",
"value",
")",
"{",
"$",
"this",
"->",
"checkHasEnoughWritePermission",
"(",
")",
";",
"$",
"config",
"=",
"$",
"this",
"->",
"configureField",
"(",
")",
";",
"$",
"this",
"->",
"validateValue",
"(",
"$",
"value... | Sets and persists this setting's value overwriting any existing value.
Before a value is actually set it will be made sure the current user is allowed to change the value. The value
will be first validated either via a system built-in validate method or via a set {@link FieldConfig::$validate}
custom method. Afterward... | [
"Sets",
"and",
"persists",
"this",
"setting",
"s",
"value",
"overwriting",
"any",
"existing",
"value",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Settings/Setting.php#L218-L235 | train | Set the value of the field. | [
30522,
2270,
3853,
2275,
10175,
5657,
30524,
12879,
12891,
1006,
1007,
1025,
1002,
2023,
1011,
1028,
9398,
3686,
10175,
5657,
1006,
1002,
3643,
1007,
1025,
2065,
1006,
1002,
9530,
8873,
2290,
1011,
1028,
10938,
1004,
1004,
1002,
9530,
8873,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/Yaml/Inline.php | Inline.dumpArray | private static function dumpArray(array $value, int $flags): string
{
// array
if (($value || Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE & $flags) && !self::isHash($value)) {
$output = [];
foreach ($value as $val) {
$output[] = self::dump($val, $flags);
}
... | php | private static function dumpArray(array $value, int $flags): string
{
// array
if (($value || Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE & $flags) && !self::isHash($value)) {
$output = [];
foreach ($value as $val) {
$output[] = self::dump($val, $flags);
}
... | [
"private",
"static",
"function",
"dumpArray",
"(",
"array",
"$",
"value",
",",
"int",
"$",
"flags",
")",
":",
"string",
"{",
"// array",
"if",
"(",
"(",
"$",
"value",
"||",
"Yaml",
"::",
"DUMP_EMPTY_ARRAY_AS_SEQUENCE",
"&",
"$",
"flags",
")",
"&&",
"!",
... | Dumps a PHP array to a YAML string.
@param array $value The PHP array to dump
@param int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string
@return string The YAML string representing the PHP array | [
"Dumps",
"a",
"PHP",
"array",
"to",
"a",
"YAML",
"string",
"."
] | b82b09eefb084e487997f4af753400d721edd0a8 | https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Yaml/Inline.php#L238-L257 | train | Dump array value | [
30522,
2797,
10763,
3853,
15653,
2906,
9447,
1006,
9140,
1002,
3643,
1010,
20014,
1002,
9245,
1007,
1024,
5164,
1063,
1013,
1013,
9140,
2065,
1006,
1006,
1002,
3643,
1064,
1064,
8038,
19968,
1024,
1024,
15653,
1035,
4064,
1035,
9140,
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/CssSelector/Parser/Handler/CommentHandler.php | CommentHandler.handle | public function handle(Reader $reader, TokenStream $stream): bool
{
if ('/*' !== $reader->getSubstring(2)) {
return false;
}
$offset = $reader->getOffset('*/');
if (false === $offset) {
$reader->moveToEnd();
} else {
$reader->moveForward(... | php | public function handle(Reader $reader, TokenStream $stream): bool
{
if ('/*' !== $reader->getSubstring(2)) {
return false;
}
$offset = $reader->getOffset('*/');
if (false === $offset) {
$reader->moveToEnd();
} else {
$reader->moveForward(... | [
"public",
"function",
"handle",
"(",
"Reader",
"$",
"reader",
",",
"TokenStream",
"$",
"stream",
")",
":",
"bool",
"{",
"if",
"(",
"'/*'",
"!==",
"$",
"reader",
"->",
"getSubstring",
"(",
"2",
")",
")",
"{",
"return",
"false",
";",
"}",
"$",
"offset"... | {@inheritdoc} | [
"{"
] | b82b09eefb084e487997f4af753400d721edd0a8 | https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/CssSelector/Parser/Handler/CommentHandler.php#L32-L47 | train | Handle the token stream | [
30522,
2270,
3853,
5047,
1006,
8068,
1002,
8068,
1010,
19204,
21422,
1002,
5460,
1007,
1024,
22017,
2140,
1063,
2065,
1006,
1005,
1013,
1008,
1005,
999,
1027,
1027,
1002,
8068,
1011,
1028,
4152,
12083,
3367,
4892,
1006,
1016,
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 | libs/Zend/Db/Adapter/Pdo/Abstract.php | Zend_Db_Adapter_Pdo_Abstract.query | public function query($sql, $bind = array())
{
if (empty($bind) && $sql instanceof Zend_Db_Select) {
$bind = $sql->getBind();
}
if (is_array($bind)) {
foreach ($bind as $name => $value) {
if (!is_int($name) && !preg_match('/^:/', $name)) {
... | php | public function query($sql, $bind = array())
{
if (empty($bind) && $sql instanceof Zend_Db_Select) {
$bind = $sql->getBind();
}
if (is_array($bind)) {
foreach ($bind as $name => $value) {
if (!is_int($name) && !preg_match('/^:/', $name)) {
... | [
"public",
"function",
"query",
"(",
"$",
"sql",
",",
"$",
"bind",
"=",
"array",
"(",
")",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"bind",
")",
"&&",
"$",
"sql",
"instanceof",
"Zend_Db_Select",
")",
"{",
"$",
"bind",
"=",
"$",
"sql",
"->",
"getBin... | Special handling for PDO query().
All bind parameter names must begin with ':'
@param string|Zend_Db_Select $sql The SQL statement with placeholders.
@param array $bind An array of data to bind to the placeholders.
@return Zend_Db_Statement_Pdo
@throws Zend_Db_Adapter_Exception To re-throw PDOException. | [
"Special",
"handling",
"for",
"PDO",
"query",
"()",
".",
"All",
"bind",
"parameter",
"names",
"must",
"begin",
"with",
":"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Adapter/Pdo/Abstract.php#L221-L246 | train | Implementa un query de una base de datos | [
30522,
2270,
3853,
23032,
1006,
1002,
29296,
1010,
1002,
14187,
1027,
9140,
1006,
1007,
1007,
1063,
2065,
1006,
4064,
1006,
1002,
14187,
1007,
1004,
1004,
1002,
29296,
6013,
11253,
16729,
2094,
1035,
16962,
1035,
7276,
1007,
1063,
1002,
141... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.setGlobalToAndRemoveCcAndBcc | protected function setGlobalToAndRemoveCcAndBcc($message)
{
$message->to($this->to['address'], $this->to['name'], true);
$message->cc(null, null, true);
$message->bcc(null, null, true);
} | php | protected function setGlobalToAndRemoveCcAndBcc($message)
{
$message->to($this->to['address'], $this->to['name'], true);
$message->cc(null, null, true);
$message->bcc(null, null, true);
} | [
"protected",
"function",
"setGlobalToAndRemoveCcAndBcc",
"(",
"$",
"message",
")",
"{",
"$",
"message",
"->",
"to",
"(",
"$",
"this",
"->",
"to",
"[",
"'address'",
"]",
",",
"$",
"this",
"->",
"to",
"[",
"'name'",
"]",
",",
"true",
")",
";",
"$",
"me... | Set the global "to" address on the given message.
@param \Illuminate\Mail\Message $message
@return void | [
"Set",
"the",
"global",
"to",
"address",
"on",
"the",
"given",
"message",
"."
] | 0e0a428a50fc8378e3f77d18f3caae76c19e8c7a | https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Mail/Mailer.php#L362-L367 | train | Set the global to address and name of the message and remove the cc and bcc addresses | [
30522,
5123,
3853,
2275,
23296,
16429,
2389,
3406,
5685,
28578,
21818,
16665,
4859,
9818,
2278,
1006,
1002,
4471,
1007,
1063,
1002,
4471,
1011,
1028,
2000,
1006,
1002,
2023,
1011,
1028,
2000,
1031,
1005,
4769,
1005,
1033,
1010,
1002,
2023,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
symfony/symfony | src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php | PhpDumper.dumpLiteralClass | private function dumpLiteralClass(string $class): string
{
if (false !== strpos($class, '$')) {
return sprintf('${($_ = %s) && false ?: "_"}', $class);
}
if (0 !== strpos($class, "'") || !preg_match('/^\'(?:\\\{2})?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?:\\\{2}[a-zA-Z_\x7f-\xf... | php | private function dumpLiteralClass(string $class): string
{
if (false !== strpos($class, '$')) {
return sprintf('${($_ = %s) && false ?: "_"}', $class);
}
if (0 !== strpos($class, "'") || !preg_match('/^\'(?:\\\{2})?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?:\\\{2}[a-zA-Z_\x7f-\xf... | [
"private",
"function",
"dumpLiteralClass",
"(",
"string",
"$",
"class",
")",
":",
"string",
"{",
"if",
"(",
"false",
"!==",
"strpos",
"(",
"$",
"class",
",",
"'$'",
")",
")",
"{",
"return",
"sprintf",
"(",
"'${($_ = %s) && false ?: \"_\"}'",
",",
"$",
"cla... | Dumps a string to a literal (aka PHP Code) class value.
@throws RuntimeException | [
"Dumps",
"a",
"string",
"to",
"a",
"literal",
"(",
"aka",
"PHP",
"Code",
")",
"class",
"value",
"."
] | b82b09eefb084e487997f4af753400d721edd0a8 | https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php#L1658-L1670 | train | Dump literal class name | [
30522,
2797,
3853,
15653,
22779,
7941,
26266,
1006,
5164,
1002,
2465,
1007,
1024,
5164,
1063,
2065,
1006,
6270,
999,
1027,
1027,
2358,
14536,
2891,
1006,
1002,
2465,
1010,
1005,
1002,
1005,
1007,
1007,
1063,
2709,
9043,
2546,
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... |
octobercms/october | modules/system/behaviors/SettingsModel.php | SettingsModel.saveModelInternal | public function saveModelInternal()
{
// Purge the field values from the attributes
$this->model->attributes = array_diff_key($this->model->attributes, $this->fieldValues);
} | php | public function saveModelInternal()
{
// Purge the field values from the attributes
$this->model->attributes = array_diff_key($this->model->attributes, $this->fieldValues);
} | [
"public",
"function",
"saveModelInternal",
"(",
")",
"{",
"// Purge the field values from the attributes",
"$",
"this",
"->",
"model",
"->",
"attributes",
"=",
"array_diff_key",
"(",
"$",
"this",
"->",
"model",
"->",
"attributes",
",",
"$",
"this",
"->",
"fieldVal... | Internal save method for the model
@return void | [
"Internal",
"save",
"method",
"for",
"the",
"model"
] | 3118660d834f161d513da08477be92281a2eb96a | https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/behaviors/SettingsModel.php#L182-L186 | train | Save the model to the attributes array | [
30522,
2270,
3853,
3828,
5302,
9247,
18447,
11795,
2389,
1006,
1007,
1063,
1013,
1013,
24694,
1996,
2492,
5300,
2013,
1996,
12332,
1002,
2023,
1011,
1028,
2944,
1011,
1028,
12332,
1027,
9140,
1035,
4487,
4246,
1035,
3145,
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... |
z-song/laravel-admin | src/Console/ExtendCommand.php | ExtendCommand.extensionPath | protected function extensionPath($path = '')
{
$path = rtrim($path, '/');
if (empty($path)) {
return rtrim($this->basePath, '/');
}
return rtrim($this->basePath, '/').'/'.ltrim($path, '/');
} | php | protected function extensionPath($path = '')
{
$path = rtrim($path, '/');
if (empty($path)) {
return rtrim($this->basePath, '/');
}
return rtrim($this->basePath, '/').'/'.ltrim($path, '/');
} | [
"protected",
"function",
"extensionPath",
"(",
"$",
"path",
"=",
"''",
")",
"{",
"$",
"path",
"=",
"rtrim",
"(",
"$",
"path",
",",
"'/'",
")",
";",
"if",
"(",
"empty",
"(",
"$",
"path",
")",
")",
"{",
"return",
"rtrim",
"(",
"$",
"this",
"->",
... | Extension path.
@param string $path
@return string | [
"Extension",
"path",
"."
] | 3e65086f806b54699145f58af53843e5dbbb7994 | https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Console/ExtendCommand.php#L247-L256 | train | Extension path getter | [
30522,
5123,
3853,
5331,
15069,
1006,
1002,
4130,
1027,
1005,
1005,
1007,
1063,
1002,
4130,
1027,
19387,
20026,
1006,
1002,
4130,
1010,
1005,
1013,
1005,
1007,
1025,
2065,
1006,
4064,
1006,
1002,
4130,
1007,
1007,
1063,
2709,
19387,
20026,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
symfony/symfony | src/Symfony/Component/Lock/Lock.php | Lock.acquire | public function acquire($blocking = false)
{
try {
if ($blocking) {
$this->store->waitAndSave($this->key);
} else {
$this->store->save($this->key);
}
$this->dirty = true;
$this->logger->info('Successfully acquired t... | php | public function acquire($blocking = false)
{
try {
if ($blocking) {
$this->store->waitAndSave($this->key);
} else {
$this->store->save($this->key);
}
$this->dirty = true;
$this->logger->info('Successfully acquired t... | [
"public",
"function",
"acquire",
"(",
"$",
"blocking",
"=",
"false",
")",
"{",
"try",
"{",
"if",
"(",
"$",
"blocking",
")",
"{",
"$",
"this",
"->",
"store",
"->",
"waitAndSave",
"(",
"$",
"this",
"->",
"key",
")",
";",
"}",
"else",
"{",
"$",
"thi... | {@inheritdoc} | [
"{"
] | b82b09eefb084e487997f4af753400d721edd0a8 | https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Lock/Lock.php#L69-L103 | train | Acquires the lock | [
30522,
2270,
3853,
9878,
1006,
1002,
10851,
1027,
6270,
1007,
1063,
3046,
1063,
2065,
1006,
1002,
10851,
1007,
1063,
1002,
2023,
1011,
1028,
3573,
1011,
1028,
3524,
29560,
10696,
1006,
1002,
2023,
1011,
1028,
3145,
1007,
1025,
1065,
2842,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/UrlHelper.php | UrlHelper.getQueryStringWithExcludedParameters | public static function getQueryStringWithExcludedParameters($queryParameters, $parametersToExclude)
{
$validQuery = '';
$separator = '&';
foreach ($queryParameters as $name => $value) {
// decode encoded square brackets
$name = str_replace(array('%5B', '%5D'), array('... | php | public static function getQueryStringWithExcludedParameters($queryParameters, $parametersToExclude)
{
$validQuery = '';
$separator = '&';
foreach ($queryParameters as $name => $value) {
// decode encoded square brackets
$name = str_replace(array('%5B', '%5D'), array('... | [
"public",
"static",
"function",
"getQueryStringWithExcludedParameters",
"(",
"$",
"queryParameters",
",",
"$",
"parametersToExclude",
")",
"{",
"$",
"validQuery",
"=",
"''",
";",
"$",
"separator",
"=",
"'&'",
";",
"foreach",
"(",
"$",
"queryParameters",
"as",
"$... | Converts an array of query parameter name/value mappings into a query string.
Parameters that are in `$parametersToExclude` will not appear in the result.
@static
@param $queryParameters Array of query parameters, eg, `array('site' => '0', 'date' => '2012-01-01')`.
@param $parametersToExclude Array of query parameter ... | [
"Converts",
"an",
"array",
"of",
"query",
"parameter",
"name",
"/",
"value",
"mappings",
"into",
"a",
"query",
"string",
".",
"Parameters",
"that",
"are",
"in",
"$parametersToExclude",
"will",
"not",
"appear",
"in",
"the",
"result",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/UrlHelper.php#L65-L91 | train | Returns the query string with excluded parameters | [
30522,
2270,
10763,
3853,
2131,
4226,
24769,
18886,
3070,
24415,
10288,
20464,
13936,
28689,
22828,
2015,
1006,
1002,
23032,
28689,
22828,
2015,
1010,
1002,
11709,
3406,
10288,
20464,
12672,
1007,
1063,
1002,
9398,
4226,
2854,
1027,
1005,
100... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
octobercms/october | modules/cms/classes/CmsObjectCollection.php | CmsObjectCollection.where | public function where($property, $value, $strict = true)
{
return $this->filter(function ($object) use ($property, $value, $strict) {
if (!array_key_exists($property, $object->settings)) {
return false;
}
return $strict
? $object->setting... | php | public function where($property, $value, $strict = true)
{
return $this->filter(function ($object) use ($property, $value, $strict) {
if (!array_key_exists($property, $object->settings)) {
return false;
}
return $strict
? $object->setting... | [
"public",
"function",
"where",
"(",
"$",
"property",
",",
"$",
"value",
",",
"$",
"strict",
"=",
"true",
")",
"{",
"return",
"$",
"this",
"->",
"filter",
"(",
"function",
"(",
"$",
"object",
")",
"use",
"(",
"$",
"property",
",",
"$",
"value",
",",... | Returns objects whose properties match the supplied value.
@param string $property
@param string $value
@param bool $strict
@return static | [
"Returns",
"objects",
"whose",
"properties",
"match",
"the",
"supplied",
"value",
"."
] | 3118660d834f161d513da08477be92281a2eb96a | https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/classes/CmsObjectCollection.php#L47-L59 | train | Filter the result by a property value | [
30522,
2270,
3853,
2073,
1006,
1002,
3200,
1010,
1002,
3643,
1010,
1002,
9384,
1027,
2995,
1007,
1063,
2709,
1002,
2023,
1011,
1028,
11307,
1006,
3853,
1006,
1002,
4874,
1007,
2224,
1006,
1002,
3200,
1010,
1002,
3643,
1010,
1002,
9384,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
octobercms/october | modules/system/behaviors/SettingsModel.php | SettingsModel.resetDefault | public function resetDefault()
{
if ($record = $this->getSettingsRecord()) {
$record->delete();
unset(self::$instances[$this->recordCode]);
Cache::forget($this->getCacheKey());
}
} | php | public function resetDefault()
{
if ($record = $this->getSettingsRecord()) {
$record->delete();
unset(self::$instances[$this->recordCode]);
Cache::forget($this->getCacheKey());
}
} | [
"public",
"function",
"resetDefault",
"(",
")",
"{",
"if",
"(",
"$",
"record",
"=",
"$",
"this",
"->",
"getSettingsRecord",
"(",
")",
")",
"{",
"$",
"record",
"->",
"delete",
"(",
")",
";",
"unset",
"(",
"self",
"::",
"$",
"instances",
"[",
"$",
"t... | Reset the settings to their defaults, this will delete the record model | [
"Reset",
"the",
"settings",
"to",
"their",
"defaults",
"this",
"will",
"delete",
"the",
"record",
"model"
] | 3118660d834f161d513da08477be92281a2eb96a | https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/system/behaviors/SettingsModel.php#L87-L94 | train | Reset default settings | [
30522,
2270,
3853,
25141,
3207,
7011,
11314,
1006,
1007,
1063,
2065,
1006,
1002,
2501,
1027,
1002,
2023,
1011,
1028,
4152,
18319,
3070,
21338,
8586,
8551,
1006,
1007,
1007,
1063,
1002,
2501,
1011,
1028,
3972,
12870,
1006,
1007,
1025,
4895,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
octobercms/october | modules/cms/classes/ComponentManager.php | ComponentManager.registerComponent | public function registerComponent($className, $code = null, $plugin = null)
{
if (!$this->classMap) {
$this->classMap = [];
}
if (!$this->codeMap) {
$this->codeMap = [];
}
if (!$code) {
$code = Str::getClassId($className);
}
... | php | public function registerComponent($className, $code = null, $plugin = null)
{
if (!$this->classMap) {
$this->classMap = [];
}
if (!$this->codeMap) {
$this->codeMap = [];
}
if (!$code) {
$code = Str::getClassId($className);
}
... | [
"public",
"function",
"registerComponent",
"(",
"$",
"className",
",",
"$",
"code",
"=",
"null",
",",
"$",
"plugin",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"classMap",
")",
"{",
"$",
"this",
"->",
"classMap",
"=",
"[",
"]",
";",
... | Registers a single component. | [
"Registers",
"a",
"single",
"component",
"."
] | 3118660d834f161d513da08477be92281a2eb96a | https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/classes/ComponentManager.php#L93-L120 | train | Registers a component | [
30522,
2270,
3853,
4236,
9006,
29513,
3372,
1006,
1002,
2465,
18442,
1010,
1002,
3642,
1027,
19701,
1010,
1002,
13354,
2378,
1027,
19701,
1007,
1063,
2065,
1006,
999,
1002,
2023,
1011,
1028,
2465,
2863,
2361,
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... |
octobercms/october | modules/cms/classes/Controller.php | Controller.findComponentByHandler | public function findComponentByHandler($handler)
{
foreach ($this->page->components as $component) {
if ($component->methodExists($handler)) {
return $component;
}
}
foreach ($this->layout->components as $component) {
if ($component->metho... | php | public function findComponentByHandler($handler)
{
foreach ($this->page->components as $component) {
if ($component->methodExists($handler)) {
return $component;
}
}
foreach ($this->layout->components as $component) {
if ($component->metho... | [
"public",
"function",
"findComponentByHandler",
"(",
"$",
"handler",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"page",
"->",
"components",
"as",
"$",
"component",
")",
"{",
"if",
"(",
"$",
"component",
"->",
"methodExists",
"(",
"$",
"handler",
")",
"... | Searches the layout and page components by an AJAX handler
@param string $handler
@return ComponentBase The component object, if found | [
"Searches",
"the",
"layout",
"and",
"page",
"components",
"by",
"an",
"AJAX",
"handler"
] | 3118660d834f161d513da08477be92281a2eb96a | https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/classes/Controller.php#L1496-L1511 | train | Find Component By Handler | [
30522,
2270,
3853,
2424,
9006,
29513,
3372,
3762,
11774,
3917,
1006,
1002,
28213,
1007,
1063,
18921,
6776,
1006,
1002,
2023,
1011,
1028,
3931,
1011,
1028,
6177,
2004,
1002,
6922,
1007,
1063,
2065,
1006,
1002,
6922,
1011,
1028,
4118,
10288,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
symfony/symfony | src/Symfony/Component/Console/Descriptor/TextDescriptor.php | TextDescriptor.formatDefaultValue | private function formatDefaultValue($default): string
{
if (INF === $default) {
return 'INF';
}
if (\is_string($default)) {
$default = OutputFormatter::escape($default);
} elseif (\is_array($default)) {
foreach ($default as $key => $value) {
... | php | private function formatDefaultValue($default): string
{
if (INF === $default) {
return 'INF';
}
if (\is_string($default)) {
$default = OutputFormatter::escape($default);
} elseif (\is_array($default)) {
foreach ($default as $key => $value) {
... | [
"private",
"function",
"formatDefaultValue",
"(",
"$",
"default",
")",
":",
"string",
"{",
"if",
"(",
"INF",
"===",
"$",
"default",
")",
"{",
"return",
"'INF'",
";",
"}",
"if",
"(",
"\\",
"is_string",
"(",
"$",
"default",
")",
")",
"{",
"$",
"default... | Formats input option/argument default value.
@param mixed $default | [
"Formats",
"input",
"option",
"/",
"argument",
"default",
"value",
"."
] | b82b09eefb084e487997f4af753400d721edd0a8 | https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Descriptor/TextDescriptor.php#L281-L298 | train | Formats the default value for the field. | [
30522,
2797,
3853,
4289,
3207,
7011,
11314,
10175,
5657,
1006,
1002,
12398,
1007,
1024,
5164,
1063,
2065,
1006,
1999,
2546,
1027,
1027,
1027,
1002,
12398,
1007,
1063,
2709,
1005,
1999,
2546,
1005,
1025,
1065,
2065,
1006,
1032,
2003,
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/Database/Query/Grammars/Grammar.php | Grammar.whereBetween | protected function whereBetween(Builder $query, $where)
{
$between = $where['not'] ? 'not between' : 'between';
$min = $this->parameter(reset($where['values']));
$max = $this->parameter(end($where['values']));
return $this->wrap($where['column']).' '.$between.' '.$min.' and '.$max... | php | protected function whereBetween(Builder $query, $where)
{
$between = $where['not'] ? 'not between' : 'between';
$min = $this->parameter(reset($where['values']));
$max = $this->parameter(end($where['values']));
return $this->wrap($where['column']).' '.$between.' '.$min.' and '.$max... | [
"protected",
"function",
"whereBetween",
"(",
"Builder",
"$",
"query",
",",
"$",
"where",
")",
"{",
"$",
"between",
"=",
"$",
"where",
"[",
"'not'",
"]",
"?",
"'not between'",
":",
"'between'",
";",
"$",
"min",
"=",
"$",
"this",
"->",
"parameter",
"(",... | Compile a "between" where clause.
@param \Illuminate\Database\Query\Builder $query
@param array $where
@return string | [
"Compile",
"a",
"between",
"where",
"clause",
"."
] | 0e0a428a50fc8378e3f77d18f3caae76c19e8c7a | https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Grammars/Grammar.php#L373-L382 | train | Protected whereBetween method | [
30522,
5123,
3853,
2073,
20915,
28394,
2078,
1006,
12508,
1002,
23032,
1010,
1002,
2073,
1007,
1063,
1002,
2090,
1027,
1002,
2073,
1031,
1005,
2025,
1005,
1033,
1029,
1005,
2025,
2090,
1005,
1024,
1005,
2090,
1005,
1025,
1002,
8117,
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/Tracker/GoalManager.php | GoalManager.recordEcommerceGoal | protected function recordEcommerceGoal(VisitProperties $visitProperties, Request $request, $conversion, $action)
{
$isThereExistingCartInVisit = $request->getMetadata('Goals', 'isThereExistingCartInVisit');
if ($isThereExistingCartInVisit) {
Common::printDebug("There is an existing cart ... | php | protected function recordEcommerceGoal(VisitProperties $visitProperties, Request $request, $conversion, $action)
{
$isThereExistingCartInVisit = $request->getMetadata('Goals', 'isThereExistingCartInVisit');
if ($isThereExistingCartInVisit) {
Common::printDebug("There is an existing cart ... | [
"protected",
"function",
"recordEcommerceGoal",
"(",
"VisitProperties",
"$",
"visitProperties",
",",
"Request",
"$",
"request",
",",
"$",
"conversion",
",",
"$",
"action",
")",
"{",
"$",
"isThereExistingCartInVisit",
"=",
"$",
"request",
"->",
"getMetadata",
"(",
... | Records an Ecommerce conversion in the DB. Deals with Items found in the request.
Will deal with 2 types of conversions: Ecommerce Order and Ecommerce Cart update (Add to cart, Update Cart etc).
@param array $conversion
@param Visitor $visitor
@param Action $action
@param array $visitInformation | [
"Records",
"an",
"Ecommerce",
"conversion",
"in",
"the",
"DB",
".",
"Deals",
"with",
"Items",
"found",
"in",
"the",
"request",
".",
"Will",
"deal",
"with",
"2",
"types",
"of",
"conversions",
":",
"Ecommerce",
"Order",
"and",
"Ecommerce",
"Cart",
"update",
... | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Tracker/GoalManager.php#L290-L348 | train | Records an ecommerce goal | [
30522,
5123,
3853,
2501,
8586,
5358,
5017,
3401,
3995,
2389,
1006,
3942,
21572,
4842,
7368,
1002,
3942,
21572,
4842,
7368,
1010,
5227,
1002,
5227,
1010,
1002,
7584,
1010,
1002,
2895,
1007,
1063,
1002,
21541,
5886,
4402,
9048,
16643,
3070,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
z-song/laravel-admin | src/Form.php | Form.prepare | protected function prepare($data = [])
{
if (($response = $this->callSubmitted()) instanceof Response) {
return $response;
}
$this->inputs = array_merge($this->removeIgnoredFields($data), $this->inputs);
if (($response = $this->callSaving()) instanceof Response) {
... | php | protected function prepare($data = [])
{
if (($response = $this->callSubmitted()) instanceof Response) {
return $response;
}
$this->inputs = array_merge($this->removeIgnoredFields($data), $this->inputs);
if (($response = $this->callSaving()) instanceof Response) {
... | [
"protected",
"function",
"prepare",
"(",
"$",
"data",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"(",
"$",
"response",
"=",
"$",
"this",
"->",
"callSubmitted",
"(",
")",
")",
"instanceof",
"Response",
")",
"{",
"return",
"$",
"response",
";",
"}",
"$",
"t... | Prepare input data for insert or update.
@param array $data
@return mixed | [
"Prepare",
"input",
"data",
"for",
"insert",
"or",
"update",
"."
] | 3e65086f806b54699145f58af53843e5dbbb7994 | https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Form.php#L439-L454 | train | Prepare the request and save it to the database | [
30522,
5123,
3853,
7374,
1006,
1002,
2951,
1027,
1031,
1033,
1007,
1063,
2065,
1006,
1006,
1002,
3433,
1027,
1002,
2023,
1011,
1028,
4455,
12083,
22930,
3064,
1006,
1007,
1007,
6013,
11253,
3433,
1007,
1063,
2709,
1002,
3433,
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... |
laravel/framework | src/Illuminate/Queue/RedisQueue.php | RedisQueue.pushRaw | public function pushRaw($payload, $queue = null, array $options = [])
{
$this->getConnection()->eval(
LuaScripts::push(), 2, $this->getQueue($queue),
$this->getQueue($queue).':notify', $payload
);
return json_decode($payload, true)['id'] ?? null;
} | php | public function pushRaw($payload, $queue = null, array $options = [])
{
$this->getConnection()->eval(
LuaScripts::push(), 2, $this->getQueue($queue),
$this->getQueue($queue).':notify', $payload
);
return json_decode($payload, true)['id'] ?? null;
} | [
"public",
"function",
"pushRaw",
"(",
"$",
"payload",
",",
"$",
"queue",
"=",
"null",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"this",
"->",
"getConnection",
"(",
")",
"->",
"eval",
"(",
"LuaScripts",
"::",
"push",
"(",
")",
",",... | Push a raw payload onto the queue.
@param string $payload
@param string $queue
@param array $options
@return mixed | [
"Push",
"a",
"raw",
"payload",
"onto",
"the",
"queue",
"."
] | 0e0a428a50fc8378e3f77d18f3caae76c19e8c7a | https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Queue/RedisQueue.php#L102-L110 | train | Pushes a raw message to the queue | [
30522,
2270,
3853,
5245,
2527,
2860,
1006,
1002,
18093,
1010,
1002,
24240,
1027,
19701,
1010,
9140,
1002,
7047,
1027,
1031,
1033,
1007,
1063,
1002,
2023,
1011,
1028,
2131,
8663,
2638,
7542,
1006,
1007,
1011,
1028,
9345,
2140,
1006,
11320,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/Messages/Message.php | Message.transformToXml | public function transformToXml(array $appends = [], bool $returnAsArray = false): string
{
$data = array_merge(['MsgType' => $this->getType()], $this->toXmlArray(), $appends);
return $returnAsArray ? $data : XML::build($data);
} | php | public function transformToXml(array $appends = [], bool $returnAsArray = false): string
{
$data = array_merge(['MsgType' => $this->getType()], $this->toXmlArray(), $appends);
return $returnAsArray ? $data : XML::build($data);
} | [
"public",
"function",
"transformToXml",
"(",
"array",
"$",
"appends",
"=",
"[",
"]",
",",
"bool",
"$",
"returnAsArray",
"=",
"false",
")",
":",
"string",
"{",
"$",
"data",
"=",
"array_merge",
"(",
"[",
"'MsgType'",
"=>",
"$",
"this",
"->",
"getType",
"... | @param array $appends
@param bool $returnAsArray
@return string | [
"@param",
"array",
"$appends",
"@param",
"bool",
"$returnAsArray"
] | 120c72faaa93c270365bc75c73c362d5fd583209 | https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Kernel/Messages/Message.php#L171-L176 | train | Transform the message to xml string | [
30522,
2270,
3853,
10938,
3406,
2595,
19968,
1006,
9140,
1002,
10439,
10497,
2015,
1027,
1031,
1033,
1010,
22017,
2140,
1002,
2709,
16782,
11335,
2100,
1027,
6270,
1007,
1024,
5164,
1063,
1002,
2951,
1027,
9140,
1035,
13590,
1006,
1031,
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/Support/Str.php | Str.orderedUuid | public static function orderedUuid()
{
$factory = new UuidFactory;
$factory->setRandomGenerator(new CombGenerator(
$factory->getRandomGenerator(),
$factory->getNumberConverter()
));
$factory->setCodec(new TimestampFirstCombCodec(
$factory->getUui... | php | public static function orderedUuid()
{
$factory = new UuidFactory;
$factory->setRandomGenerator(new CombGenerator(
$factory->getRandomGenerator(),
$factory->getNumberConverter()
));
$factory->setCodec(new TimestampFirstCombCodec(
$factory->getUui... | [
"public",
"static",
"function",
"orderedUuid",
"(",
")",
"{",
"$",
"factory",
"=",
"new",
"UuidFactory",
";",
"$",
"factory",
"->",
"setRandomGenerator",
"(",
"new",
"CombGenerator",
"(",
"$",
"factory",
"->",
"getRandomGenerator",
"(",
")",
",",
"$",
"facto... | Generate a time-ordered UUID (version 4).
@return \Ramsey\Uuid\UuidInterface | [
"Generate",
"a",
"time",
"-",
"ordered",
"UUID",
"(",
"version",
"4",
")",
"."
] | 0e0a428a50fc8378e3f77d18f3caae76c19e8c7a | https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Support/Str.php#L559-L573 | train | Returns a UUID that is ordered by the order of the current time. | [
30522,
2270,
10763,
3853,
3641,
2226,
21272,
1006,
1007,
1063,
1002,
4713,
1027,
2047,
1057,
21272,
21450,
1025,
1002,
4713,
1011,
1028,
2275,
13033,
5358,
6914,
6906,
4263,
1006,
2047,
22863,
6914,
6906,
4263,
1006,
1002,
4713,
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 | core/DataAccess/TableMetadata.php | TableMetadata.getIdActionColumnNames | public function getIdActionColumnNames($table)
{
$columns = $this->getColumns($table);
$columns = array_filter($columns, function ($columnName) {
return strpos($columnName, 'idaction') !== false;
});
return array_values($columns);
} | php | public function getIdActionColumnNames($table)
{
$columns = $this->getColumns($table);
$columns = array_filter($columns, function ($columnName) {
return strpos($columnName, 'idaction') !== false;
});
return array_values($columns);
} | [
"public",
"function",
"getIdActionColumnNames",
"(",
"$",
"table",
")",
"{",
"$",
"columns",
"=",
"$",
"this",
"->",
"getColumns",
"(",
"$",
"table",
")",
";",
"$",
"columns",
"=",
"array_filter",
"(",
"$",
"columns",
",",
"function",
"(",
"$",
"columnNa... | Returns the list of idaction columns in a table. A column is
assumed to be an idaction reference if it has `"idaction"` in its
name (eg, `"idaction_url"` or `"idaction_content_name"`.
@param string $table Prefixed table name.
@return string[] | [
"Returns",
"the",
"list",
"of",
"idaction",
"columns",
"in",
"a",
"table",
".",
"A",
"column",
"is",
"assumed",
"to",
"be",
"an",
"idaction",
"reference",
"if",
"it",
"has",
"idaction",
"in",
"its",
"name",
"(",
"eg",
"idaction_url",
"or",
"idaction_conten... | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataAccess/TableMetadata.php#L46-L55 | train | Returns an array of idaction column names for a table | [
30522,
2270,
3853,
2131,
8524,
7542,
25778,
2819,
9516,
7834,
1006,
1002,
2795,
1007,
1063,
1002,
7753,
1027,
1002,
2023,
1011,
1028,
2131,
25778,
2819,
3619,
1006,
1002,
2795,
1007,
1025,
1002,
7753,
1027,
9140,
1035,
11307,
1006,
1002,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
laravel/framework | src/Illuminate/Foundation/Exceptions/Handler.php | Handler.shouldntReport | protected function shouldntReport(Exception $e)
{
$dontReport = array_merge($this->dontReport, $this->internalDontReport);
return ! is_null(Arr::first($dontReport, function ($type) use ($e) {
return $e instanceof $type;
}));
} | php | protected function shouldntReport(Exception $e)
{
$dontReport = array_merge($this->dontReport, $this->internalDontReport);
return ! is_null(Arr::first($dontReport, function ($type) use ($e) {
return $e instanceof $type;
}));
} | [
"protected",
"function",
"shouldntReport",
"(",
"Exception",
"$",
"e",
")",
"{",
"$",
"dontReport",
"=",
"array_merge",
"(",
"$",
"this",
"->",
"dontReport",
",",
"$",
"this",
"->",
"internalDontReport",
")",
";",
"return",
"!",
"is_null",
"(",
"Arr",
"::"... | Determine if the exception is in the "do not report" list.
@param \Exception $e
@return bool | [
"Determine",
"if",
"the",
"exception",
"is",
"in",
"the",
"do",
"not",
"report",
"list",
"."
] | 0e0a428a50fc8378e3f77d18f3caae76c19e8c7a | https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Exceptions/Handler.php#L135-L142 | train | Check if exception is in the list of types that should be reported | [
30522,
5123,
3853,
5807,
7913,
6442,
1006,
6453,
1002,
1041,
1007,
1063,
1002,
2123,
7913,
6442,
1027,
9140,
1035,
13590,
1006,
1002,
2023,
1011,
1028,
2123,
7913,
6442,
1010,
1002,
2023,
1011,
1028,
4722,
5280,
7913,
6442,
1007,
1025,
27... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
laravel/framework | src/Illuminate/Session/Store.php | Store.migrate | public function migrate($destroy = false)
{
if ($destroy) {
$this->handler->destroy($this->getId());
}
$this->setExists(false);
$this->setId($this->generateSessionId());
return true;
} | php | public function migrate($destroy = false)
{
if ($destroy) {
$this->handler->destroy($this->getId());
}
$this->setExists(false);
$this->setId($this->generateSessionId());
return true;
} | [
"public",
"function",
"migrate",
"(",
"$",
"destroy",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"destroy",
")",
"{",
"$",
"this",
"->",
"handler",
"->",
"destroy",
"(",
"$",
"this",
"->",
"getId",
"(",
")",
")",
";",
"}",
"$",
"this",
"->",
"setExi... | Generate a new session ID for the session.
@param bool $destroy
@return bool | [
"Generate",
"a",
"new",
"session",
"ID",
"for",
"the",
"session",
"."
] | 0e0a428a50fc8378e3f77d18f3caae76c19e8c7a | https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Session/Store.php#L489-L500 | train | Migrate the current session to the new session | [
30522,
2270,
3853,
22806,
1006,
1002,
6033,
1027,
6270,
1007,
1063,
2065,
1006,
1002,
6033,
1007,
1063,
1002,
2023,
1011,
1028,
28213,
1011,
1028,
6033,
1006,
1002,
2023,
1011,
1028,
2131,
3593,
1006,
1007,
1007,
1025,
1065,
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/Console/Application.php | Application.parseCommand | protected function parseCommand($command, $parameters)
{
if (is_subclass_of($command, SymfonyCommand::class)) {
$callingClass = true;
$command = $this->laravel->make($command)->getName();
}
if (! isset($callingClass) && empty($parameters)) {
$command = $... | php | protected function parseCommand($command, $parameters)
{
if (is_subclass_of($command, SymfonyCommand::class)) {
$callingClass = true;
$command = $this->laravel->make($command)->getName();
}
if (! isset($callingClass) && empty($parameters)) {
$command = $... | [
"protected",
"function",
"parseCommand",
"(",
"$",
"command",
",",
"$",
"parameters",
")",
"{",
"if",
"(",
"is_subclass_of",
"(",
"$",
"command",
",",
"SymfonyCommand",
"::",
"class",
")",
")",
"{",
"$",
"callingClass",
"=",
"true",
";",
"$",
"command",
... | Parse the incoming Artisan command and its input.
@param string $command
@param array $parameters
@return array | [
"Parse",
"the",
"incoming",
"Artisan",
"command",
"and",
"its",
"input",
"."
] | 0e0a428a50fc8378e3f77d18f3caae76c19e8c7a | https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Console/Application.php#L193-L210 | train | Parse the command and parameters | [
30522,
5123,
3853,
11968,
3366,
9006,
2386,
2094,
1006,
1002,
3094,
1010,
1002,
11709,
1007,
1063,
2065,
1006,
2003,
1035,
4942,
26266,
1035,
1997,
1006,
1002,
3094,
1010,
25353,
2213,
14876,
4890,
9006,
2386,
2094,
1024,
1024,
2465,
1007,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
overtrue/wechat | src/Payment/ProfitSharing/Client.php | Client.share | public function share(
string $transactionId,
string $outOrderNo,
array $receivers
) {
$params = [
'appid' => $this->app['config']->app_id,
'transaction_id' => $transactionId,
'out_order_no' => $outOrderNo,
'receivers' => json_encode(
... | php | public function share(
string $transactionId,
string $outOrderNo,
array $receivers
) {
$params = [
'appid' => $this->app['config']->app_id,
'transaction_id' => $transactionId,
'out_order_no' => $outOrderNo,
'receivers' => json_encode(
... | [
"public",
"function",
"share",
"(",
"string",
"$",
"transactionId",
",",
"string",
"$",
"outOrderNo",
",",
"array",
"$",
"receivers",
")",
"{",
"$",
"params",
"=",
"[",
"'appid'",
"=>",
"$",
"this",
"->",
"app",
"[",
"'config'",
"]",
"->",
"app_id",
",... | Single profit sharing.
请求单次分账.
@param string $transactionId 微信支付订单号
@param string $outOrderNo 商户系统内部的分账单号
@param string $receivers 分账接收方列表 | [
"Single",
"profit",
"sharing",
".",
"请求单次分账",
"."
] | 120c72faaa93c270365bc75c73c362d5fd583209 | https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Payment/ProfitSharing/Client.php#L83-L100 | train | Share Profit Share | [
30522,
2270,
3853,
3745,
1006,
5164,
1002,
12598,
3593,
1010,
5164,
1002,
2041,
8551,
11795,
2080,
1010,
9140,
1002,
19278,
1007,
1063,
1002,
11498,
5244,
1027,
1031,
1005,
10439,
3593,
1005,
1027,
1028,
1002,
2023,
1011,
1028,
10439,
1031,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
matomo-org/matomo | libs/Zend/Mail.php | Zend_Mail._addRecipientAndHeader | protected function _addRecipientAndHeader($headerName, $email, $name)
{
$email = $this->_filterEmail($email);
$name = $this->_filterName($name);
// prevent duplicates
$this->_recipients[$email] = 1;
$this->_storeHeader($headerName, $this->_formatAddress($email, $name), true)... | php | protected function _addRecipientAndHeader($headerName, $email, $name)
{
$email = $this->_filterEmail($email);
$name = $this->_filterName($name);
// prevent duplicates
$this->_recipients[$email] = 1;
$this->_storeHeader($headerName, $this->_formatAddress($email, $name), true)... | [
"protected",
"function",
"_addRecipientAndHeader",
"(",
"$",
"headerName",
",",
"$",
"email",
",",
"$",
"name",
")",
"{",
"$",
"email",
"=",
"$",
"this",
"->",
"_filterEmail",
"(",
"$",
"email",
")",
";",
"$",
"name",
"=",
"$",
"this",
"->",
"_filterNa... | Helper function for adding a recipient and the corresponding header
@param string $headerName
@param string $email
@param string $name | [
"Helper",
"function",
"for",
"adding",
"a",
"recipient",
"and",
"the",
"corresponding",
"header"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail.php#L555-L562 | train | Add a recipient and header to the header array | [
30522,
5123,
3853,
1035,
5587,
2890,
6895,
14756,
12380,
4859,
4974,
2121,
30524,
2023,
1011,
1028,
1035,
15991,
1031,
1002,
10373,
1033,
1027,
1015,
1025,
1002,
2023,
1011,
1028,
1035,
3573,
4974,
2121,
1006,
1002,
20346,
18442,
1010,
1002... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
laravel/framework | src/Illuminate/Foundation/ComposerScripts.php | ComposerScripts.clearCompiled | protected static function clearCompiled()
{
$laravel = new Application(getcwd());
if (file_exists($servicesPath = $laravel->getCachedServicesPath())) {
@unlink($servicesPath);
}
if (file_exists($packagesPath = $laravel->getCachedPackagesPath())) {
@unlink($p... | php | protected static function clearCompiled()
{
$laravel = new Application(getcwd());
if (file_exists($servicesPath = $laravel->getCachedServicesPath())) {
@unlink($servicesPath);
}
if (file_exists($packagesPath = $laravel->getCachedPackagesPath())) {
@unlink($p... | [
"protected",
"static",
"function",
"clearCompiled",
"(",
")",
"{",
"$",
"laravel",
"=",
"new",
"Application",
"(",
"getcwd",
"(",
")",
")",
";",
"if",
"(",
"file_exists",
"(",
"$",
"servicesPath",
"=",
"$",
"laravel",
"->",
"getCachedServicesPath",
"(",
")... | Clear the cached Laravel bootstrapping files.
@return void | [
"Clear",
"the",
"cached",
"Laravel",
"bootstrapping",
"files",
"."
] | 0e0a428a50fc8378e3f77d18f3caae76c19e8c7a | https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/ComposerScripts.php#L53-L64 | train | Clear compiled files | [
30522,
5123,
10763,
3853,
3154,
9006,
22090,
2094,
1006,
1007,
1063,
1002,
13679,
15985,
1027,
2047,
4646,
1006,
2131,
2278,
21724,
1006,
1007,
1007,
1025,
2065,
1006,
5371,
1035,
6526,
1006,
1002,
2578,
15069,
1027,
1002,
13679,
15985,
101... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
dompdf/dompdf | lib/html5lib/TreeBuilder.php | HTML5_TreeBuilder.printActiveFormattingElements | private function printActiveFormattingElements() {
if (!$this->a_formatting) {
return;
}
$names = array();
foreach ($this->a_formatting as $node) {
if ($node === self::MARKER) {
$names[] = 'MARKER';
} else {
$names[] = $... | php | private function printActiveFormattingElements() {
if (!$this->a_formatting) {
return;
}
$names = array();
foreach ($this->a_formatting as $node) {
if ($node === self::MARKER) {
$names[] = 'MARKER';
} else {
$names[] = $... | [
"private",
"function",
"printActiveFormattingElements",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"a_formatting",
")",
"{",
"return",
";",
"}",
"$",
"names",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"a_formatting",
"as",
... | For debugging, prints active formatting elements | [
"For",
"debugging",
"prints",
"active",
"formatting",
"elements"
] | 75f13c700009be21a1965dc2c5b68a8708c22ba2 | https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/lib/html5lib/TreeBuilder.php#L3744-L3757 | train | Print active formatting elements | [
30522,
2797,
3853,
6140,
19620,
14192,
19321,
23496,
16930,
11187,
1006,
1007,
1063,
2065,
1006,
999,
1002,
2023,
1011,
1028,
1037,
1035,
4289,
3436,
1007,
1063,
2709,
1025,
1065,
1002,
3415,
1027,
9140,
1006,
1007,
1025,
18921,
6776,
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/Annotations/API.php | API.getAnnotationCountForDates | public function getAnnotationCountForDates($idSite, $date, $period, $lastN = false, $getAnnotationText = false)
{
Piwik::checkUserHasViewAccess($idSite);
// get start & end date for request. lastN is ignored if $period == 'range'
list($startDate, $endDate) = self::getDateRangeForPeriod($dat... | php | public function getAnnotationCountForDates($idSite, $date, $period, $lastN = false, $getAnnotationText = false)
{
Piwik::checkUserHasViewAccess($idSite);
// get start & end date for request. lastN is ignored if $period == 'range'
list($startDate, $endDate) = self::getDateRangeForPeriod($dat... | [
"public",
"function",
"getAnnotationCountForDates",
"(",
"$",
"idSite",
",",
"$",
"date",
",",
"$",
"period",
",",
"$",
"lastN",
"=",
"false",
",",
"$",
"getAnnotationText",
"=",
"false",
")",
"{",
"Piwik",
"::",
"checkUserHasViewAccess",
"(",
"$",
"idSite",... | Returns the count of annotations for a list of periods, including the count of
starred annotations.
@param string $idSite The site ID to add the annotation to.
@param string|bool $date The date of the period.
@param string $period The period type.
@param int|bool $lastN Whether to get counts for the last N number of p... | [
"Returns",
"the",
"count",
"of",
"annotations",
"for",
"a",
"list",
"of",
"periods",
"including",
"the",
"count",
"of",
"starred",
"annotations",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Annotations/API.php#L222-L274 | train | Returns annotation count for a given date range and annotation period | [
30522,
2270,
3853,
2131,
11639,
17287,
3508,
3597,
16671,
3877,
8520,
1006,
1002,
8909,
28032,
2063,
1010,
1002,
3058,
1010,
1002,
2558,
1010,
1002,
2197,
2078,
1027,
6270,
1010,
1002,
2131,
11639,
17287,
30524,
2015,
1006,
1002,
8909,
2803... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/RouteCollectionBuilder.php | RouteCollectionBuilder.load | private function load($resource, string $type = null): array
{
if (null === $this->loader) {
throw new \BadMethodCallException('Cannot import other routing resources: you must pass a LoaderInterface when constructing RouteCollectionBuilder.');
}
if ($this->loader->supports($reso... | php | private function load($resource, string $type = null): array
{
if (null === $this->loader) {
throw new \BadMethodCallException('Cannot import other routing resources: you must pass a LoaderInterface when constructing RouteCollectionBuilder.');
}
if ($this->loader->supports($reso... | [
"private",
"function",
"load",
"(",
"$",
"resource",
",",
"string",
"$",
"type",
"=",
"null",
")",
":",
"array",
"{",
"if",
"(",
"null",
"===",
"$",
"this",
"->",
"loader",
")",
"{",
"throw",
"new",
"\\",
"BadMethodCallException",
"(",
"'Cannot import ot... | Finds a loader able to load an imported resource and loads it.
@param mixed $resource A resource
@param string|null $type The resource type or null if unknown
@return RouteCollection[]
@throws LoaderLoadException If no loader is found | [
"Finds",
"a",
"loader",
"able",
"to",
"load",
"an",
"imported",
"resource",
"and",
"loads",
"it",
"."
] | b82b09eefb084e487997f4af753400d721edd0a8 | https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Routing/RouteCollectionBuilder.php#L352-L375 | train | Load the routing resources | [
30522,
2797,
3853,
7170,
30524,
1006,
1005,
3685,
12324,
2060,
16972,
4219,
1024,
2017,
2442,
3413,
1037,
7170,
23282,
3334,
12172,
2043,
15696,
2799,
26895,
18491,
8569,
23891,
2099,
1012,
1005,
1007,
1025,
1065,
2065,
1006,
1002,
2023,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
matomo-org/matomo | core/Menu/MenuAdmin.php | MenuAdmin.addPersonalItem | public function addPersonalItem($menuName, $url, $order = 50, $tooltip = false)
{
$this->addItem('UsersManager_MenuPersonal', $menuName, $url, $order, $tooltip);
} | php | public function addPersonalItem($menuName, $url, $order = 50, $tooltip = false)
{
$this->addItem('UsersManager_MenuPersonal', $menuName, $url, $order, $tooltip);
} | [
"public",
"function",
"addPersonalItem",
"(",
"$",
"menuName",
",",
"$",
"url",
",",
"$",
"order",
"=",
"50",
",",
"$",
"tooltip",
"=",
"false",
")",
"{",
"$",
"this",
"->",
"addItem",
"(",
"'UsersManager_MenuPersonal'",
",",
"$",
"menuName",
",",
"$",
... | See {@link add()}. Adds a new menu item to the manage section of the user menu.
@param string $menuName
@param array $url
@param int $order
@param bool|string $tooltip
@api
@since 2.5.0 | [
"See",
"{"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Menu/MenuAdmin.php#L32-L35 | train | Add a personal menu item | [
30522,
2270,
3853,
5587,
28823,
4221,
2213,
1006,
1002,
12183,
18442,
1010,
1002,
24471,
2140,
1010,
1002,
2344,
1027,
2753,
1010,
1002,
6994,
25101,
1027,
6270,
1007,
1063,
1002,
2023,
1011,
1028,
5587,
4221,
2213,
1006,
1005,
5198,
24805,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/RouteCollectionBuilder.php | RouteCollectionBuilder.mount | public function mount($prefix, self $builder)
{
$builder->prefix = trim(trim($prefix), '/');
$this->routes[] = $builder;
} | php | public function mount($prefix, self $builder)
{
$builder->prefix = trim(trim($prefix), '/');
$this->routes[] = $builder;
} | [
"public",
"function",
"mount",
"(",
"$",
"prefix",
",",
"self",
"$",
"builder",
")",
"{",
"$",
"builder",
"->",
"prefix",
"=",
"trim",
"(",
"trim",
"(",
"$",
"prefix",
")",
",",
"'/'",
")",
";",
"$",
"this",
"->",
"routes",
"[",
"]",
"=",
"$",
... | Add a RouteCollectionBuilder.
@param string $prefix
@param RouteCollectionBuilder $builder | [
"Add",
"a",
"RouteCollectionBuilder",
"."
] | b82b09eefb084e487997f4af753400d721edd0a8 | https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Routing/RouteCollectionBuilder.php#L121-L125 | train | Mount a new route builder | [
30522,
2270,
3853,
4057,
1006,
1002,
17576,
1010,
2969,
1002,
12508,
1007,
1063,
1002,
12508,
1011,
1028,
17576,
1027,
12241,
1006,
12241,
1006,
1002,
17576,
1007,
1010,
1005,
1013,
1005,
1007,
1025,
1002,
2023,
1011,
1028,
5847,
1031,
1033... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
matomo-org/matomo | plugins/Overlay/Controller.php | Controller.startOverlaySession | public function startOverlaySession()
{
$this->checkSitePermission();
Piwik::checkUserHasViewAccess($this->idSite);
$view = new View('@Overlay/startOverlaySession');
$sitesManager = APISitesManager::getInstance();
$site = $sitesManager->getSiteFromId($this->idSite);
... | php | public function startOverlaySession()
{
$this->checkSitePermission();
Piwik::checkUserHasViewAccess($this->idSite);
$view = new View('@Overlay/startOverlaySession');
$sitesManager = APISitesManager::getInstance();
$site = $sitesManager->getSiteFromId($this->idSite);
... | [
"public",
"function",
"startOverlaySession",
"(",
")",
"{",
"$",
"this",
"->",
"checkSitePermission",
"(",
")",
";",
"Piwik",
"::",
"checkUserHasViewAccess",
"(",
"$",
"this",
"->",
"idSite",
")",
";",
"$",
"view",
"=",
"new",
"View",
"(",
"'@Overlay/startOv... | Start an Overlay session: Redirect to the tracked website. The Piwik
tracker will recognize this referrer and start the session. | [
"Start",
"an",
"Overlay",
"session",
":",
"Redirect",
"to",
"the",
"tracked",
"website",
".",
"The",
"Piwik",
"tracker",
"will",
"recognize",
"this",
"referrer",
"and",
"start",
"the",
"session",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Overlay/Controller.php#L164-L183 | train | This method renders the HTML code to start the overlay session | [
30522,
2270,
3853,
2707,
7840,
8485,
8583,
10992,
1006,
1007,
1063,
1002,
2023,
1011,
1028,
14148,
4221,
4842,
25481,
1006,
1007,
1025,
14255,
9148,
2243,
1024,
1024,
4638,
20330,
14949,
8584,
6305,
9623,
2015,
1006,
1002,
2023,
1011,
1028,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
symfony/symfony | src/Symfony/Component/Form/Extension/Core/DataTransformer/StringToFloatTransformer.php | StringToFloatTransformer.transform | public function transform($value)
{
if (null === $value) {
return null;
}
if (!\is_string($value) || !is_numeric($value)) {
throw new TransformationFailedException('Expected a numeric string.');
}
return (float) $value;
} | php | public function transform($value)
{
if (null === $value) {
return null;
}
if (!\is_string($value) || !is_numeric($value)) {
throw new TransformationFailedException('Expected a numeric string.');
}
return (float) $value;
} | [
"public",
"function",
"transform",
"(",
"$",
"value",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"value",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"!",
"\\",
"is_string",
"(",
"$",
"value",
")",
"||",
"!",
"is_numeric",
"(",
"$",
"value",
"... | @param mixed $value
@return float|null | [
"@param",
"mixed",
"$value"
] | b82b09eefb084e487997f4af753400d721edd0a8 | https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Form/Extension/Core/DataTransformer/StringToFloatTransformer.php#L31-L42 | train | Transforms a numeric string into a float | [
30522,
2270,
3853,
10938,
1006,
1002,
3643,
1007,
1063,
2065,
1006,
19701,
1027,
1027,
1027,
1002,
3643,
1007,
1063,
2709,
19701,
1025,
1065,
2065,
1006,
999,
1032,
2003,
1035,
5164,
1006,
1002,
3643,
1007,
1064,
1064,
999,
2003,
1035,
16... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
matomo-org/matomo | libs/Zend/Config.php | Zend_Config.next | public function next()
{
if ($this->_skipNextIteration) {
$this->_skipNextIteration = false;
return;
}
next($this->_data);
$this->_index++;
} | php | public function next()
{
if ($this->_skipNextIteration) {
$this->_skipNextIteration = false;
return;
}
next($this->_data);
$this->_index++;
} | [
"public",
"function",
"next",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_skipNextIteration",
")",
"{",
"$",
"this",
"->",
"_skipNextIteration",
"=",
"false",
";",
"return",
";",
"}",
"next",
"(",
"$",
"this",
"->",
"_data",
")",
";",
"$",
"this",... | Defined by Iterator interface | [
"Defined",
"by",
"Iterator",
"interface"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Config.php#L278-L286 | train | Returns the next term in the iterator | [
30522,
2270,
3853,
2279,
1006,
30524,
1009,
1025,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
laravel/framework | src/Illuminate/Database/Schema/SQLiteBuilder.php | SQLiteBuilder.dropAllTables | public function dropAllTables()
{
if ($this->connection->getDatabaseName() !== ':memory:') {
return $this->refreshDatabaseFile();
}
$this->connection->select($this->grammar->compileEnableWriteableSchema());
$this->connection->select($this->grammar->compileDropAllTables(... | php | public function dropAllTables()
{
if ($this->connection->getDatabaseName() !== ':memory:') {
return $this->refreshDatabaseFile();
}
$this->connection->select($this->grammar->compileEnableWriteableSchema());
$this->connection->select($this->grammar->compileDropAllTables(... | [
"public",
"function",
"dropAllTables",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"connection",
"->",
"getDatabaseName",
"(",
")",
"!==",
"':memory:'",
")",
"{",
"return",
"$",
"this",
"->",
"refreshDatabaseFile",
"(",
")",
";",
"}",
"$",
"this",
"->",... | Drop all tables from the database.
@return void | [
"Drop",
"all",
"tables",
"from",
"the",
"database",
"."
] | 0e0a428a50fc8378e3f77d18f3caae76c19e8c7a | https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/SQLiteBuilder.php#L12-L25 | train | Drop all tables in the database | [
30522,
2270,
3853,
4530,
8095,
10880,
2015,
1006,
1007,
1063,
2065,
1006,
1002,
2023,
1011,
1028,
4434,
1011,
1028,
2131,
2850,
2696,
15058,
18442,
1006,
1007,
999,
1027,
1027,
1005,
1024,
3638,
1024,
1005,
1007,
1063,
2709,
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/Filesystem/Filesystem.php | Filesystem.replace | public function replace($path, $content)
{
// If the path already exists and is a symlink, get the real path...
clearstatcache(true, $path);
$path = realpath($path) ?: $path;
$tempPath = tempnam(dirname($path), basename($path));
// Fix permissions of tempPath because `temp... | php | public function replace($path, $content)
{
// If the path already exists and is a symlink, get the real path...
clearstatcache(true, $path);
$path = realpath($path) ?: $path;
$tempPath = tempnam(dirname($path), basename($path));
// Fix permissions of tempPath because `temp... | [
"public",
"function",
"replace",
"(",
"$",
"path",
",",
"$",
"content",
")",
"{",
"// If the path already exists and is a symlink, get the real path...",
"clearstatcache",
"(",
"true",
",",
"$",
"path",
")",
";",
"$",
"path",
"=",
"realpath",
"(",
"$",
"path",
"... | Write the contents of a file, replacing it atomically if it already exists.
@param string $path
@param string $content
@return void | [
"Write",
"the",
"contents",
"of",
"a",
"file",
"replacing",
"it",
"atomically",
"if",
"it",
"already",
"exists",
"."
] | 0e0a428a50fc8378e3f77d18f3caae76c19e8c7a | https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Filesystem/Filesystem.php#L132-L147 | train | Replaces the content of the file with the content of the file | [
30522,
2270,
3853,
5672,
1006,
1002,
4130,
1010,
1002,
4180,
1007,
1063,
1013,
1013,
2065,
1996,
4130,
2525,
6526,
1998,
2003,
1037,
25353,
19968,
19839,
1010,
2131,
1996,
2613,
4130,
1012,
1012,
1012,
28837,
29336,
3540,
5403,
1006,
2995,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
octobercms/october | modules/cms/widgets/AssetList.php | AssetList.validateFileType | protected function validateFileType($name)
{
$extension = strtolower(File::extension($name));
if (!in_array($extension, $this->assetExtensions)) {
return false;
}
return true;
} | php | protected function validateFileType($name)
{
$extension = strtolower(File::extension($name));
if (!in_array($extension, $this->assetExtensions)) {
return false;
}
return true;
} | [
"protected",
"function",
"validateFileType",
"(",
"$",
"name",
")",
"{",
"$",
"extension",
"=",
"strtolower",
"(",
"File",
"::",
"extension",
"(",
"$",
"name",
")",
")",
";",
"if",
"(",
"!",
"in_array",
"(",
"$",
"extension",
",",
"$",
"this",
"->",
... | Check for valid asset file extension
@param string
@return bool | [
"Check",
"for",
"valid",
"asset",
"file",
"extension"
] | 3118660d834f161d513da08477be92281a2eb96a | https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/cms/widgets/AssetList.php#L603-L612 | train | Validate asset file type | [
30522,
5123,
3853,
9398,
3686,
8873,
7485,
18863,
1006,
1002,
2171,
1007,
1063,
1002,
5331,
1027,
2358,
5339,
12898,
13777,
1006,
5371,
1024,
1024,
5331,
1006,
1002,
2171,
1007,
1007,
1025,
2065,
1006,
999,
1999,
1035,
9140,
1006,
1002,
5... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
laravel/framework | src/Illuminate/Auth/Console/AuthMakeCommand.php | AuthMakeCommand.createDirectories | protected function createDirectories()
{
if (! is_dir($directory = $this->getViewPath('layouts'))) {
mkdir($directory, 0755, true);
}
if (! is_dir($directory = $this->getViewPath('auth/passwords'))) {
mkdir($directory, 0755, true);
}
} | php | protected function createDirectories()
{
if (! is_dir($directory = $this->getViewPath('layouts'))) {
mkdir($directory, 0755, true);
}
if (! is_dir($directory = $this->getViewPath('auth/passwords'))) {
mkdir($directory, 0755, true);
}
} | [
"protected",
"function",
"createDirectories",
"(",
")",
"{",
"if",
"(",
"!",
"is_dir",
"(",
"$",
"directory",
"=",
"$",
"this",
"->",
"getViewPath",
"(",
"'layouts'",
")",
")",
")",
"{",
"mkdir",
"(",
"$",
"directory",
",",
"0755",
",",
"true",
")",
... | Create the directories for the files.
@return void | [
"Create",
"the",
"directories",
"for",
"the",
"files",
"."
] | 0e0a428a50fc8378e3f77d18f3caae76c19e8c7a | https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/Console/AuthMakeCommand.php#L75-L84 | train | Create directories for layout and auth | [
30522,
5123,
3853,
2580,
7442,
16761,
3111,
1006,
1007,
1063,
2065,
1006,
999,
2003,
1035,
16101,
1006,
1002,
14176,
1027,
1002,
2023,
1011,
1028,
2131,
8584,
15069,
1006,
1005,
9621,
2015,
1005,
1007,
1007,
1007,
1063,
12395,
4305,
2099,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
z-song/laravel-admin | src/Form/Field/Tags.php | Tags.options | public function options($options = [])
{
if (!$this->keyAsValue) {
return parent::options($options);
}
if ($options instanceof Collection) {
$options = $options->pluck($this->visibleColumn, $this->key)->toArray();
}
if ($options instanceof Arrayable)... | php | public function options($options = [])
{
if (!$this->keyAsValue) {
return parent::options($options);
}
if ($options instanceof Collection) {
$options = $options->pluck($this->visibleColumn, $this->key)->toArray();
}
if ($options instanceof Arrayable)... | [
"public",
"function",
"options",
"(",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"keyAsValue",
")",
"{",
"return",
"parent",
"::",
"options",
"(",
"$",
"options",
")",
";",
"}",
"if",
"(",
"$",
"options",
"instanceo... | Set the field options.
@param array|Collection|Arrayable $options
@return $this|Field | [
"Set",
"the",
"field",
"options",
"."
] | 3e65086f806b54699145f58af53843e5dbbb7994 | https://github.com/z-song/laravel-admin/blob/3e65086f806b54699145f58af53843e5dbbb7994/src/Form/Field/Tags.php#L96-L113 | train | Options for this column | [
30522,
2270,
3853,
7047,
1006,
1002,
7047,
1027,
1031,
1033,
1007,
1063,
2065,
1006,
999,
1002,
2023,
1011,
1028,
3145,
3022,
10175,
5657,
1007,
1063,
2709,
6687,
1024,
1024,
7047,
1006,
1002,
7047,
1007,
1025,
1065,
2065,
1006,
1002,
704... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
overtrue/wechat | src/OfficialAccount/ShakeAround/DeviceClient.php | DeviceClient.bindPoi | public function bindPoi(array $deviceIdentifier, int $poiId)
{
$params = [
'device_identifier' => $deviceIdentifier,
'poi_id' => $poiId,
];
return $this->httpPostJson('shakearound/device/bindlocation', $params);
} | php | public function bindPoi(array $deviceIdentifier, int $poiId)
{
$params = [
'device_identifier' => $deviceIdentifier,
'poi_id' => $poiId,
];
return $this->httpPostJson('shakearound/device/bindlocation', $params);
} | [
"public",
"function",
"bindPoi",
"(",
"array",
"$",
"deviceIdentifier",
",",
"int",
"$",
"poiId",
")",
"{",
"$",
"params",
"=",
"[",
"'device_identifier'",
"=>",
"$",
"deviceIdentifier",
",",
"'poi_id'",
"=>",
"$",
"poiId",
",",
"]",
";",
"return",
"$",
... | Bind location for device.
@param array $deviceIdentifier
@param int $poiId
@return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
@throws InvalidArgumentException | [
"Bind",
"location",
"for",
"device",
"."
] | 120c72faaa93c270365bc75c73c362d5fd583209 | https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/ShakeAround/DeviceClient.php#L78-L86 | train | Bind Poi to Device | [
30522,
2270,
3853,
14187,
6873,
2072,
1006,
9140,
1002,
5080,
5178,
16778,
8873,
2121,
1010,
20014,
1002,
13433,
6137,
2094,
1007,
1063,
1002,
11498,
5244,
1027,
1031,
1005,
5080,
1035,
8909,
4765,
30524,
1011,
1028,
8299,
19894,
22578,
223... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
laravel/framework | src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php | SqlServerGrammar.compileDropColumn | public function compileDropColumn(Blueprint $blueprint, Fluent $command)
{
$columns = $this->wrapArray($command->columns);
return 'alter table '.$this->wrapTable($blueprint).' drop column '.implode(', ', $columns);
} | php | public function compileDropColumn(Blueprint $blueprint, Fluent $command)
{
$columns = $this->wrapArray($command->columns);
return 'alter table '.$this->wrapTable($blueprint).' drop column '.implode(', ', $columns);
} | [
"public",
"function",
"compileDropColumn",
"(",
"Blueprint",
"$",
"blueprint",
",",
"Fluent",
"$",
"command",
")",
"{",
"$",
"columns",
"=",
"$",
"this",
"->",
"wrapArray",
"(",
"$",
"command",
"->",
"columns",
")",
";",
"return",
"'alter table '",
".",
"$... | Compile a drop column command.
@param \Illuminate\Database\Schema\Blueprint $blueprint
@param \Illuminate\Support\Fluent $command
@return string | [
"Compile",
"a",
"drop",
"column",
"command",
"."
] | 0e0a428a50fc8378e3f77d18f3caae76c19e8c7a | https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php#L191-L196 | train | Compiles drop column SQL statement. | [
30522,
2270,
3853,
9227,
18981,
25778,
2819,
2078,
1006,
2630,
16550,
1002,
2630,
16550,
1010,
19376,
1002,
3094,
1007,
1063,
1002,
7753,
1027,
1002,
2023,
1011,
1028,
10236,
2906,
9447,
1006,
1002,
3094,
1011,
1028,
7753,
1007,
1025,
2709,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
matomo-org/matomo | plugins/Live/Visitor.php | Visitor.enrichVisitorArrayWithActions | public static function enrichVisitorArrayWithActions($visitorDetailsArray, $actionDetails = array())
{
$actionsLimit = (int)Config::getInstance()->General['visitor_log_maximum_actions_per_visit'];
$visitorDetailsManipulators = self::getAllVisitorDetailsInstances();
foreach ($visitorDetailsM... | php | public static function enrichVisitorArrayWithActions($visitorDetailsArray, $actionDetails = array())
{
$actionsLimit = (int)Config::getInstance()->General['visitor_log_maximum_actions_per_visit'];
$visitorDetailsManipulators = self::getAllVisitorDetailsInstances();
foreach ($visitorDetailsM... | [
"public",
"static",
"function",
"enrichVisitorArrayWithActions",
"(",
"$",
"visitorDetailsArray",
",",
"$",
"actionDetails",
"=",
"array",
"(",
")",
")",
"{",
"$",
"actionsLimit",
"=",
"(",
"int",
")",
"Config",
"::",
"getInstance",
"(",
")",
"->",
"General",
... | @param array $visitorDetailsArray
@param array $actionDetails preset action details
@return array | [
"@param",
"array",
"$visitorDetailsArray",
"@param",
"array",
"$actionDetails",
"preset",
"action",
"details"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Live/Visitor.php#L281-L316 | train | Enriches the visitor array with the action details of all the visits | [
30522,
2270,
10763,
3853,
4372,
13149,
11365,
15660,
2906,
9447,
24415,
18908,
8496,
1006,
1002,
10367,
3207,
22081,
2906,
9447,
1010,
1002,
2895,
3207,
22081,
1027,
9140,
1006,
1007,
1007,
1063,
1002,
4506,
17960,
4183,
1027,
1006,
20014,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
symfony/symfony | src/Symfony/Component/HttpClient/CurlHttpClient.php | CurlHttpClient.request | public function request(string $method, string $url, array $options = []): ResponseInterface
{
[$url, $options] = self::prepareRequest($method, $url, $options, $this->defaultOptions);
$scheme = $url['scheme'];
$authority = $url['authority'];
$host = parse_url($authority, PHP_URL_HOST... | php | public function request(string $method, string $url, array $options = []): ResponseInterface
{
[$url, $options] = self::prepareRequest($method, $url, $options, $this->defaultOptions);
$scheme = $url['scheme'];
$authority = $url['authority'];
$host = parse_url($authority, PHP_URL_HOST... | [
"public",
"function",
"request",
"(",
"string",
"$",
"method",
",",
"string",
"$",
"url",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
":",
"ResponseInterface",
"{",
"[",
"$",
"url",
",",
"$",
"options",
"]",
"=",
"self",
"::",
"prepareRequest",
... | @see HttpClientInterface::OPTIONS_DEFAULTS for available options
{@inheritdoc} | [
"@see",
"HttpClientInterface",
"::",
"OPTIONS_DEFAULTS",
"for",
"available",
"options"
] | b82b09eefb084e487997f4af753400d721edd0a8 | https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/HttpClient/CurlHttpClient.php#L97-L275 | train | Sends a request to the specified url and returns a response | [
30522,
2270,
3853,
5227,
1006,
5164,
1002,
4118,
1010,
5164,
1002,
24471,
2140,
1010,
9140,
1002,
7047,
1027,
1031,
1033,
1007,
1024,
3433,
18447,
2121,
12172,
1063,
1031,
1002,
24471,
2140,
1010,
1002,
7047,
1033,
1027,
2969,
1024,
1024,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
symfony/symfony | src/Symfony/Component/Validator/Constraints/UniqueValidator.php | UniqueValidator.validate | public function validate($value, Constraint $constraint)
{
if (!$constraint instanceof Unique) {
throw new UnexpectedTypeException($constraint, Unique::class);
}
if (null === $value) {
return;
}
if (!\is_array($value) && !$value instanceof \IteratorA... | php | public function validate($value, Constraint $constraint)
{
if (!$constraint instanceof Unique) {
throw new UnexpectedTypeException($constraint, Unique::class);
}
if (null === $value) {
return;
}
if (!\is_array($value) && !$value instanceof \IteratorA... | [
"public",
"function",
"validate",
"(",
"$",
"value",
",",
"Constraint",
"$",
"constraint",
")",
"{",
"if",
"(",
"!",
"$",
"constraint",
"instanceof",
"Unique",
")",
"{",
"throw",
"new",
"UnexpectedTypeException",
"(",
"$",
"constraint",
",",
"Unique",
"::",
... | {@inheritdoc} | [
"{"
] | b82b09eefb084e487997f4af753400d721edd0a8 | https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Validator/Constraints/UniqueValidator.php#L27-L53 | train | Checks if the value is a unique | [
30522,
2270,
3853,
9398,
3686,
1006,
1002,
3643,
1010,
27142,
1002,
27142,
1007,
1063,
2065,
1006,
999,
1002,
27142,
6013,
11253,
4310,
1007,
1063,
5466,
2047,
9223,
13874,
10288,
24422,
1006,
1002,
27142,
1010,
4310,
1024,
1024,
2465,
1007... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
laravel/framework | src/Illuminate/Database/Connectors/MySqlConnector.php | MySqlConnector.setCustomModes | protected function setCustomModes(PDO $connection, array $config)
{
$modes = implode(',', $config['modes']);
$connection->prepare("set session sql_mode='{$modes}'")->execute();
} | php | protected function setCustomModes(PDO $connection, array $config)
{
$modes = implode(',', $config['modes']);
$connection->prepare("set session sql_mode='{$modes}'")->execute();
} | [
"protected",
"function",
"setCustomModes",
"(",
"PDO",
"$",
"connection",
",",
"array",
"$",
"config",
")",
"{",
"$",
"modes",
"=",
"implode",
"(",
"','",
",",
"$",
"config",
"[",
"'modes'",
"]",
")",
";",
"$",
"connection",
"->",
"prepare",
"(",
"\"se... | Set the custom modes on the connection.
@param \PDO $connection
@param array $config
@return void | [
"Set",
"the",
"custom",
"modes",
"on",
"the",
"connection",
"."
] | 0e0a428a50fc8378e3f77d18f3caae76c19e8c7a | https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Connectors/MySqlConnector.php#L164-L169 | train | Set custom modes | [
30522,
5123,
3853,
2275,
7874,
20389,
5302,
6155,
1006,
22851,
2080,
1002,
4434,
1010,
9140,
1002,
9530,
8873,
2290,
1007,
1063,
1002,
11583,
1027,
17727,
4135,
3207,
1006,
1005,
1010,
1005,
1010,
1002,
9530,
8873,
2290,
1031,
1005,
11583,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
getgrav/grav | system/src/Grav/Common/Uri.php | Uri.params | public function params($id = null, $array = false)
{
$config = Grav::instance()['config'];
$sep = $config->get('system.param_sep');
$params = null;
if ($id === null) {
if ($array) {
return $this->params;
}
$output = [];
... | php | public function params($id = null, $array = false)
{
$config = Grav::instance()['config'];
$sep = $config->get('system.param_sep');
$params = null;
if ($id === null) {
if ($array) {
return $this->params;
}
$output = [];
... | [
"public",
"function",
"params",
"(",
"$",
"id",
"=",
"null",
",",
"$",
"array",
"=",
"false",
")",
"{",
"$",
"config",
"=",
"Grav",
"::",
"instance",
"(",
")",
"[",
"'config'",
"]",
";",
"$",
"sep",
"=",
"$",
"config",
"->",
"get",
"(",
"'system.... | Return all or a single query parameter as a URI compatible string.
@param string $id Optional parameter name.
@param boolean $array return the array format or not
@return null|string|array | [
"Return",
"all",
"or",
"a",
"single",
"query",
"parameter",
"as",
"a",
"URI",
"compatible",
"string",
"."
] | 1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72 | https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Uri.php#L274-L297 | train | Return parameters of the current page | [
30522,
2270,
3853,
11498,
5244,
1006,
1002,
8909,
1027,
19701,
1010,
1002,
9140,
1027,
6270,
1007,
1063,
1002,
9530,
8873,
2290,
1027,
24665,
11431,
1024,
1024,
6013,
1006,
1007,
1031,
1005,
9530,
8873,
2290,
1005,
1033,
1025,
1002,
19802,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
symfony/symfony | src/Symfony/Component/Cache/Traits/DoctrineTrait.php | DoctrineTrait.doClear | protected function doClear($namespace)
{
$namespace = $this->provider->getNamespace();
return isset($namespace[0])
? $this->provider->deleteAll()
: $this->provider->flushAll();
} | php | protected function doClear($namespace)
{
$namespace = $this->provider->getNamespace();
return isset($namespace[0])
? $this->provider->deleteAll()
: $this->provider->flushAll();
} | [
"protected",
"function",
"doClear",
"(",
"$",
"namespace",
")",
"{",
"$",
"namespace",
"=",
"$",
"this",
"->",
"provider",
"->",
"getNamespace",
"(",
")",
";",
"return",
"isset",
"(",
"$",
"namespace",
"[",
"0",
"]",
")",
"?",
"$",
"this",
"->",
"pro... | {@inheritdoc} | [
"{"
] | b82b09eefb084e487997f4af753400d721edd0a8 | https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Cache/Traits/DoctrineTrait.php#L69-L76 | train | Clear all cache | [
30522,
5123,
3853,
9986,
19738,
2099,
1006,
1002,
3415,
15327,
1007,
1063,
1002,
3415,
15327,
1027,
1002,
2023,
1011,
1028,
10802,
1011,
1028,
2131,
18442,
23058,
1006,
1007,
1025,
2709,
26354,
3388,
1006,
1002,
3415,
15327,
1031,
1014,
103... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
getgrav/grav | system/src/Grav/Common/Page/Page.php | Page.doReorder | protected function doReorder($new_order)
{
if (!$this->_original) {
return;
}
$pages = Grav::instance()['pages'];
$pages->init();
$this->_original->path($this->path());
$parent = $this->parent();
$siblings = $parent ? $parent->children() : null;... | php | protected function doReorder($new_order)
{
if (!$this->_original) {
return;
}
$pages = Grav::instance()['pages'];
$pages->init();
$this->_original->path($this->path());
$parent = $this->parent();
$siblings = $parent ? $parent->children() : null;... | [
"protected",
"function",
"doReorder",
"(",
"$",
"new_order",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_original",
")",
"{",
"return",
";",
"}",
"$",
"pages",
"=",
"Grav",
"::",
"instance",
"(",
")",
"[",
"'pages'",
"]",
";",
"$",
"pages",
"->"... | Reorders all siblings according to a defined order
@param array|null $new_order | [
"Reorders",
"all",
"siblings",
"according",
"to",
"a",
"defined",
"order"
] | 1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72 | https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Page/Page.php#L3051-L3092 | train | Reorder the page. | [
30522,
5123,
3853,
2079,
2890,
8551,
2121,
1006,
1002,
2047,
1035,
2344,
1007,
1063,
2065,
1006,
999,
1002,
2023,
1011,
1028,
1035,
2434,
1007,
1063,
2709,
1025,
1065,
1002,
5530,
1027,
24665,
11431,
1024,
1024,
6013,
1006,
1007,
1031,
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/DependencyInjection/ContainerBuilder.php | ContainerBuilder.get | public function get($id, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE)
{
if ($this->isCompiled() && isset($this->removedIds[$id = (string) $id]) && ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE >= $invalidBehavior) {
return parent::get($id);
}
retur... | php | public function get($id, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE)
{
if ($this->isCompiled() && isset($this->removedIds[$id = (string) $id]) && ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE >= $invalidBehavior) {
return parent::get($id);
}
retur... | [
"public",
"function",
"get",
"(",
"$",
"id",
",",
"$",
"invalidBehavior",
"=",
"ContainerInterface",
"::",
"EXCEPTION_ON_INVALID_REFERENCE",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"isCompiled",
"(",
")",
"&&",
"isset",
"(",
"$",
"this",
"->",
"removedIds",
... | Gets a service.
@param string $id The service identifier
@param int $invalidBehavior The behavior when the service does not exist
@return object The associated service
@throws InvalidArgumentException when no definitions are available
@throws ServiceCircularReferenceException When a circular... | [
"Gets",
"a",
"service",
"."
] | b82b09eefb084e487997f4af753400d721edd0a8 | https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/DependencyInjection/ContainerBuilder.php#L552-L559 | train | Get a language from the cache. | [
30522,
2270,
3853,
2131,
1006,
1002,
8909,
1010,
1002,
19528,
4783,
3270,
25500,
2099,
1027,
11661,
18447,
2121,
12172,
1024,
1024,
6453,
1035,
2006,
1035,
19528,
1035,
4431,
1007,
1063,
2065,
1006,
1002,
2023,
1011,
1028,
2003,
9006,
22090... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
slimphp/Slim | Slim/App.php | App.run | public function run($silent = false)
{
$response = $this->container->get('response');
try {
ob_start();
$response = $this->process($this->container->get('request'), $response);
} catch (InvalidMethodException $e) {
$response = $this->processInvalidMethod(... | php | public function run($silent = false)
{
$response = $this->container->get('response');
try {
ob_start();
$response = $this->process($this->container->get('request'), $response);
} catch (InvalidMethodException $e) {
$response = $this->processInvalidMethod(... | [
"public",
"function",
"run",
"(",
"$",
"silent",
"=",
"false",
")",
"{",
"$",
"response",
"=",
"$",
"this",
"->",
"container",
"->",
"get",
"(",
"'response'",
")",
";",
"try",
"{",
"ob_start",
"(",
")",
";",
"$",
"response",
"=",
"$",
"this",
"->",... | Run application
This method traverses the application middleware stack and then sends the
resultant Response object to the HTTP client.
@param bool|false $silent
@return ResponseInterface
@throws Exception
@throws Throwable | [
"Run",
"application"
] | ccef5f7d8bcd469d59cbe64f6210d83764f91543 | https://github.com/slimphp/Slim/blob/ccef5f7d8bcd469d59cbe64f6210d83764f91543/Slim/App.php#L291-L324 | train | Runs the application | [
30522,
2270,
3853,
2448,
1006,
1002,
4333,
1027,
6270,
1007,
1063,
1002,
3433,
1027,
1002,
2023,
1011,
1028,
11661,
1011,
1028,
2131,
1006,
1005,
3433,
1005,
1007,
1025,
3046,
1063,
27885,
1035,
2707,
1006,
1007,
1025,
1002,
3433,
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... |
getgrav/grav | system/src/Grav/Common/Filesystem/Folder.php | Folder.hashAllFiles | public static function hashAllFiles($path)
{
$flags = \RecursiveDirectoryIterator::SKIP_DOTS;
$files = [];
/** @var UniformResourceLocator $locator */
$locator = Grav::instance()['locator'];
if ($locator->isStream($path)) {
$directory = $locator->getRecursiveIter... | php | public static function hashAllFiles($path)
{
$flags = \RecursiveDirectoryIterator::SKIP_DOTS;
$files = [];
/** @var UniformResourceLocator $locator */
$locator = Grav::instance()['locator'];
if ($locator->isStream($path)) {
$directory = $locator->getRecursiveIter... | [
"public",
"static",
"function",
"hashAllFiles",
"(",
"$",
"path",
")",
"{",
"$",
"flags",
"=",
"\\",
"RecursiveDirectoryIterator",
"::",
"SKIP_DOTS",
";",
"$",
"files",
"=",
"[",
"]",
";",
"/** @var UniformResourceLocator $locator */",
"$",
"locator",
"=",
"Grav... | Recursively md5 hash all files in a path
@param string $path
@return string | [
"Recursively",
"md5",
"hash",
"all",
"files",
"in",
"a",
"path"
] | 1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72 | https://github.com/getgrav/grav/blob/1a41e00a4f0f5d17b6c0ce5150a5d656a8c5be72/system/src/Grav/Common/Filesystem/Folder.php#L93-L113 | train | Hash all files in a directory | [
30522,
2270,
10763,
30524,
1002,
9245,
1027,
1032,
28667,
9236,
3512,
4305,
2890,
16761,
10139,
14621,
4263,
1024,
1024,
13558,
1035,
14981,
1025,
1002,
6764,
1027,
1031,
1033,
1025,
1013,
1008,
1008,
1030,
13075,
6375,
6072,
8162,
29109,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
matomo-org/matomo | core/DataAccess/RawLogDao.php | RawLogDao.deleteFromLogTable | public function deleteFromLogTable($tableName, $visitIds)
{
$sql = "DELETE FROM `" . Common::prefixTable($tableName) . "` WHERE idvisit IN "
. $this->getInFieldExpressionWithInts($visitIds);
$statement = Db::query($sql);
return $statement->rowCount();
} | php | public function deleteFromLogTable($tableName, $visitIds)
{
$sql = "DELETE FROM `" . Common::prefixTable($tableName) . "` WHERE idvisit IN "
. $this->getInFieldExpressionWithInts($visitIds);
$statement = Db::query($sql);
return $statement->rowCount();
} | [
"public",
"function",
"deleteFromLogTable",
"(",
"$",
"tableName",
",",
"$",
"visitIds",
")",
"{",
"$",
"sql",
"=",
"\"DELETE FROM `\"",
".",
"Common",
"::",
"prefixTable",
"(",
"$",
"tableName",
")",
".",
"\"` WHERE idvisit IN \"",
".",
"$",
"this",
"->",
"... | Deletes conversions for the supplied visit IDs from log_conversion. This method does not cascade, so
conversion items will not be deleted.
@param int[] $visitIds
@return int The number of deleted rows. | [
"Deletes",
"conversions",
"for",
"the",
"supplied",
"visit",
"IDs",
"from",
"log_conversion",
".",
"This",
"method",
"does",
"not",
"cascade",
"so",
"conversion",
"items",
"will",
"not",
"be",
"deleted",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/DataAccess/RawLogDao.php#L130-L137 | train | Delete rows from log table | [
30522,
2270,
3853,
3972,
12870,
19699,
5358,
21197,
10880,
1006,
1002,
2795,
18442,
1010,
1002,
3942,
9821,
1007,
1063,
1002,
29296,
1027,
1000,
3972,
12870,
2013,
1036,
1000,
1012,
2691,
1024,
1024,
17576,
10880,
1006,
1002,
2795,
18442,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
matomo-org/matomo | plugins/SitesManager/API.php | API.deleteSite | public function deleteSite($idSite)
{
Piwik::checkUserHasSuperUserAccess();
$idSites = $this->getSitesId();
if (!in_array($idSite, $idSites)) {
throw new Exception("website id = $idSite not found");
}
$nbSites = count($idSites);
if ($nbSites == 1) {
... | php | public function deleteSite($idSite)
{
Piwik::checkUserHasSuperUserAccess();
$idSites = $this->getSitesId();
if (!in_array($idSite, $idSites)) {
throw new Exception("website id = $idSite not found");
}
$nbSites = count($idSites);
if ($nbSites == 1) {
... | [
"public",
"function",
"deleteSite",
"(",
"$",
"idSite",
")",
"{",
"Piwik",
"::",
"checkUserHasSuperUserAccess",
"(",
")",
";",
"$",
"idSites",
"=",
"$",
"this",
"->",
"getSitesId",
"(",
")",
";",
"if",
"(",
"!",
"in_array",
"(",
"$",
"idSite",
",",
"$"... | Delete a website from the database, given its Id. The method deletes the actual site as well as some associated
data. However, it does not delete any logs or archives that belong to this website. You can delete logs and
archives for a site manually as described in this FAQ: http://matomo.org/faq/how-to/faq_73/ .
Requi... | [
"Delete",
"a",
"website",
"from",
"the",
"database",
"given",
"its",
"Id",
".",
"The",
"method",
"deletes",
"the",
"actual",
"site",
"as",
"well",
"as",
"some",
"associated",
"data",
".",
"However",
"it",
"does",
"not",
"delete",
"any",
"logs",
"or",
"ar... | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/SitesManager/API.php#L795-L820 | train | Delete a site | [
30522,
2270,
3853,
3972,
12870,
28032,
2063,
1006,
1002,
8909,
28032,
2063,
1007,
1063,
14255,
9148,
2243,
1024,
1024,
4638,
20330,
14949,
6342,
4842,
20330,
6305,
9623,
2015,
1006,
1007,
1025,
1002,
8909,
28032,
2229,
1027,
1002,
2023,
101... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
laravel/framework | src/Illuminate/Cache/DynamoDbStore.php | DynamoDbStore.get | public function get($key)
{
$response = $this->dynamo->getItem([
'TableName' => $this->table,
'ConsistentRead' => false,
'Key' => [
$this->keyAttribute => [
'S' => $this->prefix.$key,
],
],
]);
... | php | public function get($key)
{
$response = $this->dynamo->getItem([
'TableName' => $this->table,
'ConsistentRead' => false,
'Key' => [
$this->keyAttribute => [
'S' => $this->prefix.$key,
],
],
]);
... | [
"public",
"function",
"get",
"(",
"$",
"key",
")",
"{",
"$",
"response",
"=",
"$",
"this",
"->",
"dynamo",
"->",
"getItem",
"(",
"[",
"'TableName'",
"=>",
"$",
"this",
"->",
"table",
",",
"'ConsistentRead'",
"=>",
"false",
",",
"'Key'",
"=>",
"[",
"$... | Retrieve an item from the cache by key.
@param string $key
@return mixed | [
"Retrieve",
"an",
"item",
"from",
"the",
"cache",
"by",
"key",
"."
] | 0e0a428a50fc8378e3f77d18f3caae76c19e8c7a | https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Cache/DynamoDbStore.php#L93-L120 | train | Get the value of a key from the cache | [
30522,
2270,
3853,
2131,
1006,
1002,
3145,
1007,
1063,
1002,
3433,
1027,
1002,
2023,
1011,
1028,
17205,
1011,
1028,
2131,
4221,
2213,
1006,
1031,
1005,
2795,
18442,
1005,
1027,
1028,
1002,
2023,
1011,
1028,
2795,
1010,
1005,
8335,
16416,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
matomo-org/matomo | core/Tracker/GoalManager.php | GoalManager.recordGoals | public function recordGoals(VisitProperties $visitProperties, Request $request)
{
$visitorInformation = $visitProperties->getProperties();
$visitCustomVariables = $request->getMetadata('CustomVariables', 'visitCustomVariables') ?: array();
/** @var Action $action */
$action = $reque... | php | public function recordGoals(VisitProperties $visitProperties, Request $request)
{
$visitorInformation = $visitProperties->getProperties();
$visitCustomVariables = $request->getMetadata('CustomVariables', 'visitCustomVariables') ?: array();
/** @var Action $action */
$action = $reque... | [
"public",
"function",
"recordGoals",
"(",
"VisitProperties",
"$",
"visitProperties",
",",
"Request",
"$",
"request",
")",
"{",
"$",
"visitorInformation",
"=",
"$",
"visitProperties",
"->",
"getProperties",
"(",
")",
";",
"$",
"visitCustomVariables",
"=",
"$",
"r... | Records one or several goals matched in this request.
@param Visitor $visitor
@param array $visitorInformation
@param array $visitCustomVariables
@param Action $action | [
"Records",
"one",
"or",
"several",
"goals",
"matched",
"in",
"this",
"request",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Tracker/GoalManager.php#L227-L262 | train | Record Goals in the order that the user has requested | [
30522,
2270,
3853,
2501,
3995,
9777,
1006,
3942,
21572,
4842,
7368,
1002,
3942,
21572,
4842,
7368,
1010,
5227,
1002,
5227,
1007,
1063,
1002,
10367,
2378,
14192,
3370,
1027,
1002,
3942,
21572,
4842,
7368,
1011,
1028,
2131,
21572,
4842,
7368,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/Command/Command.php | Command.run | public function run(InputInterface $input, OutputInterface $output)
{
// force the creation of the synopsis before the merge with the app definition
$this->getSynopsis(true);
$this->getSynopsis(false);
// add the application arguments and options
$this->mergeApplicationDefin... | php | public function run(InputInterface $input, OutputInterface $output)
{
// force the creation of the synopsis before the merge with the app definition
$this->getSynopsis(true);
$this->getSynopsis(false);
// add the application arguments and options
$this->mergeApplicationDefin... | [
"public",
"function",
"run",
"(",
"InputInterface",
"$",
"input",
",",
"OutputInterface",
"$",
"output",
")",
"{",
"// force the creation of the synopsis before the merge with the app definition",
"$",
"this",
"->",
"getSynopsis",
"(",
"true",
")",
";",
"$",
"this",
"... | Runs the command.
The code to execute is either defined directly with the
setCode() method or by overriding the execute() method
in a sub-class.
@return int The command exit code
@throws \Exception When binding input fails. Bypass this by calling {@link ignoreValidationErrors()}.
@see setCode()
@see execute() | [
"Runs",
"the",
"command",
"."
] | b82b09eefb084e487997f4af753400d721edd0a8 | https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Console/Command/Command.php#L203-L259 | train | Runs the application | [
30522,
2270,
3853,
2448,
1006,
7953,
18447,
30524,
1025,
1002,
2023,
1011,
1028,
4152,
6038,
22599,
1006,
6270,
1007,
1025,
1013,
1013,
5587,
1996,
4646,
9918,
1998,
7047,
1002,
2023,
1011,
1028,
13590,
29098,
19341,
3508,
3207,
16294,
2275... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
matomo-org/matomo | plugins/Actions/ArchivingHelper.php | ArchivingHelper.getDefaultRow | private static function getDefaultRow()
{
static $row = false;
if ($row === false) {
// This row is used in the case where an action is know as an exit_action
// but this action was not properly recorded when it was hit in the first place
// so we add this fake ro... | php | private static function getDefaultRow()
{
static $row = false;
if ($row === false) {
// This row is used in the case where an action is know as an exit_action
// but this action was not properly recorded when it was hit in the first place
// so we add this fake ro... | [
"private",
"static",
"function",
"getDefaultRow",
"(",
")",
"{",
"static",
"$",
"row",
"=",
"false",
";",
"if",
"(",
"$",
"row",
"===",
"false",
")",
"{",
"// This row is used in the case where an action is know as an exit_action",
"// but this action was not properly rec... | The default row is used when archiving, if data is inconsistent in the DB,
there could be pages that have exit/entry hits, but don't yet
have a record in the table (or the record was truncated).
@return Row | [
"The",
"default",
"row",
"is",
"used",
"when",
"archiving",
"if",
"data",
"is",
"inconsistent",
"in",
"the",
"DB",
"there",
"could",
"be",
"pages",
"that",
"have",
"exit",
"/",
"entry",
"hits",
"but",
"don",
"t",
"yet",
"have",
"a",
"record",
"in",
"th... | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Actions/ArchivingHelper.php#L346-L361 | train | Get the default row for the action | [
30522,
2797,
10763,
3853,
2131,
3207,
7011,
11314,
10524,
1006,
1007,
1063,
10763,
1002,
5216,
1027,
6270,
1025,
2065,
1006,
1002,
5216,
1027,
1027,
1027,
6270,
1007,
1063,
1013,
1013,
2023,
5216,
2003,
2109,
1999,
1996,
2553,
2073,
2019,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
symfony/symfony | src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/Configuration.php | Configuration.getConfigTreeBuilder | public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder('web_profiler');
$treeBuilder->getRootNode()
->children()
->booleanNode('toolbar')->defaultFalse()->end()
->booleanNode('intercept_redirects')->defaultFalse()->end()
-... | php | public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder('web_profiler');
$treeBuilder->getRootNode()
->children()
->booleanNode('toolbar')->defaultFalse()->end()
->booleanNode('intercept_redirects')->defaultFalse()->end()
-... | [
"public",
"function",
"getConfigTreeBuilder",
"(",
")",
"{",
"$",
"treeBuilder",
"=",
"new",
"TreeBuilder",
"(",
"'web_profiler'",
")",
";",
"$",
"treeBuilder",
"->",
"getRootNode",
"(",
")",
"->",
"children",
"(",
")",
"->",
"booleanNode",
"(",
"'toolbar'",
... | Generates the configuration tree builder.
@return TreeBuilder The tree builder | [
"Generates",
"the",
"configuration",
"tree",
"builder",
"."
] | b82b09eefb084e487997f4af753400d721edd0a8 | https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/Configuration.php#L32-L45 | train | Get the tree builder for the web profiler | [
30522,
2270,
3853,
2131,
8663,
8873,
13512,
9910,
8569,
23891,
2099,
1006,
1007,
1063,
1002,
3392,
8569,
23891,
2099,
1027,
2047,
3392,
8569,
23891,
2099,
1006,
1005,
4773,
1035,
6337,
2099,
1005,
1007,
1025,
1002,
3392,
8569,
23891,
2099,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
symfony/symfony | src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php | HtmlDumper.leaveHash | public function leaveHash(Cursor $cursor, $type, $class, $hasChild, $cut)
{
$this->dumpEllipsis($cursor, $hasChild, $cut);
if ($hasChild) {
$this->line .= '</samp>';
}
parent::leaveHash($cursor, $type, $class, $hasChild, 0);
} | php | public function leaveHash(Cursor $cursor, $type, $class, $hasChild, $cut)
{
$this->dumpEllipsis($cursor, $hasChild, $cut);
if ($hasChild) {
$this->line .= '</samp>';
}
parent::leaveHash($cursor, $type, $class, $hasChild, 0);
} | [
"public",
"function",
"leaveHash",
"(",
"Cursor",
"$",
"cursor",
",",
"$",
"type",
",",
"$",
"class",
",",
"$",
"hasChild",
",",
"$",
"cut",
")",
"{",
"$",
"this",
"->",
"dumpEllipsis",
"(",
"$",
"cursor",
",",
"$",
"hasChild",
",",
"$",
"cut",
")"... | {@inheritdoc} | [
"{"
] | b82b09eefb084e487997f4af753400d721edd0a8 | https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php#L819-L826 | train | Overwrites the leaveHash method so we can dump the ellipsis and append the amp to the end of the hash. | [
30522,
2270,
3853,
2681,
14949,
2232,
1006,
12731,
25301,
2099,
1002,
12731,
25301,
2099,
1010,
1002,
2828,
1010,
1002,
2465,
1010,
1002,
2038,
19339,
1010,
1002,
3013,
1007,
1063,
1002,
2023,
1011,
1028,
15653,
13348,
18409,
1006,
1002,
12... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
octobercms/october | modules/backend/controllers/Files.php | Files.getUniqueCode | public static function getUniqueCode($file)
{
if (!$file) {
return null;
}
$hash = md5($file->file_name . '!' . $file->disk_name);
return base64_encode($file->id . '!' . $hash);
} | php | public static function getUniqueCode($file)
{
if (!$file) {
return null;
}
$hash = md5($file->file_name . '!' . $file->disk_name);
return base64_encode($file->id . '!' . $hash);
} | [
"public",
"static",
"function",
"getUniqueCode",
"(",
"$",
"file",
")",
"{",
"if",
"(",
"!",
"$",
"file",
")",
"{",
"return",
"null",
";",
"}",
"$",
"hash",
"=",
"md5",
"(",
"$",
"file",
"->",
"file_name",
".",
"'!'",
".",
"$",
"file",
"->",
"dis... | Returns a unique code used for masking the file identifier.
@param $file System\Models\File
@return string | [
"Returns",
"a",
"unique",
"code",
"used",
"for",
"masking",
"the",
"file",
"identifier",
"."
] | 3118660d834f161d513da08477be92281a2eb96a | https://github.com/octobercms/october/blob/3118660d834f161d513da08477be92281a2eb96a/modules/backend/controllers/Files.php#L82-L90 | train | Get Unique Code | [
30522,
2270,
10763,
3853,
2131,
19496,
4226,
16044,
1006,
1002,
5371,
1007,
1063,
2065,
1006,
999,
1002,
5371,
1007,
1063,
2709,
19701,
1025,
1065,
1002,
23325,
1027,
9108,
2629,
1006,
1002,
5371,
1011,
1028,
5371,
1035,
2171,
1012,
1005,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
matomo-org/matomo | core/Tracker/GoalManager.php | GoalManager.getItemRowCast | protected function getItemRowCast($row)
{
return array(
(string)(int)$row[self::INTERNAL_ITEM_SKU],
(string)(int)$row[self::INTERNAL_ITEM_NAME],
(string)(int)$row[self::INTERNAL_ITEM_CATEGORY],
(string)(int)$row[self::INTERNAL_ITEM_CATEGORY2],
(str... | php | protected function getItemRowCast($row)
{
return array(
(string)(int)$row[self::INTERNAL_ITEM_SKU],
(string)(int)$row[self::INTERNAL_ITEM_NAME],
(string)(int)$row[self::INTERNAL_ITEM_CATEGORY],
(string)(int)$row[self::INTERNAL_ITEM_CATEGORY2],
(str... | [
"protected",
"function",
"getItemRowCast",
"(",
"$",
"row",
")",
"{",
"return",
"array",
"(",
"(",
"string",
")",
"(",
"int",
")",
"$",
"row",
"[",
"self",
"::",
"INTERNAL_ITEM_SKU",
"]",
",",
"(",
"string",
")",
"(",
"int",
")",
"$",
"row",
"[",
"... | Casts the item array so that array comparisons work nicely
@param array $row
@return array | [
"Casts",
"the",
"item",
"array",
"so",
"that",
"array",
"comparisons",
"work",
"nicely"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Tracker/GoalManager.php#L763-L776 | train | Casts the item row into an array of cast values | [
30522,
5123,
3853,
2131,
4221,
2213,
10524,
10526,
1006,
1002,
5216,
1007,
1063,
2709,
9140,
1006,
1006,
5164,
1007,
1006,
20014,
1007,
1002,
5216,
1031,
2969,
1024,
1024,
4722,
1035,
8875,
1035,
15315,
2226,
1033,
1010,
1006,
5164,
1007,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
laravel/framework | src/Illuminate/Foundation/Console/VendorPublishCommand.php | VendorPublishCommand.promptForProviderOrTag | protected function promptForProviderOrTag()
{
$choice = $this->choice(
"Which provider or tag's files would you like to publish?",
$choices = $this->publishableChoices()
);
if ($choice == $choices[0] || is_null($choice)) {
return;
}
$this... | php | protected function promptForProviderOrTag()
{
$choice = $this->choice(
"Which provider or tag's files would you like to publish?",
$choices = $this->publishableChoices()
);
if ($choice == $choices[0] || is_null($choice)) {
return;
}
$this... | [
"protected",
"function",
"promptForProviderOrTag",
"(",
")",
"{",
"$",
"choice",
"=",
"$",
"this",
"->",
"choice",
"(",
"\"Which provider or tag's files would you like to publish?\"",
",",
"$",
"choices",
"=",
"$",
"this",
"->",
"publishableChoices",
"(",
")",
")",
... | Prompt for which provider or tag to publish.
@return void | [
"Prompt",
"for",
"which",
"provider",
"or",
"tag",
"to",
"publish",
"."
] | 0e0a428a50fc8378e3f77d18f3caae76c19e8c7a | https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Console/VendorPublishCommand.php#L107-L119 | train | Prompts the user for a provider or tag | [
30522,
5123,
3853,
25732,
29278,
21572,
17258,
10624,
13320,
2290,
1006,
1007,
1063,
1002,
3601,
1027,
30524,
1005,
1055,
6764,
2052,
2017,
2066,
2000,
10172,
1029,
1000,
1010,
1002,
9804,
1027,
1002,
2023,
1011,
1028,
10172,
3085,
9905,
23... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
symfony/symfony | src/Symfony/Component/Mailer/Transport/Smtp/SmtpTransport.php | SmtpTransport.setLocalDomain | public function setLocalDomain(string $domain): self
{
if ('' !== $domain && '[' !== $domain[0]) {
if (filter_var($domain, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {
$domain = '['.$domain.']';
} elseif (filter_var($domain, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
... | php | public function setLocalDomain(string $domain): self
{
if ('' !== $domain && '[' !== $domain[0]) {
if (filter_var($domain, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {
$domain = '['.$domain.']';
} elseif (filter_var($domain, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
... | [
"public",
"function",
"setLocalDomain",
"(",
"string",
"$",
"domain",
")",
":",
"self",
"{",
"if",
"(",
"''",
"!==",
"$",
"domain",
"&&",
"'['",
"!==",
"$",
"domain",
"[",
"0",
"]",
")",
"{",
"if",
"(",
"filter_var",
"(",
"$",
"domain",
",",
"FILTE... | Sets the name of the local domain that will be used in HELO.
This should be a fully-qualified domain name and should be truly the domain
you're using.
If your server does not have a domain name, use the IP address. This will
automatically be wrapped in square brackets as described in RFC 5321,
section 4.1.3. | [
"Sets",
"the",
"name",
"of",
"the",
"local",
"domain",
"that",
"will",
"be",
"used",
"in",
"HELO",
"."
] | b82b09eefb084e487997f4af753400d721edd0a8 | https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Mailer/Transport/Smtp/SmtpTransport.php#L81-L94 | train | Set local domain | [
30522,
2270,
3853,
2275,
4135,
9289,
9527,
8113,
1006,
5164,
1002,
5884,
1007,
1024,
2969,
1063,
2065,
1006,
1005,
1005,
999,
1027,
1027,
1002,
5884,
1004,
1004,
1005,
1031,
1005,
999,
1027,
1027,
1002,
5884,
1031,
1014,
1033,
1007,
1063,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
matomo-org/matomo | core/Scheduler/Schedule/Daily.php | Daily.getRescheduledTime | public function getRescheduledTime()
{
$currentTime = $this->getTime();
// Add one day
$rescheduledTime = mktime(date('H', $currentTime),
date('i', $currentTime),
date('s', $currentTime),
date('n', $currentTime),
date('j', $currentTime) + 1,
... | php | public function getRescheduledTime()
{
$currentTime = $this->getTime();
// Add one day
$rescheduledTime = mktime(date('H', $currentTime),
date('i', $currentTime),
date('s', $currentTime),
date('n', $currentTime),
date('j', $currentTime) + 1,
... | [
"public",
"function",
"getRescheduledTime",
"(",
")",
"{",
"$",
"currentTime",
"=",
"$",
"this",
"->",
"getTime",
"(",
")",
";",
"// Add one day",
"$",
"rescheduledTime",
"=",
"mktime",
"(",
"date",
"(",
"'H'",
",",
"$",
"currentTime",
")",
",",
"date",
... | @see ScheduledTime::getRescheduledTime
@return int | [
"@see",
"ScheduledTime",
"::",
"getRescheduledTime",
"@return",
"int"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Scheduler/Schedule/Daily.php#L26-L44 | train | Get the rescheduled time | [
30522,
2270,
3853,
2131,
6072,
7690,
18696,
7292,
1006,
1007,
1063,
1002,
2783,
7292,
1027,
1002,
2023,
1011,
1028,
2131,
7292,
1006,
1007,
1025,
1013,
1013,
5587,
2028,
2154,
1002,
24501,
7690,
18696,
7292,
1027,
12395,
7292,
1006,
3058,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.addCc | public function addCc($email, $name='')
{
if (!is_array($email)) {
$email = array($name => $email);
}
foreach ($email as $n => $recipient) {
$this->_addRecipientAndHeader('Cc', $recipient, is_int($n) ? '' : $n);
}
return $this;
} | php | public function addCc($email, $name='')
{
if (!is_array($email)) {
$email = array($name => $email);
}
foreach ($email as $n => $recipient) {
$this->_addRecipientAndHeader('Cc', $recipient, is_int($n) ? '' : $n);
}
return $this;
} | [
"public",
"function",
"addCc",
"(",
"$",
"email",
",",
"$",
"name",
"=",
"''",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"email",
")",
")",
"{",
"$",
"email",
"=",
"array",
"(",
"$",
"name",
"=>",
"$",
"email",
")",
";",
"}",
"foreach",
... | Adds Cc-header and recipient, $email can be an array, or a single string address
@param string|array $email
@param string $name
@return Zend_Mail Provides fluent interface | [
"Adds",
"Cc",
"-",
"header",
"and",
"recipient",
"$email",
"can",
"be",
"an",
"array",
"or",
"a",
"single",
"string",
"address"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Mail.php#L592-L603 | train | Add Cc - recipients to header | [
30522,
2270,
3853,
5587,
9468,
1006,
1002,
10373,
1010,
1002,
2171,
1027,
1005,
1005,
1007,
1063,
2065,
1006,
999,
2003,
1035,
9140,
1006,
1002,
10373,
1007,
1007,
1063,
1002,
10373,
1027,
9140,
1006,
1002,
2171,
1027,
1028,
1002,
10373,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/SMTP.php | SMTP.close | public function close()
{
$this->setError('');
$this->server_caps = null;
$this->helo_rply = null;
if (is_resource($this->smtp_conn)) {
// close the connection and cleanup
fclose($this->smtp_conn);
$this->smtp_conn = null; //Makes for cleaner seria... | php | public function close()
{
$this->setError('');
$this->server_caps = null;
$this->helo_rply = null;
if (is_resource($this->smtp_conn)) {
// close the connection and cleanup
fclose($this->smtp_conn);
$this->smtp_conn = null; //Makes for cleaner seria... | [
"public",
"function",
"close",
"(",
")",
"{",
"$",
"this",
"->",
"setError",
"(",
"''",
")",
";",
"$",
"this",
"->",
"server_caps",
"=",
"null",
";",
"$",
"this",
"->",
"helo_rply",
"=",
"null",
";",
"if",
"(",
"is_resource",
"(",
"$",
"this",
"->"... | Close the socket and clean up the state of the class.
Don't use this function without first trying to use QUIT.
@see quit() | [
"Close",
"the",
"socket",
"and",
"clean",
"up",
"the",
"state",
"of",
"the",
"class",
".",
"Don",
"t",
"use",
"this",
"function",
"without",
"first",
"trying",
"to",
"use",
"QUIT",
"."
] | 3d7132341659a8a201adbc3ba11b1e202ee2857c | https://github.com/PHPMailer/PHPMailer/blob/3d7132341659a8a201adbc3ba11b1e202ee2857c/src/SMTP.php#L615-L626 | train | Close the connection and cleanup | [
30522,
2270,
3853,
2485,
1006,
1007,
1063,
1002,
2023,
1011,
1028,
2275,
2121,
29165,
1006,
1005,
1005,
1007,
1025,
1002,
2023,
1011,
1028,
8241,
1035,
9700,
1027,
19701,
1025,
1002,
2023,
1011,
1028,
2002,
4135,
1035,
1054,
22086,
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/Scheduler/Scheduler.php | Scheduler.run | public function run()
{
$tasks = $this->loader->loadTasks();
$this->logger->debug('{count} scheduled tasks loaded', array('count' => count($tasks)));
// remove from timetable tasks that are not active anymore
$this->timetable->removeInactiveTasks($tasks);
$this->logger->in... | php | public function run()
{
$tasks = $this->loader->loadTasks();
$this->logger->debug('{count} scheduled tasks loaded', array('count' => count($tasks)));
// remove from timetable tasks that are not active anymore
$this->timetable->removeInactiveTasks($tasks);
$this->logger->in... | [
"public",
"function",
"run",
"(",
")",
"{",
"$",
"tasks",
"=",
"$",
"this",
"->",
"loader",
"->",
"loadTasks",
"(",
")",
";",
"$",
"this",
"->",
"logger",
"->",
"debug",
"(",
"'{count} scheduled tasks loaded'",
",",
"array",
"(",
"'count'",
"=>",
"count"... | Executes tasks that are scheduled to run, then reschedules them.
@return array An array describing the results of scheduled task execution. Each element
in the array will have the following format:
```
array(
'task' => 'task name',
'output' => '... task output ...'
)
``` | [
"Executes",
"tasks",
"that",
"are",
"scheduled",
"to",
"run",
"then",
"reschedules",
"them",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Scheduler/Scheduler.php#L92-L146 | train | Runs all scheduled tasks | [
30522,
2270,
3853,
2448,
1006,
1007,
1063,
1002,
8518,
1027,
1002,
2023,
1011,
1028,
7170,
2121,
1011,
1028,
7170,
10230,
5705,
1006,
1007,
1025,
1002,
2023,
1011,
1028,
8833,
4590,
1011,
1028,
2139,
8569,
2290,
1006,
1005,
1063,
4175,
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/Auth/Access/Gate.php | Gate.getPolicyFor | public function getPolicyFor($class)
{
if (is_object($class)) {
$class = get_class($class);
}
if (! is_string($class)) {
return;
}
if (isset($this->policies[$class])) {
return $this->resolvePolicy($this->policies[$class]);
}
... | php | public function getPolicyFor($class)
{
if (is_object($class)) {
$class = get_class($class);
}
if (! is_string($class)) {
return;
}
if (isset($this->policies[$class])) {
return $this->resolvePolicy($this->policies[$class]);
}
... | [
"public",
"function",
"getPolicyFor",
"(",
"$",
"class",
")",
"{",
"if",
"(",
"is_object",
"(",
"$",
"class",
")",
")",
"{",
"$",
"class",
"=",
"get_class",
"(",
"$",
"class",
")",
";",
"}",
"if",
"(",
"!",
"is_string",
"(",
"$",
"class",
")",
")... | Get a policy instance for a given class.
@param object|string $class
@return mixed | [
"Get",
"a",
"policy",
"instance",
"for",
"a",
"given",
"class",
"."
] | 0e0a428a50fc8378e3f77d18f3caae76c19e8c7a | https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/Access/Gate.php#L539-L564 | train | Get the policy for a given class. | [
30522,
2270,
3853,
2131,
18155,
2594,
2100,
29278,
1006,
1002,
2465,
1007,
1063,
2065,
1006,
2003,
1035,
4874,
1006,
1002,
2465,
1007,
1007,
1063,
1002,
2465,
1027,
2131,
1035,
2465,
1006,
1002,
2465,
1007,
1025,
1065,
2065,
1006,
999,
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... |
laravel/framework | src/Illuminate/Support/Str.php | Str.camel | public static function camel($value)
{
if (isset(static::$camelCache[$value])) {
return static::$camelCache[$value];
}
return static::$camelCache[$value] = lcfirst(static::studly($value));
} | php | public static function camel($value)
{
if (isset(static::$camelCache[$value])) {
return static::$camelCache[$value];
}
return static::$camelCache[$value] = lcfirst(static::studly($value));
} | [
"public",
"static",
"function",
"camel",
"(",
"$",
"value",
")",
"{",
"if",
"(",
"isset",
"(",
"static",
"::",
"$",
"camelCache",
"[",
"$",
"value",
"]",
")",
")",
"{",
"return",
"static",
"::",
"$",
"camelCache",
"[",
"$",
"value",
"]",
";",
"}",
... | Convert a value to camel case.
@param string $value
@return string | [
"Convert",
"a",
"value",
"to",
"camel",
"case",
"."
] | 0e0a428a50fc8378e3f77d18f3caae76c19e8c7a | https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Support/Str.php#L88-L95 | train | Converts a string into CamelCase | [
30522,
2270,
10763,
3853,
19130,
1006,
1002,
3643,
1007,
1063,
2065,
1006,
26354,
3388,
1006,
10763,
1024,
1024,
1002,
19130,
3540,
5403,
1031,
1002,
3643,
1033,
1007,
1007,
1063,
2709,
10763,
1024,
1024,
1002,
19130,
3540,
5403,
1031,
1002... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
symfony/symfony | src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php | RecursiveContextualValidator.stepThroughGroupSequence | private function stepThroughGroupSequence($value, $object, $cacheKey, MetadataInterface $metadata = null, $propertyPath, $traversalStrategy, GroupSequence $groupSequence, $cascadedGroup, ExecutionContextInterface $context)
{
$violationCount = \count($context->getViolations());
$cascadedGroups = $cas... | php | private function stepThroughGroupSequence($value, $object, $cacheKey, MetadataInterface $metadata = null, $propertyPath, $traversalStrategy, GroupSequence $groupSequence, $cascadedGroup, ExecutionContextInterface $context)
{
$violationCount = \count($context->getViolations());
$cascadedGroups = $cas... | [
"private",
"function",
"stepThroughGroupSequence",
"(",
"$",
"value",
",",
"$",
"object",
",",
"$",
"cacheKey",
",",
"MetadataInterface",
"$",
"metadata",
"=",
"null",
",",
"$",
"propertyPath",
",",
"$",
"traversalStrategy",
",",
"GroupSequence",
"$",
"groupSequ... | Sequentially validates a node's value in each group of a group sequence.
If any of the constraints generates a violation, subsequent groups in the
group sequence are skipped.
@param mixed $value The validated value
@param object|null $object The current object
... | [
"Sequentially",
"validates",
"a",
"node",
"s",
"value",
"in",
"each",
"group",
"of",
"a",
"group",
"sequence",
"."
] | b82b09eefb084e487997f4af753400d721edd0a8 | https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php#L727-L765 | train | Step through the group sequence | [
30522,
2797,
3853,
3357,
2705,
22494,
5603,
17058,
3366,
4226,
5897,
1006,
1002,
3643,
1010,
1002,
4874,
1010,
1002,
17053,
14839,
1010,
27425,
18447,
2121,
12172,
1002,
27425,
1027,
19701,
1010,
1002,
3200,
15069,
1010,
1002,
29053,
9777,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/Request.php | Request.offsetExists | public function offsetExists($offset)
{
return Arr::has(
$this->all() + $this->route()->parameters(),
$offset
);
} | php | public function offsetExists($offset)
{
return Arr::has(
$this->all() + $this->route()->parameters(),
$offset
);
} | [
"public",
"function",
"offsetExists",
"(",
"$",
"offset",
")",
"{",
"return",
"Arr",
"::",
"has",
"(",
"$",
"this",
"->",
"all",
"(",
")",
"+",
"$",
"this",
"->",
"route",
"(",
")",
"->",
"parameters",
"(",
")",
",",
"$",
"offset",
")",
";",
"}"
... | Determine if the given offset exists.
@param string $offset
@return bool | [
"Determine",
"if",
"the",
"given",
"offset",
"exists",
"."
] | 0e0a428a50fc8378e3f77d18f3caae76c19e8c7a | https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Http/Request.php#L638-L644 | train | Return true if the route parameters exists in the current context | [
30522,
2270,
3853,
16396,
10288,
5130,
1006,
1002,
16396,
1007,
1063,
2709,
12098,
2099,
1024,
1024,
2038,
1006,
1002,
2023,
1011,
1028,
2035,
1006,
1007,
1009,
1002,
2023,
1011,
1028,
2799,
1006,
1007,
1011,
1028,
11709,
1006,
1007,
1010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
laravel/framework | src/Illuminate/Database/Eloquent/Relations/MorphPivot.php | MorphPivot.getQueueableId | public function getQueueableId()
{
if (isset($this->attributes[$this->getKeyName()])) {
return $this->getKey();
}
return sprintf(
'%s:%s:%s:%s:%s:%s',
$this->foreignKey, $this->getAttribute($this->foreignKey),
$this->relatedKey, $this->getAttr... | php | public function getQueueableId()
{
if (isset($this->attributes[$this->getKeyName()])) {
return $this->getKey();
}
return sprintf(
'%s:%s:%s:%s:%s:%s',
$this->foreignKey, $this->getAttribute($this->foreignKey),
$this->relatedKey, $this->getAttr... | [
"public",
"function",
"getQueueableId",
"(",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"attributes",
"[",
"$",
"this",
"->",
"getKeyName",
"(",
")",
"]",
")",
")",
"{",
"return",
"$",
"this",
"->",
"getKey",
"(",
")",
";",
"}",
"return"... | Get the queueable identity for the entity.
@return mixed | [
"Get",
"the",
"queueable",
"identity",
"for",
"the",
"entity",
"."
] | 0e0a428a50fc8378e3f77d18f3caae76c19e8c7a | https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Relations/MorphPivot.php#L86-L98 | train | Get Queueable Id | [
30522,
2270,
3853,
2131,
4226,
5657,
3085,
3593,
1006,
1007,
1063,
2065,
1006,
26354,
3388,
1006,
1002,
2023,
1011,
1028,
12332,
1031,
1002,
2023,
1011,
1028,
2131,
14839,
18442,
1006,
1007,
1033,
1007,
1007,
1063,
2709,
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... |
laravel/framework | src/Illuminate/Redis/Connectors/PhpRedisConnector.php | PhpRedisConnector.createClient | protected function createClient(array $config)
{
return tap(new Redis, function ($client) use ($config) {
$this->establishConnection($client, $config);
if (! empty($config['password'])) {
$client->auth($config['password']);
}
if (! empty($con... | php | protected function createClient(array $config)
{
return tap(new Redis, function ($client) use ($config) {
$this->establishConnection($client, $config);
if (! empty($config['password'])) {
$client->auth($config['password']);
}
if (! empty($con... | [
"protected",
"function",
"createClient",
"(",
"array",
"$",
"config",
")",
"{",
"return",
"tap",
"(",
"new",
"Redis",
",",
"function",
"(",
"$",
"client",
")",
"use",
"(",
"$",
"config",
")",
"{",
"$",
"this",
"->",
"establishConnection",
"(",
"$",
"cl... | Create the Redis client instance.
@param array $config
@return \Redis | [
"Create",
"the",
"Redis",
"client",
"instance",
"."
] | 0e0a428a50fc8378e3f77d18f3caae76c19e8c7a | https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Redis/Connectors/PhpRedisConnector.php#L63-L84 | train | Create Redis client | [
30522,
5123,
3853,
3443,
20464,
11638,
1006,
9140,
1002,
9530,
8873,
2290,
1007,
1063,
2709,
11112,
1006,
2047,
2417,
2483,
1010,
3853,
1006,
1002,
7396,
1007,
2224,
1006,
1002,
9530,
8873,
2290,
1007,
1063,
1002,
2023,
1011,
1028,
5323,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/GeoIP2AutoUpdater.php | GeoIP2AutoUpdater.performRedundantDbChecks | protected function performRedundantDbChecks($logErrors = true)
{
$databaseTypes = array_keys(LocationProviderGeoIp2::$dbNames);
foreach ($databaseTypes as $type) {
$customNames = array(
'loc' => array(),
'isp' => array(),
'org' => array()
... | php | protected function performRedundantDbChecks($logErrors = true)
{
$databaseTypes = array_keys(LocationProviderGeoIp2::$dbNames);
foreach ($databaseTypes as $type) {
$customNames = array(
'loc' => array(),
'isp' => array(),
'org' => array()
... | [
"protected",
"function",
"performRedundantDbChecks",
"(",
"$",
"logErrors",
"=",
"true",
")",
"{",
"$",
"databaseTypes",
"=",
"array_keys",
"(",
"LocationProviderGeoIp2",
"::",
"$",
"dbNames",
")",
";",
"foreach",
"(",
"$",
"databaseTypes",
"as",
"$",
"type",
... | Utility function that checks if geolocation works with each installed database,
and if one or more doesn't, they are renamed to make sure tracking will work.
This is a safety measure used to make sure tracking isn't affected if strange
update errors occur.
Databases are renamed to ${original}.broken .
Note: method is... | [
"Utility",
"function",
"that",
"checks",
"if",
"geolocation",
"works",
"with",
"each",
"installed",
"database",
"and",
"if",
"one",
"or",
"more",
"doesn",
"t",
"they",
"are",
"renamed",
"to",
"make",
"sure",
"tracking",
"will",
"work",
".",
"This",
"is",
"... | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/GeoIp2/GeoIP2AutoUpdater.php#L501-L540 | train | Perform redundant database checks | [
30522,
5123,
3853,
4685,
5596,
18426,
3372,
18939,
5403,
10603,
1006,
1002,
8833,
2121,
29165,
2015,
1027,
2995,
1007,
1063,
1002,
7809,
13874,
2015,
1027,
9140,
1035,
6309,
1006,
3295,
21572,
17258,
2121,
3351,
10448,
2361,
2475,
1024,
102... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
symfony/symfony | src/Symfony/Component/Serializer/Normalizer/DateTimeNormalizer.php | DateTimeNormalizer.normalize | public function normalize($object, $format = null, array $context = [])
{
if (!$object instanceof \DateTimeInterface) {
throw new InvalidArgumentException('The object must implement the "\DateTimeInterface".');
}
$dateTimeFormat = $context[self::FORMAT_KEY] ?? $this->defaultCont... | php | public function normalize($object, $format = null, array $context = [])
{
if (!$object instanceof \DateTimeInterface) {
throw new InvalidArgumentException('The object must implement the "\DateTimeInterface".');
}
$dateTimeFormat = $context[self::FORMAT_KEY] ?? $this->defaultCont... | [
"public",
"function",
"normalize",
"(",
"$",
"object",
",",
"$",
"format",
"=",
"null",
",",
"array",
"$",
"context",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"!",
"$",
"object",
"instanceof",
"\\",
"DateTimeInterface",
")",
"{",
"throw",
"new",
"InvalidArg... | {@inheritdoc}
@throws InvalidArgumentException | [
"{",
"@inheritdoc",
"}"
] | b82b09eefb084e487997f4af753400d721edd0a8 | https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Serializer/Normalizer/DateTimeNormalizer.php#L61-L76 | train | Normalize a \ DateTimeInterface object to a date time format | [
30522,
2270,
3853,
3671,
4697,
1006,
1002,
4874,
1010,
1002,
4289,
1027,
19701,
1010,
9140,
1002,
6123,
1027,
1031,
1033,
1007,
1063,
2065,
1006,
999,
1002,
4874,
6013,
11253,
1032,
3058,
7292,
18447,
2121,
12172,
1007,
1063,
5466,
2047,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
matomo-org/matomo | plugins/CoreVisualizations/Visualizations/Sparklines/Config.php | Config.removeSparklineMetric | public function removeSparklineMetric($metricNames)
{
foreach ($this->sparkline_metrics as $index => $metric) {
if ($metric['columns'] === $metricNames) {
array_splice($this->sparkline_metrics, $index, 1);
break;
}
}
} | php | public function removeSparklineMetric($metricNames)
{
foreach ($this->sparkline_metrics as $index => $metric) {
if ($metric['columns'] === $metricNames) {
array_splice($this->sparkline_metrics, $index, 1);
break;
}
}
} | [
"public",
"function",
"removeSparklineMetric",
"(",
"$",
"metricNames",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"sparkline_metrics",
"as",
"$",
"index",
"=>",
"$",
"metric",
")",
"{",
"if",
"(",
"$",
"metric",
"[",
"'columns'",
"]",
"===",
"$",
"met... | Removes an existing sparkline entry. Especially useful in dataTable filters in case sparklines should be not
displayed depending on the fetched data.
Example:
$config->addSparklineMetric('nb_users');
$config->filters[] = function ($dataTable) use ($config) {
if ($dataTable->getFirstRow()->getColumn('nb_users') == 0) {... | [
"Removes",
"an",
"existing",
"sparkline",
"entry",
".",
"Especially",
"useful",
"in",
"dataTable",
"filters",
"in",
"case",
"sparklines",
"should",
"be",
"not",
"displayed",
"depending",
"on",
"the",
"fetched",
"data",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/CoreVisualizations/Visualizations/Sparklines/Config.php#L90-L99 | train | Remove a sparkline metric | [
30522,
2270,
3853,
20362,
14432,
4179,
12589,
1006,
1002,
12046,
18442,
2015,
1007,
1063,
18921,
6776,
1006,
1002,
2023,
1011,
1028,
12125,
4179,
1035,
12046,
2015,
2004,
1002,
5950,
1027,
1028,
1002,
12046,
1007,
1063,
2065,
1006,
1002,
12... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
dompdf/dompdf | src/Helpers.php | Helpers.rle4_decode | public static function rle4_decode($str, $width)
{
$w = floor($width / 2) + ($width % 2);
$lineWidth = $w + (3 - (($width - 1) / 2) % 4);
$pixels = array();
$cnt = strlen($str);
$c = 0;
for ($i = 0; $i < $cnt; $i++) {
$o = ord($str[$i]);
switc... | php | public static function rle4_decode($str, $width)
{
$w = floor($width / 2) + ($width % 2);
$lineWidth = $w + (3 - (($width - 1) / 2) % 4);
$pixels = array();
$cnt = strlen($str);
$c = 0;
for ($i = 0; $i < $cnt; $i++) {
$o = ord($str[$i]);
switc... | [
"public",
"static",
"function",
"rle4_decode",
"(",
"$",
"str",
",",
"$",
"width",
")",
"{",
"$",
"w",
"=",
"floor",
"(",
"$",
"width",
"/",
"2",
")",
"+",
"(",
"$",
"width",
"%",
"2",
")",
";",
"$",
"lineWidth",
"=",
"$",
"w",
"+",
"(",
"3",... | Decoder for RLE4 compression in windows bitmaps
see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps_6x0u.asp
@param string $str Data to decode
@param integer $width Image width
@return string | [
"Decoder",
"for",
"RLE4",
"compression",
"in",
"windows",
"bitmaps",
"see",
"http",
":",
"//",
"msdn",
".",
"microsoft",
".",
"com",
"/",
"library",
"/",
"default",
".",
"asp?url",
"=",
"/",
"library",
"/",
"en",
"-",
"us",
"/",
"gdi",
"/",
"bitmaps_6x... | 75f13c700009be21a1965dc2c5b68a8708c22ba2 | https://github.com/dompdf/dompdf/blob/75f13c700009be21a1965dc2c5b68a8708c22ba2/src/Helpers.php#L305-L368 | train | Decode an rle4 image | [
30522,
2270,
10763,
3853,
1054,
2571,
2549,
1035,
21933,
3207,
1006,
1002,
2358,
2099,
1010,
1002,
9381,
1007,
1063,
1002,
1059,
1027,
2723,
1006,
1002,
9381,
1013,
1016,
1007,
1009,
1006,
1002,
9381,
1003,
1016,
1007,
1025,
1002,
2240,
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... |
slimphp/Slim | Slim/Router.php | Router.getNamedRoute | public function getNamedRoute($name)
{
foreach ($this->routes as $route) {
if ($name == $route->getName()) {
return $route;
}
}
throw new RuntimeException('Named route does not exist for name: ' . $name);
} | php | public function getNamedRoute($name)
{
foreach ($this->routes as $route) {
if ($name == $route->getName()) {
return $route;
}
}
throw new RuntimeException('Named route does not exist for name: ' . $name);
} | [
"public",
"function",
"getNamedRoute",
"(",
"$",
"name",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"routes",
"as",
"$",
"route",
")",
"{",
"if",
"(",
"$",
"name",
"==",
"$",
"route",
"->",
"getName",
"(",
")",
")",
"{",
"return",
"$",
"route",
... | {@inheritdoc} | [
"{"
] | ccef5f7d8bcd469d59cbe64f6210d83764f91543 | https://github.com/slimphp/Slim/blob/ccef5f7d8bcd469d59cbe64f6210d83764f91543/Slim/Router.php#L268-L276 | train | Get the route with the given name | [
30522,
2270,
3853,
2131,
18442,
22196,
10421,
1006,
1002,
2171,
1007,
1063,
18921,
6776,
1006,
1002,
2023,
1011,
1028,
5847,
2004,
1002,
2799,
1007,
1063,
2065,
1006,
1002,
2171,
1027,
1027,
1002,
2799,
1011,
1028,
2131,
18442,
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... |
matomo-org/matomo | libs/Zend/Db/Statement/Oracle.php | Zend_Db_Statement_Oracle.fetchObject | public function fetchObject($class = 'stdClass', array $config = array())
{
if (!$this->_stmt) {
return false;
}
$obj = oci_fetch_object($this->_stmt);
if ($error = oci_error($this->_stmt)) {
/**
* @see Zend_Db_Adapter_Oracle_Exception
... | php | public function fetchObject($class = 'stdClass', array $config = array())
{
if (!$this->_stmt) {
return false;
}
$obj = oci_fetch_object($this->_stmt);
if ($error = oci_error($this->_stmt)) {
/**
* @see Zend_Db_Adapter_Oracle_Exception
... | [
"public",
"function",
"fetchObject",
"(",
"$",
"class",
"=",
"'stdClass'",
",",
"array",
"$",
"config",
"=",
"array",
"(",
")",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_stmt",
")",
"{",
"return",
"false",
";",
"}",
"$",
"obj",
"=",
"oci_fetch... | Fetches the next row and returns it as an object.
@param string $class OPTIONAL Name of the class to create.
@param array $config OPTIONAL Constructor arguments for the class.
@return mixed One object instance of the specified class.
@throws Zend_Db_Statement_Exception | [
"Fetches",
"the",
"next",
"row",
"and",
"returns",
"it",
"as",
"an",
"object",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/libs/Zend/Db/Statement/Oracle.php#L507-L526 | train | Fetch the result of the statement as an object | [
30522,
2270,
3853,
18584,
16429,
20614,
1006,
1002,
2465,
1027,
1005,
2358,
16409,
27102,
1005,
1010,
30524,
1002,
2023,
1011,
1028,
1035,
2358,
20492,
1007,
1063,
2709,
6270,
1025,
1065,
1002,
27885,
3501,
1027,
1051,
6895,
1035,
18584,
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/Cache/Traits/AbstractAdapterTrait.php | AbstractAdapterTrait.getItem | public function getItem($key)
{
if ($this->deferred) {
$this->commit();
}
$id = $this->getId($key);
$f = $this->createCacheItem;
$isHit = false;
$value = null;
try {
foreach ($this->doFetch([$id]) as $value) {
$isHit =... | php | public function getItem($key)
{
if ($this->deferred) {
$this->commit();
}
$id = $this->getId($key);
$f = $this->createCacheItem;
$isHit = false;
$value = null;
try {
foreach ($this->doFetch([$id]) as $value) {
$isHit =... | [
"public",
"function",
"getItem",
"(",
"$",
"key",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"deferred",
")",
"{",
"$",
"this",
"->",
"commit",
"(",
")",
";",
"}",
"$",
"id",
"=",
"$",
"this",
"->",
"getId",
"(",
"$",
"key",
")",
";",
"$",
"f",
... | {@inheritdoc} | [
"{"
] | b82b09eefb084e487997f4af753400d721edd0a8 | https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Component/Cache/Traits/AbstractAdapterTrait.php#L39-L59 | train | Get an item from the cache | [
30522,
2270,
3853,
2131,
4221,
2213,
1006,
1002,
3145,
1007,
1063,
2065,
1006,
1002,
2023,
1011,
1028,
13366,
28849,
2094,
1007,
1063,
1002,
2023,
1011,
1028,
10797,
1006,
1007,
1025,
1065,
1002,
8909,
1027,
1002,
2023,
1011,
1028,
2131,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
symfony/symfony | src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php | MarkdownDescriptor.describeCallable | protected function describeCallable($callable, array $options = [])
{
$string = '';
if (\is_array($callable)) {
$string .= "\n- Type: `function`";
if (\is_object($callable[0])) {
$string .= "\n".sprintf('- Name: `%s`', $callable[1]);
$string ... | php | protected function describeCallable($callable, array $options = [])
{
$string = '';
if (\is_array($callable)) {
$string .= "\n- Type: `function`";
if (\is_object($callable[0])) {
$string .= "\n".sprintf('- Name: `%s`', $callable[1]);
$string ... | [
"protected",
"function",
"describeCallable",
"(",
"$",
"callable",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"string",
"=",
"''",
";",
"if",
"(",
"\\",
"is_array",
"(",
"$",
"callable",
")",
")",
"{",
"$",
"string",
".=",
"\"\\n- Ty... | {@inheritdoc} | [
"{"
] | b82b09eefb084e487997f4af753400d721edd0a8 | https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php#L324-L393 | train | Describes the function | [
30522,
5123,
3853,
6235,
9289,
20470,
2571,
1006,
1002,
2655,
3085,
1010,
9140,
1002,
7047,
1027,
1031,
1033,
1007,
1063,
1002,
5164,
1027,
1005,
1005,
1025,
2065,
1006,
1032,
2003,
1035,
9140,
1006,
1002,
2655,
3085,
1007,
1007,
1063,
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/Tracker/Response.php | Response.outputException | public function outputException(Tracker $tracker, Exception $e, $statusCode)
{
Common::sendResponseCode($statusCode);
$this->logExceptionToErrorLog($e);
if ($tracker->isDebugModeEnabled()) {
Common::sendHeader('Content-Type: text/html; charset=utf-8');
$trailer = '<s... | php | public function outputException(Tracker $tracker, Exception $e, $statusCode)
{
Common::sendResponseCode($statusCode);
$this->logExceptionToErrorLog($e);
if ($tracker->isDebugModeEnabled()) {
Common::sendHeader('Content-Type: text/html; charset=utf-8');
$trailer = '<s... | [
"public",
"function",
"outputException",
"(",
"Tracker",
"$",
"tracker",
",",
"Exception",
"$",
"e",
",",
"$",
"statusCode",
")",
"{",
"Common",
"::",
"sendResponseCode",
"(",
"$",
"statusCode",
")",
";",
"$",
"this",
"->",
"logExceptionToErrorLog",
"(",
"$"... | Echos an error message & other information, then exits.
@param Tracker $tracker
@param Exception $e
@param int $statusCode eg 500 | [
"Echos",
"an",
"error",
"message",
"&",
"other",
"information",
"then",
"exits",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Tracker/Response.php#L53-L69 | train | Output exception to the browser | [
30522,
2270,
3853,
6434,
10288,
24422,
1006,
27080,
1002,
27080,
1010,
6453,
1002,
1041,
1010,
1002,
3570,
16044,
1007,
1063,
2691,
1024,
1024,
4604,
6072,
26029,
3366,
16044,
1006,
1002,
3570,
16044,
1007,
1025,
1002,
2023,
1011,
1028,
883... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
symfony/symfony | src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php | AbstractDoctrineExtension.loadMappingInformation | protected function loadMappingInformation(array $objectManager, ContainerBuilder $container)
{
if ($objectManager['auto_mapping']) {
// automatically register bundle mappings
foreach (array_keys($container->getParameter('kernel.bundles')) as $bundle) {
if (!isset($obj... | php | protected function loadMappingInformation(array $objectManager, ContainerBuilder $container)
{
if ($objectManager['auto_mapping']) {
// automatically register bundle mappings
foreach (array_keys($container->getParameter('kernel.bundles')) as $bundle) {
if (!isset($obj... | [
"protected",
"function",
"loadMappingInformation",
"(",
"array",
"$",
"objectManager",
",",
"ContainerBuilder",
"$",
"container",
")",
"{",
"if",
"(",
"$",
"objectManager",
"[",
"'auto_mapping'",
"]",
")",
"{",
"// automatically register bundle mappings",
"foreach",
"... | @param array $objectManager A configured object manager
@param ContainerBuilder $container A ContainerBuilder instance
@throws \InvalidArgumentException | [
"@param",
"array",
"$objectManager",
"A",
"configured",
"object",
"manager",
"@param",
"ContainerBuilder",
"$container",
"A",
"ContainerBuilder",
"instance"
] | b82b09eefb084e487997f4af753400d721edd0a8 | https://github.com/symfony/symfony/blob/b82b09eefb084e487997f4af753400d721edd0a8/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php#L43-L98 | train | Load mapping information from the object manager | [
30522,
5123,
3853,
7170,
2863,
14853,
2378,
14192,
3370,
1006,
9140,
1002,
4874,
24805,
4590,
1010,
11661,
8569,
23891,
2099,
1002,
11661,
1007,
1063,
2065,
1006,
1002,
4874,
24805,
4590,
1031,
1005,
8285,
1035,
12375,
1005,
1033,
1007,
106... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
laravel/framework | src/Illuminate/Console/Command.php | Command.parseVerbosity | protected function parseVerbosity($level = null)
{
if (isset($this->verbosityMap[$level])) {
$level = $this->verbosityMap[$level];
} elseif (! is_int($level)) {
$level = $this->verbosity;
}
return $level;
} | php | protected function parseVerbosity($level = null)
{
if (isset($this->verbosityMap[$level])) {
$level = $this->verbosityMap[$level];
} elseif (! is_int($level)) {
$level = $this->verbosity;
}
return $level;
} | [
"protected",
"function",
"parseVerbosity",
"(",
"$",
"level",
"=",
"null",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"verbosityMap",
"[",
"$",
"level",
"]",
")",
")",
"{",
"$",
"level",
"=",
"$",
"this",
"->",
"verbosityMap",
"[",
"$",
... | Get the verbosity level in terms of Symfony's OutputInterface level.
@param string|int|null $level
@return int | [
"Get",
"the",
"verbosity",
"level",
"in",
"terms",
"of",
"Symfony",
"s",
"OutputInterface",
"level",
"."
] | 0e0a428a50fc8378e3f77d18f3caae76c19e8c7a | https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Console/Command.php#L553-L562 | train | Parse verbosity level | [
30522,
5123,
3853,
11968,
3366,
6299,
15853,
3012,
1006,
1002,
2504,
1027,
19701,
1007,
1063,
2065,
1006,
26354,
3388,
1006,
1002,
2023,
1011,
1028,
12034,
25949,
2863,
2361,
1031,
1002,
2504,
1033,
1007,
1007,
1063,
1002,
2504,
1027,
1002,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
matomo-org/matomo | core/Mail.php | Mail.setFrom | public function setFrom($email, $name = null)
{
return parent::setFrom(
$this->parseDomainPlaceholderAsPiwikHostName($email),
$name
);
} | php | public function setFrom($email, $name = null)
{
return parent::setFrom(
$this->parseDomainPlaceholderAsPiwikHostName($email),
$name
);
} | [
"public",
"function",
"setFrom",
"(",
"$",
"email",
",",
"$",
"name",
"=",
"null",
")",
"{",
"return",
"parent",
"::",
"setFrom",
"(",
"$",
"this",
"->",
"parseDomainPlaceholderAsPiwikHostName",
"(",
"$",
"email",
")",
",",
"$",
"name",
")",
";",
"}"
] | Sets the sender.
@param string $email Email address of the sender.
@param null|string $name Name of the sender.
@return Zend_Mail | [
"Sets",
"the",
"sender",
"."
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/core/Mail.php#L75-L81 | train | Set From - - | [
30522,
2270,
3853,
2275,
19699,
5358,
1006,
1002,
10373,
1010,
1002,
2171,
1027,
19701,
1007,
1063,
2709,
6687,
1024,
1024,
2275,
19699,
5358,
1006,
1002,
2023,
1011,
1028,
11968,
6924,
9626,
2378,
24759,
10732,
14528,
3022,
8197,
9148,
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/Support/Arr.php | Arr.crossJoin | public static function crossJoin(...$arrays)
{
$results = [[]];
foreach ($arrays as $index => $array) {
$append = [];
foreach ($results as $product) {
foreach ($array as $item) {
$product[$index] = $item;
$append[] = ... | php | public static function crossJoin(...$arrays)
{
$results = [[]];
foreach ($arrays as $index => $array) {
$append = [];
foreach ($results as $product) {
foreach ($array as $item) {
$product[$index] = $item;
$append[] = ... | [
"public",
"static",
"function",
"crossJoin",
"(",
"...",
"$",
"arrays",
")",
"{",
"$",
"results",
"=",
"[",
"[",
"]",
"]",
";",
"foreach",
"(",
"$",
"arrays",
"as",
"$",
"index",
"=>",
"$",
"array",
")",
"{",
"$",
"append",
"=",
"[",
"]",
";",
... | Cross join the given arrays, returning all possible permutations.
@param array ...$arrays
@return array | [
"Cross",
"join",
"the",
"given",
"arrays",
"returning",
"all",
"possible",
"permutations",
"."
] | 0e0a428a50fc8378e3f77d18f3caae76c19e8c7a | https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Support/Arr.php#L70-L89 | train | Cross join array | [
30522,
2270,
10763,
3853,
2892,
5558,
2378,
1006,
1012,
1012,
1012,
1002,
27448,
1007,
1063,
1002,
3463,
1027,
1031,
1031,
1033,
1033,
1025,
18921,
6776,
1006,
1002,
27448,
2004,
1002,
5950,
1027,
1028,
1002,
9140,
1007,
1063,
1002,
30524,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/ScheduledReports/ScheduledReports.php | ScheduledReports.deleteSiteReport | public function deleteSiteReport($idSite)
{
$idReports = API::getInstance()->getReports($idSite);
foreach ($idReports as $report) {
$idReport = $report['idreport'];
API::getInstance()->deleteReport($idReport);
}
} | php | public function deleteSiteReport($idSite)
{
$idReports = API::getInstance()->getReports($idSite);
foreach ($idReports as $report) {
$idReport = $report['idreport'];
API::getInstance()->deleteReport($idReport);
}
} | [
"public",
"function",
"deleteSiteReport",
"(",
"$",
"idSite",
")",
"{",
"$",
"idReports",
"=",
"API",
"::",
"getInstance",
"(",
")",
"->",
"getReports",
"(",
"$",
"idSite",
")",
";",
"foreach",
"(",
"$",
"idReports",
"as",
"$",
"report",
")",
"{",
"$",... | Delete reports for the website | [
"Delete",
"reports",
"for",
"the",
"website"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/ScheduledReports/ScheduledReports.php#L121-L129 | train | Delete all reports for a site | [
30522,
2270,
3853,
3972,
12870,
28032,
7869,
6442,
1006,
1002,
8909,
28032,
2063,
1007,
1063,
1002,
8909,
2890,
25378,
1027,
17928,
1024,
1024,
2131,
7076,
26897,
1006,
1007,
1011,
1028,
2131,
2890,
25378,
1006,
1002,
8909,
28032,
2063,
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 | plugins/Ecommerce/Columns/Revenue.php | Revenue.onEcommerceCartUpdateConversion | public function onEcommerceCartUpdateConversion(Request $request, Visitor $visitor, $action, GoalManager $goalManager)
{
return $this->onEcommerceOrderConversion($request, $visitor, $action, $goalManager);
} | php | public function onEcommerceCartUpdateConversion(Request $request, Visitor $visitor, $action, GoalManager $goalManager)
{
return $this->onEcommerceOrderConversion($request, $visitor, $action, $goalManager);
} | [
"public",
"function",
"onEcommerceCartUpdateConversion",
"(",
"Request",
"$",
"request",
",",
"Visitor",
"$",
"visitor",
",",
"$",
"action",
",",
"GoalManager",
"$",
"goalManager",
")",
"{",
"return",
"$",
"this",
"->",
"onEcommerceOrderConversion",
"(",
"$",
"r... | @param Request $request
@param Visitor $visitor
@param Action|null $action
@param GoalManager $goalManager
@return mixed|false | [
"@param",
"Request",
"$request",
"@param",
"Visitor",
"$visitor",
"@param",
"Action|null",
"$action",
"@param",
"GoalManager",
"$goalManager"
] | 72df150735664275a60a7861e468c6ff3b152a14 | https://github.com/matomo-org/matomo/blob/72df150735664275a60a7861e468c6ff3b152a14/plugins/Ecommerce/Columns/Revenue.php#L70-L73 | train | This method is called when an ecommerce cart update conversion is triggered | [
30522,
2270,
3853,
2028,
9006,
5017,
3401,
10010,
8525,
17299,
3686,
8663,
27774,
1006,
5227,
1002,
5227,
1010,
10367,
1002,
10367,
1010,
1002,
2895,
1010,
3125,
24805,
4590,
1002,
3125,
24805,
4590,
1007,
1063,
2709,
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.