@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | /** |
| 155 | 155 | * Gets the unique key of a channel |
| 156 | 156 | * |
| 157 | - * @return string |
|
| 157 | + * @return integer |
|
| 158 | 158 | */ |
| 159 | 159 | public function getKey() |
| 160 | 160 | { |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | /** |
| 177 | 177 | * Gets the unique key of a channel |
| 178 | 178 | * |
| 179 | - * @return string |
|
| 179 | + * @return integer |
|
| 180 | 180 | */ |
| 181 | 181 | public function getExternalkey() |
| 182 | 182 | { |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | /** |
| 260 | 260 | * Gets the tax for a price |
| 261 | 261 | * |
| 262 | - * @return string |
|
| 262 | + * @return integer |
|
| 263 | 263 | */ |
| 264 | 264 | public function getTax() |
| 265 | 265 | { |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | /** |
| 353 | 353 | * Gets the headline of the channel |
| 354 | 354 | * |
| 355 | - * @return mixed |
|
| 355 | + * @return string |
|
| 356 | 356 | */ |
| 357 | 357 | public function getHeadLine() |
| 358 | 358 | { |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | } |
| 391 | 391 | |
| 392 | 392 | /** |
| 393 | - * @return mixed |
|
| 393 | + * @return string |
|
| 394 | 394 | */ |
| 395 | 395 | public function getLinkText() |
| 396 | 396 | { |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | } |
| 409 | 409 | |
| 410 | 410 | /** |
| 411 | - * @return mixed |
|
| 411 | + * @return string |
|
| 412 | 412 | */ |
| 413 | 413 | public function getRoute() |
| 414 | 414 | { |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | * |
| 82 | 82 | * @var int $publishDuration |
| 83 | 83 | */ |
| 84 | - protected $publishDuration=30; |
|
| 84 | + protected $publishDuration = 30; |
|
| 85 | 85 | |
| 86 | 86 | /** |
| 87 | 87 | * Category for this channel |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | */ |
| 141 | 141 | public function setKey($key) |
| 142 | 142 | { |
| 143 | - $this->key=$key; |
|
| 143 | + $this->key = $key; |
|
| 144 | 144 | return $this; |
| 145 | 145 | } |
| 146 | 146 | |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | */ |
| 163 | 163 | public function setExternalkey($key) |
| 164 | 164 | { |
| 165 | - $this->externalkey=$key; |
|
| 165 | + $this->externalkey = $key; |
|
| 166 | 166 | return $this; |
| 167 | 167 | } |
| 168 | 168 | |
@@ -250,6 +250,9 @@ |
||
| 250 | 250 | return $container; |
| 251 | 251 | } |
| 252 | 252 | |
| 253 | + /** |
|
| 254 | + * @param string $script |
|
| 255 | + */ |
|
| 253 | 256 | protected function getErrorViewModel($script) |
| 254 | 257 | { |
| 255 | 258 | $this->getResponse()->setStatusCode(Response::STATUS_CODE_500); |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | try { |
| 125 | 125 | /* @var $handler \Organizations\Controller\Plugin\GetOrganizationHandler */ |
| 126 | 126 | $handler = $this->plugin('Organizations/GetOrganizationHandler'); |
| 127 | - $org = $handler->process($this->params(), true); |
|
| 127 | + $org = $handler->process($this->params(), true); |
|
| 128 | 128 | } catch (MissingParentOrganizationException $e) { |
| 129 | 129 | return $this->getErrorViewModel('no-parent'); |
| 130 | 130 | } catch (NotFoundException $e) { |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | ]; |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | - $container = $this->getFormular($org); |
|
| 138 | + $container = $this->getFormular($org); |
|
| 139 | 139 | |
| 140 | 140 | if (isset($formIdentifier) && $request->isPost()) { |
| 141 | 141 | /* @var $form \Zend\Form\FormInterface */ |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | $form = $container->get($formIdentifier); |
| 161 | 161 | $form->setData(array_merge($postData, $filesData)); |
| 162 | 162 | if (!isset($form)) { |
| 163 | - throw new \RuntimeException('No form found for "' . $formIdentifier . '"'); |
|
| 163 | + throw new \RuntimeException('No form found for "'.$formIdentifier.'"'); |
|
| 164 | 164 | } |
| 165 | 165 | $isValid = $form->isValid(); |
| 166 | 166 | |
@@ -32,7 +32,6 @@ |
||
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | - * @param mixed $value$organizationImageEntity |
|
| 36 | 35 | * |
| 37 | 36 | * @return mixed |
| 38 | 37 | */ |
@@ -150,7 +150,7 @@ |
||
| 150 | 150 | * $this->proxy($method[, $arg1[, $arg2[, ...]]]); |
| 151 | 151 | * </pre> |
| 152 | 152 | * |
| 153 | - * @param $method |
|
| 153 | + * @param string $method |
|
| 154 | 154 | * |
| 155 | 155 | * @return self|mixed |
| 156 | 156 | */ |
@@ -195,7 +195,7 @@ |
||
| 195 | 195 | return $this->proxy('__isset', $property); |
| 196 | 196 | } |
| 197 | 197 | |
| 198 | - public function notEmpty($property, array $args=[]) |
|
| 198 | + public function notEmpty($property, array $args = []) |
|
| 199 | 199 | { |
| 200 | 200 | return $this->proxy('notEmpty', $args); |
| 201 | 201 | } |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | /** |
| 38 | 38 | * Sets the label of the qualifications form field |
| 39 | 39 | * |
| 40 | - * @param string $labelQualification |
|
| 40 | + * @param string $labelQualifications |
|
| 41 | 41 | * |
| 42 | 42 | * @return self |
| 43 | 43 | */ |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | /** |
| 107 | 107 | * Finds the main organization of an user. |
| 108 | 108 | * |
| 109 | - * @param string|UserInterface $userOrId |
|
| 109 | + * @param string $userOrId |
|
| 110 | 110 | * |
| 111 | 111 | * @return null|OrganizationInterface |
| 112 | 112 | */ |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | /** |
| 143 | 143 | * Finds the organization, an user is employed by. |
| 144 | 144 | * |
| 145 | - * @param string|UserInterface $userOrId |
|
| 145 | + * @param string $userOrId |
|
| 146 | 146 | * |
| 147 | 147 | * @return null|OrganizationInterface |
| 148 | 148 | */ |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | /** |
| 271 | 271 | * Look for an drafted Document of a given user |
| 272 | 272 | * |
| 273 | - * @param $user |
|
| 273 | + * @param \Auth\Entity\AnonymousUser $user |
|
| 274 | 274 | * @return \Organizations\Entity\Organization|null |
| 275 | 275 | */ |
| 276 | 276 | public function findDraft($user) |
@@ -129,10 +129,10 @@ |
||
| 129 | 129 | // ) |
| 130 | 130 | // ); |
| 131 | 131 | $qb->addAnd($qb->expr()->field('user')->equals($userId)) |
| 132 | - ->addAnd( |
|
| 133 | - $qb->expr()->addOr($qb->expr()->field('parent')->exists(false)) |
|
| 134 | - ->addOr($qb->expr()->field('parent')->equals(null)) |
|
| 135 | - ); |
|
| 132 | + ->addAnd( |
|
| 133 | + $qb->expr()->addOr($qb->expr()->field('parent')->exists(false)) |
|
| 134 | + ->addOr($qb->expr()->field('parent')->equals(null)) |
|
| 135 | + ); |
|
| 136 | 136 | |
| 137 | 137 | $q = $qb->getQuery(); |
| 138 | 138 | $entity = $q->getSingleResult(); |
@@ -197,7 +197,7 @@ |
||
| 197 | 197 | * @param bool $persist |
| 198 | 198 | * @return \Organizations\Entity\Organization |
| 199 | 199 | */ |
| 200 | - public function create(array $data = null, $persist=false) |
|
| 200 | + public function create(array $data = null, $persist = false) |
|
| 201 | 201 | { |
| 202 | 202 | $entity = parent::create($data); |
| 203 | 203 | $entity->isDraft(true); |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | /** |
| 165 | 165 | * give a summary of all inserted Files, |
| 166 | 166 | * this is for having access to those files in the post-process |
| 167 | - * @param \Core\View\Helper\InsertFile\FileEvent|\Zend\View\ViewEvent $e |
|
| 167 | + * @param FileEvent $e |
|
| 168 | 168 | * @return NULL |
| 169 | 169 | */ |
| 170 | 170 | public function collectFiles(FileEvent $e) |
@@ -313,7 +313,7 @@ discard block |
||
| 313 | 313 | * |
| 314 | 314 | * @param string $name |
| 315 | 315 | * @param \Zend\View\Renderer\RendererInterface $renderer |
| 316 | - * @return string|boolean |
|
| 316 | + * @return string|false |
|
| 317 | 317 | */ |
| 318 | 318 | public function resolve($name, Renderer $renderer = null) |
| 319 | 319 | { |
@@ -40,10 +40,10 @@ |
||
| 40 | 40 | |
| 41 | 41 | |
| 42 | 42 | /** |
| 43 | - * Loads module specific configuration. |
|
| 44 | - * |
|
| 45 | - * @return array |
|
| 46 | - */ |
|
| 43 | + * Loads module specific configuration. |
|
| 44 | + * |
|
| 45 | + * @return array |
|
| 46 | + */ |
|
| 47 | 47 | public function getConfig() |
| 48 | 48 | { |
| 49 | 49 | return ModuleConfigLoader::load(__DIR__ . '/../config'); |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | */ |
| 47 | 47 | public function getConfig() |
| 48 | 48 | { |
| 49 | - return ModuleConfigLoader::load(__DIR__ . '/../config'); |
|
| 49 | + return ModuleConfigLoader::load(__DIR__.'/../config'); |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | public static function factory(ServiceManager $serviceManager) |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | $eventManager->getSharedManager()->attach( |
| 63 | 63 | 'Applications', |
| 64 | 64 | 'application.detail.actionbuttons', |
| 65 | - function ($event) { |
|
| 65 | + function($event) { |
|
| 66 | 66 | return 'pdf/application/details/button'; |
| 67 | 67 | } |
| 68 | 68 | ); |
@@ -142,9 +142,9 @@ discard block |
||
| 142 | 142 | { |
| 143 | 143 | $file = $e->getLastFileObject(); |
| 144 | 144 | // assume it is of the class Core\Entity\FileEntity |
| 145 | - $return = '<div class="col-md-3"><a href="#attachment_' . $file->getId() . '">' . $file->getName() . '</a></div>' . PHP_EOL |
|
| 146 | - . '<div class="col-md-3">' . $file->getType() . '</div>' |
|
| 147 | - . '<div class="col-md-3">' . $file->prettySize . '</div>'; |
|
| 145 | + $return = '<div class="col-md-3"><a href="#attachment_'.$file->getId().'">'.$file->getName().'</a></div>'.PHP_EOL |
|
| 146 | + . '<div class="col-md-3">'.$file->getType().'</div>' |
|
| 147 | + . '<div class="col-md-3">'.$file->prettySize.'</div>'; |
|
| 148 | 148 | /* |
| 149 | 149 | * this snippet was for direct inserting an image into the PDF |
| 150 | 150 | if ($file && $file instanceOf FileEntity && 0 === strpos($file->getType(), 'image')) { |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | |
| 245 | 245 | // the handles are for temporary files |
| 246 | 246 | error_reporting(0); |
| 247 | - foreach (array(self::RENDER_FULL, self::RENDER_WITHOUT_PDF, self::RENDER_WITHOUT_ATTACHMENTS ) as $render) { |
|
| 247 | + foreach (array(self::RENDER_FULL, self::RENDER_WITHOUT_PDF, self::RENDER_WITHOUT_ATTACHMENTS) as $render) { |
|
| 248 | 248 | $handles = array(); |
| 249 | 249 | try { |
| 250 | 250 | $pdf = new extern\mPDFderive(); |
@@ -258,8 +258,8 @@ discard block |
||
| 258 | 258 | if (is_array($this->appendImage) && !empty($this->appendImage)) { |
| 259 | 259 | foreach ($this->appendImage as $imageAttachment) { |
| 260 | 260 | $content = $imageAttachment->getContent(); |
| 261 | - $url = 'data:image/' . $imageAttachment->getType() . ';base64,' . base64_encode($content); |
|
| 262 | - $html = '<a name="attachment_' . $imageAttachment->getId() . '"><img src="' . $url . '" /><br /></a>'; |
|
| 261 | + $url = 'data:image/'.$imageAttachment->getType().';base64,'.base64_encode($content); |
|
| 262 | + $html = '<a name="attachment_'.$imageAttachment->getId().'"><img src="'.$url.'" /><br /></a>'; |
|
| 263 | 263 | $pdf->WriteHTML($html); |
| 264 | 264 | } |
| 265 | 265 | } |
@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | $pagecount = $pdf->SetSourceFile($filename); |
| 287 | 287 | for ($pages = 0; $pages < $pagecount; $pages++) { |
| 288 | 288 | $pdf->AddPage(); |
| 289 | - $pdf->WriteHTML(' pages: ' . $pagecount); |
|
| 289 | + $pdf->WriteHTML(' pages: '.$pagecount); |
|
| 290 | 290 | $tx = $pdf->ImportPage($pages + 1); |
| 291 | 291 | $pdf->UseTemplate($tx); |
| 292 | 292 | } |
@@ -323,18 +323,18 @@ discard block |
||
| 323 | 323 | $defaultSuffix = $viewTemplatePathStack->getDefaultSuffix(); |
| 324 | 324 | if (pathinfo($name, PATHINFO_EXTENSION) != $defaultSuffix) { |
| 325 | 325 | ; |
| 326 | - $name .= '.pdf.' . $defaultSuffix; |
|
| 326 | + $name .= '.pdf.'.$defaultSuffix; |
|
| 327 | 327 | } else { |
| 328 | 328 | // TODO: replace Filename by Filename for PDF |
| 329 | 329 | } |
| 330 | 330 | |
| 331 | 331 | foreach ($paths as $path) { |
| 332 | - $file = new SplFileInfo($path . $name); |
|
| 332 | + $file = new SplFileInfo($path.$name); |
|
| 333 | 333 | if ($file->isReadable()) { |
| 334 | 334 | // Found! Return it. |
| 335 | 335 | if (($filePath = $file->getRealPath()) === false && substr($path, 0, 7) === 'phar://') { |
| 336 | 336 | // Do not try to expand phar paths (realpath + phars == fail) |
| 337 | - $filePath = $path . $name; |
|
| 337 | + $filePath = $path.$name; |
|
| 338 | 338 | if (!file_exists($filePath)) { |
| 339 | 339 | break; |
| 340 | 340 | } |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | |
| 26 | 26 | /** |
| 27 | 27 | * @param bool $recursive |
| 28 | - * @param array $skipMembers |
|
| 28 | + * @param string[] $skipMembers |
|
| 29 | 29 | * |
| 30 | 30 | * @return $this |
| 31 | 31 | */ |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | /** |
| 133 | - * @param $property |
|
| 133 | + * @param string $property |
|
| 134 | 134 | * |
| 135 | 135 | * @return null |
| 136 | 136 | */ |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | */ |
| 139 | 139 | public function __get($property) |
| 140 | 140 | { |
| 141 | - $getter = "get" . ucfirst($property); |
|
| 141 | + $getter = "get".ucfirst($property); |
|
| 142 | 142 | if (method_exists($this, $getter)) { |
| 143 | 143 | return $this->$getter(); |
| 144 | 144 | } |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | { |
| 160 | 160 | $this->checkWriteAccess(); |
| 161 | 161 | |
| 162 | - $setter = 'set' . ucfirst($property); |
|
| 162 | + $setter = 'set'.ucfirst($property); |
|
| 163 | 163 | if (method_exists($this, $setter)) { |
| 164 | 164 | $this->$setter($value); |
| 165 | 165 | return; |
@@ -44,7 +44,6 @@ |
||
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * the $id for an entity 'setting' is the same as for the entity 'user' |
| 47 | - * @param type $id |
|
| 48 | 47 | */ |
| 49 | 48 | public function getSettingsByUser($user) |
| 50 | 49 | { |