bearsunday /
BEAR.Package
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace BEAR\Package\Compiler; |
||
| 6 | |||
| 7 | use ArrayObject; |
||
| 8 | use BEAR\Package\Types; |
||
| 9 | |||
| 10 | use function file_exists; |
||
| 11 | use function file_put_contents; |
||
| 12 | |||
| 13 | /** @psalm-import-type OverwrittenFiles from Types */ |
||
| 14 | final class FilePutContents |
||
| 15 | { |
||
| 16 | /** @param OverwrittenFiles $overwritten For debugging */ |
||
|
0 ignored issues
–
show
|
|||
| 17 | public function __construct( |
||
| 18 | private ArrayObject $overwritten, // @phpstan-ignore-line |
||
| 19 | ) { |
||
| 20 | } |
||
| 21 | |||
| 22 | public function __invoke(string $fileName, string $content): void |
||
| 23 | { |
||
| 24 | if (file_exists($fileName)) { |
||
| 25 | /** @psalm-suppress NullArgument */ |
||
| 26 | $this->overwritten[] = $fileName; |
||
| 27 | } |
||
| 28 | |||
| 29 | file_put_contents($fileName, $content); |
||
| 30 | } |
||
| 31 | } |
||
| 32 |
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