It seems like resetMessage() must be provided by classes using this trait. How about adding it as abstract method to this trait?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
15
$this->/** @scrutinizer ignore-call */
16
resetMessage();
Loading history...
16
1
return $this;
17
}
18
19
1
public function is(Constraint $constraint): self
20
{
21
1
return $this->has($constraint);
22
}
23
24
1
public function hasNot(Constraint $constraint): self
25
{
26
1
Assert::assertThat($this->value, new LogicalNot($constraint));
27
1
$this->resetMessage();
28
1
return $this;
29
}
30
31
1
public function isNot(Constraint $constraint): self