@@ -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 | */ |
@@ -87,7 +87,7 @@ |
||
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |
90 | - * @param LifecycleEventArgs $eventArgs |
|
90 | + * @param PostFlushEventArgs $eventArgs |
|
91 | 91 | */ |
92 | 92 | public function postFlush(PostFlushEventArgs $eventArgs) |
93 | 93 | { |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | */ |
49 | 49 | public function getSubscribedEvents() |
50 | 50 | { |
51 | - if (! $this->manager->isEnabled()) { |
|
51 | + if (!$this->manager->isEnabled()) { |
|
52 | 52 | return []; |
53 | 53 | } |
54 | 54 | |
@@ -66,19 +66,19 @@ discard block |
||
66 | 66 | $organization = $eventArgs->getDocument(); |
67 | 67 | |
68 | 68 | // check for a organization instance |
69 | - if (! $organization instanceof Organization) { |
|
69 | + if (!$organization instanceof Organization) { |
|
70 | 70 | return; |
71 | 71 | } |
72 | 72 | |
73 | 73 | // check if the image has been changed |
74 | - if (! $eventArgs->hasChangedField('image')) { |
|
74 | + if (!$eventArgs->hasChangedField('image')) { |
|
75 | 75 | return; |
76 | 76 | } |
77 | 77 | |
78 | 78 | $image = $eventArgs->getOldValue('image'); |
79 | 79 | |
80 | 80 | // check if any image existed |
81 | - if (! $image instanceof OrganizationImage) { |
|
81 | + if (!$image instanceof OrganizationImage) { |
|
82 | 82 | return; |
83 | 83 | } |
84 | 84 |
@@ -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); |
@@ -14,6 +14,9 @@ |
||
14 | 14 | |
15 | 15 | class OrganizationName extends AbstractRepository |
16 | 16 | { |
17 | + /** |
|
18 | + * @param string $name |
|
19 | + */ |
|
17 | 20 | public function findbyName($name, $create = true) |
18 | 21 | { |
19 | 22 | $entity = $this->findOneBy(array('name' => $name)); |
@@ -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; |
@@ -31,6 +31,11 @@ discard block |
||
31 | 31 | return $this->hydrator; |
32 | 32 | } |
33 | 33 | |
34 | + /** |
|
35 | + * @param string $name |
|
36 | + * |
|
37 | + * @return callable |
|
38 | + */ |
|
34 | 39 | protected function getPlugin($name) |
35 | 40 | { |
36 | 41 | $plugin = null; |
@@ -69,6 +74,9 @@ discard block |
||
69 | 74 | $this->add($this->formManager->get('DefaultButtonsFieldset')); |
70 | 75 | } |
71 | 76 | |
77 | + /** |
|
78 | + * @return string |
|
79 | + */ |
|
72 | 80 | abstract public function getCoreFieldset(); |
73 | 81 | |
74 | 82 | /** |
@@ -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 | { |
@@ -17,8 +17,8 @@ |
||
17 | 17 | } else { |
18 | 18 | echo '<p>Could not initialize autoloading. This happens, if the dependencies are not installed yet.</p>'; |
19 | 19 | echo '<p>Please try to install the dependencies via: </p>'; |
20 | - echo '<code>cd '. realpath('.') .'<br>./install.sh</code>'; |
|
21 | - echo '<p>exit at ' . __FILE__ . ' in line ' . __LINE__ .'</p>'; |
|
20 | + echo '<code>cd '.realpath('.').'<br>./install.sh</code>'; |
|
21 | + echo '<p>exit at '.__FILE__.' in line '.__LINE__.'</p>'; |
|
22 | 22 | exit; |
23 | 23 | } |
24 | 24 |