Completed
Pull Request — develop (#459)
by ANTHONIUS
06:44
created
module/Settings/Module.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
      */
30 30
     public function onBootstrap(MvcEvent $e)
31 31
     {
32
-    	// we attach with wildcard events name
32
+        // we attach with wildcard events name
33 33
         $events = $e->getApplication()->getEventManager();
34 34
         $events->attach(
35 35
             MvcEvent::EVENT_RENDER,
Please login to merge, or discard this patch.
module/Settings/src/Settings/Repository/SettingsEntityResolverFactory.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -19,23 +19,23 @@
 block discarded – undo
19 19
 
20 20
 class SettingsEntityResolverFactory implements FactoryInterface
21 21
 {
22
-	public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
23
-	{
24
-		$moduleManager = $container->get('ModuleManager');
25
-		$config        = $container->get('Config');
22
+    public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
23
+    {
24
+        $moduleManager = $container->get('ModuleManager');
25
+        $config        = $container->get('Config');
26 26
 		
27
-		$map = array();
28
-		foreach (array_keys($moduleManager->getLoadedModules()) as $module) {
29
-			$map[$module] = isset($config[$module]['settings']['entity'])
30
-				? $config[$module]['settings']['entity']
31
-				: '\Settings\Entity\ModuleSettingsContainer';
32
-		}
27
+        $map = array();
28
+        foreach (array_keys($moduleManager->getLoadedModules()) as $module) {
29
+            $map[$module] = isset($config[$module]['settings']['entity'])
30
+                ? $config[$module]['settings']['entity']
31
+                : '\Settings\Entity\ModuleSettingsContainer';
32
+        }
33 33
 		
34
-		$resolver = new SettingsEntityResolver($map);
35
-		return $resolver;
36
-	}
34
+        $resolver = new SettingsEntityResolver($map);
35
+        return $resolver;
36
+    }
37 37
 	
38
-	public function createService(ServiceLocatorInterface $serviceLocator)
38
+    public function createService(ServiceLocatorInterface $serviceLocator)
39 39
     {
40 40
     
41 41
     }
Please login to merge, or discard this patch.
module/Settings/src/Settings/Repository/Service/SettingsFactory.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -11,17 +11,17 @@
 block discarded – undo
11 11
 
12 12
 class SettingsFactory implements FactoryInterface
13 13
 {
14
-	public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
15
-	{
16
-		$settings = new Settings();
17
-		$settings->setServiceLocator($container);
18
-		$settings->setUserRepository($container->get('RepositoryManager')->get('User'));
19
-		$config = $container->get('Config');
14
+    public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
15
+    {
16
+        $settings = new Settings();
17
+        $settings->setServiceLocator($container);
18
+        $settings->setUserRepository($container->get('RepositoryManager')->get('User'));
19
+        $config = $container->get('Config');
20 20
 		
21
-		// put on the Listener for saving the entity
22
-		$application = $container->get('Application');
23
-		$events = $application->getEventManager();
24
-		$events->attach('postDispatch', array($settings, 'onPostDispatch'));
25
-		return $settings;
26
-	}
21
+        // put on the Listener for saving the entity
22
+        $application = $container->get('Application');
23
+        $events = $application->getEventManager();
24
+        $events->attach('postDispatch', array($settings, 'onPostDispatch'));
25
+        return $settings;
26
+    }
27 27
 }
Please login to merge, or discard this patch.
module/Settings/src/Settings/Repository/Settings.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -87,9 +87,9 @@
 block discarded – undo
87 87
         }
88 88
     }
89 89
 	
90
-	public function find( $user, $lockMode = LockMode::NONE, $lockVersion = null ) {
91
-		return $this->getSettingsByUser($user);
92
-	}
90
+    public function find( $user, $lockMode = LockMode::NONE, $lockVersion = null ) {
91
+        return $this->getSettingsByUser($user);
92
+    }
93 93
     
94 94
     public function getEntityByStrategy($namespace)
95 95
     {
Please login to merge, or discard this patch.
module/Settings/src/Settings/Controller/Plugin/SettingsFactory.php 1 patch
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 SettingsFactory implements FactoryInterface
17 17
 {
18
-	public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
19
-	{
20
-		$auth     = $container->get('AuthenticationService');
21
-		$user     = $auth->getUser();
22
-		$plugin   = new Settings($user);
18
+    public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
19
+    {
20
+        $auth     = $container->get('AuthenticationService');
21
+        $user     = $auth->getUser();
22
+        $plugin   = new Settings($user);
23 23
 		
24
-		return $plugin;
25
-	}
24
+        return $plugin;
25
+    }
26 26
 }
Please login to merge, or discard this patch.
module/Settings/src/Settings/Controller/IndexController.php 1 patch
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -28,38 +28,38 @@  discard block
 block discarded – undo
28 28
  */
29 29
 class IndexController extends AbstractActionController
30 30
 {
31
-	/**
32
-	 * @var TranslatorInterface
33
-	 */
34
-	private $translator;
31
+    /**
32
+     * @var TranslatorInterface
33
+     */
34
+    private $translator;
35 35
 	
36
-	/**
37
-	 * @var FormElementManager
38
-	 */
39
-	private $formManager;
36
+    /**
37
+     * @var FormElementManager
38
+     */
39
+    private $formManager;
40 40
 	
41
-	private $viewHelper;
41
+    private $viewHelper;
42 42
 	
43
-	public function __construct(
44
-		TranslatorInterface $translator,
45
-		FormElementManager $formManager,
46
-		$viewHelper
47
-	)
48
-	{
49
-		$this->translator = $translator;
50
-		$this->formManager = $formManager;
51
-		$this->viewHelper = $viewHelper;
52
-	}
43
+    public function __construct(
44
+        TranslatorInterface $translator,
45
+        FormElementManager $formManager,
46
+        $viewHelper
47
+    )
48
+    {
49
+        $this->translator = $translator;
50
+        $this->formManager = $formManager;
51
+        $this->viewHelper = $viewHelper;
52
+    }
53 53
 	
54
-	static public function factory(ContainerInterface $container)
55
-	{
56
-		$translator = $container->get('translator');
57
-		return new self(
58
-			$translator,
59
-			$container->get('FormElementManager'),
60
-			$container->get('ViewHelperManager')
61
-		);
62
-	}
54
+    static public function factory(ContainerInterface $container)
55
+    {
56
+        $translator = $container->get('translator');
57
+        return new self(
58
+            $translator,
59
+            $container->get('FormElementManager'),
60
+            $container->get('ViewHelperManager')
61
+        );
62
+    }
63 63
 	
64 64
     public function indexAction()
65 65
     {
@@ -99,8 +99,8 @@  discard block
 block discarded – undo
99 99
         
100 100
         $form = $formManager->get($formName);
101 101
         
102
-	    $vars = array();
103
-	    $vars['form'] = $form;
102
+        $vars = array();
103
+        $vars['form'] = $form;
104 104
         // Binding the Entity to the Formular
105 105
         $form->bind($settings);
106 106
         $data = $this->getRequest()->getPost();
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
                     array('settings' => $settings)
121 121
                 );
122 122
                 $this->getEventManager()->trigger($event->getName(),$event);
123
-	            $vars['valid'] = true;
123
+                $vars['valid'] = true;
124 124
             } else {
125 125
                 $vars['error'] = $form->getMessages();
126 126
             }
Please login to merge, or discard this patch.
Settings/src/Settings/Form/Element/DisableElementsCapableFormSettings.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@
 block discarded – undo
167 167
             'required' => true,
168 168
             'filters'  => array(
169 169
                 array(
170
-                	'name' => \Settings\Form\Filter\DisableElementsCapableFormSettings::class,
170
+                    'name' => \Settings\Form\Filter\DisableElementsCapableFormSettings::class,
171 171
                 ),
172 172
             ),
173 173
         );
Please login to merge, or discard this patch.
module/Settings/src/Settings/Form/AbstractSettingsForm.php 1 patch
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -26,25 +26,25 @@  discard block
 block discarded – undo
26 26
      */
27 27
     protected $isBuild = false;
28 28
 	
29
-	/**
30
-	 * @var FormElementManager
31
-	 */
29
+    /**
30
+     * @var FormElementManager
31
+     */
32 32
     protected $formManager;
33 33
 	
34
-	/**
35
-	 * @var array|HelperPluginManager
36
-	 */
34
+    /**
35
+     * @var array|HelperPluginManager
36
+     */
37 37
     protected $viewHelper;
38 38
 	
39
-	/**
40
-	 * AbstractSettingsForm constructor.
41
-	 *
42
-	 * @param FormElementManager $formManager
43
-	 * @param HelperPluginManager $viewHelper
44
-	 */
39
+    /**
40
+     * AbstractSettingsForm constructor.
41
+     *
42
+     * @param FormElementManager $formManager
43
+     * @param HelperPluginManager $viewHelper
44
+     */
45 45
     public function __construct(
46
-    	FormElementManager $formManager,
47
-	    HelperPluginManager $viewHelper
46
+        FormElementManager $formManager,
47
+        HelperPluginManager $viewHelper
48 48
     )
49 49
     {
50 50
         parent::__construct();
@@ -81,13 +81,13 @@  discard block
 block discarded – undo
81 81
         }
82 82
         
83 83
         $fieldset->setUseAsBaseFieldset(true)
84
-                 ->setName('base');
84
+                    ->setName('base');
85 85
         
86 86
         $fieldset->setObject($object);
87 87
         $this->add($fieldset);
88 88
         
89 89
         $this->add([
90
-        	'type' => 'DefaultButtonsFieldset'
90
+            'type' => 'DefaultButtonsFieldset'
91 91
         ]);
92 92
         $this->isBuild=true;
93 93
     }
@@ -132,16 +132,16 @@  discard block
 block discarded – undo
132 132
         return strtolower($moduleName);
133 133
     }
