-
Notifications
You must be signed in to change notification settings - Fork 34
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
Bucket/phpstan and fixes #2055
base: master
Are you sure you want to change the base?
Bucket/phpstan and fixes #2055
Conversation
This just adds the working files - no fixes. [TECENG-44]
Add phpstan to tribe-common
@@ -208,14 +216,14 @@ protected function parse_for_upgrade_notice( $readme ) { | |||
* Convert the plugin version header and any links from Markdown to HTML. | |||
*/ | |||
protected function format_upgrade_notice() { | |||
// Convert [links](http://...) to <a href="..."> tags | |||
// Convert [links](http://...) to <a href="..."> tags. |
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.
[phpcs] reported by reviewdog 🐶Squiz.PHP.CommentedOutCode.Found
This comment is 56% valid code; is this commented out code?
@@ -5,6 +5,9 @@ | |||
* @since 4.14.2 | |||
* | |||
*/ | |||
|
|||
// @TODO: This class lives in TEC, it should not be used here! |
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.
[phpcs] reported by reviewdog 🐶Universal.WhiteSpace.PrecisionAlignment.Found
Found precision alignment of 1 spaces.
@@ -5,6 +5,9 @@ | |||
* @since 4.14.2 | |||
* | |||
*/ | |||
|
|||
// @TODO: This class lives in TEC, it should not be used here! | |||
use Tribe__Events__Aggregator__Record__Eventbrite as Eventbrite; |
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.
[phpcs] reported by reviewdog 🐶Universal.WhiteSpace.PrecisionAlignment.Found
Found precision alignment of 1 spaces.
* @param string $optionName Name of the option to retrieve. | ||
* @param string $value Value to save | ||
* @param string $value Value to save. |
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.
[phpcs] reported by reviewdog 🐶Squiz.Commenting.FunctionComment.ExtraParamComment
Superfluous parameter comment
@@ -196,7 +201,8 @@ | |||
* Get the date format specified in the tribe options | |||
* | |||
* @category Events | |||
* @param bool $with_year | |||
* | |||
* @param bool $with_year. |
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.
[phpcs] reported by reviewdog 🐶Squiz.Commenting.FunctionComment.MissingParamComment
Missing parameter comment
@@ -558,7 +565,7 @@ | |||
* Retrieve an option value taking care to escape it to preserve date format slashes. | |||
* | |||
* @category Events | |||
* @param string $optionName Name of the option to retrieve. | |||
* @param string $optionName Name of the option to retrieve. |
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.
[phpcs] reported by reviewdog 🐶Squiz.Commenting.FunctionComment.SpacingAfterParamType
Expected 1 spaces after parameter type; 2 found
* @param string $slug Slug to save the notice. | ||
* @param callable|string $callback A callable Method/Function to actually display the notice. | ||
* @param array $arguments Arguments to Setup a notice. | ||
* @param ?callable $active_callback An optional callback that should return bool values. |
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.
[phpcs] reported by reviewdog 🐶Squiz.Commenting.FunctionComment.SpacingAfterParamType
Expected 7 spaces after parameter type; 8 found
@@ -631,8 +638,8 @@ | |||
/** | |||
* Register a new error based on a Namespace | |||
* | |||
* @param string|array $indexes A list of the namespaces and last item should be the error name | |||
* @param string $message What is going to be the message associate with this indexes | |||
* @param string|array $indexes A list of the namespaces and last item should be the error name. |
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.
[phpcs] reported by reviewdog 🐶Squiz.Commenting.FunctionComment.SpacingAfterParamType
Expected 1 spaces after parameter type; 2 found
* @param string|array $indexes A list of the namespaces and last item should be the error name | ||
* @param string $message What is going to be the message associate with this indexes | ||
* @param string|array $indexes A list of the namespaces and last item should be the error name. | ||
* @param string $message What is going to be the message associate with this indexes. |
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.
[phpcs] reported by reviewdog 🐶Squiz.Commenting.FunctionComment.SpacingAfterParamType
Expected 7 spaces after parameter type; 8 found
* @param object $origin The main Object for the plugin you are enqueueing the script/style for | ||
* @param array $assets { | ||
* @param object $origin The main Object for the plugin you are enqueueing the script/style for. | ||
* @param array $assets {. |
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.
[phpcs] reported by reviewdog 🐶Squiz.Commenting.FunctionComment.ParamCommentFullStop
Parameter comment must end with a full stop
Hold for now - for comparison only.