Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't convince phpstan about existing offset #53

Open
ostrolucky opened this issue Nov 14, 2019 · 1 comment
Open

Can't convince phpstan about existing offset #53

ostrolucky opened this issue Nov 14, 2019 · 1 comment

Comments

@ostrolucky
Copy link

ostrolucky commented Nov 14, 2019

self::assertArrayHasKey(1, $ubos);
self::assertFalse($ubos[1]->isActive);

produces

Offset 1 does not exist on array(MangoPay\Ubo).

related class: https://github.com/Mangopay/mangopay2-php-sdk/blob/d967b3fb6f45a0f01891134062265144950c9259/MangoPay/UboDeclaration.php

@ntzm
Copy link

ntzm commented Dec 19, 2019

As a workaround you can use

$this->assertTrue(array_key_exists('query', $urlParts));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants