David Rodrigues

Results 51 issues of David Rodrigues

Hello! PHP supports three ways to define nullable types: * Informal (not recomended): `User $user = null;` * Formal short format: `?User $user = null;` * Formal full format: `User|null...

I have a real case where a magic property is `int|null`, and my conditionals is something like `if ($obj->property)`, but it causes an issue for me, because `0` must no...

While it works fine in general cases (eg. `@covers MyClass::method`), it give a false-positive when you try to cover an entire class, for instance `@covers MyClass`. According to [**phpunit doc**](https://phpunit.de/manual/current/en/appendixes.annotations.html#appendixes.annotations.covers),...

bug / false-positive

| Subject | Details | | :------------- | :---------------------------------------------------------------------------- | | **Plugin** | U3.0.11.1 | | **Language level** | PHP 7.4 | ```php // [EA] In multiple cases the result...

bug / false-positive

The following code: ```php function test(string $value) { foreach (possibilities() as $possibility) { $slugValue = slug($value); if ($slugValue === $possibility) { return true; } } return false; } ``` Could...

enhancement

For some reason I believe this already exists on PS or EA (or maybe I'm confusing with the Java version), but I couldn't find the inspection that does it. So...

enhancement

Unix and Windows could uses `/` as _directory separator_. Windows could too uses `\`, but it is invalid for Unix distros. _And I have spent 4 hours do identify an...

enhancement

It should identify if the variable name used on loopings (both `$key` or `$value`) conflicts with a previous defined variable. It can cause an accidental variable override. ```php $values =...

enhancement

Multiplication have more priority than sum, for instance, but I think that it could turn code more clear if we put it explicity. For instance: ```php return 5 - 20...

enhancement
easy-to-pick

The `case` could be terminated by `:` or `;`. It is new for me, but I think that EA could suggest to normalize this. An option could be added if...

enhancement