Closed gaglioffo closed 1 year ago
You can disable the rules using the following configuration:
{
"rules": {
"nullable_type_declaration_for_default_null_value": {
"use_nullable_type_declaration": true
}
}
}
Original PR: #193
Thanks a lot and sorry
Pint Version
1.10.5
PHP Version
8.1.10
Description
Type null remove into declaration function
Steps To Reproduce
Scenario OS: Windows PHP: 8.1.10
public function nameFunction(?string $value = null) {
orpublic function nameFunction(string|null $value = null) {
Pint 1.10.5 remove null and become
public function nameFunction(string $value = null) {
<-- wrongI tried with Pint 1.10.3 and the type aren't touched
public function nameFunction(?string $value = null) {
<-- correctpublic function nameFunction(string|null $value = null) {
<-- correctpint.json