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

Fix failing PHPStan issue #130

Merged
merged 1 commit into from
Jan 5, 2022
Merged

Conversation

peter279k
Copy link

Changed log

  • Removing remote Docker image about PHPStan. Using the composer phpstan script instead.
  • Adding tests folder to be analysed via customized composer phpstan script.
  • Adding the returning void type hint to fix following PHPStan issue:
peterli@peterli-Virtual-Machine:~/cron-expression$ php ~/composer.phar phpstan -n
For additional security you should declare the allow-plugins config with a list of packages names that are allowed to run code. See https://getcomposer.org/allow-plugins
You have until July 2022 to add the setting. Composer will then switch the default behavior to disallow all plugins.
> ./vendor/bin/phpstan analyse -l max src tests
Note: Using configuration file /home/peterli/cron-expression/phpstan.neon.
 18/18 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ --------------------------------------------------------------------
  Line   tests/Cron/CronExpressionTest.php
 ------ --------------------------------------------------------------------
  639    Method Cron\Tests\CronExpressionTest::testGetParts() has no return
         typehint specified.
 ------ --------------------------------------------------------------------

 [ERROR] Found 1 error

Script ./vendor/bin/phpstan analyse -l max src tests handling the phpstan event returned with error code 1
peterli@peterli-Virtual-Machine:~/cron-expression$

@dragonmantank dragonmantank merged commit 2c74e61 into dragonmantank:master Jan 5, 2022
@dragonmantank
Copy link
Owner

Thanks!

dragonmantank pushed a commit that referenced this pull request Jan 5, 2022
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.

2 participants