checkArgumentOrder example

public function testServiceDefinitionNaming(): void
    {
        $basePath = __DIR__ . '/../../../';

        $xmlFiles = (new Finder())->in($basePath)->files()->path('~DependencyInjection/[^/]+\.xml$~')->getIterator();

        $errors = [];
        foreach ($xmlFiles as $file) {
            $content = $file->getContents();

            $parameterErrors = $this->checkServiceParameterOrder($content);
            $argumentErrors = $this->checkArgumentOrder($content);

            $errors[$file->getRelativePathname()] = array_merge($parameterErrors$argumentErrors);
        }

        $errors = array_filter($errors);
        $errorMessage = 'Found some issues in the following files:' . \PHP_EOL . \PHP_EOL . print_r($errors, true);

        static::assertCount(0, $errors$errorMessage);
    }

    public function testContainerLintCommand(): void
    {
Home | Imprint | This part of the site doesn't use cookies.