Skip to content

Commit a012463

Browse files
authored
Fix PHP doc
1 parent 0d0ac20 commit a012463

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

.phpstan-baseline.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2251,12 +2251,6 @@
22512251
'count' => 1,
22522252
'path' => __DIR__ . '/src/Contract_Supplier.php',
22532253
];
2254-
$ignoreErrors[] = [
2255-
'message' => '#^Default value of the parameter \\#4 \\$options \\(array\\{\\}\\) of method CronTask\\:\\:register\\(\\) is incompatible with type array\\{state\\: 0\\|1\\|2, mode\\: 1\\|2, allowmode\\: int, hourmin\\: int, hourmax\\: int, logs_lifetime\\: int, param\\: int, comment\\: string\\}\\.$#',
2256-
'identifier' => 'parameter.defaultValue',
2257-
'count' => 1,
2258-
'path' => __DIR__ . '/src/CronTask.php',
2259-
];
22602254
$ignoreErrors[] = [
22612255
'message' => '#^Function filemtime is unsafe to use\\. It can return FALSE instead of throwing an exception\\. Please add \'use function Safe\\\\filemtime;\' at the beginning of the file to use the variant provided by the \'thecodingmachine/safe\' library\\.$#',
22622256
'identifier' => 'theCodingMachineSafe.function',
@@ -2329,12 +2323,6 @@
23292323
'count' => 1,
23302324
'path' => __DIR__ . '/src/CronTask.php',
23312325
];
2332-
$ignoreErrors[] = [
2333-
'message' => '#^Offset \'allowmode\'\\|\'comment\'\\|\'hourmax\'\\|\'hourmin\'\\|\'logs_lifetime\'\\|\'mode\'\\|\'param\'\\|\'state\' on array\\{state\\: 0\\|1\\|2, mode\\: 1\\|2, allowmode\\: int, hourmin\\: int, hourmax\\: int, logs_lifetime\\: int, param\\: int, comment\\: string\\} in isset\\(\\) always exists and is not nullable\\.$#',
2334-
'identifier' => 'isset.offset',
2335-
'count' => 1,
2336-
'path' => __DIR__ . '/src/CronTask.php',
2337-
];
23382326
$ignoreErrors[] = [
23392327
'message' => '#^Cannot access property \\$first_connection on null\\.$#',
23402328
'identifier' => 'property.nonObject',

src/CronTask.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,16 @@ public static function launch($mode, $max = 1, $name = '')
945945
* @param integer $frequency execution frequency
946946
* @param array $options optional options
947947
* (state, mode, allowmode, hourmin, hourmax, logs_lifetime, param, comment)
948-
* @phpstan-param array{state: CronTask::STATE_*, mode: CronTask::MODE_*, allowmode: int, hourmin: int, hourmax: int, logs_lifetime: int, param: int, comment: string} $options
948+
* @phpstan-param array{
949+
* state?: CronTask::STATE_*,
950+
* mode?: CronTask::MODE_*,
951+
* allowmode?: int,
952+
* hourmin?: int,
953+
* hourmax?: int,
954+
* logs_lifetime?: int,
955+
* param?: int,
956+
* comment?: string
957+
* } $options
949958
*
950959
* @return boolean
951960
**/

0 commit comments

Comments
 (0)