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); }