Skip to content

PintConfigWriter ​

php
final class Zairakai\LaravelDevTools\Services\PintConfigWriter

Writes 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
ParameterDescription
$rootabsolute path to the root of the project
$layersabsolute paths of the layers, in order; a file that does not exist is skipped
$targetpath 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

Documentation of 5.5.0 , built from 92a7387 on 5.5.0 by pipeline #3086393151 on 2026-11-18.