Completed
Pull Request — develop (#329)
by Carsten
07:08
created
module/Organizations/src/Organizations/Controller/IndexController.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -301,6 +301,9 @@
 block discarded – undo
301 301
         return $organization;
302 302
     }
303 303
 
304
+    /**
305
+     * @param string $script
306
+     */
304 307
     protected function getErrorViewModel($script)
305 308
     {
306 309
         $this->getResponse()->setStatusCode(500);
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -127,12 +127,12 @@  discard block
 block discarded – undo
127 127
         try {
128 128
             /* @var $handler \Organizations\Controller\Plugin\GetOrganizationHandler */
129 129
             $handler = $this->plugin('Organizations/GetOrganizationHandler');
130
-            $org  = $handler->process($this->params(), true);
130
+            $org = $handler->process($this->params(), true);
131 131
         } catch (\RuntimeException $e) {
132 132
             return $this->getErrorViewModel('no-parent');
133 133
         }
134 134
 
135
-        $container       = $this->getFormular($org);
135
+        $container = $this->getFormular($org);
136 136
 
137 137
         if (isset($formIdentifier) && $request->isPost()) {
138 138
             /* @var $form \Zend\Form\FormInterface */
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
             $form = $container->get($formIdentifier);
158 158
             $form->setData(array_merge($postData, $filesData));
159 159
             if (!isset($form)) {
160
-                throw new \RuntimeException('No form found for "' . $formIdentifier . '"');
160
+                throw new \RuntimeException('No form found for "'.$formIdentifier.'"');
161 161
             }
162 162
             $isValid = $form->isValid();
163 163
 
Please login to merge, or discard this patch.
module/Organizations/src/Organizations/Entity/OrganizationReference.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@
 block discarded – undo
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
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -195,7 +195,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Organizations/Repository/Filter/PaginationQueryFactory.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
      *
28 28
      * @see \Zend\ServiceManager\FactoryInterface::createService()
29 29
      * @param ServiceLocatorInterface $serviceLocator
30
-     * @return \Organizations\Repository\Filter\PaginationQuery|mixed
30
+     * @return PaginationQuery
31 31
      */
32 32
     public function createService(ServiceLocatorInterface $serviceLocator)
33 33
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
      */
32 32
     public function createService(ServiceLocatorInterface $serviceLocator)
33 33
     {
34
-        $auth  = $serviceLocator->getServiceLocator()->get('AuthenticationService');
34
+        $auth = $serviceLocator->getServiceLocator()->get('AuthenticationService');
35 35
         $filter = new PaginationQuery($auth);
36 36
         return $filter;
37 37
     }
Please login to merge, or discard this patch.
module/Organizations/src/Organizations/Repository/OrganizationName.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -14,6 +14,9 @@
 block discarded – undo
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));
Please login to merge, or discard this patch.
module/Pdf/Module.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,11 +30,11 @@
 block discarded – undo
30 30
  */
31 31
 class Module
