Completed
Pull Request — develop (#509)
by ANTHONIUS
21:03
created
module/Behat/src/CvContext.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -22,23 +22,23 @@
 block discarded – undo
22 22
  */
23 23
 class CvContext implements Context
24 24
 {
25
-	use CommonContextTrait;
25
+    use CommonContextTrait;
26 26
 	
27 27
 	
28
-	/**
29
-	 * @Given I go to manage my resume page
30
-	 */
31
-	public function iGoToManageResumePage()
32
-	{
33
-	    $url = $this->buildUrl('lang/my-cv');
34
-		$this->visit($url);
35
-	}
28
+    /**
29
+     * @Given I go to manage my resume page
30
+     */
31
+    public function iGoToManageResumePage()
32
+    {
33
+        $url = $this->buildUrl('lang/my-cv');
34
+        $this->visit($url);
35
+    }
36 36
 	
37
-	/**
38
-	 * @When I click edit on my personal information
39
-	 */
40
-	public function iClickEditOnPersonalInformations()
41
-	{
42
-		$this->summaryFormContext->iClickEditOnForm('resumePersonalInformations');
43
-	}
37
+    /**
38
+     * @When I click edit on my personal information
39
+     */
40
+    public function iClickEditOnPersonalInformations()
41
+    {
42
+        $this->summaryFormContext->iClickEditOnForm('resumePersonalInformations');
43
+    }
44 44
 }
Please login to merge, or discard this patch.
module/Behat/src/OrganizationContext.php 3 patches
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -30,12 +30,12 @@  discard block
 block discarded – undo
30 30
  */
31 31
 class OrganizationContext implements Context
32 32
 {
33
-	use CommonContextTrait;
33
+    use CommonContextTrait;
34 34
 
35 35
     /**
36 36
      * @var JobContext
37 37
      */
38
-	private $jobContext;
38
+    private $jobContext;
39 39
 
40 40
     /**
41 41
      * @BeforeScenario
@@ -47,51 +47,51 @@  discard block
 block discarded – undo
47 47
         $this->jobContext = $scope->getEnvironment()->getContext(JobContext::class);
48 48
     }
49 49
 
50
-	/**
51
-	 * @Given I go to my organization page
52
-	 */
53
-	public function iGoToMyOrganizationPage()
54
-	{
50
+    /**
51
+     * @Given I go to my organization page
52
+     */
53
+    public function iGoToMyOrganizationPage()
54
+    {
55 55
         $url = $this->buildUrl('lang/my-organization');
56
-		$this->visit($url);
57
-	}
56
+        $this->visit($url);
57
+    }
58 58
 	
59
-	/**
60
-	 * @When I hover over name form
61
-	 */
62
-	public function iMouseOverOrganizationNameForm()
63
-	{
64
-		$locator = '#sf-nameForm .sf-summary';
65
-		$this->coreContext->iHoverOverTheElement($locator);
66
-	}
59
+    /**
60
+     * @When I hover over name form
61
+     */
62
+    public function iMouseOverOrganizationNameForm()
63
+    {
64
+        $locator = '#sf-nameForm .sf-summary';
65
+        $this->coreContext->iHoverOverTheElement($locator);
66
+    }
67 67
 	
68
-	/**
69
-	 * @Given I go to create new organization page
70
-	 */
71
-	public function iGoToCreateNewOrganizationPage()
72
-	{
73
-		//$this->visit('/organizations/edit');
68
+    /**
69
+     * @Given I go to create new organization page
70
+     */
71
+    public function iGoToCreateNewOrganizationPage()
72
+    {
73
+        //$this->visit('/organizations/edit');
74 74
         $url = $this->buildUrl('lang/organizations/edit');
75 75
         $this->visit($url);
76
-	}
76
+    }
77 77
 	
78
-	/**
79
-	 * @Given I go to organization overview page
80
-	 */
81
-	public function iGoToOrganizationOverviewPage()
82
-	{
83
-		//$this->visit('/organizations');
84
-		$url = $this->buildUrl('lang/organizations');
85
-		$this->visit($url);
86
-	}
78
+    /**
79
+     * @Given I go to organization overview page
80
+     */
81
+    public function iGoToOrganizationOverviewPage()
82
+    {
83
+        //$this->visit('/organizations');
84
+        $url = $this->buildUrl('lang/organizations');
85
+        $this->visit($url);
86
+    }
87 87
 
88 88
     /**
89 89
      * @Given I want to see list organization profiles
90 90
      */
91
-	public function iWantToSeeListOrganizationProfiles()
91
+    public function iWantToSeeListOrganizationProfiles()
92 92
     {
93
-       $url = $this->buildUrl('lang/organizations/profile');
94
-       $this->visit($url);
93
+        $url = $this->buildUrl('lang/organizations/profile');
94
+        $this->visit($url);
95 95
     }
96 96
 
97 97
     /**
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      * @internal param string $name
101 101
      * @internal param TableNode|null $table
102 102
      */
103
-	public function iHaveOrganization($name)
103
+    public function iHaveOrganization($name)
104 104
     {
105 105
         $user = $this->getUserContext()->getCurrentUser();
106 106
         $organization = $this->findOrganizationByName($name,false);
Please login to merge, or discard this patch.
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -103,9 +103,9 @@  discard block
 block discarded – undo
103 103
 	public function iHaveOrganization($name)
104 104
     {
105 105
         $user = $this->getUserContext()->getCurrentUser();
106
-        $organization = $this->findOrganizationByName($name,false);
106
+        $organization = $this->findOrganizationByName($name, false);
107 107
         $repo = $this->getRepository('Organizations/Organization');
108
-        if(!$organization instanceof Organization){
108
+        if (!$organization instanceof Organization) {
109 109
 
110 110
             $organization = new Organization();
111 111
             $organizationName = new OrganizationName($name);
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         $organization->setParent($parent);
119 119
         $organization->setProfileSetting(Organization::PROFILE_ALWAYS_ENABLE);
120 120
         $permissions = $organization->getPermissions();
121
-        $permissions->grant($user,Permissions::PERMISSION_ALL);
121
+        $permissions->grant($user, Permissions::PERMISSION_ALL);
122 122
 
123 123
         $repo->store($organization);
124 124
         $repo->getDocumentManager()->refresh($organization);
@@ -128,19 +128,19 @@  discard block
 block discarded – undo
128 128
     /**
129 129
      * @Given organization :name have jobs:
130 130
      */
131
-    public function organizationHavePublishedJob($name,TableNode $table)
131
+    public function organizationHavePublishedJob($name, TableNode $table)
132 132
     {
133 133
         $user = $this->getUserContext()->getCurrentUser();
134
-        if(is_null($user)){
134
+        if (is_null($user)) {
135 135
             throw new FailedExpectationException('Need to login first');
136 136
         }
137 137
 
138 138
         $organization = $this->findOrganizationByName($name);
139
-        foreach($table->getColumnsHash() as $index=>$definitions){
139
+        foreach ($table->getColumnsHash() as $index=>$definitions) {
140 140
             $definitions['user'] = $user->getLogin();
141
-            $status = isset($definitions['status']) ? $definitions['status']:'draft';
141
+            $status = isset($definitions['status']) ? $definitions['status'] : 'draft';
142 142
             unset($definitions['status']);
143
-            $this->jobContext->buildJob($status,$definitions,$organization);
143
+            $this->jobContext->buildJob($status, $definitions, $organization);
144 144
         }
145 145
     }
146 146
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
      * @param $name
150 150
      * @param $setting
151 151
      */
152
-    public function profileSetting($name,$setting)
152
+    public function profileSetting($name, $setting)
153 153
     {
154 154
         $repo = $this->getRepository('Organizations/Organization');
155 155
         $organization = $this->findOrganizationByName($name);
@@ -169,12 +169,12 @@  discard block
 block discarded – undo
169 169
         $contact = $organization->getContact();
170 170
 
171 171
         $definitions = $table->getRowsHash();
172
-        foreach($definitions as $name=>$value){
172
+        foreach ($definitions as $name=>$value) {
173 173
             $field = Inflector::camelize($name);
174 174
             $method = 'set'.$field;
175
-            $callback = array($contact,$method);
176
-            if(is_callable($callback)){
177
-                call_user_func_array($callback,[$value]);
175
+            $callback = array($contact, $method);
176
+            if (is_callable($callback)) {
177
+                call_user_func_array($callback, [$value]);
178 178
             }
179 179
         }
180 180
         $this->getRepository('Organizations/Organization')->store($organization);
@@ -186,14 +186,14 @@  discard block
 block discarded – undo
186 186
      * @param string $name
187 187
      * @throws FailedExpectationException
188 188
      */
189
-    public function iGoToOrganizationProfilePage($name=null)
189
+    public function iGoToOrganizationProfilePage($name = null)
190 190
     {
191
-        if(is_null($name)){
191
+        if (is_null($name)) {
192 192
             $organization = $this->getUserContext()->getCurrentUser()->getOrganization()->getOrganization();
193
-        }else{
193
+        } else {
194 194
             $organization = $this->findOrganizationByName($name);
195 195
         }
196
-        $url = $this->buildUrl('lang/organizations/profileDetail',[
196
+        $url = $this->buildUrl('lang/organizations/profileDetail', [
197 197
             'id' => $organization->getId()
198 198
         ]);
199 199
 
@@ -210,10 +210,10 @@  discard block
 block discarded – undo
210 210
         /* @var OrganizationRepository $repo */
211 211
         $repo = $this->getRepository('Organizations/Organization');
212 212
         $result = $repo->findByName($name);
213
-        $organization = count($result) > 0 ? $result[0]:null;
214
-        if(!$organization instanceof Organization && $throwException){
213
+        $organization = count($result) > 0 ? $result[0] : null;
214
+        if (!$organization instanceof Organization && $throwException) {
215 215
             throw new FailedExpectationException(
216
-                sprintf('Organization %s is not found.',$name)
216
+                sprintf('Organization %s is not found.', $name)
217 217
             );
218 218
         }
219 219
         return $organization;
@@ -232,8 +232,8 @@  discard block
 block discarded – undo
232 232
         $jobRepo = $this->getRepository('Jobs/Job');
233 233
         $result = $jobRepo->findByOrganization($org->getId());
234 234
 
235
-        foreach($result as $job){
236
-            $jobRepo->remove($job,true);
235
+        foreach ($result as $job) {
236
+            $jobRepo->remove($job, true);
237 237
         }
238 238
     }
239 239
 
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
     {
245 245
         $user = $this->getUserContext()->getCurrentUser();
246 246
         $organization = $user->getOrganization()->getOrganization();
247
-        $url = $this->buildUrl('lang/organizations/edit',['id' => $organization->getId()]);
247
+        $url = $this->buildUrl('lang/organizations/edit', ['id' => $organization->getId()]);
248 248
         $this->visit($url);
249 249
     }
250 250
 
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
     public function iAttachLogoFromFile($file)
256 256
     {
257 257
         $elementId = 'organizationLogo-original';
258
-        $this->minkContext->attachFileToField($elementId,$file);
258
+        $this->minkContext->attachFileToField($elementId, $file);
259 259
     }
260 260
 
261 261
     /**
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
     public function iRemoveLogoFromOrganization()
265 265
     {
266 266
         $elementId = '#organizationLogo-original-delete';
267
-        $element = $this->minkContext->getSession()->getPage()->find('css',$elementId);
267
+        $element = $this->minkContext->getSession()->getPage()->find('css', $elementId);
268 268
         $element->click();
269 269
     }
270 270
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -190,7 +190,7 @@
 block discarded – undo
190 190
     {
191 191
         if(is_null($name)){
192 192
             $organization = $this->getUserContext()->getCurrentUser()->getOrganization()->getOrganization();
193
-        }else{
193
+        } else{
194 194
             $organization = $this->findOrganizationByName($name);
195 195
         }
196 196
         $url = $this->buildUrl('lang/organizations/profileDetail',[
Please login to merge, or discard this patch.
module/Install/src/Controller/Plugin/UserCreator.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,9 +80,9 @@
 block discarded – undo
80 80
         $repo->setEntityPrototype(new User());
81 81
 
82 82
         $result = true;
83
-        try{
83
+        try {
84 84
             $repo->store($user);
85
-        }catch (\Exception $e){
85
+        } catch (\Exception $e) {
86 86
             throw $e;
87 87
         }
88 88
         return $result;
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
         $result = true;
83 83
         try{
84 84
             $repo->store($user);
85
-        }catch (\Exception $e){
85
+        } catch (\Exception $e){
86 86
             throw $e;
87 87
         }
88 88
         return $result;
Please login to merge, or discard this patch.
module/Install/src/Factory/Controller/Plugin/UserCreatorFactory.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,9 +50,9 @@  discard block
 block discarded – undo
50 50
 
51 51
         $config = $container->get('doctrine.documentmanager.odm_default')->getConfiguration();
52 52
         $config->setDefaultDB($database);
53
-        $dm = $this->createDocumentManager($options['connection'],$config);
53
+        $dm = $this->createDocumentManager($options['connection'], $config);
54 54
 
55
-        $plugin = new UserCreator($credentialFilter,$dm);
55
+        $plugin = new UserCreator($credentialFilter, $dm);
56 56
         return $plugin;
57 57
     }
58 58
 
@@ -64,10 +64,10 @@  discard block
 block discarded – undo
64 64
      * @return DocumentManager
65 65
      * @codeCoverageIgnore
66 66
      */
67
-    public function createDocumentManager($connection,$config)
67
+    public function createDocumentManager($connection, $config)
68 68
     {
69 69
         $dbConn = new Connection($connection);
70
-        $dm = DocumentManager::create($dbConn,$config);
70
+        $dm = DocumentManager::create($dbConn, $config);
71 71
         return $dm;
72 72
     }
73 73
 }
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Listener/JobEntityDependencyListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
  */
26 26
 class JobEntityDependencyListener extends AbstractDependenciesListener
27 27
 {
28
-    protected $entityClasses = [ Job::class ];
28
+    protected $entityClasses = [Job::class];
29 29
 
30 30
     protected function dependencyCheck(DependencyResultEvent $event)
31 31
     {
Please login to merge, or discard this patch.
module/Applications/src/Controller/ManageController.php 3 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -54,6 +54,7 @@
 block discarded – undo
54 54
      * ManageController constructor.
55 55
      *
56 56
      * @param RepositoryService $repositories
57
+     * @param ContainerInterface $container
57 58
      */
58 59
     public function __construct(
59 60
         RepositoryService $repositories,
Please login to merge, or discard this patch.
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
             $application->changeStatus(
164 164
                 $application->getStatus(),
165 165
                 sprintf(/*@translate*/ 'Application was read by %s',
166
-                                       $this->auth()->getUser()->getInfo()->getDisplayName()
166
+                                        $this->auth()->getUser()->getInfo()->getDisplayName()
167 167
                 )
168 168
             );
169 169
         }
@@ -192,8 +192,8 @@  discard block
 block discarded – undo
192 192
                         $viewModel->setVariables(
193 193
                             /*array(
194 194
                             'application' => */$this->builders
195
-                                              ->get('JsonApplication')
196
-                                              ->unbuild($application)
195
+                                                ->get('JsonApplication')
196
+                                                ->unbuild($application)
197 197
                         );
198 198
                         $viewModel->setVariable('isUnread', $applicationIsUnread);
199 199
                         $return = $viewModel;
@@ -358,12 +358,12 @@  discard block
 block discarded – undo
358 358
         /* @var ApplicationEvent $event */
359 359
         $event = $events->getEvent(
360 360
             ApplicationEvent::EVENT_APPLICATION_STATUS_CHANGE,
361
-                                   $this,
362
-                                   [
363
-                                       'application' => $application,
364
-                                       'status' => $status,
365
-                                       'user' => $this->auth()->getUser(),
366
-                                   ]
361
+                                    $this,
362
+                                    [
363
+                                        'application' => $application,
364
+                                        'status' => $status,
365
+                                        'user' => $this->auth()->getUser(),
366
+                                    ]
367 367
         );
368 368
         
369 369
         $event->setIsPostRequest($request->isPost());
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
         $emailAddress = $this->params()->fromQuery('email');
413 413
         /* @var \Applications\Entity\Application $application */
414 414
         $application  = $this->repositories->get('Applications/Application')
415
-                                 ->find($this->params('id'));
415
+                                    ->find($this->params('id'));
416 416
         
417 417
         $this->acl($application, 'forward');
418 418
         
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
         $this->appOptions       = $appOptions;
71 71
         $this->appEvents        = $appEvents;
72 72
         $this->translator       = $translator;
73
-        $this->container         = $container;
73
+        $this->container = $container;
74 74
     }
75 75
     
76 76
     /**
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 
171 171
 
172 172
         
173
-        $format=$this->params()->fromQuery('format');
173
+        $format = $this->params()->fromQuery('format');
174 174
 
175 175
         if ($application->isDraft()) {
176 176
             $list = false;
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
                    && ($network = $this->params()->fromQuery('network'))
299 299
                    && ($data    = $this->params()->fromPost('data'))
300 300
         ) {
301
-            $profileClass = '\\Auth\\Entity\\SocialProfiles\\' . $network;
301
+            $profileClass = '\\Auth\\Entity\\SocialProfiles\\'.$network;
302 302
             $profile      = new $profileClass();
303 303
             $profile->setData(\Zend\Json\Json::decode($data, \Zend\Json\Json::TYPE_ARRAY));
304 304
         } else {
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
         
417 417
         $this->acl($application, 'forward');
418 418
         
419
-        $translator   = $this->translator;
419
+        $translator = $this->translator;
420 420
          
421 421
         if (!$emailAddress) {
422 422
             throw new \InvalidArgumentException('An email address must be supplied.');
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
     public function deleteAction()
457 457
     {
458 458
         $id          = $this->params('id');
459
-        $repositories= $this->repositories;
459
+        $repositories = $this->repositories;
460 460
         $repository  = $repositories->get('Applications/Application');
461 461
         $application = $repository->find($id);
462 462
         
@@ -466,8 +466,8 @@  discard block
 block discarded – undo
466 466
 
467 467
         $this->acl($application, 'delete');
468 468
 
469
-        $events   = $this->appEvents;
470
-        $events->trigger(ApplicationEvent::EVENT_APPLICATION_PRE_DELETE, $this, [ 'application' => $application ]);
469
+        $events = $this->appEvents;
470
+        $events->trigger(ApplicationEvent::EVENT_APPLICATION_PRE_DELETE, $this, ['application' => $application]);
471 471
         
472 472
         $repositories->remove($application);
473 473
         
Please login to merge, or discard this patch.
module/Applications/src/Entity/Application.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -404,7 +404,7 @@
 block discarded – undo
404 404
     /**
405 405
      * {@inheritDoc}
406 406
      * @see \Applications\Entity\ApplicationInterface::getSummary()
407
-     * @return Application
407
+     * @return string
408 408
      */
409 409
     public function getSummary()
410 410
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -446,7 +446,7 @@
 block discarded – undo
446 446
     public function getCv()
447 447
     {
448 448
         if (is_null($this->cv)) {
449
-            $this->cv= new Cv();
449
+            $this->cv = new Cv();
450 450
         }
451 451
         return $this->cv;
452 452
     }
Please login to merge, or discard this patch.
module/Applications/src/Entity/ApplicationInterface.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
     /**
241 241
      * Gets all comments for the application.
242 242
      *
243
-     * @return ArrayCollection;
243
+     * @return Collection
244 244
 
245 245
      */
246 246
     public function getComments();
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
     /**
272 272
      * Gets all attributes for an application.
273 273
      *
274
-     * @return ArrayCollection;
274
+     * @return Attributes
275 275
 
276 276
      */
277 277
     public function getAttributes();
Please login to merge, or discard this patch.
Indentation   -2 removed lines patch added patch discarded remove patch
@@ -241,7 +241,6 @@  discard block
 block discarded – undo
241 241
      * Gets all comments for the application.
242 242
      *
243 243
      * @return ArrayCollection;
244
-
245 244
      */
246 245
     public function getComments();
247 246
     
@@ -272,7 +271,6 @@  discard block
 block discarded – undo
272 271
      * Gets all attributes for an application.
273 272
      *
274 273
      * @return ArrayCollection;
275
-
276 274
      */
277 275
     public function getAttributes();
278 276
 
Please login to merge, or discard this patch.
module/Applications/src/Entity/History.php 1 patch
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,6 +41,9 @@  discard block
 block discarded – undo
41 41
      */
42 42
     protected $message;
43 43
     
44
+    /**
45
+     * @param StatusInterface|null $status
46
+     */
44 47
     public function __construct($status, $message = '[System]')
45 48
     {
46 49
         if (!$status instanceof StatusInterface) {
@@ -116,7 +119,7 @@  discard block
 block discarded – undo
116 119
     /**
117 120
      * Sets the history message
118 121
      *
119
-     * @param $message
122
+     * @param string $message
120 123
      *
121 124
      * @return $this
122 125
      */
Please login to merge, or discard this patch.