Appearance
PintConfigWriter
php
final class Zairakai\LaravelDevTools\Services\PintConfigWriterWrites the pint.json of a project.
Pint cannot extend another file. The file of config/dev-tools/ is the complete one that the project edits: it is generated once from the rules of stanislas-poisson/php-dev-tools, then from each layer given (the Laravel layer of this package), a later layer replacing the rules of an earlier one and adding its exclusions. The extension of an editor takes its path in its settings.
Source: src/Services/PintConfigWriter.php
Methods
write()
php
public static function write(string $root, array $layers, string $target = 'config/dev-tools/pint.json'): string| Parameter | Description |
|---|---|
$root | absolute path to the root of the project |
$layers | absolute paths of the layers, in order; a file that does not exist is skipped |
$target | path of the file to write, from the root of the project |
Returns string the path of the file written
Throws RuntimeException when a file cannot be read or written