Completed
Pull Request — develop (#434)
by Carsten
06:27
created
module/Core/config/module.config.php 1 patch
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -39,24 +39,24 @@  discard block
 block discarded – undo
39 39
     'log' => array(
40 40
         'Core/Log' => array(
41 41
             'writers' => array(
42
-                 array(
43
-                     'name' => 'stream',
42
+                    array(
43
+                        'name' => 'stream',
44 44
                     'priority' => 1000,
45 45
                     'options' => array(
46
-                         'stream' => __DIR__ .'/../../../log/yawik.log',
46
+                            'stream' => __DIR__ .'/../../../log/yawik.log',
47
+                    ),
47 48
                     ),
48
-                 ),
49 49
             ),
50 50
         ),
51 51
         'Log/Core/Mail' => array(
52 52
             'writers' => array(
53
-                 array(
54
-                     'name' => 'stream',
53
+                    array(
54
+                        'name' => 'stream',
55 55
                     'priority' => 1000,
56 56
                     'options' => array(
57
-                         'stream' => __DIR__ .'/../../../log/mails.log',
57
+                            'stream' => __DIR__ .'/../../../log/mails.log',
58
+                    ),
58 59
                     ),
59
-                 ),
60 60
             ),
61 61
         ),
62 62
     ),
@@ -248,17 +248,17 @@  discard block
 block discarded – undo
248 248
     // Defines the Core/Navigation.
249 249
     'navigation' => array(
250 250
         'default' => array(
251
-             'home' => array(
252
-                 'label' => /*@translate*/ 'Home',
253
-                 'route' => 'lang',
254
-                 'visible' => false
255
-             ),
256
-             'admin' => array(
257
-                 'label ' => /*@translate*/ 'Admin',
258
-                 'route' => 'lang/admin',
259
-                 'resource' => 'route/lang/admin',
260
-                 'order' => 200,
261
-             ),
251
+                'home' => array(
252
+                    'label' => /*@translate*/ 'Home',
253
+                    'route' => 'lang',
254
+                    'visible' => false
255
+                ),
256
+                'admin' => array(
257
+                    'label ' => /*@translate*/ 'Admin',
258
+                    'route' => 'lang/admin',
259
+                    'resource' => 'route/lang/admin',
260
+                    'order' => 200,
261
+                ),
262 262
         ),
263 263
     ),
264 264
     // Configuration of the controller service manager (Which loads controllers)
@@ -266,14 +266,14 @@  discard block
 block discarded – undo
266 266
         'invokables' => array(
267 267
             'Core\Controller\Content' => 'Core\Controller\ContentController',
268 268
         ),
269
-	    'factories' => [
270
-	    	// @TODO: improve this factory
271
-		    'Core\Controller\Index' => [\Core\Controller\IndexController::class,'factory'],
272
-		    'Core/Admin' => [\Core\Controller\AdminController::class,'factory'],
273
-		    'Core\Controller\File'  => [\Core\Controller\FileController::class,'factory'],
274
-	    ],
269
+        'factories' => [
270
+            // @TODO: improve this factory
271
+            'Core\Controller\Index' => [\Core\Controller\IndexController::class,'factory'],
272
+            'Core/Admin' => [\Core\Controller\AdminController::class,'factory'],
273
+            'Core\Controller\File'  => [\Core\Controller\FileController::class,'factory'],
274
+        ],
275 275
         'abstract_factories' => [
276
-	        \Core\Factory\Controller\LazyControllerFactory::class
276
+            \Core\Factory\Controller\LazyControllerFactory::class
277 277
         ],
278 278
     ),
279 279
     // Configuration of the controller plugin service manager
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
             'paginatorservice' => 'Core/PaginatorService',
305 305
             'paginationParams' => 'Core/PaginationParams',
306 306
             'searchform'       => 'Core/SearchForm',
307
-	        'notification'     => 'Notification',
307
+            'notification'     => 'Notification',
308 308
         )
309 309
     ),
310 310
     // Configure the view service manager
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
         ),
403 403
         'aliases' => [
404 404
             'snippet' => \Core\View\Helper\Snippet::class,
405
-	        'ajaxUrl' => \Core\View\Helper\AjaxUrl::class,
405
+            'ajaxUrl' => \Core\View\Helper\AjaxUrl::class,
406 406
             'proxy' => \Core\View\Helper\Proxy::class,
407 407
         ],
408 408
     ),
@@ -499,17 +499,17 @@  discard block
 block discarded – undo
499 499
         ],
500 500
 
