Skip to content

Conversation

@sukhwinder33445
Copy link
Contributor

No description provided.

Errors like:
- Deprecated: ipl\Stdlib\Str::trimSplit(): Implicitly marking parameter $limit as nullable is deprecated, the explicit nullable type must be used instead
Copy link

@BastianLedererIcinga BastianLedererIcinga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The return type of BaseFilter::setBaseFilter can be changed to static.

- #62 makes it superfluous for github actions
src/Filter.php Outdated
* @return Condition
*/
public static function equal($column, $value)
public static function equal(string $column, array|bool|float|int|string|DateTime|null $value): Condition
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the param types for $value. The phpDoc is fine.

Please remove this from other methods where DateTime can be specified as a parameter.

src/Filter.php Outdated
Comment on lines 172 to 179
if (! $rule instanceof Equal && ! $rule instanceof Unequal) {
throw new InvalidArgumentException(sprintf(
'Rule must be of type %s or %s, got %s instead',
Equal::class,
Unequal::class,
get_php_type($rule)
));
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be removed now.

src/Filter.php Outdated
Comment on lines 223 to 230
if (! $rule instanceof Like && ! $rule instanceof Unlike) {
throw new InvalidArgumentException(sprintf(
'Rule must be of type %s or %s, got %s instead',
Like::class,
Unlike::class,
get_php_type($rule)
));
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is superfluous and can be removed now.

src/Filter.php Outdated
Comment on lines 499 to 501
switch (true) {
case $rule instanceof All:
return $this->matchAll($rule, $row);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use match() instead of switch() and then remove the default case.

sukhwinder33445 and others added 13 commits December 11, 2025 09:01
PhpUnit Test:
```
-  1 test triggered 2 PHP warnings:

  1) /home/runner/work/ipl-stdlib/ipl-stdlib/src/Filter.php:540
  Undefined property: stdClass::$foo

  Triggered by:

  * ipl\Tests\Stdlib\FilterTest::testConditionsHandleMissingColumnsProperly (6 times)
    /home/runner/work/ipl-stdlib/ipl-stdlib/tests/FilterTest.php:624
...
```
properties, parameters and returntypes
extended in ipl/Sql/Filter/...
    In, NotIn, Exists, NotExists
implemented in ipl/Sql/Filter/...
    In, NotIn, Exists, NotExists
@sukhwinder33445 sukhwinder33445 force-pushed the support-php-85 branch 2 times, most recently from 6408fa8 to d67ed2a Compare December 12, 2025 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants