coniadev /
boiler
| 1 | <?php |
||||
| 2 | |||||
| 3 | declare(strict_types=1); |
||||
| 4 | |||||
| 5 | namespace Conia\Boiler; |
||||
| 6 | |||||
| 7 | class Section |
||||
| 8 | { |
||||
| 9 | /** @var list<string> */ |
||||
|
0 ignored issues
–
show
|
|||||
| 10 | protected array $prepended = []; |
||||
| 11 | |||||
| 12 | /** @var list<string> */ |
||||
| 13 | protected array $appended = []; |
||||
| 14 | |||||
| 15 | 3 | public function __construct(protected string $value) |
|||
| 16 | { |
||||
| 17 | 3 | } |
|||
| 18 | |||||
| 19 | 2 | public function prepend(string $content): self |
|||
| 20 | { |
||||
| 21 | 2 | $this->prepended[] = $content; |
|||
| 22 | |||||
| 23 | 2 | return $this; |
|||
| 24 | } |
||||
| 25 | |||||
| 26 | 2 | public function append(string $content): self |
|||
| 27 | { |
||||
| 28 | 2 | array_unshift($this->appended, $content); |
|||
| 29 | |||||
| 30 | 2 | return $this; |
|||
| 31 | } |
||||
| 32 | |||||
| 33 | 1 | public function empty(): bool |
|||
| 34 | { |
||||
| 35 | 1 | error_log(print_r($this->value, true)); |
|||
|
0 ignored issues
–
show
It seems like
print_r($this->value, true) can also be of type true; however, parameter $message of error_log() does only seem to accept string, maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 36 | |||||
| 37 | 1 | return empty($this->value); |
|||
| 38 | } |
||||
| 39 | |||||
| 40 | 3 | public function get(): string |
|||
| 41 | { |
||||
| 42 | 3 | return implode('', array_merge($this->prepended, [$this->value], $this->appended)); |
|||
| 43 | } |
||||
| 44 | |||||
| 45 | 1 | public function setValue(string $value): void |
|||
| 46 | { |
||||
| 47 | 1 | $this->value = $value; |
|||
| 48 | } |
||||
| 49 | } |
||||
| 50 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths