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