@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | { |
| 83 | 83 | |
| 84 | 84 | $result = $this->pagination([ |
| 85 | - 'params' => ['Organizations_Profile',[ |
|
| 85 | + 'params' => ['Organizations_Profile', [ |
|
| 86 | 86 | 'q', |
| 87 | 87 | 'count' => $this->options['count'], |
| 88 | 88 | 'page' => 1, |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | $repo = $this->repo; |
| 113 | 113 | $id = $this->params('id'); |
| 114 | 114 | |
| 115 | - if(is_null($id)){ |
|
| 115 | + if (is_null($id)) { |
|
| 116 | 116 | $this->getResponse()->setStatusCode(Response::STATUS_CODE_404); |
| 117 | 117 | return [ |
| 118 | 118 | 'message' => $translator->translate('Can not access profile page without id'), |
@@ -121,20 +121,20 @@ discard block |
||
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | $organization = $repo->find($id); |
| 124 | - if(!$organization instanceof Organization){ |
|
| 124 | + if (!$organization instanceof Organization) { |
|
| 125 | 125 | throw new NotFoundException($id); |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | - if( |
|
| 128 | + if ( |
|
| 129 | 129 | Organization::PROFILE_DISABLED == $organization->getProfileSetting() |
| 130 | 130 | || is_null($organization->getProfileSetting()) |
| 131 | - ){ |
|
| 131 | + ) { |
|
| 132 | 132 | throw new UnauthorizedAccessException(/*@translate*/ 'This Organization Profile is disabled'); |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | $result = $this->pagination([ |
| 136 | 136 | 'params' => [ |
| 137 | - 'Organization_Jobs',[ |
|
| 137 | + 'Organization_Jobs', [ |
|
| 138 | 138 | 'q', |
| 139 | 139 | 'organization_id' => $organization->getId(), |
| 140 | 140 | 'count' => $this->options['count'], |
@@ -147,13 +147,13 @@ discard block |
||
| 147 | 147 | ], |
| 148 | 148 | ]); |
| 149 | 149 | |
| 150 | - if( |
|
| 150 | + if ( |
|
| 151 | 151 | Organization::PROFILE_ACTIVE_JOBS == $organization->getProfileSetting() |
| 152 | - ){ |
|
| 152 | + ) { |
|
| 153 | 153 | /* @var \Zend\Paginator\Paginator $paginator */ |
| 154 | 154 | $paginator = $result['jobs']; |
| 155 | 155 | $count = $paginator->getTotalItemCount(); |
| 156 | - if(0===$count){ |
|
| 156 | + if (0 === $count) { |
|
| 157 | 157 | throw new UnauthorizedAccessException($this->translator->translate('This Organization Profile is disabled')); |
| 158 | 158 | } |
| 159 | 159 | } |