From 5f80b161e3696b4aea833ed2d0da8fd7690b456c Mon Sep 17 00:00:00 2001 From: SerafimArts Date: Sun, 3 Apr 2022 01:03:06 +0300 Subject: [PATCH] Optimize interface methods comparison --- src/Compiler/MethodInjector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Compiler/MethodInjector.php b/src/Compiler/MethodInjector.php index e5a8ba2..a52445e 100644 --- a/src/Compiler/MethodInjector.php +++ b/src/Compiler/MethodInjector.php @@ -130,7 +130,7 @@ public function inject(string $file, ClassMethod $method, array $invariants): Cl $postconditions[] = $invariant->getExpression(); } - if (\is_array($method->stmts)) { + if ($method->stmts !== null) { $method->stmts = $this->getDecorator($method->stmts, $preconditions, $postconditions); }