From 5972cd732bd0e009dc6daeb3bc2c898c4b1be0a0 Mon Sep 17 00:00:00 2001 From: Mukesh Panchal Date: Mon, 23 Oct 2023 11:35:33 +0530 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Felix Arntz --- includes/Checker/Checks/File_Type_Check.php | 2 +- includes/Traits/Amend_Check_Result.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/Checker/Checks/File_Type_Check.php b/includes/Checker/Checks/File_Type_Check.php index 0e375932d..dc83f59b3 100644 --- a/includes/Checker/Checks/File_Type_Check.php +++ b/includes/Checker/Checks/File_Type_Check.php @@ -169,7 +169,7 @@ function ( $directory ) use ( $directories ) { $is_error, __( 'Version control checkouts should not be present.', 'plugin-check' ), 'vcs_present', - str_replace( $result->plugin()->path(), '', $dir ) + $dir ); } } diff --git a/includes/Traits/Amend_Check_Result.php b/includes/Traits/Amend_Check_Result.php index b36989b3e..a9e76311c 100644 --- a/includes/Traits/Amend_Check_Result.php +++ b/includes/Traits/Amend_Check_Result.php @@ -31,7 +31,7 @@ trait Amend_Check_Result { */ protected function add_result_message_for_file( Check_Result $result, $error, $message, $code, $file, $line = 0, $column = 0 ) { $result->add_message( - $error ? true : false, + (bool) $error, $message, array( 'code' => $code,