Skip to content

Fix: PHPStan - isset() on non-nullable $_direction property #32

Description

@mattgoud

Description

PHPStan (level 5, PS 8.x) reports:

```
Property ModuleGridCore::$_direction (string) in isset() is not nullable.
```

isset($this->_direction) is used but $_direction is typed as string (non-nullable), making the condition always true. The check should be replaced with a more appropriate guard (e.g. !empty() or removing it entirely).

To do

Fix the code and remove the corresponding ignoreErrors line from:

  • tests/php/phpstan/phpstan-8.1.7.neon
  • tests/php/phpstan/phpstan-8.2.x.neon

Added as ignoreErrors in

#30

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions