Skip to content

Add PHPStan & Fix existing errors (no backwards-compatibility breaks)#3

Open
FrontEndCoffee wants to merge 4 commits intoDNSMadeEasy:developfrom
FrontEndCoffee:add-phpstan
Open

Add PHPStan & Fix existing errors (no backwards-compatibility breaks)#3
FrontEndCoffee wants to merge 4 commits intoDNSMadeEasy:developfrom
FrontEndCoffee:add-phpstan

Conversation

@FrontEndCoffee
Copy link

I have added PHPStan to this project with a config on level 0 (very lenient).

I have also updated the README with instructions on how to use this.

While running level 0, I found two issues:

  • src/Managers/FolderManager.php did not adhere to its interface.
  • illuminate/pagination is a dependency that was not included in the package.

Both of these issues have also been fixed. I have checked the implementation that is used for illuminate/pagination and I have added all version constraints that are compatible with the implementation.

*
* @param int $page
* @param int $perPage
* @param array $filters

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the interface it should be array|null

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No right? Because you cannot literally pass null?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has a default value, but not a type on the method itself.
So if you ignore the docblock you can pass in literally anything 😉

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

Successfully merging this pull request may close these issues.

3 participants