Skip to content

Commit 07b7408

Browse files
committed
Add support of interfaces
1 parent 53a99af commit 07b7408

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Compiler/MethodInjector.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,9 @@ public function inject(string $file, ClassMethod $method, array $invariants): Cl
130130
$postconditions[] = $invariant->getExpression();
131131
}
132132

133-
$method->stmts = $this->getDecorator($method->stmts, $preconditions, $postconditions);
133+
if (\is_array($method->stmts)) {
134+
$method->stmts = $this->getDecorator($method->stmts, $preconditions, $postconditions);
135+
}
134136

135137
return $method;
136138
}

0 commit comments

Comments
 (0)