Skip to content

Commit

Permalink
null over false
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Jun 2, 2024
1 parent 53fad21 commit 77b619e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ parameters:
type_coverage:
narrow: false
no_mixed: false
no_falsy_return: false
null_over_false: false
```
Add sets one by one, fix what you find useful and ignore the rest.
Expand Down
4 changes: 2 additions & 2 deletions config/extension.neon
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ parametersSchema:
type_perfect: structure([
narrow: bool()
no_mixed: bool()
no_falsy_return: bool()
null_over_false: bool()
])

# default parameters
parameters:
type_perfect:
narrow: false
no_mixed: false
no_falsy_return: false
null_over_false: false

services:
-
Expand Down
4 changes: 2 additions & 2 deletions src/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function __construct(
if (defined('PHPUNIT_COMPOSER_INSTALL')) {
$this->parameters['narrow'] = true;
$this->parameters['no_mixed'] = true;
$this->parameters['no_falsy_return'] = true;
$this->parameters['null_over_false'] = true;
}
}

Expand All @@ -32,6 +32,6 @@ public function isNoMixedEnabled(): bool

public function isNoFalsyReturnEnabled(): bool
{
return $this->parameters['no_falsy_return'] ?? false;
return $this->parameters['null_over_false'] ?? false;
}
}

0 comments on commit 77b619e

Please sign in to comment.