Fixed PHPCS.
This commit is contained in:
parent
e0803df283
commit
4fe62ea248
|
@ -58,8 +58,7 @@ class Application extends b8\Application
|
||||||
UserStore $userStore,
|
UserStore $userStore,
|
||||||
ProjectStore $projectStore,
|
ProjectStore $projectStore,
|
||||||
Container $container
|
Container $container
|
||||||
)
|
) {
|
||||||
{
|
|
||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
$this->response = $response;
|
$this->response = $response;
|
||||||
$this->request = $request;
|
$this->request = $request;
|
||||||
|
@ -165,7 +164,7 @@ class Application extends b8\Application
|
||||||
public function getController()
|
public function getController()
|
||||||
{
|
{
|
||||||
if (empty($this->controller)) {
|
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;
|
return $this->controller;
|
||||||
|
@ -180,7 +179,19 @@ class Application extends b8\Application
|
||||||
*/
|
*/
|
||||||
public function controllerExists($route)
|
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']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -56,8 +56,7 @@ class BuildController extends \PHPCI\Controller
|
||||||
Response $response,
|
Response $response,
|
||||||
BuildStore $buildStore,
|
BuildStore $buildStore,
|
||||||
BuildService $buildService
|
BuildService $buildService
|
||||||
)
|
) {
|
||||||
{
|
|
||||||
parent::__construct($config, $request, $response);
|
parent::__construct($config, $request, $response);
|
||||||
|
|
||||||
$this->buildStore = $buildStore;
|
$this->buildStore = $buildStore;
|
||||||
|
|
|
@ -61,8 +61,7 @@ class BuildStatusController extends \PHPCI\Controller
|
||||||
BuildStore $buildStore,
|
BuildStore $buildStore,
|
||||||
ProjectStore $projectStore,
|
ProjectStore $projectStore,
|
||||||
HttpClient $shieldsClient
|
HttpClient $shieldsClient
|
||||||
)
|
) {
|
||||||
{
|
|
||||||
parent::__construct($config, $request, $response);
|
parent::__construct($config, $request, $response);
|
||||||
|
|
||||||
$this->buildStore = $buildStore;
|
$this->buildStore = $buildStore;
|
||||||
|
|
|
@ -52,8 +52,7 @@ class HomeController extends \PHPCI\Controller
|
||||||
Response $response,
|
Response $response,
|
||||||
BuildStore $buildStore,
|
BuildStore $buildStore,
|
||||||
ProjectStore $projectStore
|
ProjectStore $projectStore
|
||||||
)
|
) {
|
||||||
{
|
|
||||||
parent::__construct($config, $request, $response);
|
parent::__construct($config, $request, $response);
|
||||||
|
|
||||||
$this->buildStore = $buildStore;
|
$this->buildStore = $buildStore;
|
||||||
|
|
|
@ -73,8 +73,7 @@ class ProjectController extends PHPCI\Controller
|
||||||
ProjectStore $projectStore,
|
ProjectStore $projectStore,
|
||||||
ProjectService $projectService,
|
ProjectService $projectService,
|
||||||
BuildService $buildService
|
BuildService $buildService
|
||||||
)
|
) {
|
||||||
{
|
|
||||||
parent::__construct($config, $request, $response);
|
parent::__construct($config, $request, $response);
|
||||||
|
|
||||||
$this->buildStore = $buildStore;
|
$this->buildStore = $buildStore;
|
||||||
|
|
|
@ -43,8 +43,7 @@ class SessionController extends \PHPCI\Controller
|
||||||
Request $request,
|
Request $request,
|
||||||
Response $response,
|
Response $response,
|
||||||
UserStore $userStore,
|
UserStore $userStore,
|
||||||
)
|
) {
|
||||||
{
|
|
||||||
parent::__construct($config, $request, $response);
|
parent::__construct($config, $request, $response);
|
||||||
|
|
||||||
$this->response->disableLayout();
|
$this->response->disableLayout();
|
||||||
|
|
|
@ -53,8 +53,7 @@ class UserController extends Controller
|
||||||
Response $response,
|
Response $response,
|
||||||
UserStore $userStore,
|
UserStore $userStore,
|
||||||
UserService $userService
|
UserService $userService
|
||||||
)
|
) {
|
||||||
{
|
|
||||||
parent::__construct($config, $request, $response);
|
parent::__construct($config, $request, $response);
|
||||||
|
|
||||||
$this->userStore = $userStore;
|
$this->userStore = $userStore;
|
||||||
|
|
|
@ -65,8 +65,7 @@ class WebhookController extends \b8\Controller
|
||||||
BuildStore $buildStore,
|
BuildStore $buildStore,
|
||||||
ProjectStore $projectStore,
|
ProjectStore $projectStore,
|
||||||
BuildService $buildService
|
BuildService $buildService
|
||||||
)
|
) {
|
||||||
{
|
|
||||||
parent::__construct($config, $request, $response);
|
parent::__construct($config, $request, $response);
|
||||||
|
|
||||||
$this->buildStore = $buildStore;
|
$this->buildStore = $buildStore;
|
||||||
|
|
Loading…
Reference in a new issue