Skip to content

Commit

Permalink
PHPStan fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy committed Feb 26, 2025
1 parent 6a00213 commit 3862936
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions includes/Checker/Checks/Plugin_Repo/Plugin_Readme_Check.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ protected function check_files( Check_Result $result, array $files ) {
*
* @since 1.0.0
*
* @param Check_Result $result The Check Result to amend.
* @param string $readme_file Readme file.
* @param Parser $parser The Parser object.
* @param Check_Result $result The Check Result to amend.
* @param string $readme_file Readme file.
* @param DotorgParser|PrefixedParser $parser The Parser object.
*/
private function check_name( Check_Result $result, string $readme_file, $parser ) {
if ( isset( $parser->warnings['invalid_plugin_name_header'] ) && false === $parser->name ) {
Expand Down Expand Up @@ -189,9 +189,9 @@ private function check_name( Check_Result $result, string $readme_file, $parser
*
* @since 1.0.2
*
* @param Check_Result $result The Check Result to amend.
* @param string $readme_file Readme file.
* @param Parser $parser The Parser object.
* @param Check_Result $result The Check Result to amend.
* @param string $readme_file Readme file.
* @param DotorgParser|PrefixedParser $parser The Parser object.
*/
private function check_headers( Check_Result $result, string $readme_file, $parser ) {
$ignored_warnings = $this->get_ignored_warnings( $parser );

Check failure on line 197 in includes/Checker/Checks/Plugin_Repo/Plugin_Readme_Check.php

View workflow job for this annotation

GitHub Actions / PHP

Parameter #1 $parser of method WordPress\Plugin_Check\Checker\Checks\Plugin_Repo\Plugin_Readme_Check::get_ignored_warnings() expects WordPress\Plugin_Check\Checker\Checks\Plugin_Repo\Parser, WordPress\Plugin_Check\Vendor\WordPressdotorg\Plugin_Directory\Readme\Parser|WordPressdotorg\Plugin_Directory\Readme\Parser given.
Expand Down Expand Up @@ -280,9 +280,9 @@ private function check_headers( Check_Result $result, string $readme_file, $pars
*
* @since 1.0.0
*
* @param Check_Result $result The Check Result to amend.
* @param string $readme_file Readme file.
* @param Parser $parser The Parser object.
* @param Check_Result $result The Check Result to amend.
* @param string $readme_file Readme file.
* @param DotorgParser|PrefixedParser $parser The Parser object.
*/
private function check_default_text( Check_Result $result, string $readme_file, $parser ) {
$short_description = $parser->short_description;
Expand Down Expand Up @@ -312,9 +312,9 @@ private function check_default_text( Check_Result $result, string $readme_file,
*
* @since 1.0.0
*
* @param Check_Result $result The Check Result to amend.
* @param string $readme_file Readme file.
* @param Parser $parser The Parser object.
* @param Check_Result $result The Check Result to amend.
* @param string $readme_file Readme file.
* @param DotorgParser|PrefixedParser $parser The Parser object.
*/
private function check_license( Check_Result $result, string $readme_file, $parser ) {
$license = $parser->license;
Expand Down Expand Up @@ -386,9 +386,9 @@ private function check_license( Check_Result $result, string $readme_file, $pars
*
* @since 1.0.0
*
* @param Check_Result $result The Check Result to amend.
* @param string $readme_file Readme file.
* @param Parser $parser The Parser object.
* @param Check_Result $result The Check Result to amend.
* @param string $readme_file Readme file.
* @param DotorgParser|PrefixedParser $parser The Parser object.
*/
private function check_stable_tag( Check_Result $result, string $readme_file, $parser ) {
$stable_tag = $parser->stable_tag;
Expand Down Expand Up @@ -465,9 +465,9 @@ private function check_stable_tag( Check_Result $result, string $readme_file, $p
*
* @since 1.0.2
*
* @param Check_Result $result The Check Result to amend.
* @param string $readme_file Readme file.
* @param Parser $parser The Parser object.
* @param Check_Result $result The Check Result to amend.
* @param string $readme_file Readme file.
* @param DotorgParser|PrefixedParser $parser The Parser object.
*/
private function check_upgrade_notice( Check_Result $result, string $readme_file, $parser ) {
$notices = $parser->upgrade_notice;
Expand Down Expand Up @@ -499,9 +499,9 @@ private function check_upgrade_notice( Check_Result $result, string $readme_file
*
* @since 1.0.0
*
* @param Check_Result $result The Check Result to amend.
* @param string $readme_file Readme file.
* @param Parser $parser The Parser object.
* @param Check_Result $result The Check Result to amend.
* @param string $readme_file Readme file.
* @param DotorgParser|PrefixedParser $parser The Parser object.
*
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
*/
Expand Down Expand Up @@ -643,9 +643,9 @@ private function check_for_warnings( Check_Result $result, string $readme_file,
*
* @since 1.3.0
*
* @param Check_Result $result The Check Result to amend.
* @param string $readme_file Readme file.
* @param Parser $parser The Parser object.
* @param Check_Result $result The Check Result to amend.
* @param string $readme_file Readme file.
* @param DotorgParser|PrefixedParser $parser The Parser object.
*/
private function check_for_donate_link( Check_Result $result, string $readme_file, $parser ) {
$donate_link = $parser->donate_link;
Expand Down Expand Up @@ -797,9 +797,9 @@ function ( $value ) {
*
* @since 1.5.0
*
* @param Check_Result $result The Check Result to amend.
* @param string $readme_file Readme file.
* @param Parser $parser The Parser object.
* @param Check_Result $result The Check Result to amend.
* @param string $readme_file Readme file.
* @param DotorgParser|PrefixedParser $parser The Parser object.
*/
private function check_requires_headers( Check_Result $result, string $readme_file, $parser ) {
$ignored_warnings = $this->get_ignored_warnings( $parser );

Check failure on line 805 in includes/Checker/Checks/Plugin_Repo/Plugin_Readme_Check.php

View workflow job for this annotation

GitHub Actions / PHP

Parameter #1 $parser of method WordPress\Plugin_Check\Checker\Checks\Plugin_Repo\Plugin_Readme_Check::get_ignored_warnings() expects WordPress\Plugin_Check\Checker\Checks\Plugin_Repo\Parser, WordPress\Plugin_Check\Vendor\WordPressdotorg\Plugin_Directory\Readme\Parser|WordPressdotorg\Plugin_Directory\Readme\Parser given.
Expand Down

0 comments on commit 3862936

Please sign in to comment.