diff --git a/rector.php b/rector.php index e824476..9736338 100644 --- a/rector.php +++ b/rector.php @@ -48,7 +48,6 @@ use Rector\Set\ValueObject\LevelSetList; use Rector\Set\ValueObject\SetList; use Rector\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector; -use Rector\Strict\Rector\If_\BooleanInIfConditionRuleFixerRector; use Rector\TypeDeclaration\Rector\Empty_\EmptyOnNullableObjectToInstanceOfRector; use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector; use Rector\ValueObject\PhpVersion; @@ -161,7 +160,6 @@ $rectorConfig->rule(StringClassNameToClassConstantRector::class); $rectorConfig->rule(PrivatizeFinalClassPropertyRector::class); $rectorConfig->rule(CompleteDynamicPropertiesRector::class); - $rectorConfig->rule(BooleanInIfConditionRuleFixerRector::class); $rectorConfig->rule(SingleInArrayToCompareRector::class); $rectorConfig->rule(VersionCompareFuncCallToConstantRector::class); $rectorConfig->rule(ExplicitBoolCompareRector::class); diff --git a/src/Config/Services.php b/src/Config/Services.php index bc8fb68..60531a4 100644 --- a/src/Config/Services.php +++ b/src/Config/Services.php @@ -13,11 +13,11 @@ namespace CodeIgniter\Tasks\Config; +use CodeIgniter\Config\BaseService; use CodeIgniter\Tasks\CronExpression; use CodeIgniter\Tasks\Scheduler; -use Config\Services as BaseServices; -class Services extends BaseServices +class Services extends BaseService { /** * Returns the Task Scheduler diff --git a/src/RunResolver.php b/src/RunResolver.php index e9d24f5..1eb22ac 100644 --- a/src/RunResolver.php +++ b/src/RunResolver.php @@ -151,7 +151,7 @@ protected function isInList($value, string $list): bool { $list = explode(',', $list); - return in_array(trim($value), $list, true); + return in_array(trim((string) $value), $list, true); } /** diff --git a/src/Task.php b/src/Task.php index b1b2cb6..9cd2bc1 100644 --- a/src/Task.php +++ b/src/Task.php @@ -365,7 +365,7 @@ protected function buildName() */ public function __get(string $key) { - if ($key === 'name' && empty($this->name)) { + if ($key === 'name' && (! isset($this->name) || ($this->name === ''))) { return $this->buildName(); }