Completed
Pull Request — develop (#459)
by ANTHONIUS
06:44
created
module/Core/src/Core/Controller/Plugin/ContentCollector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
                       $response = new ViewModel(array('target' => $target));
87 87
                       $response->setTemplate($template);
88 88
             }
89
-            $viewModel->addChild($response, $this->_captureTo . $i);
89
+            $viewModel->addChild($response, $this->_captureTo.$i);
90 90
         }
91 91
                 
92 92
         return $viewModel;
Please login to merge, or discard this patch.
module/Core/src/Core/Controller/Plugin/Mail.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -153,18 +153,18 @@  discard block
 block discarded – undo
153 153
         $replyTo = $this->stringFromMailHeader($this->getReplyTo());
154 154
         
155 155
         return str_pad($template, 30)
156
-                . 'to: ' . str_pad($to, 50)
157
-                . 'cc: ' . str_pad($cc, 50)
158
-                . 'bcc: ' . str_pad($bcc, 50)
159
-                . 'from: ' . str_pad($from, 50)
160
-                . 'replyTo: ' . str_pad($replyTo, 50)
156
+                . 'to: '.str_pad($to, 50)
157
+                . 'cc: '.str_pad($cc, 50)
158
+                . 'bcc: '.str_pad($bcc, 50)
159
+                . 'from: '.str_pad($from, 50)
160
+                . 'replyTo: '.str_pad($replyTo, 50)
161 161
                 //. str_pad(implode(',', ArrayUtils::iteratorToArray($this->getSender())),50)
162
-                . 'subject: ' . str_pad($this->getSubject(), 50);
162
+                . 'subject: '.str_pad($this->getSubject(), 50);
163 163
     }
164 164
     
165 165
     public function template($template)
166 166
     {
167
-        $controller =  get_class($this->controller);
167
+        $controller = get_class($this->controller);
168 168
         
169 169
         $event = new Event();
170 170
         $eventManager = $this->eventManager;
@@ -181,11 +181,11 @@  discard block
 block discarded – undo
181 181
         $controllerIdentifier = strtolower(substr($controller, 0, strpos($controller, '\\')));
182 182
         $viewResolver = $this->viewResolver;
183 183
                 
184
-        $templateHalf = 'mail/' . $template;
184
+        $templateHalf = 'mail/'.$template;
185 185
         $resource = $viewResolver->resolve($templateHalf);
186 186
         
187 187
         if (empty($resource)) {
188
-            $templateFull = $controllerIdentifier . '/mail/' . $template;
188
+            $templateFull = $controllerIdentifier.'/mail/'.$template;
189 189
             $resource = $viewResolver->resolve($templateFull);
190 190
         }
191 191
         
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
                     unset($__vars[$key]);
213 213
                 }
214 214
             }
215
-            unset($__vars['content'],$__vars['controllerIdentifier'],$__vars['controller'],$__vars['resource'],$__vars['template'],$__vars['viewResolver']);
215
+            unset($__vars['content'], $__vars['controllerIdentifier'], $__vars['controller'], $__vars['resource'], $__vars['template'], $__vars['viewResolver']);
216 216
             $this->config = $__vars;
217 217
         }
218 218
     }
@@ -237,20 +237,20 @@  discard block
 block discarded – undo
237 237
         if (isset($this->config['from'])) {
238 238
             $from = $this->config['from'];
239 239
         } else {
240
-            $log->err('A from email address must be provided (Variable $from) in Template: ' . $template);
241
-            throw new \InvalidArgumentException('A from email address must be provided (Variable $from) in Template: ' . $template);
240
+            $log->err('A from email address must be provided (Variable $from) in Template: '.$template);
241
+            throw new \InvalidArgumentException('A from email address must be provided (Variable $from) in Template: '.$template);
242 242
         }
243 243
         if (isset($this->config['fromName'])) {
244 244
             $fromName = $this->config['fromName'];
245 245
         } else {
246
-            $log->err('A from name must be provided (Variable $fromName) in Template: ' . $template);
247
-            throw new \InvalidArgumentException('A from name must be provided (Variable $fromName) in Template: ' . $template);
246
+            $log->err('A from name must be provided (Variable $fromName) in Template: '.$template);
247
+            throw new \InvalidArgumentException('A from name must be provided (Variable $fromName) in Template: '.$template);
248 248
         }
249 249
         if (isset($this->config['subject'])) {
250 250
             $subject = $this->config['subject'];
251 251
         } else {
252
-            $log->err('A subject must be provided (Variable $subject) in Template: ' . $template);
253
-            throw new \InvalidArgumentException('A subject must be provided (Variable $subject) in Template: ' . $template);
252
+            $log->err('A subject must be provided (Variable $subject) in Template: '.$template);
253
+            throw new \InvalidArgumentException('A subject must be provided (Variable $subject) in Template: '.$template);
254 254
         }
255 255
         $this->setFrom($from, $fromName);
256 256
         $this->setSubject($subject);
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
             $erg = true;
272 272
             $log->info($this);
273 273
         } catch (\Exception $e) {
274
-            $log->err('Mail failure ' . $e->getMessage());
274
+            $log->err('Mail failure '.$e->getMessage());
275 275
         }
276 276
         return $erg;
277 277
     }
@@ -288,6 +288,6 @@  discard block
 block discarded – undo
288 288
         $viewResolver   = $container->get('ViewResolver');
289 289
         $eventManager   = $container->get('EventManager');
290 290
         $moduleManager  = $container->get('ModuleManager');
291
-        return new static($mailLog,$viewResolver,$eventManager,$moduleManager);
291
+        return new static($mailLog, $viewResolver, $eventManager, $moduleManager);
292 292
     }
293 293
 }
Please login to merge, or discard this patch.
module/Core/src/Core/Controller/Plugin/ConfigFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
  */
14 14
 class ConfigFactory implements FactoryInterface
