-
-
Notifications
You must be signed in to change notification settings - Fork 62
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 to CI #37
Conversation
@@ -37,6 +37,7 @@ class SerializableArrayObjectAsset extends ArrayObject implements Serializable | |||
*/ | |||
public function __construct() | |||
{ | |||
parent::__construct(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't add these
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couldn't see a quick way to disable a single rule....
maybe i'm not groking the phpstan well enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, just have to use ignoreMessages
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep
@@ -39,6 +39,7 @@ class PharExceptionAsset extends PharException | |||
*/ | |||
public function __construct() | |||
{ | |||
parent::__construct(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't add these
@@ -36,6 +36,7 @@ class PharAsset extends Phar | |||
*/ | |||
public function __construct() | |||
{ | |||
parent::__construct('foo'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't add these
@@ -36,6 +36,7 @@ | |||
*/ | |||
public function __construct() | |||
{ | |||
parent::__construct(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't add these
@@ -36,6 +36,7 @@ class ExceptionAsset extends Exception | |||
*/ | |||
public function __construct() | |||
{ | |||
parent::__construct(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't add these
@@ -36,6 +36,7 @@ class ArrayObjectAsset extends ArrayObject | |||
*/ | |||
public function __construct() | |||
{ | |||
parent::__construct(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't add these
.travis.yml
Outdated
script: ./vendor/bin/phpcs --standard=PSR2 ./src/ ./tests/ | ||
install: composer require "squizlabs/php_codesniffer:^3.0.2" "phpstan/phpstan:^0.9" --dev | ||
script: | ||
- ./vendor/bin/phpcs --standard=PSR2 ./src/ ./tests/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Split these tools into separate steps: once is CS, the other is static analysis
4781cec
to
6369882
Compare
@Ocramius done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Thanks @bendavies! |
@Ocramius think you forgot to hit merge :) |
Whoops! |
I wouldn't personally go with max (L7), it has some issues with union types etc., thus 5, maybe 6 at most. |
Thoughts on level
max
?Pretty small library, so not hard to make it pass on max.