501 501
         'Core/Ajax/Events' => [
502
-	        'service' => 'Core/EventManager',
503
-	        'event'   => \Core\Listener\Events\AjaxEvent::class,
502
+            'service' => 'Core/EventManager',
503
+            'event'   => \Core\Listener\Events\AjaxEvent::class,
504 504
         ],
505 505
 	    
506
-	    'Core/File/Events' => [
507
-		    'service' => 'Core/EventManager',
508
-		    'event' => \Core\Listener\Events\FileEvent::class,
506
+        'Core/File/Events' => [
507
+            'service' => 'Core/EventManager',
508
+            'event' => \Core\Listener\Events\FileEvent::class,
509 509
             'listeners' => [
510 510
                 \Core\Listener\DeleteImageSetListener::class => [\Core\Listener\Events\FileEvent::EVENT_DELETE, -1000],
511 511
             ],
512
-	    ]
512
+        ]
513 513
     ],
514 514
     
515 515
 );
Please login to merge, or discard this patch.
module/Core/Module.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -112,16 +112,16 @@
 block discarded – undo
112 112
         $eventManager->attach(
113 113
             MvcEvent::EVENT_DISPATCH_ERROR,
114 114
             function ($event) {
115
-            	if($event instanceof MvcEvent){
116
-		            $application = $event->getApplication();
115
+                if($event instanceof MvcEvent){
116
+                    $application = $event->getApplication();
117 117
 		            
118
-		            if ($application::ERROR_EXCEPTION == $event->getError()) {
119
-			            $ex = $event->getParam('exception');
120
-			            if (404 == $ex->getCode()) {
121
-				            $event->setError($application::ERROR_CONTROLLER_NOT_FOUND);
122
-			            }
123
-		            }
124
-	            }
118
+                    if ($application::ERROR_EXCEPTION == $event->getError()) {
119
+                        $ex = $event->getParam('exception');
120
+                        if (404 == $ex->getCode()) {
121
+                            $event->setError($application::ERROR_CONTROLLER_NOT_FOUND);
122
+                        }
123
+                    }
124
+                }
125 125
             },
126 126
             500
127 127
         );
Please login to merge, or discard this patch.
module/Core/src/Core/Repository/AbstractRepository.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
      */
43 43
     public function getService($name)
44 44
     {
45
-    	/* @TODO: [ZF3] ->getServiceLocator() should be removed in future */
46
-    	$config = $this->dm->getConfiguration();
45
+        /* @TODO: [ZF3] ->getServiceLocator() should be removed in future */
46
+        $config = $this->dm->getConfiguration();
47 47
         return $this->dm->getConfiguration()->getServiceLocator()->get($name);
48 48
     }
49 49
 
@@ -126,9 +126,9 @@  discard block
 block discarded – undo
126 126
     {
127 127
         $this->checkEntityType($entity);
128 128
         $this->dm->remove($entity);
129
-		if($flush){
130
-			$this->dm->flush($entity);
131
-		}
129
+        if($flush){
130
+            $this->dm->flush($entity);
131
+        }
132 132
         return $this;
133 133
     }
134 134
 
Please login to merge, or discard this patch.
src/Core/Repository/DoctrineMongoODM/ServiceLocatorAwareConfiguration.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 
15 15
 class ServiceLocatorAwareConfiguration extends Configuration
16 16
 {
17
-	public function setServiceLocator($serviceLocator)
17
+    public function setServiceLocator($serviceLocator)
18 18
     {
19 19
         $this->attributes['serviceLocator'] = $serviceLocator;
20 20
         return $this;
Please login to merge, or discard this patch.
module/Core/src/Core/Repository/DoctrineMongoODM/DocumentManagerFactory.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -22,17 +22,17 @@
 block discarded – undo
22 22
  */
23 23
 class DocumentManagerFactory implements FactoryInterface
24 24
 {
25
-	public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) {
26
-		$container->setAllowOverride(true);
27
-		$container->setFactory('doctrine.configuration.odm_default', new ConfigurationFactory('odm_default'));
28
-		$container->setAllowOverride(false);
25
+    public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) {
26
+        $container->setAllowOverride(true);
27
+        $container->setFactory('doctrine.configuration.odm_default', new ConfigurationFactory('odm_default'));
28
+        $container->setAllowOverride(false);
29 29
 		
30
-		$configFactory = new ConfigurationFactory('odm_default');
31
-		$config = $configFactory->createService($container);
30
+        $configFactory = new ConfigurationFactory('odm_default');
31
+        $config = $configFactory->createService($container);
32 32
 		
33
-		$dm = $container->get('doctrine.documentmanager.odm_default');
34
-		$dm = DoctrineDocumentManager::create($dm->getConnection(), $config, $dm->getEventManager());
35
-		$dm->getSchemaManager()->ensureIndexes();
36
-		return $dm;
37
-	}
33
+        $dm = $container->get('doctrine.documentmanager.odm_default');
34
+        $dm = DoctrineDocumentManager::create($dm->getConnection(), $config, $dm->getEventManager());
35
+        $dm->getSchemaManager()->ensureIndexes();
36
+        return $dm;
37
+    }
38 38
 }
