Skip to content
6 changes: 0 additions & 6 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -624,12 +624,6 @@ parameters:
count: 1
path: src/Compiler.php

-
message: '#^Parameter \#1 \$templatePath of method Phalcon\\Volt\\Parser\\Parser\:\:parseView\(\) expects string, string\|null given\.$#'
identifier: argument.type
count: 1
path: src/Compiler.php

-
message: '#^Parameter \#1 \$test of method Phalcon\\Volt\\Compiler\:\:resolveTest\(\) expects array, mixed given\.$#'
identifier: argument.type
Expand Down
6 changes: 3 additions & 3 deletions src/Compiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -1385,8 +1385,8 @@ public function compileSource(string $viewCode, bool $extendsMode = false): stri
$this->autoescape = (bool)$this->options['autoescape'];
}

$parser = new Parser($viewCode);
$intermediate = $parser->parseView($this->currentPath);
$parser = new Parser();
$intermediate = $parser->parse($viewCode, $this->currentPath ?? '');
$compilation = $this->statementList($intermediate, $extendsMode);

/**
Expand Down Expand Up @@ -2215,7 +2215,7 @@ public function getUniquePrefix(): string
*/
public function parse(string $viewCode): array
{
return (new Parser($viewCode))->parseView("eval code");
return (new Parser())->parse($viewCode, 'eval code');
}

/**
Expand Down
Loading
Loading