Fixed PHPCS.

This commit is contained in:
Marco Vito Moscaritolo 2015-05-31 17:39:52 +02:00
parent e0803df283
commit 4fe62ea248
8 changed files with 22 additions and 18 deletions

View file

@ -58,8 +58,7 @@ class Application extends b8\Application
UserStore $userStore,
ProjectStore $projectStore,
Container $container
)
{
) {
$this->config = $config;
$this->response = $response;
$this->request = $request;
@ -165,7 +164,7 @@ class Application extends b8\Application
public function getController()
{
if (empty($this->controller)) {
$this->controller = $this->container->get('application.controller.' . strtolower($this->route['controller']));
$this->controller = $this->container->get($this->getControllerId($this->route));
}
return $this->controller;
@ -180,7 +179,19 @@ class Application extends b8\Application
*/
public function controllerExists($route)
{
return $this->container->has('application.controller.' . strtolower($route['controller']));
return $this->container->has($this->getControllerId($route));
}
/**
* Create controller service Id based on specified route.
*
* @param array $route
*
* @return string
*/
protected function getControllerId($route)
{
return 'application.controller.' . strtolower($route['controller']);
}
/**

View file

@ -56,8 +56,7 @@ class BuildController extends \PHPCI\Controller
Response $response,
BuildStore $buildStore,
BuildService $buildService
)
{
) {
parent::__construct($config, $request, $response);
$this->buildStore = $buildStore;

View file

@ -61,8 +61,7 @@ class BuildStatusController extends \PHPCI\Controller
BuildStore $buildStore,
ProjectStore $projectStore,
HttpClient $shieldsClient
)
{
) {
parent::__construct($config, $request, $response);
$this->buildStore = $buildStore;

View file

@ -52,8 +52,7 @@ class HomeController extends \PHPCI\Controller
Response $response,
BuildStore $buildStore,
ProjectStore $projectStore
)
{
) {
parent::__construct($config, $request, $response);
$this->buildStore = $buildStore;

View file

@ -73,8 +73,7 @@ class ProjectController extends PHPCI\Controller
ProjectStore $projectStore,
ProjectService $projectService,
BuildService $buildService
)
{
) {
parent::__construct($config, $request, $response);
$this->buildStore = $buildStore;

View file

@ -43,8 +43,7 @@ class SessionController extends \PHPCI\Controller
Request $request,
Response $response,
UserStore $userStore,
)
{
) {
parent::__construct($config, $request, $response);
$this->response->disableLayout();

View file

@ -53,8 +53,7 @@ class UserController extends Controller
Response $response,
UserStore $userStore,
UserService $userService
)
{
) {
parent::__construct($config, $request, $response);
$this->userStore = $userStore;

View file

@ -65,8 +65,7 @@ class WebhookController extends \b8\Controller
BuildStore $buildStore,
ProjectStore $projectStore,
BuildService $buildService
)
{
) {
parent::__construct($config, $request, $response);
$this->buildStore = $buildStore;