32 32
 {
33
-     /**
34
-     * Loads module specific configuration.
35
-     *
36
-     * @return array
37
-     */
33
+        /**
34
+         * Loads module specific configuration.
35
+         *
36
+         * @return array
37
+         */
38 38
     public function getConfig()
39 39
     {
40 40
         return ModuleConfigLoader::load(__DIR__ . '/config');
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public function getConfig()
51 51
     {
52
-        return ModuleConfigLoader::load(__DIR__ . '/config');
52
+        return ModuleConfigLoader::load(__DIR__.'/config');
53 53
     }
54 54
     
55 55
     public function setServiceManager(ServiceManager $serviceManager)
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
         $eventManager->getSharedManager()->attach(
65 65
             'Applications',
66 66
             'application.detail.actionbuttons',
67
-            function ($event) {
67
+            function($event) {
68 68
                 return 'pdf/application/details/button';
69 69
             }
70 70
         );
@@ -144,9 +144,9 @@  discard block
 block discarded – undo
144 144
     {
145 145
         $file = $e->getLastFileObject();
146 146
         // assume it is of the class Core\Entity\FileEntity
147
-        $return = '<div class="col-md-3"><a href="#attachment_' . $file->getId() . '">' . $file->getName() . '</a></div>' . PHP_EOL
148
-                . '<div class="col-md-3">' . $file->getType() . '</div>'
149
-                . '<div class="col-md-3">' . $file->prettySize . '</div>';
147
+        $return = '<div class="col-md-3"><a href="#attachment_'.$file->getId().'">'.$file->getName().'</a></div>'.PHP_EOL
148
+                . '<div class="col-md-3">'.$file->getType().'</div>'
149
+                . '<div class="col-md-3">'.$file->prettySize.'</div>';
150 150
         /*
151 151
          * this snippet was for direct inserting an image into the PDF
152 152
         if ($file && $file instanceOf FileEntity && 0 === strpos($file->getType(), 'image')) {
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
         
247 247
         // the handles are for temporary files
248 248
         error_reporting(0);
249
-        foreach (array(self::RENDER_FULL, self::RENDER_WITHOUT_PDF, self::RENDER_WITHOUT_ATTACHMENTS ) as $render) {
249
+        foreach (array(self::RENDER_FULL, self::RENDER_WITHOUT_PDF, self::RENDER_WITHOUT_ATTACHMENTS) as $render) {
250 250
             $handles = array();
251 251
             try {
252 252
                 $pdf = new extern\mPDFderive();
@@ -260,8 +260,8 @@  discard block
 block discarded – undo
260 260
                     if (is_array($this->appendImage) && !empty($this->appendImage)) {
261 261
                         foreach ($this->appendImage as $imageAttachment) {
262 262
                             $content = $imageAttachment->getContent();
263
-                            $url = 'data:image/' . $imageAttachment->getType() . ';base64,' . base64_encode($content);
264
-                            $html = '<a name="attachment_' . $imageAttachment->getId() . '"><img src="' . $url . '" /><br /></a>';
263
+                            $url = 'data:image/'.$imageAttachment->getType().';base64,'.base64_encode($content);
264
+                            $html = '<a name="attachment_'.$imageAttachment->getId().'"><img src="'.$url.'" /><br /></a>';
265 265
                             $pdf->WriteHTML($html);
266 266
                         }
267 267
                     }
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
                     $pagecount = $pdf->SetSourceFile($filename);
289 289
                     for ($pages = 0; $pages < $pagecount; $pages++) {
290 290
                         $pdf->AddPage();
291
-                        $pdf->WriteHTML(' pages: ' . $pagecount);
291
+                        $pdf->WriteHTML(' pages: '.$pagecount);
292 292
                         $tx = $pdf->ImportPage($pages + 1);
293 293
                         $pdf->UseTemplate($tx);
294 294
                     }
@@ -325,18 +325,18 @@  discard block
 block discarded – undo
325 325
             $defaultSuffix = $viewTemplatePathStack->getDefaultSuffix();
326 326
             if (pathinfo($name, PATHINFO_EXTENSION) != $defaultSuffix) {
327 327
                 ;
328
-                $name .= '.pdf.' . $defaultSuffix;
328
+                $name .= '.pdf.'.$defaultSuffix;
329 329
             } else {
330 330
                 // TODO: replace Filename by Filename for PDF
331 331
             }
332 332
 
333 333
             foreach ($paths as $path) {
334
-                $file = new SplFileInfo($path . $name);
334
+                $file = new SplFileInfo($path.$name);
335 335
                 if ($file->isReadable()) {
336 336
                     // Found! Return it.
337 337
                     if (($filePath = $file->getRealPath()) === false && substr($path, 0, 7) === 'phar://') {
338 338
                         // Do not try to expand phar paths (realpath + phars == fail)
339
-                        $filePath = $path . $name;
339
+                        $filePath = $path.$name;
340 340
                         if (!file_exists($filePath)) {
341 341
                             break;
342 342
                         }
Please login to merge, or discard this patch.
module/Settings/src/Settings/Form/FormAbstract.php 1 patch
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -50,6 +50,11 @@  discard block
 block discarded – undo
50 50
         return $this->hydrator;
51 51
     }
52 52
     
53
+    /**
54
+     * @param string $name
55
+     *
56
+     * @return callable
57
+     */
53 58
     protected function getPlugin($name)
54 59
     {
55 60
         $plugin = null;
@@ -88,5 +93,8 @@  discard block
 block discarded – undo
88 93
         $this->add($this->forms->get('DefaultButtonsFieldset'));
89 94
     }
90 95
     
96
+    /**
97
+     * @return string
98
+     */
91 99
     abstract public function getCoreFieldset();
92 100
 }
Please login to merge, or discard this patch.
module/Settings/src/Settings/Repository/Settings.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,6 @@
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
config/config.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,7 @@
 block discarded – undo
40 40
             if (strpos($addModule, '-') === 0) {
41 41
                 $remove = substr($addModule,1);
42 42
                 $modules = array_filter($modules, function ($elem) use ($remove) { return strcasecmp($elem,$remove); });
43
-            }
44
-            else {
43
+            } else {
45 44
                 if (!in_array($addModule, $modules)) {
46 45
                     $modules[] = $addModule;
47 46
                 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
 $env = getenv('APPLICATION_ENV') ?: 'production';
14 14
 
15
-if (!file_exists(__DIR__ . '/autoload/yawik.config.global.php')) {
15
+if (!file_exists(__DIR__.'/autoload/yawik.config.global.php')) {
16 16
     $modules = array('Install');
17 17
 } else {
18 18
     $modules = array(
@@ -34,12 +34,12 @@  discard block
 block discarded – undo
34 34
         // kann und über Server-Variablen oder ähnlichen steuern kann
35 35
         $allModules = False;
36 36
     }
37
-    foreach (glob(__DIR__ . '/autoload/*.module.php') as $moduleFile) {
37
+    foreach (glob(__DIR__.'/autoload/*.module.php') as $moduleFile) {
38 38
         $addModules = require $moduleFile;
39 39
         foreach ($addModules as $addModule) {
40 40
             if (strpos($addModule, '-') === 0) {
41
-                $remove = substr($addModule,1);
42
-                $modules = array_filter($modules, function ($elem) use ($remove) { return strcasecmp($elem,$remove); });
41
+                $remove = substr($addModule, 1);
42
+                $modules = array_filter($modules, function($elem) use ($remove) { return strcasecmp($elem, $remove); });
43 43
             }
44 44
             else {
45 45
                 if (!in_array($addModule, $modules)) {
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     ),
93 93
 );
94 94
 
95
-$envConfigFile = __DIR__ . '/config.' . $env . '.php';
95
+$envConfigFile = __DIR__.'/config.'.$env.'.php';
96 96
 if (file_exists($envConfigFile)) {
97 97
     if (is_readable($envConfigFile)) {
98 98
         $envConfig = include $envConfigFile;
Please login to merge, or discard this patch.
module/Applications/Module.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,10 +35,10 @@
 block discarded – undo
35 35
             'applications list'             => 'list view scripts.',
36 36
             'applications reset-files-permissions [--filter=]' => 'Resets (means: Set again) the permissions of attachments and contact images',
37 37
             array('--filter=JSON', "available keys:\n"
38
-                                   . "- before    ISODate   only applications before the given date\n"
39
-                                   . "- after     ISODate   only applications after the given date\n"
40
-                                   . "- id        String    Mongo ID of the application\n"
41
-                                   . "- isDraft   Boolean   "),
38
+                                    . "- before    ISODate   only applications before the given date\n"
39
+                                    . "- after     ISODate   only applications after the given date\n"
40
+                                    . "- id        String    Mongo ID of the application\n"
41
+                                    . "- isDraft   Boolean   "),
42 42
         );
43 43
     }
44 44
     
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public function getConfig()
51 51
     {
52
-        return ModuleConfigLoader::load(__DIR__ . '/config');
52
+        return ModuleConfigLoader::load(__DIR__.'/config');
53 53
     }
54 54
 
55 55
     /**
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
         return array(
63 63
             'Zend\Loader\StandardAutoloader' => array(
64 64
                 'namespaces' => array(
65
-                    __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
66
-                    __NAMESPACE__ . 'Test' => __DIR__ . '/test/' . __NAMESPACE__ .'Test',
65
+                    __NAMESPACE__ => __DIR__.'/src/'.__NAMESPACE__,
66
+                    __NAMESPACE__.'Test' => __DIR__.'/test/'.__NAMESPACE__.'Test',
67 67
                 ),
68 68
             ),
69 69
         );
Please login to merge, or discard this patch.