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

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

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open

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.

@@ -29,10 +29,12 @@ class FolderManager extends AbstractManager implements FolderManagerInterface, L
*
* @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