Code style fixes.

This commit is contained in:
Dmitry Khomutov 2018-03-06 20:14:37 +07:00
parent 50b117455e
commit d5333b2b80
No known key found for this signature in database
GPG key ID: EC19426474B37AAC
3 changed files with 32 additions and 14 deletions

View file

@ -65,10 +65,11 @@ class WebhookController extends Controller
$this->buildService = new BuildService($this->buildStore);
}
/** Handle the action, Ensuring to return a JsonResponse.
/**
* Handle the action, Ensuring to return a JsonResponse.
*
* @param string $action
* @param mixed $actionParams
* @param array $actionParams
*
* @return Response
*/
@ -91,6 +92,10 @@ class WebhookController extends Controller
/**
* Called by Bitbucket.
*
* @param integer $projectId
*
* @return array
*/
public function bitbucket($projectId)
{
@ -244,11 +249,14 @@ class WebhookController extends Controller
/**
* Bitbucket POST service.
*
* @param array $payload
* @param Project $project
*
* @return array
*/
protected function bitbucketService($payload, $project)
protected function bitbucketService(array $payload, Project $project)
{
$payload = json_decode($this->getParam('payload'), true);
$results = [];
$status = 'failed';
foreach ($payload['commits'] as $commit) {
@ -303,6 +311,10 @@ class WebhookController extends Controller
/**
* Called by Github Webhooks:
*
* @param integer $projectId
*
* @return array
*/
public function github($projectId)
{
@ -484,6 +496,10 @@ class WebhookController extends Controller
/**
* Called by Gitlab Webhooks:
*
* @param integer $projectId
*
* @return array
*/
public function gitlab($projectId)
{
@ -866,8 +882,8 @@ class WebhookController extends Controller
/**
* Fetch a project and check its type.
*
* @param int|string $projectId id or title of project
* @param array|string $expectedType
* @param integer $projectId id or title of project
* @param string $expectedType
*
* @return Project
*

View file

@ -100,11 +100,13 @@ class Mysql extends Plugin
}
/**
* @param string $query
* @param array $query
*
* @return boolean
*
* @throws \Exception
*/
protected function executeFile($query)
protected function executeFile(array $query)
{
if (!isset($query['file'])) {
throw new \Exception('Import statement must contain a \'file\' key');