Completed
Push — develop ( 321e68...dce9ea )
by Carsten
09:20
created
module/Applications/src/Applications/Controller/MultimanageController.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -137,8 +137,8 @@
 block discarded – undo
137 137
             $application->changeStatus(
138 138
                 Status::REJECTED,
139 139
                 sprintf(
140
-                           /*@translate */ 'Mail was sent to %s',
141
-                                           $application->contact->email
140
+                            /*@translate */ 'Mail was sent to %s',
141
+                                            $application->contact->email
142 142
                 )
143 143
             );
144 144
             $repositoryService->store($application);
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $hidden = '';
71 71
         $displayNames = array();
72 72
         foreach ($elements as $element) {
73
-            $hidden .= '<input type="hidden" name="elements[]" value="' . $element . '">';
73
+            $hidden .= '<input type="hidden" name="elements[]" value="'.$element.'">';
74 74
             $application = $repository->find($element);
75 75
             $isAllowed = $this->acl()->test($application, 'change');
76 76
             if ($isAllowed) {
@@ -89,12 +89,12 @@  discard block
 block discarded – undo
89 89
             array(
90 90
             'ok' => true,
91 91
             'header' => $translator->translate('reject the applicants'),
92
-            'content' => '<form action="' . $actionUrl . '">' .
93
-            $hidden .
92
+            'content' => '<form action="'.$actionUrl.'">'.
93
+            $hidden.
94 94
             '<input class=" form-control " name="mail-subject" value="'
95
-                . $mailSubject . '"><br /><br />' .
95
+                . $mailSubject.'"><br /><br />'.
96 96
             '<textarea class=" form-control " id="mail-content" name="mail-content">'
97
-                . $mailText . '</textarea></form>'
97
+                . $mailText.'</textarea></form>'
98 98
             )
99 99
         );
100 100
     }
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
             $repositoryService->store($application);
143 143
             unset($mail);
144 144
         }
145
-        return new JsonModel(array('ok' => true, ));
145
+        return new JsonModel(array('ok' => true,));
146 146
     }
147 147
     
148 148
     /**
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
      */
153 153
     public function moveAction()
154 154
     {
155
-        $ids = (array)$this->params()->fromPost('ids');
155
+        $ids = (array) $this->params()->fromPost('ids');
156 156
         $moved = 0;
157 157
         
158 158
         if ($ids) {
Please login to merge, or discard this patch.
module/Settings/src/Settings/Entity/Hydrator/SettingsEntityHydrator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
         parent::__construct();
24 24
         $this->addFilter(
25 25
             'ignoreInternalProperties',
26
-            function ($property) {
26
+            function($property) {
27 27
                 return "_" != $property{0};
28 28
             }
29 29
         );
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
             if (!$this->filterComposite->filter($propertyName)) {
44 44
                 continue;
45 45
             }
46
-            $getter = 'get' . ucfirst($propertyName);
46
+            $getter = 'get'.ucfirst($propertyName);
47 47
             $value = method_exists($object, $getter)
48 48
                    ? $object->$getter()
49 49
                    : $property->getValue($object);
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         foreach ($data as $key => $value) {
66 66
             if (isset($reflProperties[$key])) {
67 67
                 $value  = $this->hydrateValue($key, $value);
68
-                $setter = 'set' . ucfirst($key);
68
+                $setter = 'set'.ucfirst($key);
69 69
                 if (method_exists($object, $setter)) {
70 70
                     $object->$setter($value);
71 71
                 } else {
Please login to merge, or discard this patch.
src/Settings/Form/View/Helper/FormDisableElementsCapableFormSettings.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,8 +37,8 @@
 block discarded – undo
37 37
         $headscript->appendFile($basepath('Settings/js/forms.decfs.js'));
38 38
 
39 39
         return '<ul class="disable-elements-list" id="' . $element->getAttribute('id') . '-list"' . '>'
40
-               . $this->renderCheckboxes($element->getCheckboxes())
41
-               . '</ul>';
40
+                . $this->renderCheckboxes($element->getCheckboxes())
41
+                . '</ul>';
42 42
 
43 43
     }
44 44
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
         $headscript->appendFile($basepath('Settings/js/forms.decfs.js'));
38 38
 
39
-        return '<ul class="disable-elements-list" id="' . $element->getAttribute('id') . '-list"' . '>'
39
+        return '<ul class="disable-elements-list" id="'.$element->getAttribute('id').'-list"'.'>'
40 40
                . $this->renderCheckboxes($element->getCheckboxes())
41 41
                . '</ul>';
42 42
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
                     unset($boxes['__all__']);
61 61
                 }
62 62
 
63
-                $markup .= '<ul class="disable-elements">' . $this->renderCheckboxes($boxes) . '</ul>';
63
+                $markup .= '<ul class="disable-elements">'.$this->renderCheckboxes($boxes).'</ul>';
64 64
             } else {
65 65
                 $markup .= $this->renderCheckbox($boxes);
66 66
             }
@@ -82,12 +82,12 @@  discard block
 block discarded – undo
82 82
         /* @var $renderer \Zend\View\Renderer\PhpRenderer */
83 83
         $renderer = $this->getView();
84 84
         if (null !== $class) {
85
-            $box->setAttribute('class', $box->getAttribute('class') . ' ' . $class);
85
+            $box->setAttribute('class', $box->getAttribute('class').' '.$class);
86 86
         }
87 87
         $markup = $renderer->formCheckBox($box);
88 88
         if ($desc = $box->getOption('description')) {
89 89
             $desc = $this->getTranslator()->translate($desc, $this->getTranslatorTextDomain());
90
-            $markup .= '<div class="alert alert-info"><p>' . $desc . '</p></div>';
90
+            $markup .= '<div class="alert alert-info"><p>'.$desc.'</p></div>';
91 91
         }
92 92
         return $markup;
93 93
     }
Please login to merge, or discard this patch.
Settings/src/Settings/Form/Element/DisableElementsCapableFormSettings.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
                 $this->prepareCheckboxes($box, $prefix);
196 196
             } else {
197 197
                 /* @var $box Checkbox */
198
-                $box->setName($prefix . $box->getName());
198
+                $box->setName($prefix.$box->getName());
199 199
             }
200 200
         }
201 201
     }
@@ -232,10 +232,10 @@  discard block
 block discarded – undo
232 232
         foreach ($form as $element) {
233 233
             /* @var $element \Zend\Form\ElementInterface|DisableElementsCapableInterface|DisableCapableInterface */
234 234
             $name = $element->getName();
235
-            $elementName = $prefix . '[' . $element->getName() . ']';
235
+            $elementName = $prefix.'['.$element->getName().']';
236 236
             $options = $element->getOption('disable_capable');
237 237
             $boxOptions = array(
238
-                'long_label'  => isset($options['label']) ? $options['label'] : ($element->getLabel() ? : $name),
238
+                'long_label'  => isset($options['label']) ? $options['label'] : ($element->getLabel() ?: $name),
239 239
                 'description' => isset($options['description']) ? $options['description']
240 240
                         : 'Toggle availability of this element in the form.',
241 241
             );
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
                     $return[$name] = $this->buildCheckboxes($element, $elementName);
246 246
                 }
247 247
                 if ($element->isDisableCapable()) {
248
-                    $box = $this->createCheckbox($elementName . '[__all__]', $boxOptions);
248
+                    $box = $this->createCheckbox($elementName.'[__all__]', $boxOptions);
249 249
                     $box->setAttribute('checked', true);
250 250
                     $return[$name]['__all__'] = $box;
251 251
                 }
Please login to merge, or discard this 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/Jobs/src/Jobs/Filter/ChannelPrices.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -73,15 +73,15 @@
 block discarded – undo
73 73
             if ('yawik' == $channelKey) {
74 74
                 $absoluteDiscount = 100;
75 75
             }
76
-            if ($channel instanceof ChannelOptions && $channel->getPrice('base')>0) {
76
+            if ($channel instanceof ChannelOptions && $channel->getPrice('base') > 0) {
77 77
                 $sum += $channel->getPrice('base');
78 78
                 $amount++;
79 79
             }
80 80
         }
81
-        $discount=1-($amount-1)*13.5/100;
82
-        if ($discount>0) {
83
-            $sum= round($sum * $discount, 2);
81
+        $discount = 1 - ($amount - 1) * 13.5 / 100;
82
+        if ($discount > 0) {
83
+            $sum = round($sum * $discount, 2);
84 84
         }
85
-        return $sum-$absoluteDiscount;
85
+        return $sum - $absoluteDiscount;
86 86
     }
87 87
 }
Please login to merge, or discard this patch.
module/Organizations/src/Organizations/Filter/Recipients.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,10 +34,10 @@
 block discarded – undo
34 34
      */
35 35
     public function filter($value)
36 36
     {
37
-        if (!$value instanceof Job){
37
+        if (!$value instanceof Job) {
38 38
 
39 39
         }
40
-        $reciptients=[];
40
+        $reciptients = [];
41 41
 
42 42
         return $reciptients;
43 43
     }
Please login to merge, or discard this patch.
module/Auth/src/Auth/Adapter/HybridAuth.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -211,14 +211,14 @@
 block discarded – undo
211 211
     {
212 212
         return $this->repository;
213 213
     }
214
-	/**
215
-	 * @param SocialProfilePlugin
216
-	 * @return HybridAuth
217
-	 */
218
-	public function setSocialProfilePlugin(SocialProfilePlugin $socialProfilePlugin)
219
-	{
220
-		$this->socialProfilePlugin = $socialProfilePlugin;
214
+    /**
215
+     * @param SocialProfilePlugin
216
+     * @return HybridAuth
217
+     */
218
+    public function setSocialProfilePlugin(SocialProfilePlugin $socialProfilePlugin)
219
+    {
220
+        $this->socialProfilePlugin = $socialProfilePlugin;
221 221
 		
222
-		return $this;
223
-	}
222
+        return $this;
223
+    }
224 224
 }
