@@ -136,7 +136,7 @@ |
||
| 136 | 136 | * |
| 137 | 137 | * @return Forward |
| 138 | 138 | */ |
| 139 | - public static function factory(ContainerInterface $container, $requestedName, array $options=[]) |
|
| 139 | + public static function factory(ContainerInterface $container, $requestedName, array $options = []) |
|
| 140 | 140 | { |
| 141 | 141 | $ob = new self($options); |
| 142 | 142 | $ob->setContainer($container); |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | $hidden = ''; |
| 71 | 71 | $displayNames = array(); |
| 72 | 72 | foreach ($elements as $element) { |
| 73 | - $hidden .= '<input type="hidden" name="elements[]" value="' . $element . '">'; |
|
| 73 | + $hidden .= '<input type="hidden" name="elements[]" value="'.$element.'">'; |
|
| 74 | 74 | $application = $repository->find($element); |
| 75 | 75 | $isAllowed = $this->acl()->test($application, 'change'); |
| 76 | 76 | if ($isAllowed) { |
@@ -89,12 +89,12 @@ discard block |
||
| 89 | 89 | array( |
| 90 | 90 | 'ok' => true, |
| 91 | 91 | 'header' => $translator->translate('reject the applicants'), |
| 92 | - 'content' => '<form action="' . $actionUrl . '">' . |
|
| 93 | - $hidden . |
|
| 92 | + 'content' => '<form action="'.$actionUrl.'">'. |
|
| 93 | + $hidden. |
|
| 94 | 94 | '<input class=" form-control " name="mail-subject" value="' |
| 95 | - . $mailSubject . '"><br /><br />' . |
|
| 95 | + . $mailSubject.'"><br /><br />'. |
|
| 96 | 96 | '<textarea class=" form-control " id="mail-content" name="mail-content">' |
| 97 | - . $mailText . '</textarea></form>' |
|
| 97 | + . $mailText.'</textarea></form>' |
|
| 98 | 98 | ) |
| 99 | 99 | ); |
| 100 | 100 | } |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | $repositoryService->store($application); |
| 143 | 143 | unset($mail); |
| 144 | 144 | } |
| 145 | - return new JsonModel(array('ok' => true, )); |
|
| 145 | + return new JsonModel(array('ok' => true,)); |
|
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | /** |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | */ |
| 153 | 153 | public function moveAction() |
| 154 | 154 | { |
| 155 | - $ids = (array)$this->params()->fromPost('ids'); |
|
| 155 | + $ids = (array) $this->params()->fromPost('ids'); |
|
| 156 | 156 | $moved = 0; |
| 157 | 157 | |
| 158 | 158 | if ($ids) { |
@@ -40,10 +40,10 @@ |
||
| 40 | 40 | |
| 41 | 41 | //default sorting |
| 42 | 42 | if (!isset($params['sort'])) { |
| 43 | - $params['sort']="-date"; |
|
| 43 | + $params['sort'] = "-date"; |
|
| 44 | 44 | } |
| 45 | 45 | $params->count = 5; |
| 46 | - $params->pageRange=5; |
|
| 46 | + $params->pageRange = 5; |
|
| 47 | 47 | |
| 48 | 48 | $this->paginationParams()->setParams('Applications\Index', $params); |
| 49 | 49 | |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | return $ob; |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | - public function setContainer( ContainerInterface $container ) |
|
| 75 | + public function setContainer(ContainerInterface $container) |
|
| 76 | 76 | { |
| 77 | 77 | $this->config = $container->get('Config'); |
| 78 | 78 | $this->imageCacheManager = $container->get('Organizations\ImageFileCache\Manager'); |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | throw new \RuntimeException('Invalid application id.'); |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | - $action = 'process'; |
|
| 128 | + $action = 'process'; |
|
| 129 | 129 | |
| 130 | 130 | $routeMatch->setParam('action', $action); |
| 131 | 131 | } else { |
@@ -209,14 +209,14 @@ discard block |
||
| 209 | 209 | |
| 210 | 210 | $container->setEntity($application); |
| 211 | 211 | $this->configureContainer($container); |
| 212 | - $this->formContainer = $container; |
|
| 212 | + $this->formContainer = $container; |
|
| 213 | 213 | } |
| 214 | 214 | |
| 215 | 215 | public function jobNotFoundAction() |
| 216 | 216 | { |
| 217 | 217 | $this->response->setStatusCode(410); |
| 218 | 218 | $model = new ViewModel( |
| 219 | - [ 'content' => /*@translate*/ 'Invalid apply id'] |
|
| 219 | + ['content' => /*@translate*/ 'Invalid apply id'] |
|
| 220 | 220 | ); |
| 221 | 221 | $model->setTemplate('applications/error/not-found'); |
| 222 | 222 | return $model; |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | $postData = $form->getOption('use_post_array') ? $params->fromPost() : array(); |
| 336 | 336 | //@TODO: [ZF3] option use_files_array is false by default |
| 337 | 337 | //$filesData = $form->getOption('use_files_array') ? $params->fromFiles() : array(); |
| 338 | - $form->setData(array_merge($postData,$_FILES)); |
|
| 338 | + $form->setData(array_merge($postData, $_FILES)); |
|
| 339 | 339 | |
| 340 | 340 | if (!$form->isValid()) { |
| 341 | 341 | return new JsonModel( |
@@ -397,13 +397,13 @@ discard block |
||
| 397 | 397 | } |
| 398 | 398 | |
| 399 | 399 | if ('previewmail' == $this->params()->fromQuery('do')) { |
| 400 | - $this->mailer('Applications/CarbonCopy', [ 'application' => $application], true); |
|
| 400 | + $this->mailer('Applications/CarbonCopy', ['application' => $application], true); |
|
| 401 | 401 | $this->notification()->success(/*@translate*/ 'Mail has been send'); |
| 402 | 402 | return new JsonModel(); |
| 403 | 403 | } |
| 404 | 404 | |
| 405 | 405 | if ('sendmail' == $this->params()->fromQuery('do')) { |
| 406 | - $jobEntity = $application->getJob(); |
|
| 406 | + $jobEntity = $application->getJob(); |
|
| 407 | 407 | |
| 408 | 408 | $mailData = array( |
| 409 | 409 | 'application' => $application, |
@@ -434,8 +434,8 @@ discard block |
||
| 434 | 434 | |
| 435 | 435 | $repositories->store($application); |
| 436 | 436 | |
| 437 | - $events = $this->appEvents; |
|
| 438 | - $events->trigger(ApplicationEvent::EVENT_APPLICATION_POST_CREATE, $this, [ 'application' => $application ]); |
|
| 437 | + $events = $this->appEvents; |
|
| 438 | + $events->trigger(ApplicationEvent::EVENT_APPLICATION_POST_CREATE, $this, ['application' => $application]); |
|
| 439 | 439 | |
| 440 | 440 | $model = new ViewModel( |
| 441 | 441 | array( |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | { |
| 43 | 43 | /* @var \Doctrine\ODM\MongoDB\Query\Builder $qb */ |
| 44 | 44 | $qb = $this->repository->createQueryBuilder(); |
| 45 | - $qb->field('title')->equals(new \MongoRegex('/' . addslashes($q) . '/i')); |
|
| 45 | + $qb->field('title')->equals(new \MongoRegex('/'.addslashes($q).'/i')); |
|
| 46 | 46 | $cursor = $qb->getQuery()->execute(); |
| 47 | 47 | |
| 48 | 48 | $adapter = new DoctrineMongoCursor($cursor); |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | protected function checkObjectType($object) |
| 58 | 58 | { |
| 59 | 59 | if (!$object instanceof $this->objectType) { |
| 60 | - throw new \InvalidArgumentException('Wrapped entity must be of type ' . $this->objectType); |
|
| 60 | + throw new \InvalidArgumentException('Wrapped entity must be of type '.$this->objectType); |
|
| 61 | 61 | } |
| 62 | 62 | } |
| 63 | 63 | } |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | * @var array |
| 44 | 44 | */ |
| 45 | 45 | protected $images = [ |
| 46 | - ImageSetInterface::THUMBNAIL => [100,100], |
|
| 46 | + ImageSetInterface::THUMBNAIL => [100, 100], |
|
| 47 | 47 | ]; |
| 48 | 48 | |
| 49 | 49 | /** |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | 'attributes', |
| 134 | 134 | 'options', |
| 135 | 135 | 'label' => 'options', |
| 136 | - 'required' => ['key' => ['attributes','*'], 'value' => 'required', 'if' => true], |
|
| 136 | + 'required' => ['key' => ['attributes', '*'], 'value' => 'required', 'if' => true], |
|
| 137 | 137 | 'type', |
| 138 | 138 | ] |
| 139 | 139 | ); |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | $value = $source[$key]; |
| 253 | 253 | } |
| 254 | 254 | |
| 255 | - $tmpTarget =& $target; |
|
| 255 | + $tmpTarget = & $target; |
|
| 256 | 256 | foreach ($targetKeys as $targetKey) { |
| 257 | 257 | if ('*' == $targetKey) { |
| 258 | 258 | $targetKey = $key; |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | if (!isset($tmpTarget[$targetKey])) { |
| 261 | 261 | $tmpTarget[$targetKey] = []; |
| 262 | 262 | } |
| 263 | - $tmpTarget =& $tmpTarget[$targetKey]; |
|
| 263 | + $tmpTarget = & $tmpTarget[$targetKey]; |
|
| 264 | 264 | } |
| 265 | 265 | |
| 266 | 266 | $tmpTarget = $value; |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | public function closureToDatabase() |
| 72 | 72 | { |
| 73 | 73 | return ' |
| 74 | - /* CODE FROM: ' . __METHOD__ . ' */ |
|
| 74 | + /* CODE FROM: ' . __METHOD__.' */ |
|
| 75 | 75 | if (!$value instanceOf \DateTime) return null; |
| 76 | 76 | $return = array( |
| 77 | 77 | "date" => new \MongoDate($value->getTimestamp()), |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | public function closureToPhp() |
| 114 | 114 | { |
| 115 | 115 | return ' |
| 116 | - /* CODE FROM: ' . __METHOD__ . ' */ |
|
| 116 | + /* CODE FROM: ' . __METHOD__.' */ |
|
| 117 | 117 | if (!is_array($value) |
| 118 | 118 | || !isset($value["date"]) |
| 119 | 119 | || !$value["date"] instanceOf \MongoDate |