Completed
Push — develop ( 2886f7...915463 )
by Mathias
20:06
created
module/Settings/src/Form/AbstractSettingsForm.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         }
71 71
         $this->setAttribute('method', 'post');
72 72
         $object = $this->getObject();
73
-        $fieldsetName = $object->getModuleName() . '/SettingsFieldset';
73
+        $fieldsetName = $object->getModuleName().'/SettingsFieldset';
74 74
         
75 75
         if ($this->formManager->has($fieldsetName)) {
76 76
             $fieldset = $this->formManager->get($fieldsetName);
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         $this->add([
89 89
             'type' => 'DefaultButtonsFieldset'
90 90
         ]);
91
-        $this->isBuild=true;
91
+        $this->isBuild = true;
92 92
     }
93 93
         
94 94
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
     
107 107
     public function setName($name)
108 108
     {
109
-        parent::setName(strtolower($name) . '-settings');
109
+        parent::setName(strtolower($name).'-settings');
110 110
         $urlHelper = $this->viewHelper->get('url');
111 111
         
112 112
         $url = $urlHelper('lang/settings', array('module' => $name), true);
Please login to merge, or discard this patch.
module/Settings/src/Module.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,6 +45,6 @@
 block discarded – undo
45 45
      */
46 46
     public function getConfig()
47 47
     {
48
-        return include __DIR__ . '/../config/module.config.php';
48
+        return include __DIR__.'/../config/module.config.php';
49 49
     }
50 50
 }
Please login to merge, or discard this patch.
module/Settings/src/Entity/SettingsContainer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
      */
139 139
     public function __get($property)
