Skip to content

Commit 3cba78c

Browse files
committed
Updated phpstan utilities (see details), also fixed offending code.
- Updating bitexpert/phpstan-magento (v0.3.0 => v0.5.0) - Updating phpstan/extension-installer (1.0.4 => 1.1.0) - Updating phpstan/phpstan (0.12.34 => 0.12.65)
1 parent 4c4c558 commit 3cba78c

File tree

4 files changed

+35
-37
lines changed

4 files changed

+35
-37
lines changed

Cron/ScheduleJob.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ public function schedule(string $jobCode): bool
4242
$schedule
4343
->setJobCode($jobCode)
4444
->setStatus(CronScheduleModel::STATUS_PENDING)
45-
->setCreatedAt(strftime('%Y-%m-%d %H:%M:%S', $createdAtTime))
46-
->setScheduledAt(strftime('%Y-%m-%d %H:%M', $scheduledAtTime))
45+
->setCreatedAt(strftime('%Y-%m-%d %H:%M:%S', $createdAtTime) ?: '')
46+
->setScheduledAt(strftime('%Y-%m-%d %H:%M', $scheduledAtTime) ?: '')
4747
->save();
4848

4949
return true;

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"symfony/console": "^2.5 || ^3.0 || ^4.0 || ^5.0"
2222
},
2323
"require-dev": {
24-
"bitexpert/phpstan-magento": "^0.3.0",
24+
"bitexpert/phpstan-magento": "^0.5.0",
2525
"ergebnis/composer-normalize": "^2.2",
2626
"friendsofphp/php-cs-fixer": "^2.17",
2727
"magento/magento-coding-standard": "^6.0",

composer.lock

Lines changed: 31 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpstan.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ parameters:
99
- %currentWorkingDirectory%/vendor/*
1010
ignoreErrors:
1111
- '/ has no return typehint specified./'
12+
- '/Use service contracts to persist entities in favour of Magento\\Cron\\Model\\Schedule\:\:save\(\) method/'

0 commit comments

Comments
 (0)