Completed
Push — develop ( 8b432d...18f015 )
by Mathias
05:26
created
module/Jobs/src/Jobs/Form/Validator/UniqueApplyIdFactory.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,12 +15,12 @@
 block discarded – undo
15 15
 
16 16
 class UniqueApplyIdFactory implements FactoryInterface
17 17
 {
18
-	public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
19
-	{
20
-		$repositories = $container->get('repositories');
21
-		$jobs         = $repositories->get('Jobs/Job');
22
-		$validator    = new UniqueApplyId($jobs);
18
+    public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
19
+    {
20
+        $repositories = $container->get('repositories');
21
+        $jobs         = $repositories->get('Jobs/Job');
22
+        $validator    = new UniqueApplyId($jobs);
23 23
 		
24
-		return $validator;
25
-	}
24
+        return $validator;
25
+    }
26 26
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 
16 16
 class UniqueApplyIdFactory implements FactoryInterface
17 17
 {
18
-	public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
18
+	public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
19 19
 	{
20 20
 		$repositories = $container->get('repositories');
21 21
 		$jobs         = $repositories->get('Jobs/Job');
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Form/Hydrator/Strategy/JobDescriptionTitleStrategy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     public function extract($value)
18 18
     {
19 19
         $result = null;
20
-        if (method_exists($value,'getTemplateValues')) {
20
+        if (method_exists($value, 'getTemplateValues')) {
21 21
             $result = $value->getTemplateValues()->getTitle();
22 22
         }
23 23
         return $result;
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Form/CustomerNoteFieldset.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@
 block discarded – undo
28 28
 
29 29
     public function init()
30 30
     {
31
-    	$this->setAttribute('id','customerNoteFieldset');
32
-    	$this->setName('customerNote');
31
+        $this->setAttribute('id','customerNoteFieldset');
32
+        $this->setName('customerNote');
33 33
         $this->add([
34 34
                 'type' => 'Textarea',
35 35
                 'name' => 'note',
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 
29 29
     public function init()
30 30
     {
31
-    	$this->setAttribute('id','customerNoteFieldset');
31
+    	$this->setAttribute('id', 'customerNoteFieldset');
32 32
     	$this->setName('customerNote');
33 33
         $this->add([
34 34
                 'type' => 'Textarea',
Please login to merge, or discard this patch.
module/Applications/config/module.config.php 2 patches
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -18,20 +18,20 @@  discard block
 block discarded – undo
18 18
 
19 19
 return [
20 20
     'doctrine' => [
21
-       'driver' => [
21
+        'driver' => [
22 22
             'odm_default' => [
23 23
                 'drivers' => [
24 24
                     'Applications\Entity' => 'annotation',
25 25
                 ],
26 26
             ],
27 27
             'annotation' => [
28
-               /*
28
+                /*
29 29
                 * All drivers (except DriverChain) require paths to work on. You
30 30
                 * may set this value as a string (for a single path) or an array
31 31
                 * for multiple paths.
32 32
                 * example https://github.com/doctrine/DoctrineORMModule
33 33
                 */
34
-               'paths' => [ __DIR__ . '/../src/Applications/Entity']
34
+                'paths' => [ __DIR__ . '/../src/Applications/Entity']
35 35
             ],
36 36
         ],
37 37
         'eventmanager' => [
@@ -71,17 +71,17 @@  discard block
 block discarded – undo
71 71
             'Applications/Options/ModuleOptions' => 'Applications\Options\ModuleOptions',
72 72
         ],
73 73
         'factories' => [
74
-           'Applications/Options' => 'Applications\Factory\ModuleOptionsFactory',
75
-           'ApplicationRepository' => 'Applications\Repository\Service\ApplicationRepositoryFactory',
76
-           'ApplicationMapper' => 'Applications\Repository\Service\ApplicationMapperFactory',
77
-           'EducationMapper'   => 'Applications\Repository\Service\EducationMapperFactory',
78
-           'Applications/Listener/ApplicationCreated' => 'Applications\Factory\Listener\EventApplicationCreatedFactory',
79
-           'Applications/Listener/ApplicationStatusChangePre' => 'Applications\Factory\Listener\StatusChangeFactory',
80
-           'Applications\Auth\Dependency\ListListener' => 'Applications\Factory\Auth\Dependency\ListListenerFactory',
74
+            'Applications/Options' => 'Applications\Factory\ModuleOptionsFactory',
75
+            'ApplicationRepository' => 'Applications\Repository\Service\ApplicationRepositoryFactory',
76
+            'ApplicationMapper' => 'Applications\Repository\Service\ApplicationMapperFactory',
77
+            'EducationMapper'   => 'Applications\Repository\Service\EducationMapperFactory',
78
+            'Applications/Listener/ApplicationCreated' => 'Applications\Factory\Listener\EventApplicationCreatedFactory',
79
+            'Applications/Listener/ApplicationStatusChangePre' => 'Applications\Factory\Listener\StatusChangeFactory',
80
+            'Applications\Auth\Dependency\ListListener' => 'Applications\Factory\Auth\Dependency\ListListenerFactory',
81 81
             Listener\JobSelectValues::class => Factory\Listener\JobSelectValuesFactory::class,
82 82
         ],
83 83
         'aliases' => [
84
-           'Applications/Listener/ApplicationStatusChangePost' => 'Applications/Listener/ApplicationStatusChangePre'
84
+            'Applications/Listener/ApplicationStatusChangePost' => 'Applications/Listener/ApplicationStatusChangePre'
85 85
         ]
86 86
     ],
87 87
 	
@@ -90,12 +90,12 @@  discard block
 block discarded – undo
90 90
             'Applications\Controller\Index' => 'Applications\Controller\IndexController',
91 91
             'Applications\Controller\MultiManage' => 'Applications\Controller\MultimanageController',
92 92
         ],
93
-	    'factories' => [
94
-		    'Applications/Controller/Manage' => [ManageController::class,'factory'],
95
-		    'Applications\Controller\Apply' => [ApplyController::class,'factory'],
96
-		    'Applications/CommentController' => [CommentController::class,'factory'],
97
-		    'Applications/Console' => [ConsoleController::class,'factory'],
98
-	    ]
93
+        'factories' => [
94
+            'Applications/Controller/Manage' => [ManageController::class,'factory'],
95
+            'Applications\Controller\Apply' => [ApplyController::class,'factory'],
96
+            'Applications/CommentController' => [CommentController::class,'factory'],
97
+            'Applications/Console' => [ConsoleController::class,'factory'],
98
+        ]
99 99
     ],
100 100
     
101 101
     'acl' => [
@@ -184,20 +184,20 @@  discard block
 block discarded – undo
184 184
     ],
185 185
     'form_elements' => [
186 186
         'invokables' => [
187
-             'Applications/Mail' => 'Applications\Form\Mail',
188
-             'Applications/BaseFieldset' => 'Applications\Form\BaseFieldset',
189
-             'Applications/SettingsFieldset' => 'Applications\Form\SettingsFieldset',
190
-             'Applications/CommentForm' => 'Applications\Form\CommentForm',
191
-             'Applications/CommentFieldset' => 'Applications\Form\CommentFieldset',
192
-             'Applications/Apply' => 'Applications\Form\Apply',
193
-             'Applications/Contact' => 'Applications\Form\ContactContainer',
194
-             'Applications/Base'  => 'Applications\Form\Base',
195
-             'Applications/Facts' => 'Applications\Form\Facts',
196
-             'Applications/FactsFieldset' => 'Applications\Form\FactsFieldset',
197
-             'Applications/Attributes' => 'Applications\Form\Attributes',
198
-             'href' => 'Applications\Form\Element\Ref',
187
+                'Applications/Mail' => 'Applications\Form\Mail',
188
+                'Applications/BaseFieldset' => 'Applications\Form\BaseFieldset',
189
+                'Applications/SettingsFieldset' => 'Applications\Form\SettingsFieldset',
190
+                'Applications/CommentForm' => 'Applications\Form\CommentForm',
191
+                'Applications/CommentFieldset' => 'Applications\Form\CommentFieldset',
192
+                'Applications/Apply' => 'Applications\Form\Apply',
193
+                'Applications/Contact' => 'Applications\Form\ContactContainer',
194
+                'Applications/Base'  => 'Applications\Form\Base',
195
+                'Applications/Facts' => 'Applications\Form\Facts',
196
+                'Applications/FactsFieldset' => 'Applications\Form\FactsFieldset',
197
+                'Applications/Attributes' => 'Applications\Form\Attributes',
198
+                'href' => 'Applications\Form\Element\Ref',
199 199
 
200
-         ],
200
+            ],
201 201
         'factories' => [
202 202
             'Applications/ContactImage' => 'Applications\Factory\Form\ContactImageFactory',
203 203
             'Applications/Attachments' => 'Applications\Factory\Form\AttachmentsFactory',
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
             'Applications\Form\Element\StatusSelect' => Factory\Form\StatusSelectFactory::class,
206 206
             Form\Element\JobSelect::class => Factory\Form\JobSelectFactory::class
207 207
         ],
208
-     ],
208
+        ],
209 209
 
210 210
     'form_elements_config' => [
211 211
         'Applications/Apply' => [
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
                 * for multiple paths.
32 32
                 * example https://github.com/doctrine/DoctrineORMModule
33 33
                 */
34
-               'paths' => [ __DIR__ . '/../src/Applications/Entity']
34
+               'paths' => [__DIR__.'/../src/Applications/Entity']
35 35
             ],
36 36
         ],
37 37
         'eventmanager' => [
@@ -91,10 +91,10 @@  discard block
 block discarded – undo
91 91
             'Applications\Controller\MultiManage' => 'Applications\Controller\MultimanageController',
92 92
         ],
93 93
 	    'factories' => [
94
-		    'Applications/Controller/Manage' => [ManageController::class,'factory'],
95
-		    'Applications\Controller\Apply' => [ApplyController::class,'factory'],
96
-		    'Applications/CommentController' => [CommentController::class,'factory'],
97
-		    'Applications/Console' => [ConsoleController::class,'factory'],
94
+		    'Applications/Controller/Manage' => [ManageController::class, 'factory'],
95
+		    'Applications\Controller\Apply' => [ApplyController::class, 'factory'],
96
+		    'Applications/CommentController' => [CommentController::class, 'factory'],
97
+		    'Applications/Console' => [ConsoleController::class, 'factory'],
98 98
 	    ]
99 99
     ],
100 100
     
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
         'translation_file_patterns' => [
154 154
             [
155 155
                 'type' => 'gettext',
156
-                'base_dir' => __DIR__ . '/../language',
156
+                'base_dir' => __DIR__.'/../language',
157 157
                 'pattern' => '%s.mo',
158 158
             ],
159 159
         ],
@@ -161,16 +161,16 @@  discard block
 block discarded – undo
161 161
     // Configure the view service manager
162 162
     'view_manager' => [
163 163
         'template_path_stack' => [
164
-            'Applications' => __DIR__ . '/../view',
164
+            'Applications' => __DIR__.'/../view',
165 165
         ],
166 166
         'template_map' => [
167
-            'applications/error/not-found' => __DIR__ . '/../view/error/not-found.phtml',
168
-            'layout/apply' => __DIR__ . '/../view/layout/layout.phtml',
169
-            'applications/sidebar/manage' => __DIR__ . '/../view/sidebar/manage.phtml',
170
-            'applications/mail/forward' => __DIR__ . '/../view/mail/forward.phtml',
171
-            'applications/detail/pdf' => __DIR__ . '/../view/applications/manage/detail.pdf.phtml',
172
-            'applications/index/disclaimer' => __DIR__ . '/../view/applications/index/disclaimer.phtml',
173
-            'content/applications-privacy-policy' => __DIR__ . '/../view/applications/index/disclaimer.phtml',
167
+            'applications/error/not-found' => __DIR__.'/../view/error/not-found.phtml',
168
+            'layout/apply' => __DIR__.'/../view/layout/layout.phtml',
169
+            'applications/sidebar/manage' => __DIR__.'/../view/sidebar/manage.phtml',
170
+            'applications/mail/forward' => __DIR__.'/../view/mail/forward.phtml',
171
+            'applications/detail/pdf' => __DIR__.'/../view/applications/manage/detail.pdf.phtml',
172
+            'applications/index/disclaimer' => __DIR__.'/../view/applications/index/disclaimer.phtml',
173
+            'content/applications-privacy-policy' => __DIR__.'/../view/applications/index/disclaimer.phtml',
174 174
         ]
175 175
     ],
176 176
     'view_helpers' => [
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
         'factories' => [
241 241
             'Applications/NewApplication' => 'Applications\Factory\Mail\NewApplicationFactory',
242 242
             Mail\Confirmation::class      => Factory\Mail\ConfirmationFactory::class,
243
-            'Applications/Forward'        => [Forward::class,'factory'],
243
+            'Applications/Forward'        => [Forward::class, 'factory'],
244 244
         ],
245 245
         'aliases' => [
246 246
             'Applications/Confirmation'   => Mail\Confirmation::class,
Please login to merge, or discard this patch.
Applications/src/Applications/Repository/Filter/PaginationQueryFactory.php 2 patches
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -26,24 +26,24 @@
 block discarded – undo
26 26
  */
27 27
 class PaginationQueryFactory implements FactoryInterface
28 28
 {
29
-	public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
30
-	{
31
-		$auth  = $container->get('AuthenticationService');
32
-		$filter = new PaginationQuery($auth);
33
-		return $filter;
34
-	}
29
+    public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
30
+    {
31
+        $auth  = $container->get('AuthenticationService');
32
+        $filter = new PaginationQuery($auth);
33
+        return $filter;
34
+    }
35 35
 	
36
-	/**
37
-	 * Creates pagination Service
38
-	 *
39
-	 * @see \Zend\ServiceManager\FactoryInterface::createService()
40
-	 *
41
-	 * @param ContainerInterface $container
42
-	 * @return PaginationQuery|mixed
43
-	 * @internal param ServiceLocatorInterface $serviceLocator
44
-	 */
36
+    /**
37
+     * Creates pagination Service
38
+     *
39
+     * @see \Zend\ServiceManager\FactoryInterface::createService()
40
+     *
41
+     * @param ContainerInterface $container
42
+     * @return PaginationQuery|mixed
43
+     * @internal param ServiceLocatorInterface $serviceLocator
44
+     */
45 45
     public function createService(ContainerInterface $container)
46 46
     {
47
-		return $this($container,PaginationQuery::class);
47
+        return $this($container,PaginationQuery::class);
48 48
     }
49 49
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,9 +26,9 @@  discard block
 block discarded – undo
26 26
  */
27 27
 class PaginationQueryFactory implements FactoryInterface
28 28
 {
29
-	public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
29
+	public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
30 30
 	{
31
-		$auth  = $container->get('AuthenticationService');
31
+		$auth = $container->get('AuthenticationService');
32 32
 		$filter = new PaginationQuery($auth);
33 33
 		return $filter;
34 34
 	}
@@ -44,6 +44,6 @@  discard block
 block discarded – undo
44 44
 	 */
45 45
     public function createService(ContainerInterface $container)
46 46
     {
47
-		return $this($container,PaginationQuery::class);
47
+		return $this($container, PaginationQuery::class);
48 48
     }
49 49
 }
Please login to merge, or discard this patch.
module/Applications/src/Applications/Listener/StatusChange.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      * @param ApplicationEvent $e
70 70
      */
71 71
     public function prepareFormData(ApplicationEvent $e){
72
-    	$target = $e->getTarget();
72
+        $target = $e->getTarget();
73 73
         if ($target->isPostRequest()) {
74 74
             return;
75 75
         }
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      * @param ApplicationEvent $event
124 124
      */
125 125
     public function sendMail(ApplicationEvent $event){
126
-    	$event = $event->getTarget();
126
+        $event = $event->getTarget();
127 127
         if (!$event->isPostRequest()) {
128 128
             return;
129 129
         }
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      *
69 69
      * @param ApplicationEvent $e
70 70
      */
71
-    public function prepareFormData(ApplicationEvent $e){
71
+    public function prepareFormData(ApplicationEvent $e) {
72 72
     	$target = $e->getTarget();
73 73
         if ($target->isPostRequest()) {
74 74
             return;
@@ -96,13 +96,13 @@  discard block
 block discarded – undo
96 96
                 $key = 'mailRejectionText';
97 97
                 break;
98 98
             default:
99
-                throw new \InvalidArgumentException('Unknown status value: ' .$status);
99
+                throw new \InvalidArgumentException('Unknown status value: '.$status);
100 100
         }
101
-        $mailText      = $settings->$key ? $settings->$key : '';
101
+        $mailText = $settings->$key ? $settings->$key : '';
102 102
         $mail->setBody($mailText);
103 103
         $mail->setApplication($this->application);
104 104
         $mailText = $mail->getBodyText();
105
-        $mailSubject   = sprintf(
105
+        $mailSubject = sprintf(
106 106
             $this->translator->translate('Your application dated %s'),
107 107
             strftime('%x', $this->application->getDateCreated()->getTimestamp())
108 108
         );
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
      *
123 123
      * @param ApplicationEvent $event
124 124
      */
125
-    public function sendMail(ApplicationEvent $event){
125
+    public function sendMail(ApplicationEvent $event) {
126 126
     	$event = $event->getTarget();
127 127
         if (!$event->isPostRequest()) {
128 128
             return;
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
         $this->mailService->send($mail);
170 170
 
171 171
 
172
-        $historyText = sprintf($this->translator->translate('Mail was sent to %s'), key($recipient) ?: $recipient[0] );
172
+        $historyText = sprintf($this->translator->translate('Mail was sent to %s'), key($recipient) ?: $recipient[0]);
173 173
         $this->application->changeStatus($status, $historyText);
174 174
         $event->setNotification($historyText);
175 175
     }
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
      *
181 181
      * @return AddressList
182 182
      */
183
-    protected function getRecipient( Application $application, $status) {
183
+    protected function getRecipient(Application $application, $status) {
184 184
 
185 185
         $recipient = Status::ACCEPTED == $status
186 186
             ? $application->getJob()->getUser()->getInfo()
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
         $email = $recipient->getEmail();
190 190
         $name  = $recipient->getDisplayName(false);
191 191
 
192
-        return $name ? [ $email => $name ] : [ $email ];
192
+        return $name ? [$email => $name] : [$email];
193 193
     }
194 194
 
195 195
 }
196 196
\ No newline at end of file
Please login to merge, or discard this patch.
module/Applications/src/Applications/Factory/Mail/NewApplicationFactory.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
         $options = $options ?: $this->options;
44 44
         $router = $container->get('Router');
45 45
         $options['router'] = $router;
46
-		$this->setCreationOptions($options);
46
+        $this->setCreationOptions($options);
47 47
         $mail   = new NewApplication($options);
48 48
 
49 49
         return $mail;
Please login to merge, or discard this patch.
module/Applications/src/Applications/Factory/Mail/ConfirmationFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
         $auth = $container->get('AuthenticationService');
31 31
         $user = $auth->getUser();
32 32
         $options['user'] = $user;
33
-        $mail   = new Confirmation($options);
33
+        $mail = new Confirmation($options);
34 34
 
35 35
         return $mail;
36 36
     }
Please login to merge, or discard this patch.
module/Applications/src/Applications/Controller/ConsoleController.php 2 patches
Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -33,48 +33,48 @@  discard block
 block discarded – undo
33 33
  */
34 34
 class ConsoleController extends AbstractActionController
35 35
 {
36
-	/**
37
-	 * @var RepositoryService
38
-	 */
39
-	private $repositories;
36
+    /**
37
+     * @var RepositoryService
38
+     */
39
+    private $repositories;
40 40
 	
41
-	/**
42
-	 * @var FilterPluginManager
43
-	 */
44
-	private $filterManager;
41
+    /**
42
+     * @var FilterPluginManager
43
+     */
44
+    private $filterManager;
45 45
 	
46
-	/**
47
-	 * @var array
48
-	 */
49
-	private $config;
46
+    /**
47
+     * @var array
48
+     */
49
+    private $config;
50 50
 	
51
-	/**
52
-	 * @var DocumentManager
53
-	 */
54
-	private $documentManager;
51
+    /**
52
+     * @var DocumentManager
53
+     */
54
+    private $documentManager;
55 55
 	
56
-	public function __construct(
57
-		RepositoryService $repositories,
58
-		FilterPluginManager $filterManager,
59
-		DocumentManager $documentManager,
60
-		$config
61
-	)
62
-	{
63
-		$this->repositories = $repositories;
64
-		$this->filterManager = $filterManager;
65
-		$this->documentManager = $documentManager;
66
-		$this->config = $config;
67
-	}
56
+    public function __construct(
57
+        RepositoryService $repositories,
58
+        FilterPluginManager $filterManager,
59
+        DocumentManager $documentManager,
60
+        $config
61
+    )
62
+    {
63
+        $this->repositories = $repositories;
64
+        $this->filterManager = $filterManager;
65
+        $this->documentManager = $documentManager;
66
+        $this->config = $config;
67
+    }
68 68
 	
69
-	static public function factory(ContainerInterface $container)
70
-	{
71
-		return new self(
72
-			$container->get('repositories'),
73
-			$container->get('FilterManager'),
74
-			$container->get('Core/DocumentManager'),
75
-			$container->get('Config')
76
-		);
77
-	}
69
+    static public function factory(ContainerInterface $container)
70
+    {
71
+        return new self(
72
+            $container->get('repositories'),
73
+            $container->get('FilterManager'),
74
+            $container->get('Core/DocumentManager'),
75
+            $container->get('Config')
76
+        );
77
+    }
78 78
 
79 79
     /**
80 80
      * regenerate keywords for applications
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 
195 195
         $table = new Table(
196 196
             array('columnWidths' => array(40, 40, 40),
197
-                                 'decorator' => 'ascii')
197
+                                    'decorator' => 'ascii')
198 198
         );
199 199
 
200 200
         $table->appendRow(array('Module', 'Name', 'Description'));
@@ -275,8 +275,8 @@  discard block
 block discarded – undo
275 275
             $attachments = $app->getAttachments();
276 276
             foreach ($attachments as $attachment) {
277 277
                 $attachment->getPermissions()
278
-                           ->clear()
279
-                           ->inherit($permissions);
278
+                            ->clear()
279
+                            ->inherit($permissions);
280 280
             }
281 281
             $contact = $app->getContact();
282 282
             if ($contact) {
@@ -284,8 +284,8 @@  discard block
 block discarded – undo
284 284
 
285 285
                 if ($image) {
286 286
                     $image->getPermissions()
287
-                          ->clear()
288
-                          ->inherit($permissions);
287
+                            ->clear()
288
+                            ->inherit($permissions);
289 289
                 }
290 290
             }
291 291
         }
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
                 
99 99
         echo "Generate keywords for $count applications ...\n";
100 100
         
101
-        $progress     = new ProgressBar($count);
101
+        $progress = new ProgressBar($count);
102 102
 
103 103
         /** @var \Core\Repository\Filter\PropertyToKeywords $filter */
104 104
         $filter = $this->filterManager->get('Core/Repository/PropertyToKeywords');
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
         /** @var \Applications\Entity\Application $application */
108 108
         foreach ($applications as $application) {
109
-            $progress->update($i++, 'Application ' . $i . ' / ' . $count);
109
+            $progress->update($i++, 'Application '.$i.' / '.$count);
110 110
             $keywords = $filter->filter($application);
111 111
             
112 112
             $application->setKeywords($keywords);
@@ -132,13 +132,13 @@  discard block
 block discarded – undo
132 132
     {
133 133
         $applications = $this->fetchApplications();
134 134
         $count = count($applications);
135
-        $i=0;
136
-        echo "Calculate rating for " . $count . " applications ...\n";
135
+        $i = 0;
136
+        echo "Calculate rating for ".$count." applications ...\n";
137 137
         
138 138
         $progress = new ProgressBar($count);
139 139
         /** @var  \Applications\Entity\Application $application */
140 140
         foreach ($applications as $application) {
141
-            $progress->update($i++, 'Application ' . $i . ' / ' . $count);
141
+            $progress->update($i++, 'Application '.$i.' / '.$count);
142 142
             $application->getRating(/* recalculate */ true);
143 143
         }
144 144
         $progress->update($i, 'Write to database...');
@@ -165,17 +165,17 @@  discard block
 block discarded – undo
165 165
         $documentManager = $this->documentManager;
166 166
 
167 167
         $count = count($applications);
168
-        $i=0;
168
+        $i = 0;
169 169
 
170
-        echo  $count . " applications in Draft Mode and older than " . $days . " days will be deleted\n";
170
+        echo  $count." applications in Draft Mode and older than ".$days." days will be deleted\n";
171 171
 
172 172
         $progress = new ProgressBar($count);
173 173
 
174 174
         foreach ($applications as $application) {
175
-            $progress->update($i++, 'Application ' . $i . ' / ' . $count);
175
+            $progress->update($i++, 'Application '.$i.' / '.$count);
176 176
             try {
177 177
                 $documentManager->remove($application);
178
-            } catch (\Exception $e){
178
+            } catch (\Exception $e) {
179 179
                 // log something
180 180
                 $e->getCode();
181 181
             }
@@ -199,17 +199,17 @@  discard block
 block discarded – undo
199 199
 
200 200
         $table->appendRow(array('Module', 'Name', 'Description'));
201 201
 
202
-        $offset=strlen(getcwd())+1;
203
-        $links="";
204
-        $github='https://github.com/cross-solution/YAWIK/blob/master/';
202
+        $offset = strlen(getcwd()) + 1;
203
+        $links = "";
204
+        $github = 'https://github.com/cross-solution/YAWIK/blob/master/';
205 205
 
206 206
         foreach ($config['view_manager']['template_map'] as $key => $absolute_filename) {
207 207
             // strip the application_root plus an additional slash
208
-            $filename=substr(realpath($absolute_filename), $offset);
208
+            $filename = substr(realpath($absolute_filename), $offset);
209 209
             if (preg_match('~module/([^/]+)~', $filename, $match)) {
210
-                $module=$match[1];
210
+                $module = $match[1];
211 211
             } else {
212
-                $module="not found ($key)";
212
+                $module = "not found ($key)";
213 213
             }
214 214
 
215 215
             $viewModel = new ViewModel();
@@ -218,17 +218,17 @@  discard block
 block discarded – undo
218 218
             $row = new Row();
219 219
             $row->appendColumn(new Column($module));
220 220
             if ($filename) {
221
-                $row->appendColumn(new Column('`' . $key . '`_'));
222
-                $links.='.. _'. $key .': '. $github.$filename .PHP_EOL;
221
+                $row->appendColumn(new Column('`'.$key.'`_'));
222
+                $links .= '.. _'.$key.': '.$github.$filename.PHP_EOL;
223 223
             } else {
224 224
                 $row->appendColumn(new Column("WRONG CONFIGURATION"));
225 225
             }
226
-            $comment="";
226
+            $comment = "";
227 227
             if (file_exists($absolute_filename)) {
228
-                $src=file_get_contents($absolute_filename);
229
-                $comment="file exists";
228
+                $src = file_get_contents($absolute_filename);
229
+                $comment = "file exists";
230 230
                 if (preg_match("/{{rtd:\s*(.*)}}/", $src, $match)) {
231
-                    $comment=$match['1'];
231
+                    $comment = $match['1'];
232 232
                 }
233 233
             }
234 234
             $row->appendColumn(new Column($comment));
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
     {
246 246
         echo "Loading applications... ";
247 247
 
248
-        $filter       = \Zend\Json\Json::decode($this->params('filter', '{}'), \Zend\Json\Json::TYPE_ARRAY);
248
+        $filter = \Zend\Json\Json::decode($this->params('filter', '{}'), \Zend\Json\Json::TYPE_ARRAY);
249 249
         $filter['$or'] = array(
250 250
             array('attachments' => array('$exists' => 1)),
251 251
             array('contact.image' => array('$exists' => 1)),
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
             return;
260 260
         }
261 261
         $progress = new ProgressBar($count);
262
-        $i=0;
262
+        $i = 0;
263 263
 
264 264
         foreach ($applications as $app) {
265 265
             $progress->update($i++, "Process $i / $count");
Please login to merge, or discard this patch.