Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Phplint Laravel Package

overtrue/phplint

PHPLint is a fast PHP syntax linter that runs multiple lint processes in parallel to speed up checking large codebases. Supports modern PHP versions, with easy installation via Composer, PHAR, Docker, or Phive, and configurable rules and paths.

View on GitHub
Deep Wiki
Context7

Process

PHPLint uses the Symfony Process Component to run multiple file syntax check in parallel.

The Overtrue\PHPLint\Linter object is responsible to create php -l command and build one Overtrue\PHPLint\Process\LintProcess instance for each command/file to check.

UML Diagram

UML Diagram

Generated by bartlett/graph-uml package via the resources/graph-uml/build.php script.

Example(s)

<?php
use Overtrue\PHPLint\Command\LintCommand;
use Overtrue\PHPLint\Configuration\ConsoleOptionsResolver;
use Overtrue\PHPLint\Event\EventDispatcher;
use Overtrue\PHPLint\Finder;
use Overtrue\PHPLint\Linter;
use Symfony\Component\Console\Input\ArrayInput;

$dispatcher = new EventDispatcher([]);

$arguments = [
    'path' => [__DIR__ . '/src', __DIR__ . '/tests'],
    '--no-configuration' => true,
    '--no-cache' => true,
    '--exclude' => ['vendor'],
    '--extensions' => ['php'],
    '--warning' => true,
];
$command = new LintCommand($dispatcher);
$input = new ArrayInput($arguments, $command->getDefinition());

$configResolver = new ConsoleOptionsResolver($input);

$finder = new Finder($configResolver);

$linter = new Linter($configResolver, $dispatcher);

$results = $linter->lintFiles($finder->getFiles());

// $results is instance of "Overtrue\PHPLint\Output\LinterOutput"
// many shortcuts exists to :
// - detect if there are some failures (`hasFailures()`), errors (`hasErrors()`) or warnings (`hasWarnings()`)
// - retrieve failures (`getFailures()`), errors (`getErrors()`) or warnings (`getWarnings()`) that were occurred
// - list of file that were skipped (`getHits()`) because not changed since previous run
// - list of file that were analyzed (`getMisses()`) because contents changed since previous run 
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport