Skip to content

Commit

Permalink
Fix spacing and misc issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ernilambar committed Jan 2, 2024
1 parent 61d15ba commit 3d39941
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions includes/Checker/Checks/Plugin_Readme_Check.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ protected function check_files( Check_Result $result, array $files ) {
*
* @since n.e.x.t
*
* @param Check_Result $result The Check Result to amend.
* @param Check_Result $result The Check Result to amend.
* @param string $readme_file Readme file.
* @param Parser $parser The Parser object.
* @param Parser $parser The Parser object.
*/
private function check_default_text( Check_Result $result, string $readme_file, Parser $parser ) {
$short_description = $parser->short_description;
Expand All @@ -120,9 +120,9 @@ private function check_default_text( Check_Result $result, string $readme_file,
*
* @since n.e.x.t
*
* @param Check_Result $result The Check Result to amend.
* @param Check_Result $result The Check Result to amend.
* @param string $readme_file Readme file.
* @param Parser $parser The Parser object.
* @param Parser $parser The Parser object.
*/
private function check_license( Check_Result $result, string $readme_file, Parser $parser ) {
$license = $parser->license;

Check warning on line 128 in includes/Checker/Checks/Plugin_Readme_Check.php

View check run for this annotation

Codecov / codecov/patch

includes/Checker/Checks/Plugin_Readme_Check.php#L127-L128

Added lines #L127 - L128 were not covered by tests
Expand All @@ -143,9 +143,9 @@ private function check_license( Check_Result $result, string $readme_file, Parse
*
* @since n.e.x.t
*
* @param Check_Result $result The Check Result to amend.
* @param Check_Result $result The Check Result to amend.
* @param string $readme_file Readme file.
* @param Parser $parser The Parser object.
* @param Parser $parser The Parser object.
*/
private function check_stable_tag( Check_Result $result, string $readme_file, Parser $parser ) {
$stable_tag = $parser->stable_tag;

Check warning on line 151 in includes/Checker/Checks/Plugin_Readme_Check.php

View check run for this annotation

Codecov / codecov/patch

includes/Checker/Checks/Plugin_Readme_Check.php#L150-L151

Added lines #L150 - L151 were not covered by tests
Expand Down Expand Up @@ -180,12 +180,12 @@ private function check_stable_tag( Check_Result $result, string $readme_file, Pa
*
* @since n.e.x.t
*
* @param Check_Result $result The Check Result to amend.
* @param Check_Result $result The Check Result to amend.
* @param string $readme_file Readme file.
* @param Parser $parser The Parser object.
* @param Parser $parser The Parser object.
*/
private function check_for_warnings( Check_Result $result, string $readme_file, Parser $parser ) {
$warnings = $parser->warnings;
$warnings = $parser->warnings ? $parser->warnings : array();

Check warning on line 188 in includes/Checker/Checks/Plugin_Readme_Check.php

View check run for this annotation

Codecov / codecov/patch

includes/Checker/Checks/Plugin_Readme_Check.php#L187-L188

Added lines #L187 - L188 were not covered by tests

$warning_keys = array_keys( $warnings );

Check warning on line 190 in includes/Checker/Checks/Plugin_Readme_Check.php

View check run for this annotation

Codecov / codecov/patch

includes/Checker/Checks/Plugin_Readme_Check.php#L190

Added line #L190 was not covered by tests

Expand All @@ -199,18 +199,18 @@ private function check_for_warnings( Check_Result $result, string $readme_file,
* @since n.e.x.t
*
* @param array $ignored_warnings Array of ignored warning keys.
* @param Parser $parser The Parser object.
* @param Parser $parser The Parser object.
*/
$ignored_warnings = (array) apply_filters( 'plugin_check_readme_warnings_ignored', $ignored_warnings, $parser );
$ignored_warnings = (array) apply_filters( 'wp_plugin_check_readme_warnings_ignored', $ignored_warnings, $parser );

Check warning on line 204 in includes/Checker/Checks/Plugin_Readme_Check.php

View check run for this annotation

Codecov / codecov/patch

includes/Checker/Checks/Plugin_Readme_Check.php#L204

Added line #L204 was not covered by tests

$warning_keys = array_diff( $warning_keys, $ignored_warnings );

Check warning on line 206 in includes/Checker/Checks/Plugin_Readme_Check.php

View check run for this annotation

Codecov / codecov/patch

includes/Checker/Checks/Plugin_Readme_Check.php#L206

Added line #L206 was not covered by tests

if ( ! empty( $warning_keys ) ) {
$this->add_result_warning_for_file(
$result,
sprintf(

Check warning on line 211 in includes/Checker/Checks/Plugin_Readme_Check.php

View check run for this annotation

Codecov / codecov/patch

includes/Checker/Checks/Plugin_Readme_Check.php#L208-L211

Added lines #L208 - L211 were not covered by tests
/* translators: %1$s: list of warnings */
__( 'The following readme parser warnings were detected: %1$s', 'plugin-check' ),
/* translators: list of warnings */
esc_html__( 'The following readme parser warnings were detected: %s', 'plugin-check' ),
esc_html( implode( ', ', $warning_keys ) )
),
'readme_parser_warnings',
Expand Down

0 comments on commit 3d39941

Please sign in to comment.