IsraelOrtuno / pipedrive

Complete Pipedrive API client for PHP
MIT License
166 stars 58 forks source link

Add missing types phpdoc #133

Closed fgibaux closed 1 year ago

fgibaux commented 1 year ago

added some missing type in phpdoc

MichaelBrauner commented 1 year ago

I found another one:

// src/Http/Response.php

    /**
     * Get the request data.
     *
     * @return mixed[]|\stdClass
     */
    public function getData()
    {
        if ($this->isSuccess() && isset($this->getContent()->data)) {
            return $this->getContent()->data;
        }

        return null;
    }

Obviously the DocblockTypes do not contain null - what leads to Psalm errors:

DocblockTypeContradiction: array<array-key, mixed>|stdClass does not contain null (see https://psalm.dev/155)

Can you include this also in your changes please?

IsraelOrtuno commented 1 year ago

Thanks for the contribution