From 50fb0a88e1633e996f94d3904e8f865c399d5e46 Mon Sep 17 00:00:00 2001 From: webimpress Date: Sat, 5 Oct 2019 22:42:25 +0100 Subject: [PATCH] Optimize "or" conditions --- classes/DefaultArgumentRemoverReturnTypes.php | 4 ++-- classes/DefaultArgumentRemoverReturnTypes84.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/classes/DefaultArgumentRemoverReturnTypes.php b/classes/DefaultArgumentRemoverReturnTypes.php index 968b1f7..32d928d 100644 --- a/classes/DefaultArgumentRemoverReturnTypes.php +++ b/classes/DefaultArgumentRemoverReturnTypes.php @@ -30,8 +30,8 @@ public function matches(Invocation $invocation) : bool { $iClass = class_exists(Invocation::class); - if ($invocation instanceof Invocation\StaticInvocation - || $iClass + if ($iClass + || $invocation instanceof Invocation\StaticInvocation ) { $this->removeDefaultArguments( $invocation, diff --git a/classes/DefaultArgumentRemoverReturnTypes84.php b/classes/DefaultArgumentRemoverReturnTypes84.php index 6b5c6cf..4513ef5 100644 --- a/classes/DefaultArgumentRemoverReturnTypes84.php +++ b/classes/DefaultArgumentRemoverReturnTypes84.php @@ -30,8 +30,8 @@ public function matches(Invocation $invocation) : bool { $iClass = class_exists(Invocation::class); - if ($invocation instanceof Invocation\StaticInvocation - || $iClass + if ($iClass + || $invocation instanceof Invocation\StaticInvocation ) { $this->removeDefaultArguments( $invocation,