phplrt/phplrt

View on GitHub
libs/compiler/src/Generator/PhpCodeGenerator.php

Summary

Maintainability
A
0 mins
Test Coverage

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 22 and the first side effect is on line 18.
Open

<?php

Possible parse error: class missing opening or closing brace
Open

final class PhpCodeGenerator extends CodeGenerator

Possible parse error: class missing opening or closing brace
Open

final class PhpCodeGenerator extends CodeGenerator

Arguments with default values must be at the end of the argument list
Open

        private readonly PrinterInterface $printer = new PhpPrinter(),

Line indented incorrectly; expected 0 spaces, found 4
Open

    }

Line indented incorrectly; expected 0 spaces, found 4
Open

    }

Line indented incorrectly; expected 4 spaces, found 8
Open

        foreach ($this->getReferences() as $reference) {

Line indented incorrectly; expected 0 spaces, found 4
Open

    private function getTemplateResult(): string

Line indented incorrectly; expected 0 spaces, found 4
Open

    }

Line indented incorrectly; expected 0 spaces, found 4
Open

    }

Line indented incorrectly; expected 4 spaces, found 8
Open

        }

Line indented incorrectly; expected 0 spaces, found 4
Open

    }

Line indented incorrectly; expected 0 spaces, found 4
Open

    private bool $strict = true;

Line indented incorrectly; expected 4 spaces, found 8
Open

        }

Line indented incorrectly; expected 0 spaces, found 4
Open

    public function withoutStrictTypes(): self

Line indented incorrectly; expected 0 spaces, found 4
Open

    }

Line indented incorrectly; expected 4 spaces, found 8
Open

        if ($this->strict) {

Line indented incorrectly; expected 0 spaces, found 8
Open

        private readonly PrinterInterface $printer = new PhpPrinter(),

Line indented incorrectly; expected 0 spaces, found 4
Open

    public function withClassUsage(string $class, string $alias = null): self

Line indented incorrectly; expected 0 spaces, found 4
Open

    public function generate(): string

Line indented incorrectly; expected 0 spaces, found 4
Open

    public function withStrictTypes(): self

Line indented incorrectly; expected 4 spaces, found 8
Open

        }

Line indented incorrectly; expected 0 spaces, found 4
Open

    }

Line indented incorrectly; expected 0 spaces, found 4
Open

    public function __construct(

Line indented incorrectly; expected 0 spaces, found 4
Open

    private function getStrictTypesResult(): string

Line indented incorrectly; expected 0 spaces, found 4
Open

    private function getReferencesResult(): string

Line indented incorrectly; expected 4 spaces, found 8
Open

        if ($result === []) {

There are no issues that match your filters.

Category
Status