Please login to merge, or discard this patch.
module/Auth/src/Auth/Form/SocialProfiles.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -61,14 +61,14 @@
 block discarded – undo
61 61
         return $this->useDefaultValidation ? \Zend\Form\Form::isValid() : parent::isValid();
62 62
     }
63 63
     
64
-	/**
65
-	 * @param bool $bool
66
-	 * @return SocialProfiles
67
-	 */
68
-	public function setUseDefaultValidation($bool)
69
-	{
70
-		$this->useDefaultValidation = (bool)$bool;
64
+    /**
65
+     * @param bool $bool
66
+     * @return SocialProfiles
67
+     */
68
+    public function setUseDefaultValidation($bool)
69
+    {
70
+        $this->useDefaultValidation = (bool)$bool;
71 71
 		
72
-		return $this;
73
-	}
72
+        return $this;
73
+    }
74 74
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
 	 */
68 68
 	public function setUseDefaultValidation($bool)
69 69
 	{
70
-		$this->useDefaultValidation = (bool)$bool;
70
+		$this->useDefaultValidation = (bool) $bool;
71 71
 		
72 72
 		return $this;
73 73
 	}
Please login to merge, or discard this patch.
module/Auth/src/Auth/Controller/ManageController.php 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -96,8 +96,7 @@
 block discarded – undo
96 96
                     'content' => $content,
97 97
                     )
98 98
                 );
