gfargo / newsapi

PHP wrapper for News API
https://newsapi.org
MIT License
0 stars 0 forks source link

Resolve Issues with Typecasting in Adapter #14

Open szepeviktor opened 5 years ago

szepeviktor commented 5 years ago

@GFargo Static analysis by @phpstan report.

$ phpstan analyze src/ -l max

 ------ -----------------------------------------------------------------------------------------------------------------
  Line   v2/Adapter.php
 ------ -----------------------------------------------------------------------------------------------------------------
  29     Variable $apiKey in isset() always exists and is not nullable.
  49     Method NewsAPI\V2\Adapter::__construct() with return type void returns $this(NewsAPI\V2\Adapter) but should not
         return anything.
  72     Cannot cast array|null to string.
 ------ -----------------------------------------------------------------------------------------------------------------
szepeviktor commented 5 years ago

Do you take PR-s?

gfargo commented 5 years ago

Hey @szepeviktor, thanks for reporting this! I should be able to spin out a quick fix for this in the next few days.

Moving forward, any and all PRs are welcome and greatly appreciated! 🙌