15 15
 {
16
-	public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
16
+	public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
17 17
 	{
18 18
 		$config = $container->get('Config');
19 19
 		$plugin = new Config($config);
Please login to merge, or discard this patch.
module/Core/Module.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     public function getConsoleBanner(Console $console)
42 42
     {
43 43
         $version = `git describe 2>/dev/null`;
44
-        $name = 'YAWIK ' . trim($version);
44
+        $name = 'YAWIK '.trim($version);
45 45
         $width = $console->getWidth();
46 46
         return sprintf(
47 47
             "==%1\$s==\n%2\$s%3\$s\n**%1\$s**\n",
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
             /* @var \Core\Options\ModuleOptions $options */
86 86
             $languageRouteListener = new LanguageRouteListener(
87
-                $sm->get('Core/Locale'),$sm->get('Core/Options')
87
+                $sm->get('Core/Locale'), $sm->get('Core/Options')
88 88
             );
89 89
             $languageRouteListener->attach($eventManager);
90 90
         
@@ -113,8 +113,8 @@  discard block
 block discarded – undo
113 113
 
114 114
         $eventManager->attach(
115 115
             MvcEvent::EVENT_DISPATCH_ERROR,
116
-            function ($event) {
117
-            	if($event instanceof MvcEvent){
116
+            function($event) {
117
+            	if ($event instanceof MvcEvent) {
118 118
 		            $application = $event->getApplication();
119 119
 		            
120 120
 		            if ($application::ERROR_EXCEPTION == $event->getError()) {
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         );
130 130
         $eventManager->attach(
131 131
             MvcEvent::EVENT_DISPATCH,
132
-            function ($event) use ($eventManager) {
132
+            function($event) use ($eventManager) {
133 133
                 $eventManager->trigger('postDispatch', $event);
134 134
             },
135 135
             -150
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
      */
145 145
     public function getConfig()
146 146
     {
147
-        $config = include __DIR__ . '/config/module.config.php';
147
+        $config = include __DIR__.'/config/module.config.php';
148 148
         return $config;
149 149
     }
150 150
 
@@ -157,13 +157,13 @@  discard block
 block discarded – undo
157 157
     {
158 158
         return array(
159 159
             'Zend\Loader\ClassMapAutoloader' => [
160
-                __DIR__ . '/src/autoload_classmap.php'
160
+                __DIR__.'/src/autoload_classmap.php'
161 161
             ],
162 162
             'Zend\Loader\StandardAutoloader' => array(
163 163
                 'namespaces' => array(
164
-                    __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
165
-                    'CoreTest' => __DIR__ . '/test/' . 'CoreTest',
166
-                    'CoreTestUtils' => __DIR__ . '/test/CoreTestUtils',
164
+                    __NAMESPACE__ => __DIR__.'/src/'.__NAMESPACE__,
165
+                    'CoreTest' => __DIR__.'/test/'.'CoreTest',
166
+                    'CoreTestUtils' => __DIR__.'/test/CoreTestUtils',
167 167
                 ),
168 168
             ),
169 169
         );
Please login to merge, or discard this patch.
module/Core/src/Core/Listener/LanguageRouteListener.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -124,10 +124,10 @@  discard block
 block discarded – undo
124 124
         }
125 125
         
126 126
         $router = $e->getRouter();
127
-        $basePath=$router->getBaseUrl();
127
+        $basePath = $router->getBaseUrl();
128 128
         $match = [];
129 129
         
130
-        if (preg_match('~^' . $basePath . '/([a-z]{2})(?:/|$)~', $e->getRequest()->getRequestUri(), $match)) {
130
+        if (preg_match('~^'.$basePath.'/([a-z]{2})(?:/|$)~', $e->getRequest()->getRequestUri(), $match)) {
131 131
             /* It seems we have already a language in the URI
132 132
              * Now there are two possibilities:
133 133
              *
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 
162 162
         $options = $this->moduleOptions;
163 163
         // using default language if detect language is disabled
164
-        $lang = $options->isDetectLanguage() ? $this->detectLanguage($e):$options->getDefaultLanguage();
164
+        $lang = $options->isDetectLanguage() ? $this->detectLanguage($e) : $options->getDefaultLanguage();
165 165
         $langUri = rtrim("$basePath/$lang$origUri", '/');
166 166
         if ($router->match($request->setUri($langUri)) instanceof RouteMatch) {
167 167
             $e->stopPropagation(true);
@@ -212,8 +212,8 @@  discard block
 block discarded – undo
212 212
         setlocale(
213 213
             LC_ALL,
214 214
             array(
215
-            $locale . ".utf8",
216
-            $locale . ".iso88591",
215
+            $locale.".utf8",
216
+            $locale.".iso88591",
217 217
             $locale,
218 218
             substr($locale, 0, 2),
219 219
             'de_DE.utf8',
Please login to merge, or discard this patch.
module/Core/config/module.config.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 use Zend\I18n\Translator\Resources;
17 17
 use Zend\ServiceManager\Factory\InvokableFactory;
18 18
 
19
-$doctrineConfig = include __DIR__ . '/doctrine.config.php';
19
+$doctrineConfig = include __DIR__.'/doctrine.config.php';
20 20
 
21 21
 
22 22
 return array(
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     'doctrine' => $doctrineConfig,
25 25
 
26 26
     'options' => [
27
-        'Core/MailServiceOptions' => [ 'class' => '\Core\Options\MailServiceOptions' ],
27
+        'Core/MailServiceOptions' => ['class' => '\Core\Options\MailServiceOptions'],
28 28
         ],
29 29
     
30 30
     'Core' => array(
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
                      'name' => 'stream',
45 45
                     'priority' => 1000,
46 46
                     'options' => array(
47
-                         'stream' => __DIR__ .'/../../../log/yawik.log',
47
+                         'stream' => __DIR__.'/../../../log/yawik.log',
48 48
                     ),
49 49
                  ),
50 50
             ),
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
                      'name' => 'stream',
56 56
                     'priority' => 1000,
57 57
                     'options' => array(
58
-                         'stream' => __DIR__ .'/../../../log/mails.log',
58
+                         'stream' => __DIR__.'/../../../log/mails.log',
59 59
                     ),
60 60
                  ),
61 61
             ),
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         'mode' => true, // true = production|false = development|null = autodetect|IP address(es) csv/array
73 73
         'bar' => false, // bool = enabled|Toggle nette diagnostics bar.
74 74
         'strict' => true, // bool = cause immediate death|int = matched against error severity
75
-        'log' => __DIR__ . '/../../../log/tracy', // path to log directory (this directory keeps error.log, snoozing mailsent file & html exception trace files)
75
+        'log' => __DIR__.'/../../../log/tracy', // path to log directory (this directory keeps error.log, snoozing mailsent file & html exception trace files)
76 76
         'email' => null, // in production mode notifies the recipient
77 77
         'email_snooze' => 900 // interval for sending email in seconds
78 78
     ],
@@ -199,16 +199,16 @@  discard block
 block discarded – undo
199 199
             'Core/JsonEntityHydrator' => 'Core\Entity\Hydrator\JsonEntityHydratorFactory',
200 200
             'Core/EntityHydrator' => 'Core\Entity\Hydrator\EntityHydratorFactory',
201 201
             'Core/Options' => 'Core\Factory\ModuleOptionsFactory',
202
-            'Core/DoctrineMongoODM/RepositoryEvents' => [\Core\Repository\DoctrineMongoODM\Event\RepositoryEventsSubscriber::class,'factory'],
203
-            'DefaultListeners' => ['Core\Listener\DefaultListener','factory'],
204
-            'templateProviderStrategy'   => ['Core\Form\Hydrator\Strategy\TemplateProviderStrategy','factory'],
205
-            'Core/Listener/DeferredListenerAggregate' => [\Core\Listener\DeferredListenerAggregate::class,'factory'],
202
+            'Core/DoctrineMongoODM/RepositoryEvents' => [\Core\Repository\DoctrineMongoODM\Event\RepositoryEventsSubscriber::class, 'factory'],
203
+            'DefaultListeners' => ['Core\Listener\DefaultListener', 'factory'],
204
+            'templateProviderStrategy'   => ['Core\Form\Hydrator\Strategy\TemplateProviderStrategy', 'factory'],
205
+            'Core/Listener/DeferredListenerAggregate' => [\Core\Listener\DeferredListenerAggregate::class, 'factory'],
206 206
             'Core/Listener/CreatePaginator' => 'Core\Listener\CreatePaginatorListener::factory',
207 207
             'Core/Locale' => 'Core\I18n\LocaleFactory',
208 208
             \Core\Listener\AjaxRouteListener::class => \Core\Factory\Listener\AjaxRouteListenerFactory::class,
209 209
             \Core\Listener\DeleteImageSetListener::class => \Core\Factory\Listener\DeleteImageSetListenerFactory::class,
210 210
             'Imagine' => \Core\Factory\Service\ImagineFactory::class,
211
-            'Core/Listener/Notification' => [\Core\Listener\NotificationListener::class,'factory'],
211
+            'Core/Listener/Notification' => [\Core\Listener\NotificationListener::class, 'factory'],
212 212
         ),
213 213
         'abstract_factories' => array(
214 214
             'Core\Factory\OptionsAbstractFactory',
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
         'translation_file_patterns' => array(
232 232
             [
233 233
                 'type' => 'gettext',
234
-                'base_dir' => __DIR__ . '/../language',
234
+                'base_dir' => __DIR__.'/../language',
235 235
                 'pattern' => '%s.mo',
236 236
             ],
237 237
             [
@@ -269,9 +269,9 @@  discard block
 block discarded – undo
269 269
         ),
270 270
 	    'factories' => [
271 271
 	    	// @TODO: improve this factory
272
-		    'Core\Controller\Index' => [\Core\Controller\IndexController::class,'factory'],
273
-		    'Core/Admin' => [\Core\Controller\AdminController::class,'factory'],
274
-		    'Core\Controller\File'  => [\Core\Controller\FileController::class,'factory'],
272
+		    'Core\Controller\Index' => [\Core\Controller\IndexController::class, 'factory'],
273
+		    'Core/Admin' => [\Core\Controller\AdminController::class, 'factory'],
274
+		    'Core\Controller\File'  => [\Core\Controller\FileController::class, 'factory'],
275 275
 	    ],
276 276
         'abstract_factories' => [
277 277
 	        \Core\Factory\Controller\LazyControllerFactory::class
@@ -286,9 +286,9 @@  discard block
 block discarded – undo
286 286
             'Core/SearchForm' => 'Core\Factory\Controller\Plugin\SearchFormFactory',
287 287
             'listquery' => 'Core\Controller\Plugin\ListQuery::factory',
288 288
             'mail' => 'Core\Controller\Plugin\Mail::factory',
289
-            'Core/Mailer' => ['Core\Controller\Plugin\Mailer','factory'],
290
-            'Core/CreatePaginator' => [\Core\Controller\Plugin\CreatePaginator::class,'factory'],
291
-            'Core/PaginatorService' => [\Core\Controller\Plugin\CreatePaginatorService::class,'factory'],
289
+            'Core/Mailer' => ['Core\Controller\Plugin\Mailer', 'factory'],
290
+            'Core/CreatePaginator' => [\Core\Controller\Plugin\CreatePaginator::class, 'factory'],
291
+            'Core/PaginatorService' => [\Core\Controller\Plugin\CreatePaginatorService::class, 'factory'],
292 292
         ),
293 293
         'invokables' => array(
294 294
             'Core/FileSender' => 'Core\Controller\Plugin\FileSender',
@@ -318,32 +318,32 @@  discard block
 block discarded – undo
318 318
         'exception_template' => 'error/index',
319 319
         // Map template to files. Speeds up the lookup through the template stack.
320 320
         'template_map' => array(
321
-            'noscript-notice' => __DIR__ . '/../view/layout/_noscript-notice.phtml',
322
-            'layout/layout' => __DIR__ . '/../view/layout/layout.phtml',
323
-            'error/404' => __DIR__ . '/../view/error/404.phtml',
324
-            'error/403' => __DIR__ . '/../view/error/403.phtml',
325
-            'error/index' => __DIR__ . '/../view/error/index.phtml',
326
-            'main-navigation' => __DIR__ . '/../view/partial/main-navigation.phtml',
327
-            'pagination-control' => __DIR__ . '/../view/partial/pagination-control.phtml',
328
-            'core/loading-popup' => __DIR__ . '/../view/partial/loading-popup.phtml',
329
-            'core/notifications' => __DIR__ . '/../view/partial/notifications.phtml',
330
-            'form/core/buttons' => __DIR__ . '/../view/form/buttons.phtml',
331
-            'core/social-buttons' => __DIR__ . '/../view/partial/social-buttons.phtml',
332
-            'form/core/privacy' => __DIR__ . '/../view/form/privacy.phtml',
333
-            'core/form/permissions-fieldset' => __DIR__ . '/../view/form/permissions-fieldset.phtml',
334
-            'core/form/permissions-collection' => __DIR__ . '/../view/form/permissions-collection.phtml',
335
-            'core/form/container-view' => __DIR__ . '/../view/form/container.view.phtml',
336
-            'core/form/tree-manage.view' => __DIR__ . '/../view/form/tree-manage.view.phtml',
337
-            'core/form/tree-manage.form' => __DIR__ . '/../view/form/tree-manage.form.phtml',
338
-            'core/form/tree-add-item' => __DIR__ . '/../view/form/tree-add-item.phtml',
339
-            'mail/header' =>  __DIR__ . '/../view/mail/header.phtml',
340
-            'mail/footer' =>  __DIR__ . '/../view/mail/footer.phtml',
341
-            'mail/footer.en' =>  __DIR__ . '/../view/mail/footer.en.phtml',
321
+            'noscript-notice' => __DIR__.'/../view/layout/_noscript-notice.phtml',
322
+            'layout/layout' => __DIR__.'/../view/layout/layout.phtml',
323
+            'error/404' => __DIR__.'/../view/error/404.phtml',
324
+            'error/403' => __DIR__.'/../view/error/403.phtml',
325
+            'error/index' => __DIR__.'/../view/error/index.phtml',
326
+            'main-navigation' => __DIR__.'/../view/partial/main-navigation.phtml',
327
+            'pagination-control' => __DIR__.'/../view/partial/pagination-control.phtml',
328
+            'core/loading-popup' => __DIR__.'/../view/partial/loading-popup.phtml',
329
+            'core/notifications' => __DIR__.'/../view/partial/notifications.phtml',
330
+            'form/core/buttons' => __DIR__.'/../view/form/buttons.phtml',
331
+            'core/social-buttons' => __DIR__.'/../view/partial/social-buttons.phtml',
332
+            'form/core/privacy' => __DIR__.'/../view/form/privacy.phtml',
333
+            'core/form/permissions-fieldset' => __DIR__.'/../view/form/permissions-fieldset.phtml',
334
+            'core/form/permissions-collection' => __DIR__.'/../view/form/permissions-collection.phtml',
335
+            'core/form/container-view' => __DIR__.'/../view/form/container.view.phtml',
336
+            'core/form/tree-manage.view' => __DIR__.'/../view/form/tree-manage.view.phtml',
337
+            'core/form/tree-manage.form' => __DIR__.'/../view/form/tree-manage.form.phtml',
338
+            'core/form/tree-add-item' => __DIR__.'/../view/form/tree-add-item.phtml',
339
+            'mail/header' =>  __DIR__.'/../view/mail/header.phtml',
340
+            'mail/footer' =>  __DIR__.'/../view/mail/footer.phtml',
341
+            'mail/footer.en' =>  __DIR__.'/../view/mail/footer.en.phtml',
342 342
             //'startpage' => __DIR__ . '/../view/layout/startpage.phtml',
343 343
         ),
344 344
         // Where to look for view templates not mapped above
345 345
         'template_path_stack' => array(
346
-            __DIR__ . '/../view',
346
+            __DIR__.'/../view',
347 347
         ),
348 348
     ),
349 349
     'view_helpers' => array(
Please login to merge, or discard this patch.
module/Core/src/Core/Mail/FileTransport.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     {
33 33
         $options  = $this->options;
34 34
         $filename = call_user_func($options->getCallback(), $this);
35
-        $file     = $options->getPath() . DIRECTORY_SEPARATOR . $filename;
35
+        $file     = $options->getPath().DIRECTORY_SEPARATOR.$filename;
36 36
 
37 37
 
38 38
         $contents = $message->toString();
Please login to merge, or discard this patch.
module/Core/src/Core/Mail/MailServiceFactory.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
  */
27 27
 class MailServiceFactory 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 31
 		$config = $container->get('Config');
32 32
 		$mails = isset($config['mails']) ? $config['mails'] : [];
@@ -48,12 +48,12 @@  discard block
 block discarded – undo
48 48
 		$configArray = array_merge($configArray, $mails);
49 49
 		
50 50
 		$config = new MailServiceConfig($configArray);
51
-		$service   = new MailService($container,$config->toArray());
51
+		$service = new MailService($container, $config->toArray());
52 52
 		$config->configureServiceManager($service);
53
-		foreach($config->toArray() as $name=>$value){
53
+		foreach ($config->toArray() as $name=>$value) {
54 54
 			$method = 'set'.$name;
55
-			if(method_exists($service,$method)){
56
-				call_user_func([$service,$method],$value);
55
+			if (method_exists($service, $method)) {
56
+				call_user_func([$service, $method], $value);
57 57
 			}
58 58
 		}
59 59
 		
@@ -65,11 +65,11 @@  discard block
 block discarded – undo
65 65
         $type = $mailServiceOptions->getTransportClass();
66 66
         if (MailService::TRANSPORT_SMTP == $type) {
67 67
             return new Smtp($mailServiceOptions);
68
-        }elseif(MailService::TRANSPORT_FILE == $type){
68
+        }elseif (MailService::TRANSPORT_FILE == $type) {
69 69
             $fileOptions = new FileOptions();
70 70
             $fileOptions->setPath($mailServiceOptions->getPath());
71 71
             return new FileTransport($fileOptions);
72
-        }elseif(MailService::TRANSPORT_SENDMAIL == $type){
72
+        }elseif (MailService::TRANSPORT_SENDMAIL == $type) {
73 73
             return new Sendmail();
74 74
         }
75 75
 
Please login to merge, or discard this patch.
module/Core/src/Core/Options/MailServiceOptions.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         return $this;
100 100
     }
101 101
 
102
-    public function getUsername(){
102
+    public function getUsername() {
103 103
         return $this->connectionConfig['username'];
104 104
     }
105 105
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         return $this;
111 111
     }
112 112
 
113
-    public function getPassword(){
113
+    public function getPassword() {
114 114
         return $this->connectionConfig['password'];
115 115
     }
116 116
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
         return $this;
122 122
     }
123 123
 
124
-    public function getSsl(){
124
+    public function getSsl() {
125 125
         return $this->connectionConfig['ssl'];
126 126
     }
127 127
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
         return $this;
131 131
     }
132 132
 
133
-    public function getTransportClass(){
133
+    public function getTransportClass() {
134 134
         return $this->transportClass;
135 135
     }
136 136
 
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
      */
140 140
     public function getPath()
141 141
     {
142
-        if(is_null($this->path)){
142
+        if (is_null($this->path)) {
143 143
             $this->setPath(sys_get_temp_dir().'/yawik/mails');
144 144
         }
145 145
         return $this->path;
@@ -151,9 +151,9 @@  discard block
 block discarded – undo
151 151
      */
152 152
     public function setPath($path)
153 153
     {
154
-        if(!is_dir($path)){
155
-            mkdir($path,0777,true);
156
-            chmod($path,0777);
154
+        if (!is_dir($path)) {
155
+            mkdir($path, 0777, true);
156
+            chmod($path, 0777);
157 157
         }
158 158
         $this->path = $path;
159 159
         return $this;
Please login to merge, or discard this patch.