99
-            }
100
-            elseif ($postProfiles) {
99
+            } elseif ($postProfiles) {
101 100
                 $formSocialProfiles->setData($this->params()->fromPost());
102 101
                 
103 102
                 if ($formSocialProfiles->isValid()) {
Please login to merge, or discard this patch.
Indentation   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -28,66 +28,66 @@  discard block
 block discarded – undo
28 28
  */
29 29
 class ManageController extends AbstractActionController
30 30
 {
31
-	private $userProfileContainer;
31
+    private $userProfileContainer;
32 32
 	
33
-	private $authService;
33
+    private $authService;
34 34
 	
35
-	private $socialProfileForm;
35
+    private $socialProfileForm;
36 36
 	
37
-	private $translator;
37
+    private $translator;
38 38
 	
39
-	private $repositories;
39
+    private $repositories;
40 40
 	
41
-	private $viewHelper;
41
+    private $viewHelper;
42 42
 	
43
-	private $hybridAuthAdapter;
43
+    private $hybridAuthAdapter;
44 44
 	
45
-	/**
46
-	 * @param ContainerInterface $container
47
-	 * @return ManageController
48
-	 */
49
-	static public function factory(ContainerInterface $container)
50
-	{
51
-		$forms = $container->get('forms');
52
-		$userProfileContainer = $forms->get('Auth/UserProfileContainer');
53
-		$socialProfileForm = $forms->get('Auth/SocialProfiles');
54
-		$authService = $container->get('AuthenticationService');
55
-		$translator = $container->get('translator');
56
-		$repositories = $container->get('repositories');
57
-		$viewHelper = $container->get('ViewHelperManager');
58
-		$hybridAuthAdapter = $container->get('HybridAuthAdapter');
59
-		$controller = new ManageController(
60
-			$userProfileContainer,
61
-			$authService,
62
-			$repositories,
63
-			$socialProfileForm,
64
-			$translator,
65
-			$viewHelper,
66
-			$hybridAuthAdapter
67
-		);
68
-		return $controller;
69
-	}
45
+    /**
46
+     * @param ContainerInterface $container
47
+     * @return ManageController
48
+     */
49
+    static public function factory(ContainerInterface $container)
50
+    {
51
+        $forms = $container->get('forms');
52
+        $userProfileContainer = $forms->get('Auth/UserProfileContainer');
53
+        $socialProfileForm = $forms->get('Auth/SocialProfiles');
54
+        $authService = $container->get('AuthenticationService');
55
+        $translator = $container->get('translator');
56
+        $repositories = $container->get('repositories');
57
+        $viewHelper = $container->get('ViewHelperManager');
58
+        $hybridAuthAdapter = $container->get('HybridAuthAdapter');
59
+        $controller = new ManageController(
60
+            $userProfileContainer,
61
+            $authService,
62
+            $repositories,
63
+            $socialProfileForm,
64
+            $translator,
65
+            $viewHelper,
66
+            $hybridAuthAdapter
67
+        );
68
+        return $controller;
69
+    }
70 70
 	
71
-	public function __construct(
72
-		UserProfileContainer $userProfileContainer,
73
-		AuthenticationService $authService,
74
-		RepositoryService $repositories,
75
-		SocialProfiles $socialProfileForm,
76
-		Translator $translator,
77
-		HelperPluginManager $viewHelper,
78
-		HybridAuth $hybridAuthAdapter
79
-	)
80
-	{
81
-		$this->userProfileContainer = $userProfileContainer;
82
-		$this->authService = $authService;
83
-		$this->socialProfileForm = $socialProfileForm;
84
-		$this->repositories = $repositories;
85
-		$this->translator = $translator;
86
-		$this->viewHelper = $viewHelper;
87
-		$this->hybridAuthAdapter = $hybridAuthAdapter;
88
-	}
71
+    public function __construct(
72
+        UserProfileContainer $userProfileContainer,
73
+        AuthenticationService $authService,
74
+        RepositoryService $repositories,
75
+        SocialProfiles $socialProfileForm,
76
+        Translator $translator,
77
+        HelperPluginManager $viewHelper,
78
+        HybridAuth $hybridAuthAdapter
79
+    )
80
+    {
81
+        $this->userProfileContainer = $userProfileContainer;
82
+        $this->authService = $authService;
83
+        $this->socialProfileForm = $socialProfileForm;
84
+        $this->repositories = $repositories;
85
+        $this->translator = $translator;
86
+        $this->viewHelper = $viewHelper;
87
+        $this->hybridAuthAdapter = $hybridAuthAdapter;
88
+    }
89 89
 	
90
-	/**
90
+    /**
91 91
      * @return array|JsonModel
92 92
      */
93 93
     public function profileAction()
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
                 $postData  = $form->getOption('use_post_array') ? $_POST : array();
122 122
                 //@TODO: [ZF3] option use_files_array is false by default
123 123
                 //$filesData = $form->getOption('use_files_array') ? $_FILES : array();
124
-	            $filesData = $_FILES;
124
+                $filesData = $_FILES;
125 125
                 $data      = array_merge($postData, $filesData);
126 126
                 $form->setData($data);
127 127
                 
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -95,11 +95,11 @@  discard block
 block discarded – undo
95 95
         /* @var \Auth\Form\UserProfileContainer $userProfileContainer */
96 96
         $userProfileContainer = $this->userProfileContainer;
97 97
         $user = $this->authService->getUser(); /* @var $user \Auth\Entity\User */
98
-        $postProfiles = (array)$this->params()->fromPost('social_profiles');
98
+        $postProfiles = (array) $this->params()->fromPost('social_profiles');
99 99
         $userProfiles = $user->getProfile();
100 100
         $formSocialProfiles = $this->socialProfileForm
101 101
             ->setUseDefaultValidation(true)
102
-            ->setData(['social_profiles' => array_map(function ($array)
102
+            ->setData(['social_profiles' => array_map(function($array)
103 103
             {
104 104
                 return $array['data'];
105 105
             }, $userProfiles)]);
@@ -118,11 +118,11 @@  discard block
 block discarded – undo
118 118
             $form      = $userProfileContainer->getForm($formName);
119 119
             
120 120
             if ($form) {
121
-                $postData  = $form->getOption('use_post_array') ? $_POST : array();
121
+                $postData = $form->getOption('use_post_array') ? $_POST : array();
122 122
                 //@TODO: [ZF3] option use_files_array is false by default
123 123
                 //$filesData = $form->getOption('use_files_array') ? $_FILES : array();
124 124
 	            $filesData = $_FILES;
125
-                $data      = array_merge($postData, $filesData);
125
+                $data = array_merge($postData, $filesData);
126 126
                 $form->setData($data);
127 127
                 
128 128
                 if (!$form->isValid()) {
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
                                 ));
184 184
                             } else {
185 185
                                 $profile = [
186
-                                    'auth' => (array)$authProfile,
186
+                                    'auth' => (array) $authProfile,
187 187
                                     'data' => \Zend\Json\Json::decode($dataProfiles[$network])
188 188
                                 ];
189 189
                                 $user->addProfile($network, $profile);
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
                 }
194 194
                 
195 195
                 // keep data in sync & properly decoded
196
-                $formSocialProfiles->setData(['social_profiles' => array_map(function ($array)
196
+                $formSocialProfiles->setData(['social_profiles' => array_map(function($array)
197 197
                 {
198 198
                     return \Zend\Json\Json::decode($array) ?: '';
199 199
                 }, $dataProfiles)]);
Please login to merge, or discard this patch.