Skip to content

Commit

Permalink
style(api): apply consistent formatting across various files
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Poyigi <[email protected]>
  • Loading branch information
sampoyigi committed Feb 21, 2025
1 parent 7106d60 commit df0110a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
9 changes: 6 additions & 3 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
__DIR__.'/src/Classes/BaseEvent.php',
],
])
->withTypeCoverageLevel(100)
->withDeadCodeLevel(100)
->withCodeQualityLevel(100);
->withPreparedSets(
deadCode: true,
codeQuality: true,
codingStyle: true,
typeDeclarations: true,
);
1 change: 1 addition & 0 deletions src/Classes/BaseModelAttributesCondition.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ protected function evalAttributeStringType($model, $subCondition)
$operator = array_get($subCondition, 'operator');
$conditionValue = array_get($subCondition, 'value');
$conditionValue = is_array($conditionValue) ? $conditionValue : mb_strtolower(trim((string)$conditionValue));

$modelValue = $this->getModelEvalAttribute($model, $attribute, $subCondition);

if ($operator === 'is') {
Expand Down
2 changes: 1 addition & 1 deletion src/Console/Cleanup.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function handle(): void

$amountDeleted = AutomationLog::query()->where('created_at', '<', $logTTL)->delete();

$this->info("Deleted {$amountDeleted} record(s) from the automation log.");
$this->info(sprintf('Deleted %s record(s) from the automation log.', $amountDeleted));
$this->comment('All done!');
}
}
2 changes: 1 addition & 1 deletion tests/Classes/BaseActionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function defineFormFields(): array
$action = new BaseAction;

$action->triggerAction([]);
})->throws('Method Igniter\Automation\Classes\BaseAction::triggerAction() is not implemented.');
})->throws('Method '.BaseAction::class.'::triggerAction() is not implemented.');

it('triggers an action', function(): void {
$action = new class extends BaseAction
Expand Down

0 comments on commit df0110a

Please sign in to comment.