140 140
     {
141
-        $getter = "get" . ucfirst($property);
141
+        $getter = "get".ucfirst($property);
142 142
         if (method_exists($this, $getter)) {
143 143
             return $this->$getter();
144 144
         }
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
     {
160 160
         $this->checkWriteAccess();
161 161
         
162
-        $setter = 'set' . ucfirst($property);
162
+        $setter = 'set'.ucfirst($property);
163 163
         if (method_exists($this, $setter)) {
164 164
             $this->$setter($value);
165 165
             return;
Please login to merge, or discard this patch.
src/Entity/Hydrator/Strategy/DisableElementsCapableFormSettings.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
     protected function filterArrayStrings($array, $search, $replace)
58 58
     {
59 59
         $return = array();
60
-        foreach ((array)$array as $key => $value) {
60
+        foreach ((array) $array as $key => $value) {
61 61
             $key = str_replace($search, $replace, $key);
62 62
             $value = is_array($value)
63 63
                 ? $this->filterArrayStrings($value, $search, $replace)
Please login to merge, or discard this patch.
module/Settings/src/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.
module/Settings/src/Controller/IndexController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         $mvcEvent->setParam('__settings_active_module', $moduleName);
86 86
         
87 87
         $formManager = $this->formManager;
88
-        $formName = $moduleName . '/SettingsForm';
88
+        $formName = $moduleName.'/SettingsForm';
89 89
         if (!$formManager->has($formName)) {
90 90
             $formName = "Settings/Form";
91 91
         }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
             $valid   = $form->isValid();
109 109
             $partial = $this->viewHelper->get('partial');
110 110
             $text    = $valid
111
-                     ?  /*@translate*/'Changes successfully saved'
111
+                     ? /*@translate*/'Changes successfully saved'
112 112
                      :  /*@translate*/'Changes could not be saved';
113 113
             $this->notification()->success($translator->translate($text));
114 114
 
Please login to merge, or discard this patch.
module/Behat/src/CoreContext.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
     private $config;
31 31
 
32
-    public function __construct($config=null)
32
+    public function __construct($config = null)
33 33
     {
34 34
         if (is_null($config)) {
35 35
             $config = __DIR__.'/../../../config/config.php';
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
     public function iSetMainWindowName()
181 181
     {
182 182
         $window_name = 'main_window';
183
-        $script = 'window.name = "' . $window_name . '"';
183
+        $script = 'window.name = "'.$window_name.'"';
184 184
         $this->getSession()->executeScript($script);
185 185
     }
186 186
     
@@ -239,14 +239,14 @@  discard block
 block discarded – undo
239 239
                 break;
240 240
             
241 241
             default:
242
-                throw new \Exception(__METHOD__ . ' Couldn\'t find selector: ' . $selector . ' - Allowed selectors: #id, .className, //xpath');
242
+                throw new \Exception(__METHOD__.' Couldn\'t find selector: '.$selector.' - Allowed selectors: #id, .className, //xpath');
243 243
                 break;
244 244
         }
245 245
         
246 246
         try {
247 247
             $this->getSession()->executeScript($function);
248 248
         } catch (\Exception $e) {
249
-            throw new \Exception(__METHOD__ . ' failed'. ' Message: for this locator:"'.$selector.'"');
249
+            throw new \Exception(__METHOD__.' failed'.' Message: for this locator:"'.$selector.'"');
250 250
         }
251 251
     }
252 252
     
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
      *
267 267
      * @return \Behat\Mink\Element\NodeElement|mixed|null
268 268
      */
269
-    public function getElement($locator, $selector='css')
269
+    public function getElement($locator, $selector = 'css')
270 270
     {
271 271
         $page = $this->minkContext->getSession()->getPage();
272 272
         $element = $page->find('css', $locator);
@@ -300,12 +300,12 @@  discard block
 block discarded – undo
300 300
         $session = $this->getSession();
301 301
         $element = $session->getPage()->find(
302 302
             'xpath',
303
-            $session->getSelectorsHandler()->selectorToXpath('xpath', '*//*[text()="'. $text .'"]')
303
+            $session->getSelectorsHandler()->selectorToXpath('xpath', '*//*[text()="'.$text.'"]')
304 304
         );
305 305
         if (null === $element) {
306 306
             $element = $session->getPage()->find(
307 307
                 'named',
308
-                array('id',$text)
308
+                array('id', $text)
309 309
             );
310 310
         }
311 311
         if (null === $element) {
Please login to merge, or discard this patch.
module/Behat/src/UserContext.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     protected $currentUser;
65 65
     
66
-    public function __construct($parameters=[])
66
+    public function __construct($parameters = [])
67 67
     {
68 68
         $defaultLoginInfo = [
69 69
             'facebook' => [
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
                 'session_password-login' => getenv('LINKEDIN_USER_PASSWORD')
76 76
             ],
77 77
         ];
78
-        $socialLoginConfig = isset($parameters['social_login_info']) ? $parameters['social_login_info']:[];
78
+        $socialLoginConfig = isset($parameters['social_login_info']) ? $parameters['social_login_info'] : [];
79 79
         $this->socialLoginInfo = array_merge($defaultLoginInfo, $socialLoginConfig);
80 80
     }
81 81
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
      * @Given I am logged in as a recruiter
143 143
      * @Given I am logged in as a recruiter with :organization as organization
144 144
      */
145
-    public function iAmLoggedInAsARecruiter($organization=null)
145
+    public function iAmLoggedInAsARecruiter($organization = null)
146 146
     {
147 147
         $user = $this->thereIsAUserIdentifiedBy(
148 148
             '[email protected]',
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
     public function iDonTHaveUser($login)
175 175
     {
176 176
         $repo = $this->getUserRepository();
177
-        $user=$repo->findByLogin($login);
177
+        $user = $repo->findByLogin($login);
178 178
         if ($user instanceof UserInterface) {
179 179
             $repo->remove($user, true);
180 180
         }
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
     private function startLogin(UserInterface $user, $password)
223 223
     {
224 224
         $currentUser = $this->currentUser;
225
-        if (!is_object($currentUser) || $user->getId()!=$currentUser->getId()) {
225
+        if (!is_object($currentUser) || $user->getId() != $currentUser->getId()) {
226 226
             $this->iWantToLogIn();
227 227
             $this->iSpecifyTheUsernameAs($user->getLogin());
228 228
             $this->iSpecifyThePasswordAs($password);
@@ -242,10 +242,10 @@  discard block
 block discarded – undo
242 242
     /**
243 243
      * @Given there is a user :email identified by :password
244 244
      */
245
-    public function thereIsAUserIdentifiedBy($email, $password, $role=User::ROLE_RECRUITER, $fullname="Test Recruiter", $organization=null)
245
+    public function thereIsAUserIdentifiedBy($email, $password, $role = User::ROLE_RECRUITER, $fullname = "Test Recruiter", $organization = null)
246 246
     {
247 247
         $repo = $this->getUserRepository();
248
-        if (!is_object($user=$repo->findByEmail($email))) {
248
+        if (!is_object($user = $repo->findByEmail($email))) {
249 249
             $user = $this->createUser($email, $password, $role, $fullname, $organization);
250 250
         }
251 251
         
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
      *
267 267
      * @return \Auth\Entity\UserInterface
268 268
      */
269
-    public function createUser($email, $password, $role=User::ROLE_RECRUITER, $fullname="Test Recruiter")
269
+    public function createUser($email, $password, $role = User::ROLE_RECRUITER, $fullname = "Test Recruiter")
270 270
     {
271 271
         /* @var Register $service */
272 272
         /* @var User $user */
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
         $expFullName = explode(' ', $fullname);
281 281
         $info = $user->getInfo();
282 282
         $info->setFirstName(array_shift($expFullName));
283
-        $info->setLastName(count($expFullName)>0 ? implode(' ', $expFullName):'');
283
+        $info->setLastName(count($expFullName) > 0 ? implode(' ', $expFullName) : '');
284 284
         $info->setEmail($email);
285 285
         $info->setEmailVerified(true);
286 286
         $repo->store($user);
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
         /* @var $repoOrganization OrganizationRepository */
311 311
         $repoOrganization = $this->coreContext->getRepositories()->get('Organizations/Organization');
312 312
         $result = $repoOrganization->findByName($orgName);
313
-        $organization = count($result) > 0 ? $result[0]:null;
313
+        $organization = count($result) > 0 ? $result[0] : null;
314 314
         if (!$organization instanceof Organization) {
315 315
             $organization = new Organization();
316 316
             $organizationName = new OrganizationName($orgName);
@@ -426,12 +426,12 @@  discard block
 block discarded – undo
426 426
     {
427 427
         $repo = $this->getUserRepository();
428 428
         $data = $table->getRowsHash();
429
-        $email = isset($data['email']) ? $data['email']:'[email protected]';
430
-        $password = isset($data['password']) ? $data['password']:'test';
431
-        $fullname = isset($data['fullname']) ? $data['fullname']:'Test User';
432
-        $role = isset($data['role']) ? $data['role']:User::ROLE_RECRUITER;
429
+        $email = isset($data['email']) ? $data['email'] : '[email protected]';
430
+        $password = isset($data['password']) ? $data['password'] : 'test';
431
+        $fullname = isset($data['fullname']) ? $data['fullname'] : 'Test User';
432
+        $role = isset($data['role']) ? $data['role'] : User::ROLE_RECRUITER;
433 433
         
434
-        if (!is_object($user=$repo->findByLogin($email))) {
434
+        if (!is_object($user = $repo->findByLogin($email))) {
435 435
             $user = $this->createUser($email, $password, $role, $fullname);
436 436
         }
437 437
         $this->currentUser = $user;
Please login to merge, or discard this patch.
config/config.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -16,12 +16,12 @@  discard block
 block discarded – undo
16 16
 
17 17
 // we will skip install mode when we are in bin/console mode
18 18
 $isCli = php_sapi_name() === 'cli';
19
-if (!$isCli && !file_exists(__DIR__ . '/autoload/yawik.config.global.php')) {
19
+if (!$isCli && !file_exists(__DIR__.'/autoload/yawik.config.global.php')) {
20 20
     $modules = [
21 21
         'Install',
22 22
     ];
23 23
 } else {
24
-    $modules =[
24
+    $modules = [
25 25
         'Core',
26 26
         'Auth',
27 27
         'Cv',
@@ -38,12 +38,12 @@  discard block
 block discarded – undo
38 38
         // kann und über Server-Variablen oder ähnlichen steuern kann
39 39
         $allModules = false;
40 40
     }
41
-    foreach (glob(__DIR__ . '/autoload/*.module.php') as $moduleFile) {
41
+    foreach (glob(__DIR__.'/autoload/*.module.php') as $moduleFile) {
42 42
         $addModules = require $moduleFile;
43 43
         foreach ($addModules as $addModule) {
44 44
             if (strpos($addModule, '-') === 0) {
45 45
                 $remove = substr($addModule, 1);
46
-                $modules = array_filter($modules, function ($elem) use ($remove) {
46
+                $modules = array_filter($modules, function($elem) use ($remove) {
47 47
                     return strcasecmp($elem, $remove);
48 48
                 });
49 49
             } else {
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     ),
100 100
 );
101 101
 
102
-$envConfigFile = __DIR__ . '/config.' . $env . '.php';
102
+$envConfigFile = __DIR__.'/config.'.$env.'.php';
103 103
 if (file_exists($envConfigFile)) {
104 104
     if (is_readable($envConfigFile)) {
105 105
         $envConfig = include $envConfigFile;
Please login to merge, or discard this patch.