Skip to content

Can't convince phpstan about existing offset #53

Open
@ostrolucky

Description

@ostrolucky
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

Activity

ntzm

ntzm commented on Dec 19, 2019

@ntzm

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Can't convince phpstan about existing offset · Issue #53 · phpstan/phpstan-phpunit