phug-php/tester

View on GitHub

Showing 93 of 93 total issues

@throws type of renderFile has undeclared type \Phug\RendererException
Open

    protected function renderFile($file, $locals = [], $options = null): string
Severity: Minor
Found in src/Phug/Tester/TestCaseTrait.php by phan

Call to method scanDirectory from undeclared class \Phug\Renderer
Open

            foreach ($this->renderer->scanDirectory($path) as $file) {
Severity: Critical
Found in src/Phug/Tester/Coverage.php by phan

Argument 1 (input) is int but \str_pad() takes string
Open

                    str_pad($_nodes, 3, ' ', STR_PAD_LEFT).'   '.
Severity: Minor
Found in src/Phug/Tester/Coverage.php by phan

Call to method getLine from undeclared class \Phug\Util\SourceLocationInterface
Open

            $locationLine = $location->getLine() - 1;
Severity: Critical
Found in src/Phug/Tester/Coverage.php by phan

Call to method getChildren from undeclared class \Phug\Ast\NodeInterface
Open

            foreach ($node->getChildren() as $child) {
Severity: Critical
Found in src/Phug/Tester/Coverage.php by phan

Call to method run from undeclared class \PHPUnit\TextUI\Command
Open

        return !$this->command->run($arguments, false);
Severity: Critical
Found in src/Phug/Tester/Cli.php by phan

Call to method renderFile from undeclared class \Phug\Renderer
Open

        return $this->renderer->renderFile($file, $locals);
Severity: Critical
Found in src/Phug/Tester/TestCaseTrait.php by phan

Call to method getOption from undeclared class \Phug\Renderer
Open

        return $this->renderer->getOption('paths');
Severity: Critical
Found in src/Phug/Tester/Coverage.php by phan

Checking instanceof against undeclared class \Phug\Parser\Node\DocumentNode
Open

                                if (!($node instanceof DocumentNode) && ($location = $node->getSourceLocation())) {
Severity: Critical
Found in src/Phug/Tester/Coverage.php by phan

Reference to constant class from undeclared class \Phug\Renderer
Open

        return Renderer::class;
Severity: Critical
Found in src/Phug/Tester/TestCaseTrait.php by phan

Checking instanceof against undeclared class \Phug\Parser\NodeInterface
Open

        if ($node instanceof NodeInterface && !($node instanceof DocumentNode) && !$list->offsetExists($node)) {
Severity: Critical
Found in src/Phug/Tester/Coverage.php by phan

Call to method initAdapter from undeclared class \Phug\Renderer
Open

            $this->renderer->initAdapter();
Severity: Critical
Found in src/Phug/Tester/TestCaseTrait.php by phan

Checking instanceof against undeclared class \Phug\Ast\NodeInterface
Open

        if ($node instanceof AstNodeInterface) {
Severity: Critical
Found in src/Phug/Tester/Coverage.php by phan

@throws type of setUpCoverage has undeclared type \Phug\RendererException
Open

    protected function setUpCoverage(): void
Severity: Minor
Found in src/Phug/Tester/TestCaseTrait.php by phan

Reference to parent from trait \Phug\Tester\TestCaseTrait
Open

            parent::setUp();
Severity: Info
Found in src/Phug/Tester/TestCaseTrait.php by phan

Argument 1 (input) is int but \str_pad() takes string
Open

                        str_pad($id, $pad, ' ', STR_PAD_LEFT).
Severity: Minor
Found in src/Phug/Tester/Coverage.php by phan

Property \Phug\Tester\Cli->command has undeclared type \PHPUnit\TextUI\Command
Open

    private $command;
Severity: Minor
Found in src/Phug/Tester/Cli.php by phan

Call to method getOffset from undeclared class \Phug\Util\SourceLocationInterface
Open

            $this->coverage[$locationPath][$locationLine][$location->getOffset() - 1] = $covered;
Severity: Critical
Found in src/Phug/Tester/Coverage.php by phan

Argument #2 of this call to \str_pad is typically a literal or constant but isn't, but argument #1 (which is typically a variable) is a literal or constant. The arguments may be in the wrong order.
Open

                str_pad('Total', $pad, ' ', STR_PAD_RIGHT).
Severity: Minor
Found in src/Phug/Tester/Coverage.php by phan

Reference to parent from trait \Phug\Tester\TestCaseTrait
Open

        if (method_exists(parent::class, 'tearDown')) {
Severity: Info
Found in src/Phug/Tester/TestCaseTrait.php by phan
Severity
Category
Status
Source
Language