libs/compiler/src/Generator/PhpCodeGenerator.php
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
Open
<?php
- Exclude checks
Possible parse error: class missing opening or closing brace Open
Open
final class PhpCodeGenerator extends CodeGenerator
- Exclude checks
Possible parse error: class missing opening or closing brace Open
Open
final class PhpCodeGenerator extends CodeGenerator
- Exclude checks
Arguments with default values must be at the end of the argument list Open
Open
private readonly PrinterInterface $printer = new PhpPrinter(),
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 4 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 4 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
foreach ($this->getReferences() as $reference) {
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 4 Open
Open
private function getTemplateResult(): string
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 4 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 4 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 4 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 4 Open
Open
private bool $strict = true;
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 4 Open
Open
public function withoutStrictTypes(): self
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 4 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
if ($this->strict) {
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 8 Open
Open
private readonly PrinterInterface $printer = new PhpPrinter(),
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 4 Open
Open
public function withClassUsage(string $class, string $alias = null): self
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 4 Open
Open
public function generate(): string
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 4 Open
Open
public function withStrictTypes(): self
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 4 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 4 Open
Open
public function __construct(
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 4 Open
Open
private function getStrictTypesResult(): string
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 4 Open
Open
private function getReferencesResult(): string
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
if ($result === []) {
- Exclude checks