It seems like element() 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
14
$this->/** @scrutinizer ignore-call */
15
element()->setAttribute('required', $required);
Loading history...
15
return $this;
16
}
17
18
/**
19
* @param bool $valid
20
* @param string $message
21
*
22
* @return static
23
*/
24
public function feedback(bool $valid, string $message = ''): static