From a2da36b6f3f770a29d3b1111738f08bd607e6c51 Mon Sep 17 00:00:00 2001 From: Gudmundur Haraldsson Date: Wed, 9 Feb 2022 00:41:51 +0000 Subject: [PATCH] Rename function to use vipgoci_ prefix. --- github-api.php | 4 ++-- skip-file.php | 4 ++-- tests/unit/VipgociSkipFileTest.php | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/github-api.php b/github-api.php index dac566200..070a5d2d4 100644 --- a/github-api.php +++ b/github-api.php @@ -2824,8 +2824,8 @@ function vipgoci_github_pr_review_submit( ) ); - $validation_message = get_validation_message_prefix( VIPGOCI_VALIDATION_MAXIMUM_LINES, $skip_large_files_limit ); - $results[VIPGOCI_SKIPPED_FILES][ $pr_number ] = vipgo_skip_file_check_previous_pr_comments( $results[VIPGOCI_SKIPPED_FILES][ $pr_number ], $pr_reviews_commented, $validation_message ); + $validation_message = vipgoci_skip_file_get_validation_message_prefix( VIPGOCI_VALIDATION_MAXIMUM_LINES, $skip_large_files_limit ); + $results[VIPGOCI_SKIPPED_FILES][ $pr_number ] = vipgoci_skip_file_check_previous_pr_comments( $results[VIPGOCI_SKIPPED_FILES][ $pr_number ], $pr_reviews_commented, $validation_message ); /** * Format skipped files message if the validation has issues diff --git a/skip-file.php b/skip-file.php index 444e14754..51ab47d48 100644 --- a/skip-file.php +++ b/skip-file.php @@ -76,7 +76,7 @@ function vipgoci_get_skipped_files_message( array $skipped, string $validation_m * * @return string */ -function get_validation_message_prefix( string $issue_type, int $skip_files_lines_limit ): string { +function vipgoci_skip_file_get_validation_message_prefix( string $issue_type, int $skip_files_lines_limit ): string { return sprintf( VIPGOCI_VALIDATION[ $issue_type ] . ':%s - ', $skip_files_lines_limit, @@ -114,7 +114,7 @@ function vipgoci_get_skipped_files_issue_message( * * @return array $pr_issues_result */ -function vipgo_skip_file_check_previous_pr_comments( array $pr_issues_results, array $comments, string $validation_message ): array { +function vipgoci_skip_file_check_previous_pr_comments( array $pr_issues_results, array $comments, string $validation_message ): array { /** * If there is no previous comments in this PR, return */ diff --git a/tests/unit/VipgociSkipFileTest.php b/tests/unit/VipgociSkipFileTest.php index 3302c5495..22bf6c3ec 100644 --- a/tests/unit/VipgociSkipFileTest.php +++ b/tests/unit/VipgociSkipFileTest.php @@ -245,13 +245,13 @@ public function testGetSkippedFilesIssueMessage(): void { } /** - * @covers ::vipgo_skip_file_check_previous_pr_comments + * @covers ::vipgoci_skip_file_check_previous_pr_comments */ public function testVipgociVerifySkipFileMessageDuplication(): void { $comments_mock = $this->getSkippedFilesCommentsMock(); $results_mock = $this->getResultsMock(); - $result = vipgo_skip_file_check_previous_pr_comments( + $result = vipgoci_skip_file_check_previous_pr_comments( $results_mock[15], $comments_mock, $this->validationMessagePrefix @@ -273,12 +273,12 @@ public function testVipgociVerifySkipFileMessageDuplication(): void { } /** - * @covers ::vipgo_skip_file_check_previous_pr_comments + * @covers ::vipgoci_skip_file_check_previous_pr_comments * @dataProvider vipgociVerifySkipFileMessageDuplicationWillReturnOfCommentsOreIssuesResultsAreZeroProvider */ public function testVipgociVerifySkipFileMessageDuplicationWillReturnOfCommentsOreIssuesResultsAreZero( array $skipped_files_result, array $comments ): void { - $result = vipgo_skip_file_check_previous_pr_comments( + $result = vipgoci_skip_file_check_previous_pr_comments( $skipped_files_result, $comments, $this->validationMessagePrefix