Skip to content
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

style: format code with PHP CS Fixer #132

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Src/comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function execute_appveyor($config, $metadata, $comment)
requestGitHub($metadata["token"], $metadata["reactionUrl"], array("content" => "rocket"));
$data["branch"] = $pullRequest->head->ref;
$data["commitId"] = $pullRequest->head->sha;
} else if (count($matches) === 2 && $matches[1] === "pull request") {
} elseif (count($matches) === 2 && $matches[1] === "pull request") {
requestGitHub($metadata["token"], $metadata["reactionUrl"], array("content" => "rocket"));
$data["pullRequestId"] = $comment->PullRequestNumber;
} else {
Expand Down
2 changes: 1 addition & 1 deletion Src/lib/queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function receiveQueue($queueName, $callback)
function receiveByLib($queueName, $callback)
{
global $rabbitMqHost, $rabbitMqPort, $rabbitMqUser, $rabbitMqPassword, $rabbitMqVhost;

$startTime = time();

try {
Expand Down
4 changes: 2 additions & 2 deletions Src/pullRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function handlePullRequest($pullRequest)
}

$autoReview = in_array($pullRequest->Sender, $config->pullRequests->autoReviewSubmitters);

if (!$invokerReviewed && $autoReview) {
$body = array(
"event" => "APPROVE",
Expand All @@ -84,7 +84,7 @@ function handlePullRequest($pullRequest)
requestGitHub($gitHubUserToken, $metadata["reviewsUrl"], $body);
}

if(!$invokerReviewed && !$autoReview){
if(!$invokerReviewed && !$autoReview) {
$body = array("reviewers" => $collaboratorsLogins);
requestGitHub($metadata["token"], $metadata["requestReviewUrl"], $body);
}
Expand Down
4 changes: 2 additions & 2 deletions Src/signature.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
$url = "";
if ($signature->TargetType == "repository") {
$url = "repos/" . $signature->RepositoryOwner . "/" . $signature->RepositoryName . "/hooks/" . $signature->HookId . "/config";
} else if ($signature->TargetType == "organization") {
} elseif ($signature->TargetType == "organization") {

Check notice on line 20 in Src/signature.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

Src/signature.php#L20

Usage of ELSEIF not allowed; use ELSE IF instead
$url = "repos/" . $signature->RepositoryOwner . "/hooks/" . $signature->HookId . "/config";
}

if (!empty($url)) {
requestGitHub($gitHubUserToken, $url, $request);
requestGitHub($gitHubUserToken, $url, $request);
}
}

Expand Down
Loading