You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Laravel Pint throws a false syntax error when in fact code works.
Steps To Reproduce
PHP Hooks error.
This is a valid php code, but fail on Pint
class Example {
public ?int$intBoolean {
get => $this->booleanValue === null ? null : (int) $this->booleanValue;
}
publicfunction__construct(
public ?boolean$booleanValue
) {}
}
FAIL ............................................................................................................................................. 217 files, 1 error
! Example.php. Parse error: syntax error, unexpected token "public" on line 24.
1▕ class Example {
2▕
3▕ public ?int $intBoolean {
➜ 4▕ get =>$this->booleanValue === null ? null : (int) $this->booleanValue;
5▕ }
6▕
7▕ public function__construct(
8▕ public ?boolean $booleanValue
This is a valid code too, but pass.
class Example {
public ?int$intBoolean {
get => ($this->booleanValue === null ? null : (int) $this->booleanValue);
}
publicfunction__construct(
public ?boolean$booleanValue
) {}
}
The text was updated successfully, but these errors were encountered:
Pint Version
1.20
PHP Version
8.4.3
Description
Laravel Pint throws a false syntax error when in fact code works.
Steps To Reproduce
PHP Hooks error.
This is a valid php code, but fail on Pint
This is a valid code too, but pass.
The text was updated successfully, but these errors were encountered: