phpstan-webmozart-assert icon indicating copy to clipboard operation
phpstan-webmozart-assert copied to clipboard

PHPStan extension for webmozart/assert

Results 16 phpstan-webmozart-assert issues
Sort by recently updated
recently updated
newest added

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [slevomat/coding-standard](https://togithub.com/slevomat/coding-standard) | require-dev | major | `^7.0` -> `^8.0` | ---...

This issue lists Renovate updates and detected dependencies. Read the [Dependency Dashboard](https://docs.renovatebot.com/key-concepts/dashboard/) docs to learn more.[View this repository on the Mend.io Web Portal](https://developer.mend.io/github/phpstan/phpstan-webmozart-assert). ## Config Migration Needed - [ ]...

Closes https://github.com/phpstan/phpstan-webmozart-assert/issues/129 Brings back what was reverted in https://github.com/phpstan/phpstan-webmozart-assert/pull/89 and steals ideas from https://github.com/phpstan/phpstan-webmozart-assert/pull/128

```php class A { public function __construct(private string $val) { } } function foo(A $a) { Assert::inArray($a, [new A('a')]); } ``` gives: > Call to static method Webmozart\Assert\Assert::inArray() with arguments...

bug

A nested array like: ```php /** * @param mixed[] $requestData * * @return array{ * accountId: int, * errorColor: string|null, * theme: array{ * backgroundColor: string|null, * textColor: string|null, *...

I released 1.4.0 with some new assertions that should be added here. * Assert::ip() * Assert::ipv4() * Assert::ipv6() * Assert::notRegex() * Assert::interfaceExists() * Assert::isList() * Assert::isMap()

`Assert::implementsInterface()` works on `object|string`, not just `object`, so it should be translated to something like `assert($foo instanceof $type || in_array($interface, \class_implements($value)))` (see https://3v4l.org/VdIbR). Not sure what the correct translation (understood...

The function [implementsInterface($value, $interface, $message = '')](https://github.com/webmozart/assert/blob/1.5.0/src/Assert.php#L1336) from the [docs](https://github.com/webmozart/assert) >Check that a class implements an interface. Here is the code: ```

> **Note:** This PR body was truncated due to platform limits. This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [phpunit/phpunit](https://phpunit.de/) ([source](https://redirect.github.com/sebastianbergmann/phpunit))...