@@ -31,7 +31,7 @@ |
||
| 31 | 31 | */ |
| 32 | 32 | public function __construct(LoginFilterService $loginFilter) |
| 33 | 33 | { |
| 34 | - $this->loginFilter = $loginFilter;; |
|
| 34 | + $this->loginFilter = $loginFilter; ; |
|
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | /** |
@@ -44,11 +44,11 @@ |
||
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | |
| 47 | - /** |
|
| 48 | - * @param ContainerInterface $container |
|
| 49 | - * |
|
| 50 | - * @return static |
|
| 51 | - */ |
|
| 47 | + /** |
|
| 48 | + * @param ContainerInterface $container |
|
| 49 | + * |
|
| 50 | + * @return static |
|
| 51 | + */ |
|
| 52 | 52 | public static function factory(ContainerInterface $container) |
| 53 | 53 | { |
| 54 | 54 | return new static($container->get('Auth/LoginFilter')); |
@@ -57,9 +57,9 @@ discard block |
||
| 57 | 57 | if ($exception instanceof UnauthorizedImageAccessException) { |
| 58 | 58 | $image = __DIR__ . '/../../../../../public/images/unauthorized-access.png'; |
| 59 | 59 | $response->setStatusCode(Response::STATUS_CODE_403) |
| 60 | - ->setContent(file_get_contents($image)) |
|
| 61 | - ->getHeaders() |
|
| 62 | - ->addHeaderLine('Content-Type', 'image/png'); |
|
| 60 | + ->setContent(file_get_contents($image)) |
|
| 61 | + ->getHeaders() |
|
| 62 | + ->addHeaderLine('Content-Type', 'image/png'); |
|
| 63 | 63 | $e->stopPropagation(); |
| 64 | 64 | $response->sendHeaders(); |
| 65 | 65 | //echo file_get_contents($image); |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | $application = $e->getApplication(); |
| 73 | - $auth = $application->getServiceManager()->get('AuthenticationService'); |
|
| 73 | + $auth = $application->getServiceManager()->get('AuthenticationService'); |
|
| 74 | 74 | |
| 75 | 75 | if (!$auth->hasIdentity()) { |
| 76 | 76 | $routeMatch = $e->getRouteMatch(); |
@@ -102,9 +102,9 @@ discard block |
||
| 102 | 102 | $model->setTemplate($this->getExceptionTemplate()); |
| 103 | 103 | $e->setResult($model); |
| 104 | 104 | |
| 105 | - // $statusCode = $response->getStatusCode(); |
|
| 106 | - // if ($statusCode === 200) { |
|
| 105 | + // $statusCode = $response->getStatusCode(); |
|
| 106 | + // if ($statusCode === 200) { |
|
| 107 | 107 | $response->setStatusCode(Response::STATUS_CODE_403); |
| 108 | - // } |
|
| 108 | + // } |
|
| 109 | 109 | } |
| 110 | 110 | } |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | * Return an image, if an image was requested. |
| 56 | 56 | */ |
| 57 | 57 | if ($exception instanceof UnauthorizedImageAccessException) { |
| 58 | - $image = __DIR__ . '/../../../../../public/images/unauthorized-access.png'; |
|
| 58 | + $image = __DIR__.'/../../../../../public/images/unauthorized-access.png'; |
|
| 59 | 59 | $response->setStatusCode(Response::STATUS_CODE_403) |
| 60 | 60 | ->setContent(file_get_contents($image)) |
| 61 | 61 | ->getHeaders() |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | $routeMatch->setParam('action', 'index'); |
| 79 | 79 | $query = $e->getRequest()->getQuery(); |
| 80 | 80 | $ref = $e->getRequest()->getRequestUri(); |
| 81 | - $ref = preg_replace('~^' . preg_quote($e->getRouter()->getBaseUrl()) . '~', '', $ref); |
|
| 81 | + $ref = preg_replace('~^'.preg_quote($e->getRouter()->getBaseUrl()).'~', '', $ref); |
|
| 82 | 82 | $query->set('ref', $ref); |
| 83 | 83 | $query->set('req', 1); |
| 84 | 84 | $response->setStatusCode(Response::STATUS_CODE_401); |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | |
| 57 | 57 | protected function attachDefaultListeners() |
| 58 | 58 | { |
| 59 | - $this->getEventManager()->attach(static::EVENT_REMOVE_ITEMS, function (EventInterface $event) { |
|
| 59 | + $this->getEventManager()->attach(static::EVENT_REMOVE_ITEMS, function(EventInterface $event) { |
|
| 60 | 60 | $user = $event->getParam('user'); |
| 61 | 61 | foreach ($this->getLists() as $list) { |
| 62 | 62 | foreach ($list->getEntities($user) as $entity) { |
@@ -135,7 +135,7 @@ |
||
| 135 | 135 | return array( |
| 136 | 136 | 'year' => strval($xml->year), |
| 137 | 137 | 'month'=> isset($xml->month) ? strval($xml->month) : '01', |
| 138 | - 'day' => isset($xml->day) ? strval($xml->day) : '01', |
|
| 138 | + 'day' => isset($xml->day) ? strval($xml->day) : '01', |
|
| 139 | 139 | ); |
| 140 | 140 | } |
| 141 | 141 | } |
@@ -98,9 +98,9 @@ |
||
| 98 | 98 | ); |
| 99 | 99 | |
| 100 | 100 | $this->setCount(0) |
| 101 | - ->setAllowRemove(true) |
|
| 102 | - ->setAllowAdd(true) |
|
| 103 | - ->setShouldCreateTemplate(true); |
|
| 101 | + ->setAllowRemove(true) |
|
| 102 | + ->setAllowAdd(true) |
|
| 103 | + ->setShouldCreateTemplate(true); |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | /** |
@@ -87,7 +87,7 @@ |
||
| 87 | 87 | 'attributes' => [ |
| 88 | 88 | 'data-placeholder' => /*@translate*/ 'please select', |
| 89 | 89 | 'data-allowclear' => 'false', |
| 90 | - 'data-searchbox' => -1, // hide the search box |
|
| 90 | + 'data-searchbox' => -1, // hide the search box |
|
| 91 | 91 | 'required' => true, // mark label as required |
| 92 | 92 | ], |
| 93 | 93 | ] |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | break; |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | - $config = $container->get('Config'); |
|
| 51 | + $config = $container->get('Config'); |
|
| 52 | 52 | |
| 53 | 53 | if (isset($config['view_manager'])) { |
| 54 | 54 | if (isset($config['view_manager']['display_exceptions'])) { |
@@ -97,8 +97,8 @@ |
||
| 97 | 97 | $value = null; |
| 98 | 98 | $service = $this->getService(); |
| 99 | 99 | $user = $service->getUser(); |
| 100 | - if (method_exists($user,"get".$property)) { |
|
| 101 | - $value = $user->{"get" . $property}(); |
|
| 100 | + if (method_exists($user, "get".$property)) { |
|
| 101 | + $value = $user->{"get".$property}(); |
|
| 102 | 102 | } |
| 103 | 103 | return $value; |
| 104 | 104 | } catch (\OutOfBoundsException $e) { |
@@ -92,7 +92,7 @@ |
||
| 92 | 92 | } |
| 93 | 93 | return $value; |
| 94 | 94 | } |
| 95 | - return 'id' == $property ? $auth->getIdentity() : $auth->getUser()->{'get' . $property}(); |
|
| 95 | + return 'id' == $property ? $auth->getIdentity() : $auth->getUser()->{'get'.$property}(); |
|
| 96 | 96 | } |
| 97 | 97 | return null; |
| 98 | 98 | } |
@@ -104,7 +104,7 @@ |
||
| 104 | 104 | */ |
| 105 | 105 | public static function factory(ServiceManager $sm) |
| 106 | 106 | { |
| 107 | - //$manager = $sm->get('ControllerManager'); |
|
| 107 | + //$manager = $sm->get('ControllerManager'); |
|
| 108 | 108 | return new static($sm->get('AuthenticationService')); |
| 109 | 109 | } |
| 110 | 110 | } |