134 134
 	
135
-	/**
136
-	 * @param ContainerInterface $container
137
-	 *
138
-	 * @return AbstractSettingsForm
139
-	 */
135
+    /**
136
+     * @param ContainerInterface $container
137
+     *
138
+     * @return AbstractSettingsForm
139
+     */
140 140
     public static function factory(ContainerInterface $container)
141 141
     {
142 142
         return new static(
143
-        	$container->get('FormElementManager'),
144
-	        $container->get('ViewHelperManager')
143
+            $container->get('FormElementManager'),
144
+            $container->get('ViewHelperManager')
145 145
         );
146 146
     }
147 147
 }
Please login to merge, or discard this patch.
Settings/src/Settings/Form/DisableElementsCapableFormSettingsFieldset.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -109,11 +109,11 @@
 block discarded – undo
109 109
         $this->isBuild = true;
110 110
     }
111 111
 	
112
-	/**
113
-	 * @param ContainerInterface $container
114
-	 *
115
-	 * @return DisableElementsCapableFormSettingsFieldset
116
-	 */
112
+    /**
113
+     * @param ContainerInterface $container
114
+     *
115
+     * @return DisableElementsCapableFormSettingsFieldset
116
+     */
117 117
     public static function factory(ContainerInterface $container)
118 118
     {
119 119
         return new static($container->get('FormElementManager'));
Please login to merge, or discard this patch.