From ed1c524436c7a525dde98f9469afc52761c75afb Mon Sep 17 00:00:00 2001 From: Sebastian Schreiber Date: Sun, 15 Nov 2020 23:40:33 +0100 Subject: [PATCH] [TASK] Use composer scripts in captainhook --- captainhook.json | 6 +++--- .../v8/v0/TimeTrackerInsteadOfNullTimeTrackerRector.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/captainhook.json b/captainhook.json index b23bfbf65..287479441 100644 --- a/captainhook.json +++ b/captainhook.json @@ -16,17 +16,17 @@ "conditions": [] }, { - "action": "vendor/bin/ecs check --ansi", + "action": "composer run check-style", "options": [], "conditions": [] }, { - "action": "vendor/bin/rector rectify --dry-run --ansi", + "action": "composer run rector", "options": [], "conditions": [] }, { - "action": "vendor/bin/phpstan analyse --memory-limit=-1 --ansi --error-format symplify", + "action": "composer run analyze", "options": [], "conditions": [] } diff --git a/src/Rector/v8/v0/TimeTrackerInsteadOfNullTimeTrackerRector.php b/src/Rector/v8/v0/TimeTrackerInsteadOfNullTimeTrackerRector.php index fd2c1f6a8..477604901 100644 --- a/src/Rector/v8/v0/TimeTrackerInsteadOfNullTimeTrackerRector.php +++ b/src/Rector/v8/v0/TimeTrackerInsteadOfNullTimeTrackerRector.php @@ -113,7 +113,7 @@ private function addAdditionalArgumentIfNeeded(Node $node): ?Node return null; } - if (! $this->isMakeInstanceCall($node) && ! $this->isObjectMangerCall($node)) { + if (! $this->isMakeInstanceCall($node) && ! $this->isObjectManagerCall($node)) { return null; } @@ -139,7 +139,7 @@ private function isMakeInstanceCall(Node $node): bool return $this->isName($node->name, 'makeInstance'); } - private function isObjectMangerCall(Node $node): bool + private function isObjectManagerCall(Node $node): bool { if (! $node instanceof MethodCall) { return false;