Please login to merge, or discard this patch.
module/Core/src/Core/Repository/RepositoryServiceFactory.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -21,16 +21,16 @@
 block discarded – undo
21 21
 class RepositoryServiceFactory implements FactoryInterface
22 22
 {
23 23
 	
24
-	public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) {
25
-		$dm      = $container->get('Core/DocumentManager');
26
-		$service = new RepositoryService($dm);
24
+    public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) {
25
+        $dm      = $container->get('Core/DocumentManager');
26
+        $service = new RepositoryService($dm);
27 27
 		
28
-		/* Attach persistence listener */
29
-		$application = $container->get('Application');
30
-		$events      = $application->getEventManager();
31
-		$persistenceListener = new PersistenceListener($service);
32
-		$persistenceListener->attach($events);
28
+        /* Attach persistence listener */
29
+        $application = $container->get('Application');
30
+        $events      = $application->getEventManager();
31
+        $persistenceListener = new PersistenceListener($service);
32
+        $persistenceListener->attach($events);
33 33
 		
34
-		return $service;
35
-	}
34
+        return $service;
35
+    }
36 36
 }
Please login to merge, or discard this patch.
module/Core/src/Core/Filter/XssFilterFactory.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -22,20 +22,20 @@
 block discarded – undo
22 22
  */
23 23
 class XssFilterFactory implements FactoryInterface
24 24
 {
25
-	/**
26
-	 * @param ContainerInterface $container
27
-	 * @param string $requestedName
28
-	 * @param array|null $options
29
-	 *
30
-	 * @return XssFilter
31
-	 */
32
-	public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
33
-	{
34
-		$htmlPurifier = new Filter\HTMLPurifierFilter();
35
-		$htmlPurifier->setConfig(array("Cache.SerializerPath" => "cache/HtmlPurifier"));
25
+    /**
26
+     * @param ContainerInterface $container
27
+     * @param string $requestedName
28
+     * @param array|null $options
29
+     *
30
+     * @return XssFilter
31
+     */
32
+    public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
33
+    {
34
+        $htmlPurifier = new Filter\HTMLPurifierFilter();
35
+        $htmlPurifier->setConfig(array("Cache.SerializerPath" => "cache/HtmlPurifier"));
36 36
 		
37
-		$filter = new XssFilter($htmlPurifier);
37
+        $filter = new XssFilter($htmlPurifier);
38 38
 		
39
-		return $filter;
40
-	}
39
+        return $filter;
40
+    }
41 41
 }
Please login to merge, or discard this patch.
module/Core/src/Core/Entity/Tree/AbstractLeafs.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -86,9 +86,9 @@
 block discarded – undo
86 86
         $values = [];
87 87
         /* @var NodeInterface $item */
88 88
         foreach ($this->getItems() as $item) {
89
-        	if(!is_null($item)){
90
-		        $values[] = $item->getValueWithParents();
91
-	        }
89
+            if(!is_null($item)){
90
+                $values[] = $item->getValueWithParents();
91
+            }
92 92
         }
93 93
 
94 94
         $this->values = $values;
Please login to merge, or discard this patch.
module/Core/src/Core/Entity/Hydrator/EntityHydratorFactory.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -21,15 +21,15 @@  discard block
 block discarded – undo
21 21
 {
22 22
     protected $hydrator;
23 23
 	
24
-	public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
25
-	{
26
-		$this->hydrator = $this->getEntityHydrator();
27
-		$this->prepareHydrator();
28
-		return $this->hydrator;
29
-	}
24
+    public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
25
+    {
26
+        $this->hydrator = $this->getEntityHydrator();
27
+        $this->prepareHydrator();
28
+        return $this->hydrator;
29
+    }
30 30
 	
31 31
 	
32
-	/**
32
+    /**
33 33
      * Create the Json Entity Hydrator
34 34
      *
35 35
      * @param  ServiceLocatorInterface $serviceLocator
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      */
38 38
     public function createService(ServiceLocatorInterface $serviceLocator)
39 39
     {
40
-		return $this($serviceLocator,EntityHydrator::class);
40
+        return $this($serviceLocator,EntityHydrator::class);
41 41
     }
42 42
 
43 43
     protected function prepareHydrator()
Please login to merge, or discard this patch.