Completed
Pull Request — develop (#359)
by Mathias
23:51
created
module/Core/src/Core/Listener/LanguageRouteListener.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -97,10 +97,10 @@  discard block
 block discarded – undo
97 97
         }
98 98
         
99 99
         $router = $e->getRouter();
100
-        $basePath=$router->getBaseUrl();
100
+        $basePath = $router->getBaseUrl();
101 101
         $match = [];
102 102
         
103
-        if (preg_match('~^' . $basePath . '/([a-z]{2})(?:/|$)~', $e->getRequest()->getRequestUri(), $match)) {
103
+        if (preg_match('~^'.$basePath.'/([a-z]{2})(?:/|$)~', $e->getRequest()->getRequestUri(), $match)) {
104 104
             /* It seems we have already a language in the URI
105 105
              * Now there are two possibilities:
106 106
              *
@@ -182,8 +182,8 @@  discard block
 block discarded – undo
182 182
         setlocale(
183 183
             LC_ALL,
184 184
             array(
185
-            $locale . ".utf8",
186
-            $locale . ".iso88591",
185
+            $locale.".utf8",
186
+            $locale.".iso88591",
187 187
             $locale,
188 188
             substr($locale, 0, 2),
189 189
             'de_DE.utf8',
Please login to merge, or discard this patch.
module/Install/config/module.config.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -78,12 +78,12 @@  discard block
 block discarded – undo
78 78
         'exception_template' => 'error/index',
79 79
         // Map template to files. Speeds up the lookup through the template stack.
80 80
         'template_map' => array(
81
-            'layout/layout' => __DIR__ . '/../view/layout/layout.phtml',
82
-            'error/index' => __DIR__ . '/../view/error/index.phtml',
81
+            'layout/layout' => __DIR__.'/../view/layout/layout.phtml',
82
+            'error/index' => __DIR__.'/../view/error/index.phtml',
83 83
         ),
84 84
         // Where to look for view templates not mapped above
85 85
         'template_path_stack' => array(
86
-            __DIR__ . '/../view',
86
+            __DIR__.'/../view',
87 87
         ),
88 88
     ),
89 89
 
@@ -91,13 +91,13 @@  discard block
 block discarded – undo
91 91
         'translation_file_patterns' => array(
92 92
             array(
93 93
                 'type' => 'gettext',
94
-                'base_dir' => __DIR__ . '/../language',
94
+                'base_dir' => __DIR__.'/../language',
95 95
                 'pattern' => '%s.mo',
96 96
                 'text_domain' => 'Install',
97 97
             ),
98 98
             [
99 99
                 'type'     => 'phparray',
100
-                'base_dir' => __DIR__ . '/../../Core/language',
100
+                'base_dir' => __DIR__.'/../../Core/language',
101 101
                 'pattern' => 'Zend_Validate.%s.php',
102 102
                 'text_domain' => 'default',
103 103
             ],
Please login to merge, or discard this patch.
module/Applications/src/Applications/Auth/Dependency/ListListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
         foreach ($this->repository->getUserApplications($user->getId(), $limit) as $application) /* @var $application \Applications\Entity\Application */
64 64
         {
65 65
             $title = $application->getJob()->getTitle();
66
-            $title .= ' ('. $view->dateFormat($application->getDateCreated()) . ')';
66
+            $title .= ' ('.$view->dateFormat($application->getDateCreated()).')';
67 67
             $url = $view->url('lang/applications/detail', ['id' => $application->getId()]);
68 68
             $items[] = new ListItem($title, $url);
69 69
         }
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Auth/Dependency/ListListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
         foreach ($this->repository->getUserJobs($user->getId(), $limit) as $job) /* @var $job \Jobs\Entity\Job */
64 64
         {
65 65
             $title = $job->getTitle() ?: $view->translate('untitled');
66
-            $title .= ' ('. $view->dateFormat($job->getDateCreated(), 'short', 'none') . ')';
66
+            $title .= ' ('.$view->dateFormat($job->getDateCreated(), 'short', 'none').')';
67 67
             $url = $view->url('lang/jobs/manage', ['action' => 'edit'], [
68 68
                 'query' => [
69 69
                     'id' => $job->getId()
Please login to merge, or discard this patch.
module/Auth/src/Auth/Dependency/Manager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
 
57 57
     protected function attachDefaultListeners()
58 58
     {
59
-        $this->getEventManager()->attach(static::EVENT_REMOVE_ITEMS, function (EventInterface $event) {
59
+        $this->getEventManager()->attach(static::EVENT_REMOVE_ITEMS, function(EventInterface $event) {
60 60
             $user = $event->getParam('user');
61 61
             foreach ($this->getLists() as $list) {
62 62
                 foreach ($list->getEntities($user) as $entity) {
Please login to merge, or discard this patch.
module/Applications/src/Applications/Options/ModuleOptions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      *
36 36
      * @var array $attachmentsMimeType
37 37
      */
38
-    protected $attachmentsMimeType = array('image','applications/pdf',
38
+    protected $attachmentsMimeType = array('image', 'applications/pdf',
39 39
         'application/x-pdf',
40 40
         'application/acrobat',
41 41
         'applications/vnd.pdf',
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
      */
234 234
     public function setAllowSubsequentAttachmentUpload($allowSubsequentAttachmentUpload)
235 235
     {
236
-        $this->allowSubsequentAttachmentUpload = (bool)$allowSubsequentAttachmentUpload;
236
+        $this->allowSubsequentAttachmentUpload = (bool) $allowSubsequentAttachmentUpload;
237 237
         
238 238
         return $this;
239 239
     }
Please login to merge, or discard this patch.
module/Core/src/Core/Form/View/Helper/FormFileUpload.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -98,12 +98,12 @@  discard block
 block discarded – undo
98 98
     </a>
99 99
     <div class="fu-errors input-error">
100 100
         <ul class="errors">
101
-            <li class="fu-error-size">' . $translator->translate('The file is too big', $textDomain) . '</li>
102
-            <li class="fu-error-type">' . $translator->translate('The file type is not supported', $textDomain) . '</li>
101
+            <li class="fu-error-size">' . $translator->translate('The file is too big', $textDomain).'</li>
102
+            <li class="fu-error-type">' . $translator->translate('The file type is not supported', $textDomain).'</li>
103 103
             <li class="fu-error-count">' . sprintf(
104 104
     $translator->translate('You may only upload %d files', $textDomain),
105 105
     $element->getAttribute('data-maxfilecount')
106
-) . '</li><li class="fu-error-general">' . $translator->translate('An unknown error occured.') . '</li>
106
+).'</li><li class="fu-error-general">'.$translator->translate('An unknown error occured.').'</li>
107 107
         </ul>
108 108
    </div>
109 109
 </li>';
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
         /* @var $basepath \Zend\View\Helper\BasePath */
112 112
         $renderer          = $this->getView();
113 113
         $basepath          = $renderer->plugin('basepath');
114
-        $createFileDisplay = function ($file) use ($template, $basepath) {
114
+        $createFileDisplay = function($file) use ($template, $basepath) {
115 115
             /* @var $file \Core\Entity\FileInterface */
116 116
             $uri  = $basepath($file->getUri());
117 117
             $name = $file->getName();
@@ -146,11 +146,11 @@  discard block
 block discarded – undo
146 146
         }
147 147
 
148 148
         $nonemptynotice =
149
-            '<div class="fu-nonempty-notice"' . ('' == trim($preview) ? ' style="display:none;"' : '') . '>'
150
-            . $this->getNonEmptyNotice() . '</div>';
149
+            '<div class="fu-nonempty-notice"'.('' == trim($preview) ? ' style="display:none;"' : '').'>'
150
+            . $this->getNonEmptyNotice().'</div>';
151 151
         $emptynotice    = '<div class="fu-empty-notice"'
152
-                          . ('' == trim($preview) ? '' : ' style="display: none;"') . '>
153
-                       ' . $this->getEmptyNotice() . '
152
+                          . ('' == trim($preview) ? '' : ' style="display: none;"').'>
153
+                       ' . $this->getEmptyNotice().'
154 154
                   </div>';
155 155
 
156 156
         $markup = '
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
 	 */
299 299
 	protected function getDefaultNotice()
300 300
 	{
301
-		return '<small>' . $this->getTranslator()->translate('Click here to add files or use drag and drop.') . '</small>';
301
+		return '<small>'.$this->getTranslator()->translate('Click here to add files or use drag and drop.').'</small>';
302 302
 	}
303 303
 	
304 304
     /**
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
 	 */
309 309
 	public function setAllowRemove($allowRemove)
310 310
 	{
311
-		$this->allowRemove = (bool)$allowRemove;
311
+		$this->allowRemove = (bool) $allowRemove;
312 312
 		
313 313
 		return $this;
314 314
 	}
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
 	 */
321 321
 	public function setAllowClickableDropZone($allowClickableDropZone)
322 322
 	{
323
-		$this->allowClickableDropZone = (bool)$allowClickableDropZone;
323
+		$this->allowClickableDropZone = (bool) $allowClickableDropZone;
324 324
 		
325 325
 		return $this;
326 326
 	}
Please login to merge, or discard this patch.
module/Core/src/Core/Entity/FileEntity.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -146,18 +146,18 @@
 block discarded – undo
146 146
         $size = $this->getLength();
147 147
         
148 148
         if ($size >= 1073741824) {
149
-            return round($size / 1073741824, 2) . ' GB';
149
+            return round($size / 1073741824, 2).' GB';
150 150
         }
151 151
         
152 152
         if ($size >= 1048576) {
153
-            return round($size / 1048576, 2) . ' MB';
153
+            return round($size / 1048576, 2).' MB';
154 154
         }
155 155
         
156 156
         if ($size >= 1024) {
157
-            return round($size / 1024, 2) . ' kB';
157
+            return round($size / 1024, 2).' kB';
158 158
         }
159 159
         
160
-        return (string)$size;
160
+        return (string) $size;
161 161
     }
162 162
 
163 163
     /**
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Controller/ConsoleController.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -36,16 +36,16 @@  discard block
 block discarded – undo
36 36
         }
37 37
 
38 38
         $date = new \DateTime('today');
39
-        $date->sub(new \DateInterval('P' . $days . 'D'));
39
+        $date->sub(new \DateInterval('P'.$days.'D'));
40 40
 
41
-        $query        = [
41
+        $query = [
42 42
             'status.name' => StatusInterface::ACTIVE,
43 43
             'datePublishStart.date' => ['$lt' => $date]
44 44
         ];
45 45
 
46 46
         $offset = 0;
47 47
         if ($limit && false !== strpos($limit, ',')) {
48
-            list($limit,$offset) = explode(',', $limit);
48
+            list($limit, $offset) = explode(',', $limit);
49 49
         }
50 50
 
51 51
         $jobs = $jobsRepo->findBy($query, null, (int) $limit, (int) $offset);
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
         }
57 57
 
58 58
         if ($info) {
59
-            echo count($jobs) , ' Jobs';
60
-            if ($offset) { echo ' starting from ' . $offset; }
61
-            echo PHP_EOL . PHP_EOL;
59
+            echo count($jobs), ' Jobs';
60
+            if ($offset) { echo ' starting from '.$offset; }
61
+            echo PHP_EOL.PHP_EOL;
62 62
             $this->listExpiredJobs($jobs);
63 63
             return;
64 64
         }
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         
71 71
         echo "$count jobs found, which have to expire ...\n";
72 72
         
73
-        $progress     = new ProgressBar(
73
+        $progress = new ProgressBar(
74 74
             new ConsoleAdapter(
75 75
                 array(
76 76
                 'elements' => array(
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
         /* @var \Jobs\Entity\Job $job */
95 95
         foreach ($jobs as $job) {
96
-            $progress->update($i++, 'Job ' . $i . ' / ' . $count);
96
+            $progress->update($i++, 'Job '.$i.' / '.$count);
97 97
 
98 98
             $job->changeStatus('expired');
99 99
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
         $i            = 0;
123 123
         /* @var Job $job */
124 124
         foreach ($jobs as $job) {
125
-            $progress->update($i++, 'Job ' . $i . ' / ' . $count);
125
+            $progress->update($i++, 'Job '.$i.' / '.$count);
126 126
             
127 127
             $permissions = $job->getPermissions();
128 128
             $user        = $job->getUser();
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
                 continue;
131 131
             }
132 132
             try {
133
-                $group       = $user->getGroup($job->getCompany());
133
+                $group = $user->getGroup($job->getCompany());
134 134
             } catch (\Exception $e) {
135 135
                 continue;
136 136
             }
@@ -169,13 +169,13 @@  discard block
 block discarded – undo
169 169
                 $org = $job->getCompany();
170 170
             }
171 171
             printf(
172
-                '%s   %s   %-30s   %-20s' . PHP_EOL,
172
+                '%s   %s   %-30s   %-20s'.PHP_EOL,
173 173
                 $job->getDatePublishStart()->format('Y-m-d'),
174 174
                 $id,
175 175
                 substr($job->getTitle(), 0, 30),
176 176
                 substr($org, 0, 20)
177 177
             );
178 178
         }
179
-        return count($jobs) . ' Jobs.';
179
+        return count($jobs).' Jobs.';
180 180
     }
181 181
 }
Please login to merge, or discard this patch.