Completed
Push — develop ( 3062c0...09456b )
by Mathias
07:45
created
module/Applications/src/autoload_classmap.php 1 patch
Spacing   +82 added lines, -82 removed lines patch added patch discarded remove patch
@@ -1,86 +1,86 @@
 block discarded – undo
1 1
 <?php
2 2
 // Generated by ZF2's ./bin/classmap_generator.php
3 3
 return array(
4
-    'Applications\Acl\ApplicationAccessAssertion'                      => __DIR__ . '/Applications/Acl/ApplicationAccessAssertion.php',
5
-    'Applications\Auth\Dependency\ListListener'                        => __DIR__ . '/Applications/Auth/Dependency/ListListener.php',
6
-    'Applications\Controller\ApplyController'                          => __DIR__ . '/Applications/Controller/ApplyController.php',
7
-    'Applications\Controller\CommentController'                        => __DIR__ . '/Applications/Controller/CommentController.php',
8
-    'Applications\Controller\ConsoleController'                        => __DIR__ . '/Applications/Controller/ConsoleController.php',
9
-    'Applications\Controller\IndexController'                          => __DIR__ . '/Applications/Controller/IndexController.php',
10
-    'Applications\Controller\ManageController'                         => __DIR__ . '/Applications/Controller/ManageController.php',
11
-    'Applications\Controller\MultimanageController'                    => __DIR__ . '/Applications/Controller/MultimanageController.php',
12
-    'Applications\Controller\Plugin\StatusChanger'                     => __DIR__ . '/Applications/Controller/Plugin/StatusChanger.php',
13
-    'Applications\Entity\Application'                                  => __DIR__ . '/Applications/Entity/Application.php',
14
-    'Applications\Entity\ApplicationInterface'                         => __DIR__ . '/Applications/Entity/ApplicationInterface.php',
15
-    'Applications\Entity\Attachment'                                   => __DIR__ . '/Applications/Entity/Attachment.php',
16
-    'Applications\Entity\Attributes'                                   => __DIR__ . '/Applications/Entity/Attributes.php',
17
-    'Applications\Entity\Comment'                                      => __DIR__ . '/Applications/Entity/Comment.php',
18
-    'Applications\Entity\CommentInterface'                             => __DIR__ . '/Applications/Entity/CommentInterface.php',
19
-    'Applications\Entity\Contact'                                      => __DIR__ . '/Applications/Entity/Contact.php',
20
-    'Applications\Entity\Cv'                                           => __DIR__ . '/Applications/Entity/Cv.php',
21
-    'Applications\Entity\Facts'                                        => __DIR__ . '/Applications/Entity/Facts.php',
22
-    'Applications\Entity\FactsInterface'                               => __DIR__ . '/Applications/Entity/FactsInterface.php',
23
-    'Applications\Entity\History'                                      => __DIR__ . '/Applications/Entity/History.php',
24
-    'Applications\Entity\HistoryInterface'                             => __DIR__ . '/Applications/Entity/HistoryInterface.php',
25
-    'Applications\Entity\InternalReferences'                           => __DIR__ . '/Applications/Entity/InternalReferences.php',
26
-    'Applications\Entity\MailHistory'                                  => __DIR__ . '/Applications/Entity/MailHistory.php',
27
-    'Applications\Entity\MailHistoryInterface'                         => __DIR__ . '/Applications/Entity/MailHistoryInterface.php',
28
-    'Applications\Entity\Rating'                                       => __DIR__ . '/Applications/Entity/Rating.php',
29
-    'Applications\Entity\RatingInterface'                              => __DIR__ . '/Applications/Entity/RatingInterface.php',
30
-    'Applications\Entity\Settings'                                     => __DIR__ . '/Applications/Entity/Settings.php',
31
-    'Applications\Entity\SettingsInterface'                            => __DIR__ . '/Applications/Entity/SettingsInterface.php',
32
-    'Applications\Entity\Status'                                       => __DIR__ . '/Applications/Entity/Status.php',
33
-    'Applications\Entity\StatusInterface'                              => __DIR__ . '/Applications/Entity/StatusInterface.php',
34
-    'Applications\Entity\Subscriber'                                   => __DIR__ . '/Applications/Entity/Subscriber.php',
35
-    'Applications\Entity\SubscriberInterface'                          => __DIR__ . '/Applications/Entity/SubscriberInterface.php',
36
-    'Applications\Entity\Validator\Application'                        => __DIR__ . '/Applications/Entity/Validator/Application.php',
37
-    'Applications\Factory\Auth\Dependency\ListListenerFactory'         => __DIR__ . '/Applications/Factory/Auth/Dependency/ListListenerFactory.php',
38
-    'Applications\Factory\Form\AttachmentsFactory'                     => __DIR__ . '/Applications/Factory/Form/AttachmentsFactory.php',
39
-    'Applications\Factory\Form\ContactImageFactory'                    => __DIR__ . '/Applications/Factory/Form/ContactImageFactory.php',
40
-    'Applications\Factory\Form\JobSelectFactory'                       => __DIR__ . '/Applications/Factory/Form/JobSelectFactory.php',
41
-    'Applications\Factory\Form\StatusSelectFactory'                    => __DIR__ . '/Applications/Factory/Form/StatusSelectFactory.php',
42
-    'Applications\Factory\Listener\EventApplicationCreatedFactory'     => __DIR__ . '/Applications/Factory/Listener/EventApplicationCreatedFactory.php',
43
-    'Applications\Factory\Listener\JobSelectValuesFactory'             => __DIR__ . '/Applications/Factory/Listener/JobSelectValuesFactory.php',
44
-    'Applications\Factory\Listener\StatusChangeFactory'                => __DIR__ . '/Applications/Factory/Listener/StatusChangeFactory.php',
45
-    'Applications\Factory\Mail\ConfirmationFactory'                    => __DIR__ . '/Applications/Factory/Mail/ConfirmationFactory.php',
46
-    'Applications\Factory\Mail\NewApplicationFactory'                  => __DIR__ . '/Applications/Factory/Mail/NewApplicationFactory.php',
47
-    'Applications\Factory\ModuleOptionsFactory'                        => __DIR__ . '/Applications/Factory/ModuleOptionsFactory.php',
48
-    'Applications\Factory\Paginator\JobSelectPaginatorFactory'         => __DIR__ . '/Applications/Factory/Paginator/JobSelectPaginatorFactory.php',
49
-    'Applications\Filter\ActionToStatus'                               => __DIR__ . '/Applications/Filter/ActionToStatus.php',
50
-    'Applications\Form\ApplicationsFilter'                             => __DIR__ . '/Applications/Form/ApplicationsFilter.php',
51
-    'Applications\Form\Apply'                                          => __DIR__ . '/Applications/Form/Apply.php',
52
-    'Applications\Form\Attributes'                                     => __DIR__ . '/Applications/Form/Attributes.php',
53
-    'Applications\Form\Base'                                           => __DIR__ . '/Applications/Form/Base.php',
54
-    'Applications\Form\BaseFieldset'                                   => __DIR__ . '/Applications/Form/BaseFieldset.php',
55
-    'Applications\Form\CarbonCopyFieldset'                             => __DIR__ . '/Applications/Form/CarbonCopyFieldset.php',
56
-    'Applications\Form\CommentForm'                                    => __DIR__ . '/Applications/Form/CommentForm.php',
57
-    'Applications\Form\ContactContainer'                               => __DIR__ . '/Applications/Form/ContactContainer.php',
58
-    'Applications\Form\Element\JobSelect'                              => __DIR__ . '/Applications/Form/Element/JobSelect.php',
59
-    'Applications\Form\Element\Ref'                                    => __DIR__ . '/Applications/Form/Element/Ref.php',
60
-    'Applications\Form\Facts'                                          => __DIR__ . '/Applications/Form/Facts.php',
61
-    'Applications\Form\FactsFieldset'                                  => __DIR__ . '/Applications/Form/FactsFieldset.php',
62
-    'Applications\Form\Mail'                                           => __DIR__ . '/Applications/Form/Mail.php',
63
-    'Applications\Form\SettingsFieldset'                               => __DIR__ . '/Applications/Form/SettingsFieldset.php',
64
-    'Applications\Listener\EventApplicationCreated'                    => __DIR__ . '/Applications/Listener/EventApplicationCreated.php',
65
-    'Applications\Listener\Events\ApplicationEvent'                    => __DIR__ . '/Applications/Listener/Events/ApplicationEvent.php',
66
-    'Applications\Listener\JobSelectValues'                            => __DIR__ . '/Applications/Listener/JobSelectValues.php',
67
-    'Applications\Listener\StatusChange'                               => __DIR__ . '/Applications/Listener/StatusChange.php',
68
-    'Applications\Mail\AcceptApplication'                              => __DIR__ . '/Applications/Mail/AcceptApplication.php',
69
-    'Applications\Mail\ApplicationCarbonCopy'                          => __DIR__ . '/Applications/Mail/ApplicationCarbonCopy.php',
70
-    'Applications\Mail\Confirmation'                                   => __DIR__ . '/Applications/Mail/Confirmation.php',
71
-    'Applications\Mail\Forward'                                        => __DIR__ . '/Applications/Mail/Forward.php',
72
-    'Applications\Mail\NewApplication'                                 => __DIR__ . '/Applications/Mail/NewApplication.php',
73
-    'Applications\Mail\StatusChange'                                   => __DIR__ . '/Applications/Mail/StatusChange.php',
74
-    'Applications\Mail\StatusChangeInterface'                          => __DIR__ . '/Applications/Mail/StatusChangeInterface.php',
75
-    'Applications\Options\ModuleOptions'                               => __DIR__ . '/Applications/Options/ModuleOptions.php',
76
-    'Applications\Paginator\JobSelectPaginator'                        => __DIR__ . '/Applications/Paginator/JobSelectPaginator.php',
77
-    'Applications\Repository\Application'                              => __DIR__ . '/Applications/Repository/Application.php',
78
-    'Applications\Repository\Event\DeleteRemovedAttachmentsSubscriber' => __DIR__ . '/Applications/Repository/Event/DeleteRemovedAttachmentsSubscriber.php',
79
-    'Applications\Repository\Event\JobReferencesUpdateListener'        => __DIR__ . '/Applications/Repository/Event/JobReferencesUpdateListener.php',
80
-    'Applications\Repository\Event\UpdateFilesPermissionsSubscriber'   => __DIR__ . '/Applications/Repository/Event/UpdateFilesPermissionsSubscriber.php',
81
-    'Applications\Repository\Event\UpdatePermissionsSubscriber'        => __DIR__ . '/Applications/Repository/Event/UpdatePermissionsSubscriber.php',
82
-    'Applications\Repository\Filter\PaginationQuery'                   => __DIR__ . '/Applications/Repository/Filter/PaginationQuery.php',
83
-    'Applications\Repository\Filter\PaginationQueryFactory'            => __DIR__ . '/Applications/Repository/Filter/PaginationQueryFactory.php',
84
-    'Applications\Repository\PaginationList'                           => __DIR__ . '/Applications/Repository/PaginationList.php',
85
-    'Applications\Repository\Subscriber'                               => __DIR__ . '/Applications/Repository/Subscriber.php',
4
+    'Applications\Acl\ApplicationAccessAssertion'                      => __DIR__.'/Applications/Acl/ApplicationAccessAssertion.php',
5
+    'Applications\Auth\Dependency\ListListener'                        => __DIR__.'/Applications/Auth/Dependency/ListListener.php',
6
+    'Applications\Controller\ApplyController'                          => __DIR__.'/Applications/Controller/ApplyController.php',
7
+    'Applications\Controller\CommentController'                        => __DIR__.'/Applications/Controller/CommentController.php',
8
+    'Applications\Controller\ConsoleController'                        => __DIR__.'/Applications/Controller/ConsoleController.php',
9
+    'Applications\Controller\IndexController'                          => __DIR__.'/Applications/Controller/IndexController.php',
10
+    'Applications\Controller\ManageController'                         => __DIR__.'/Applications/Controller/ManageController.php',
11
+    'Applications\Controller\MultimanageController'                    => __DIR__.'/Applications/Controller/MultimanageController.php',
12
+    'Applications\Controller\Plugin\StatusChanger'                     => __DIR__.'/Applications/Controller/Plugin/StatusChanger.php',
13
+    'Applications\Entity\Application'                                  => __DIR__.'/Applications/Entity/Application.php',
14
+    'Applications\Entity\ApplicationInterface'                         => __DIR__.'/Applications/Entity/ApplicationInterface.php',
15
+    'Applications\Entity\Attachment'                                   => __DIR__.'/Applications/Entity/Attachment.php',
16
+    'Applications\Entity\Attributes'                                   => __DIR__.'/Applications/Entity/Attributes.php',
17
+    'Applications\Entity\Comment'                                      => __DIR__.'/Applications/Entity/Comment.php',
18
+    'Applications\Entity\CommentInterface'                             => __DIR__.'/Applications/Entity/CommentInterface.php',
19
+    'Applications\Entity\Contact'                                      => __DIR__.'/Applications/Entity/Contact.php',
20
+    'Applications\Entity\Cv'                                           => __DIR__.'/Applications/Entity/Cv.php',
21
+    'Applications\Entity\Facts'                                        => __DIR__.'/Applications/Entity/Facts.php',
22
+    'Applications\Entity\FactsInterface'                               => __DIR__.'/Applications/Entity/FactsInterface.php',
23
+    'Applications\Entity\History'                                      => __DIR__.'/Applications/Entity/History.php',
24
+    'Applications\Entity\HistoryInterface'                             => __DIR__.'/Applications/Entity/HistoryInterface.php',
25
+    'Applications\Entity\InternalReferences'                           => __DIR__.'/Applications/Entity/InternalReferences.php',
26
+    'Applications\Entity\MailHistory'                                  => __DIR__.'/Applications/Entity/MailHistory.php',
27
+    'Applications\Entity\MailHistoryInterface'                         => __DIR__.'/Applications/Entity/MailHistoryInterface.php',
28
+    'Applications\Entity\Rating'                                       => __DIR__.'/Applications/Entity/Rating.php',
29
+    'Applications\Entity\RatingInterface'                              => __DIR__.'/Applications/Entity/RatingInterface.php',
30
+    'Applications\Entity\Settings'                                     => __DIR__.'/Applications/Entity/Settings.php',
31
+    'Applications\Entity\SettingsInterface'                            => __DIR__.'/Applications/Entity/SettingsInterface.php',
32
+    'Applications\Entity\Status'                                       => __DIR__.'/Applications/Entity/Status.php',
33
+    'Applications\Entity\StatusInterface'                              => __DIR__.'/Applications/Entity/StatusInterface.php',
34
+    'Applications\Entity\Subscriber'                                   => __DIR__.'/Applications/Entity/Subscriber.php',
35
+    'Applications\Entity\SubscriberInterface'                          => __DIR__.'/Applications/Entity/SubscriberInterface.php',
36
+    'Applications\Entity\Validator\Application'                        => __DIR__.'/Applications/Entity/Validator/Application.php',
37
+    'Applications\Factory\Auth\Dependency\ListListenerFactory'         => __DIR__.'/Applications/Factory/Auth/Dependency/ListListenerFactory.php',
38
+    'Applications\Factory\Form\AttachmentsFactory'                     => __DIR__.'/Applications/Factory/Form/AttachmentsFactory.php',
39
+    'Applications\Factory\Form\ContactImageFactory'                    => __DIR__.'/Applications/Factory/Form/ContactImageFactory.php',
40
+    'Applications\Factory\Form\JobSelectFactory'                       => __DIR__.'/Applications/Factory/Form/JobSelectFactory.php',
41
+    'Applications\Factory\Form\StatusSelectFactory'                    => __DIR__.'/Applications/Factory/Form/StatusSelectFactory.php',
42
+    'Applications\Factory\Listener\EventApplicationCreatedFactory'     => __DIR__.'/Applications/Factory/Listener/EventApplicationCreatedFactory.php',
43
+    'Applications\Factory\Listener\JobSelectValuesFactory'             => __DIR__.'/Applications/Factory/Listener/JobSelectValuesFactory.php',
44
+    'Applications\Factory\Listener\StatusChangeFactory'                => __DIR__.'/Applications/Factory/Listener/StatusChangeFactory.php',
45
+    'Applications\Factory\Mail\ConfirmationFactory'                    => __DIR__.'/Applications/Factory/Mail/ConfirmationFactory.php',
46
+    'Applications\Factory\Mail\NewApplicationFactory'                  => __DIR__.'/Applications/Factory/Mail/NewApplicationFactory.php',
47
+    'Applications\Factory\ModuleOptionsFactory'                        => __DIR__.'/Applications/Factory/ModuleOptionsFactory.php',
48
+    'Applications\Factory\Paginator\JobSelectPaginatorFactory'         => __DIR__.'/Applications/Factory/Paginator/JobSelectPaginatorFactory.php',
49
+    'Applications\Filter\ActionToStatus'                               => __DIR__.'/Applications/Filter/ActionToStatus.php',
50
+    'Applications\Form\ApplicationsFilter'                             => __DIR__.'/Applications/Form/ApplicationsFilter.php',
51
+    'Applications\Form\Apply'                                          => __DIR__.'/Applications/Form/Apply.php',
52
+    'Applications\Form\Attributes'                                     => __DIR__.'/Applications/Form/Attributes.php',
53
+    'Applications\Form\Base'                                           => __DIR__.'/Applications/Form/Base.php',
54
+    'Applications\Form\BaseFieldset'                                   => __DIR__.'/Applications/Form/BaseFieldset.php',
55
+    'Applications\Form\CarbonCopyFieldset'                             => __DIR__.'/Applications/Form/CarbonCopyFieldset.php',
56
+    'Applications\Form\CommentForm'                                    => __DIR__.'/Applications/Form/CommentForm.php',
57
+    'Applications\Form\ContactContainer'                               => __DIR__.'/Applications/Form/ContactContainer.php',
58
+    'Applications\Form\Element\JobSelect'                              => __DIR__.'/Applications/Form/Element/JobSelect.php',
59
+    'Applications\Form\Element\Ref'                                    => __DIR__.'/Applications/Form/Element/Ref.php',
60
+    'Applications\Form\Facts'                                          => __DIR__.'/Applications/Form/Facts.php',
61
+    'Applications\Form\FactsFieldset'                                  => __DIR__.'/Applications/Form/FactsFieldset.php',
62
+    'Applications\Form\Mail'                                           => __DIR__.'/Applications/Form/Mail.php',
63
+    'Applications\Form\SettingsFieldset'                               => __DIR__.'/Applications/Form/SettingsFieldset.php',
64
+    'Applications\Listener\EventApplicationCreated'                    => __DIR__.'/Applications/Listener/EventApplicationCreated.php',
65
+    'Applications\Listener\Events\ApplicationEvent'                    => __DIR__.'/Applications/Listener/Events/ApplicationEvent.php',
66
+    'Applications\Listener\JobSelectValues'                            => __DIR__.'/Applications/Listener/JobSelectValues.php',
67
+    'Applications\Listener\StatusChange'                               => __DIR__.'/Applications/Listener/StatusChange.php',
68
+    'Applications\Mail\AcceptApplication'                              => __DIR__.'/Applications/Mail/AcceptApplication.php',
69
+    'Applications\Mail\ApplicationCarbonCopy'                          => __DIR__.'/Applications/Mail/ApplicationCarbonCopy.php',
70
+    'Applications\Mail\Confirmation'                                   => __DIR__.'/Applications/Mail/Confirmation.php',
71
+    'Applications\Mail\Forward'                                        => __DIR__.'/Applications/Mail/Forward.php',
72
+    'Applications\Mail\NewApplication'                                 => __DIR__.'/Applications/Mail/NewApplication.php',
73
+    'Applications\Mail\StatusChange'                                   => __DIR__.'/Applications/Mail/StatusChange.php',
74
+    'Applications\Mail\StatusChangeInterface'                          => __DIR__.'/Applications/Mail/StatusChangeInterface.php',
75
+    'Applications\Options\ModuleOptions'                               => __DIR__.'/Applications/Options/ModuleOptions.php',
76
+    'Applications\Paginator\JobSelectPaginator'                        => __DIR__.'/Applications/Paginator/JobSelectPaginator.php',
77
+    'Applications\Repository\Application'                              => __DIR__.'/Applications/Repository/Application.php',
78
+    'Applications\Repository\Event\DeleteRemovedAttachmentsSubscriber' => __DIR__.'/Applications/Repository/Event/DeleteRemovedAttachmentsSubscriber.php',
79
+    'Applications\Repository\Event\JobReferencesUpdateListener'        => __DIR__.'/Applications/Repository/Event/JobReferencesUpdateListener.php',
80
+    'Applications\Repository\Event\UpdateFilesPermissionsSubscriber'   => __DIR__.'/Applications/Repository/Event/UpdateFilesPermissionsSubscriber.php',
81
+    'Applications\Repository\Event\UpdatePermissionsSubscriber'        => __DIR__.'/Applications/Repository/Event/UpdatePermissionsSubscriber.php',
82
+    'Applications\Repository\Filter\PaginationQuery'                   => __DIR__.'/Applications/Repository/Filter/PaginationQuery.php',
83
+    'Applications\Repository\Filter\PaginationQueryFactory'            => __DIR__.'/Applications/Repository/Filter/PaginationQueryFactory.php',
84
+    'Applications\Repository\PaginationList'                           => __DIR__.'/Applications/Repository/PaginationList.php',
85
+    'Applications\Repository\Subscriber'                               => __DIR__.'/Applications/Repository/Subscriber.php',
86 86
 );
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/View/Helper/JsonLd.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,8 +50,8 @@
 block discarded – undo
50 50
         $jsonLdProvider = new JsonLdProvider($job);
51 51
 
52 52
         return '<script type="application/ld+json">'
53
-               . $jsonLdProvider->toJsonLd()
54
-               . '</script>';
53
+                . $jsonLdProvider->toJsonLd()
54
+                . '</script>';
55 55
 
56 56
     }
57 57
 
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Entity/Decorator/JsonLdProvider.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         $dateStart = $this->job->getDatePublishStart();
53 53
         $dateStart = $dateStart ? $dateStart->format('Y-m-d') : null;
54 54
 
55
-        $array=[
55
+        $array = [
56 56
             '@context'=>'http://schema.org/',
57 57
             '@type' => 'JobPosting',
58 58
             'title' => $this->job->getTitle(),
@@ -84,9 +84,9 @@  discard block
 block discarded – undo
84 84
      *
85 85
      * @return array
86 86
      */
87
-    private function getLocations($locations){
88
-        $array=[];
89
-        foreach($locations as $location){ /* @var \Core\Entity\LocationInterface $location */
87
+    private function getLocations($locations) {
88
+        $array = [];
89
+        foreach ($locations as $location) { /* @var \Core\Entity\LocationInterface $location */
90 90
             array_push(
91 91
                 $array,
92 92
                 [
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
      */
113 113
     private function getDescription(TemplateValuesInterface $values) {
114 114
 
115
-        $description=sprintf(
115
+        $description = sprintf(
116 116
             "<p>%s</p>".
117 117
             "<h1>%s</h1>".
118 118
             "<h3>Requirements</h3><p>%s</p>".
Please login to merge, or discard this patch.
module/Applications/src/Applications/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   +67 added lines, -67 removed lines patch added patch discarded remove patch
@@ -30,70 +30,70 @@  discard block
 block discarded – undo
30 30
  */
31 31
 class ManageController extends AbstractActionController
32 32
 {
33
-	/**
34
-	 * @var RepositoryService
35
-	 */
36
-	private $repositories;
33
+    /**
34
+     * @var RepositoryService
35
+     */
36
+    private $repositories;
37 37
 	
38
-	/**
39
-	 * @var
40
-	 */
41
-	private $coreNavigation;
38
+    /**
39
+     * @var
40
+     */
41
+    private $coreNavigation;
42 42
 	
43
-	private $forms;
43
+    private $forms;
44 44
 	
45
-	private $appOptions;
45
+    private $appOptions;
46 46
 	
47
-	private $appEvents;
47
+    private $appEvents;
48 48
 	
49
-	private $translator;
49
+    private $translator;
50 50
 	
51
-	private $container;
51
+    private $container;
52 52
 	
53
-	/**
54
-	 * ManageController constructor.
55
-	 *
56
-	 * @param RepositoryService $repositories
57
-	 */
58
-	public function __construct(
59
-		RepositoryService $repositories,
60
-		$coreNavigation,
61
-		$forms,
62
-		$appOptions,
63
-		$appEvents,
64
-		$translator,
65
-		$container
66
-	)
67
-	{
68
-		$this->repositories     = $repositories;
69
-		$this->coreNavigation   = $coreNavigation;
70
-		$this->forms            = $forms;
71
-		$this->appOptions       = $appOptions;
72
-		$this->appEvents        = $appEvents;
73
-		$this->translator       = $translator;
74
-		$this->container         = $container;
75
-	}
53
+    /**
54
+     * ManageController constructor.
55
+     *
56
+     * @param RepositoryService $repositories
57
+     */
58
+    public function __construct(
59
+        RepositoryService $repositories,
60
+        $coreNavigation,
61
+        $forms,
62
+        $appOptions,
63
+        $appEvents,
64
+        $translator,
65
+        $container
66
+    )
67
+    {
68
+        $this->repositories     = $repositories;
69
+        $this->coreNavigation   = $coreNavigation;
70
+        $this->forms            = $forms;
71
+        $this->appOptions       = $appOptions;
72
+        $this->appEvents        = $appEvents;
73
+        $this->translator       = $translator;
74
+        $this->container         = $container;
75
+    }
76 76
 	
77
-	/**
78
-	 * @param ContainerInterface $container
79
-	 *
80
-	 * @return ManageController
81
-	 */
82
-	static public function factory(ContainerInterface $container)
83
-	{
84
-		$ob = new self(
85
-			$container->get('Core/RepositoryService'),
86
-			$container->get('Core/Navigation'),
87
-			$container->get('forms'),
88
-			$container->get('Applications/Options'),
89
-			$container->get('Applications/Events'),
90
-			$container->get('translator'),
91
-			$container
92
-		);
93
-		return $ob;
94
-	}
77
+    /**
78
+     * @param ContainerInterface $container
79
+     *
80
+     * @return ManageController
81
+     */
82
+    static public function factory(ContainerInterface $container)
83
+    {
84
+        $ob = new self(
85
+            $container->get('Core/RepositoryService'),
86
+            $container->get('Core/Navigation'),
87
+            $container->get('forms'),
88
+            $container->get('Applications/Options'),
89
+            $container->get('Applications/Events'),
90
+            $container->get('translator'),
91
+            $container
92
+        );
93
+        return $ob;
94
+    }
95 95
 	
96
-	/**
96
+    /**
97 97
      * (non-PHPdoc)
98 98
      * @see \Zend\Mvc\Controller\AbstractActionController::onDispatch()
99 99
      */
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
             $application->changeStatus(
165 165
                 $application->getStatus(),
166 166
                 sprintf(/*@translate*/ 'Application was read by %s',
167
-                                       $this->auth()->getUser()->getInfo()->getDisplayName()));
167
+                                        $this->auth()->getUser()->getInfo()->getDisplayName()));
168 168
         }
169 169
 
170 170
 
@@ -191,15 +191,15 @@  discard block
 block discarded – undo
191 191
                         $viewModel->setVariables(
192 192
                             /*array(
193 193
                             'application' => */$this->builders
194
-                                              ->get('JsonApplication')
195
-                                              ->unbuild($application)
194
+                                                ->get('JsonApplication')
195
+                                                ->unbuild($application)
196 196
                         );
197 197
                         $viewModel->setVariable('isUnread', $applicationIsUnread);
198 198
                         $return = $viewModel;
199 199
                 break;
200 200
             case 'pdf':
201
-            	// @TODO: [ZF3] Refactor this so we can inject Core/Html2Pdf service during controller creation
202
-	            $pdf = $this->container->get('Core/Html2Pdf');
201
+                // @TODO: [ZF3] Refactor this so we can inject Core/Html2Pdf service during controller creation
202
+                $pdf = $this->container->get('Core/Html2Pdf');
203 203
                 $return['format'] = $format;
204 204
                 break;
205 205
             default:
@@ -356,12 +356,12 @@  discard block
 block discarded – undo
356 356
 
357 357
         /* @var ApplicationEvent $event */
358 358
         $event = $events->getEvent(ApplicationEvent::EVENT_APPLICATION_STATUS_CHANGE,
359
-                                   $this,
360
-                                   [
361
-                                       'application' => $application,
362
-                                       'status' => $status,
363
-                                       'user' => $this->auth()->getUser(),
364
-                                   ]
359
+                                    $this,
360
+                                    [
361
+                                        'application' => $application,
362
+                                        'status' => $status,
363
+                                        'user' => $this->auth()->getUser(),
364
+                                    ]
365 365
         );
366 366
         
367 367
         $event->setIsPostRequest($request->isPost());
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
         $emailAddress = $this->params()->fromQuery('email');
412 412
         /* @var \Applications\Entity\Application $application */
413 413
         $application  = $this->repositories->get('Applications/Application')
414
-                                 ->find($this->params('id'));
414
+                                    ->find($this->params('id'));
415 415
         
416 416
         $this->acl($application, 'forward');
417 417
         
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 		$this->appOptions       = $appOptions;
72 72
 		$this->appEvents        = $appEvents;
73 73
 		$this->translator       = $translator;
74
-		$this->container         = $container;
74
+		$this->container = $container;
75 75
 	}
76 76
 	
77 77
 	/**
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 
170 170
 
171 171
         
172
-        $format=$this->params()->fromQuery('format');
172
+        $format = $this->params()->fromQuery('format');
173 173
 
174 174
         if ($application->isDraft()) {
175 175
             $list = false;
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
                    && ($network = $this->params()->fromQuery('network'))
298 298
                    && ($data    = $this->params()->fromPost('data'))
299 299
         ) {
300
-            $profileClass = '\\Auth\\Entity\\SocialProfiles\\' . $network;
300
+            $profileClass = '\\Auth\\Entity\\SocialProfiles\\'.$network;
301 301
             $profile      = new $profileClass();
302 302
             $profile->setData(\Zend\Json\Json::decode($data, \Zend\Json\Json::TYPE_ARRAY));
303 303
         } else {
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
         
367 367
         $event->setIsPostRequest($request->isPost());
368 368
         $event->setPostData($request->getPost());
369
-        $events->trigger($event->getName(),$event);
369
+        $events->trigger($event->getName(), $event);
370 370
 
371 371
         $params = $event->getFormData();
372 372
 
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
         
416 416
         $this->acl($application, 'forward');
417 417
         
418
-        $translator   = $this->translator;
418
+        $translator = $this->translator;
419 419
          
420 420
         if (!$emailAddress) {
421 421
             throw new \InvalidArgumentException('An email address must be supplied.');
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
     public function deleteAction()
456 456
     {
457 457
         $id          = $this->params('id');
458
-        $repositories= $this->repositories;
458
+        $repositories = $this->repositories;
459 459
         $repository  = $repositories->get('Applications/Application');
460 460
         $application = $repository->find($id);
461 461
         
@@ -465,8 +465,8 @@  discard block
 block discarded – undo
465 465
 
466 466
         $this->acl($application, 'delete');
467 467
 
468
-        $events   = $this->appEvents;
469
-        $events->trigger(ApplicationEvent::EVENT_APPLICATION_PRE_DELETE, $this, [ 'application' => $application ]);
468
+        $events = $this->appEvents;
469
+        $events->trigger(ApplicationEvent::EVENT_APPLICATION_PRE_DELETE, $this, ['application' => $application]);
470 470
         
471 471
         $repositories->remove($application);
472 472
         
Please login to merge, or discard this patch.
module/Auth/src/Auth/Factory/Service/RegisterConfirmationFactory.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
      * @param  string             $requestedName
26 26
      * @param  null|array         $options
27 27
      *
28
-     * @return object
28
+     * @return RegisterConfirmation
29 29
      * @throws ServiceNotFoundException if unable to resolve the service.
30 30
      * @throws ServiceNotCreatedException if an exception is raised when
31 31
      *     creating a service.
Please login to merge, or discard this patch.
module/Auth/src/Auth/Factory/Service/UserUniqueTokenGeneratorFactory.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
      * @param  string             $requestedName
25 25
      * @param  null|array         $options
26 26
      *
27
-     * @return object
27
+     * @return UserUniqueTokenGenerator
28 28
      * @throws ServiceNotFoundException if unable to resolve the service.
29 29
      * @throws ServiceNotCreatedException if an exception is raised when
30 30
      *     creating a service.
Please login to merge, or discard this patch.
module/Behat/src/Select2Context.php 3 patches
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,6 +31,7 @@  discard block
 block discarded – undo
31 31
 	 *
32 32
 	 * @When /^(?:|I )fill in select2 "(?P<field>(?:[^"]|\\")*)" with "(?P<value>(?:[^"]|\\")*)"$/
33 33
 	 * @When /^(?:|I )fill in select2 "(?P<value>(?:[^"]|\\")*)" for "(?P<field>(?:[^"]|\\")*)"$/
34
+	 * @param string $field
34 35
 	 */
35 36
 	public function iFillInSelect2Field($field, $value)
36 37
 	{
@@ -42,7 +43,7 @@  discard block
 block discarded – undo
42 43
 	
43 44
 	/**
44 45
 	 * @When I fill in select2 search :field with :search and I choose :choice
45
-	 * @param $field
46
+	 * @param string $field
46 47
 	 * @param $value
47 48
 	 */
48 49
 	public function iFillInSelect2FieldWith($field,$search,$choice=null)
Please login to merge, or discard this patch.
Indentation   +111 added lines, -111 removed lines patch added patch discarded remove patch
@@ -24,130 +24,130 @@
 block discarded – undo
24 24
  */
25 25
 class Select2Context extends RawMinkContext implements Context
26 26
 {
27
-	protected $timeout = 5;
27
+    protected $timeout = 5;
28 28
 	
29
-	/**
30
-	 * Fills in Select2 field with specified
31
-	 *
32
-	 * @When /^(?:|I )fill in select2 "(?P<field>(?:[^"]|\\")*)" with "(?P<value>(?:[^"]|\\")*)"$/
33
-	 * @When /^(?:|I )fill in select2 "(?P<value>(?:[^"]|\\")*)" for "(?P<field>(?:[^"]|\\")*)"$/
34
-	 */
35
-	public function iFillInSelect2Field($field, $value)
36
-	{
37
-		$page = $this->getSession()->getPage();
29
+    /**
30
+     * Fills in Select2 field with specified
31
+     *
32
+     * @When /^(?:|I )fill in select2 "(?P<field>(?:[^"]|\\")*)" with "(?P<value>(?:[^"]|\\")*)"$/
33
+     * @When /^(?:|I )fill in select2 "(?P<value>(?:[^"]|\\")*)" for "(?P<field>(?:[^"]|\\")*)"$/
34
+     */
35
+    public function iFillInSelect2Field($field, $value)
36
+    {
37
+        $page = $this->getSession()->getPage();
38 38
 		
39
-		$this->openField($page, $field);
40
-		$this->selectValue($page, $field, $value, $this->timeout);
41
-	}
39
+        $this->openField($page, $field);
40
+        $this->selectValue($page, $field, $value, $this->timeout);
41
+    }
42 42
 	
43
-	/**
44
-	 * @When I fill in select2 search :field with :search and I choose :choice
45
-	 * @param $field
46
-	 * @param $value
47
-	 */
48
-	public function iFillInSelect2FieldWith($field,$search,$choice=null)
49
-	{
50
-		$page = $this->getSession()->getPage();
51
-		$this->openField($page, $field);
52
-		$this->fillSearchField($page,$field,$search);
53
-		$this->selectValue($page, $field, $choice);
54
-	}
43
+    /**
44
+     * @When I fill in select2 search :field with :search and I choose :choice
45
+     * @param $field
46
+     * @param $value
47
+     */
48
+    public function iFillInSelect2FieldWith($field,$search,$choice=null)
49
+    {
50
+        $page = $this->getSession()->getPage();
51
+        $this->openField($page, $field);
52
+        $this->fillSearchField($page,$field,$search);
53
+        $this->selectValue($page, $field, $choice);
54
+    }
55 55
 	
56
-	/**
57
-	 * Fill Select2 search field
58
-	 *
59
-	 * @param DocumentElement $page
60
-	 * @param string          $field
61
-	 * @param string          $value
62
-	 * @throws \Exception
63
-	 */
64
-	private function fillSearchField(DocumentElement $page, $field, $value)
65
-	{
66
-		$driver = $this->getSession()->getDriver();
67
-		if ('Behat\Mink\Driver\Selenium2Driver' === get_class($driver)) {
68
-			// Can't use `$this->getSession()->getPage()->find()` because of https://github.com/minkphp/MinkSelenium2Driver/issues/188
56
+    /**
57
+     * Fill Select2 search field
58
+     *
59
+     * @param DocumentElement $page
60
+     * @param string          $field
61
+     * @param string          $value
62
+     * @throws \Exception
63
+     */
64
+    private function fillSearchField(DocumentElement $page, $field, $value)
65
+    {
66
+        $driver = $this->getSession()->getDriver();
67
+        if ('Behat\Mink\Driver\Selenium2Driver' === get_class($driver)) {
68
+            // Can't use `$this->getSession()->getPage()->find()` because of https://github.com/minkphp/MinkSelenium2Driver/issues/188
69 69
 			
70
-			$element = $page->find('css','.select2-container--open .select2-search__field');
71
-			$xpath = $element->getXpath();
72
-			$select2Input = $this->getSession()
73
-				->getDriver()
74
-				->getWebDriverSession()
75
-				->element('xpath',$xpath)
76
-				//->element('xpath', "//html/descendant-or-self::*[@class and contains(concat(' ', normalize-space(@class), ' '), ' select2-search__field ')]")
77
-			;
78
-			if (!$select2Input) {
79
-				throw new \Exception(sprintf('No field "%s" found', $field));
80
-			}
70
+            $element = $page->find('css','.select2-container--open .select2-search__field');
71
+            $xpath = $element->getXpath();
72
+            $select2Input = $this->getSession()
73
+                ->getDriver()
74
+                ->getWebDriverSession()
75
+                ->element('xpath',$xpath)
76
+                //->element('xpath', "//html/descendant-or-self::*[@class and contains(concat(' ', normalize-space(@class), ' '), ' select2-search__field ')]")
77
+            ;
78
+            if (!$select2Input) {
79
+                throw new \Exception(sprintf('No field "%s" found', $field));
80
+            }
81 81
 			
82
-			$select2Input->postValue(['value' => [$value]]);
83
-		} else {
84
-			$select2Input = $page->find('css', '.select2-search__field');
85
-			if (!$select2Input) {
86
-				throw new \Exception(sprintf('No input found for "%s"', $field));
87
-			}
88
-			$select2Input->setValue($value);
89
-		}
82
+            $select2Input->postValue(['value' => [$value]]);
83
+        } else {
84
+            $select2Input = $page->find('css', '.select2-search__field');
85
+            if (!$select2Input) {
86
+                throw new \Exception(sprintf('No input found for "%s"', $field));
87
+            }
88
+            $select2Input->setValue($value);
89
+        }
90 90
 		
91
-		$this->waitForLoadingResults($this->timeout);
92
-	}
91
+        $this->waitForLoadingResults($this->timeout);
92
+    }
93 93
 	
94
-	/**
95
-	 * Select value in choice list
96
-	 *
97
-	 * @param DocumentElement $page
98
-	 * @param string          $field
99
-	 * @param string          $value
100
-	 * @param int             $time
101
-	 * @throws \Exception
102
-	 */
103
-	private function selectValue(DocumentElement $page, $field, $value, $time=5)
104
-	{
105
-		$this->waitForLoadingResults($time);
94
+    /**
95
+     * Select value in choice list
96
+     *
97
+     * @param DocumentElement $page
98
+     * @param string          $field
99
+     * @param string          $value
100
+     * @param int             $time
101
+     * @throws \Exception
102
+     */
103
+    private function selectValue(DocumentElement $page, $field, $value, $time=5)
104
+    {
105
+        $this->waitForLoadingResults($time);
106 106
 		
107
-		$chosenResults = $page->findAll('css', '.select2-results li');
108
-		foreach ($chosenResults as $result) {
109
-			$text = $result->getText();
110
-			if (false!==strpos($text,$value)) {
111
-				$result->click();
112
-				return;
113
-			}
114
-		}
107
+        $chosenResults = $page->findAll('css', '.select2-results li');
108
+        foreach ($chosenResults as $result) {
109
+            $text = $result->getText();
110
+            if (false!==strpos($text,$value)) {
111
+                $result->click();
112
+                return;
113
+            }
114
+        }
115 115
 		
116
-		throw new \Exception(sprintf('Value "%s" not found for "%s"', $value, $field));
117
-	}
116
+        throw new \Exception(sprintf('Value "%s" not found for "%s"', $value, $field));
117
+    }
118 118
 	
119
-	private function openField(DocumentElement $page, $field)
120
-	{
121
-		$inputField = $page->find('css',$field);
122
-		if(!$inputField){
123
-			$fieldName = sprintf('select[name="%s"] + .select2-container', $field);
124
-			$inputField = $page->find('css', $fieldName);
125
-		}
126
-		if (!$inputField) {
127
-			throw new \Exception(sprintf('No field "%s" found', $field));
128
-		}
119
+    private function openField(DocumentElement $page, $field)
120
+    {
121
+        $inputField = $page->find('css',$field);
122
+        if(!$inputField){
123
+            $fieldName = sprintf('select[name="%s"] + .select2-container', $field);
124
+            $inputField = $page->find('css', $fieldName);
125
+        }
126
+        if (!$inputField) {
127
+            throw new \Exception(sprintf('No field "%s" found', $field));
128
+        }
129 129
 		
130
-		$choice = $inputField->find('css', '.select2-selection');
131
-		if (!$choice) {
132
-			throw new \Exception(sprintf('No select2 choice found for "%s"', $field));
133
-		}
134
-		$choice->press();
135
-	}
130
+        $choice = $inputField->find('css', '.select2-selection');
131
+        if (!$choice) {
132
+            throw new \Exception(sprintf('No select2 choice found for "%s"', $field));
133
+        }
134
+        $choice->press();
135
+    }
136 136
 	
137
-	/**
138
-	 * Wait the end of fetching Select2 results
139
-	 *
140
-	 * @param int $time Time to wait in seconds
141
-	 */
142
-	private function waitForLoadingResults($time)
143
-	{
144
-		for ($i = 0; $i < $time; $i++) {
145
-			if (!$this->getSession()->getPage()->find('css', '.select2-results__option.loading-results')) {
146
-				return;
147
-			}
137
+    /**
138
+     * Wait the end of fetching Select2 results
139
+     *
140
+     * @param int $time Time to wait in seconds
141
+     */
142
+    private function waitForLoadingResults($time)
143
+    {
144
+        for ($i = 0; $i < $time; $i++) {
145
+            if (!$this->getSession()->getPage()->find('css', '.select2-results__option.loading-results')) {
146
+                return;
147
+            }
148 148
 			
149
-			sleep(1);
150
-		}
151
-	}
149
+            sleep(1);
150
+        }
151
+    }
152 152
 	
153 153
 }
154 154
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -45,11 +45,11 @@  discard block
 block discarded – undo
45 45
 	 * @param $field
46 46
 	 * @param $value
47 47
 	 */
48
-	public function iFillInSelect2FieldWith($field,$search,$choice=null)
48
+	public function iFillInSelect2FieldWith($field, $search, $choice = null)
49 49
 	{
50 50
 		$page = $this->getSession()->getPage();
51 51
 		$this->openField($page, $field);
52
-		$this->fillSearchField($page,$field,$search);
52
+		$this->fillSearchField($page, $field, $search);
53 53
 		$this->selectValue($page, $field, $choice);
54 54
 	}
55 55
 	
@@ -67,12 +67,12 @@  discard block
 block discarded – undo
67 67
 		if ('Behat\Mink\Driver\Selenium2Driver' === get_class($driver)) {
68 68
 			// Can't use `$this->getSession()->getPage()->find()` because of https://github.com/minkphp/MinkSelenium2Driver/issues/188
69 69
 			
70
-			$element = $page->find('css','.select2-container--open .select2-search__field');
70
+			$element = $page->find('css', '.select2-container--open .select2-search__field');
71 71
 			$xpath = $element->getXpath();
72 72
 			$select2Input = $this->getSession()
73 73
 				->getDriver()
74 74
 				->getWebDriverSession()
75
-				->element('xpath',$xpath)
75
+				->element('xpath', $xpath)
76 76
 				//->element('xpath', "//html/descendant-or-self::*[@class and contains(concat(' ', normalize-space(@class), ' '), ' select2-search__field ')]")
77 77
 			;
78 78
 			if (!$select2Input) {
@@ -100,14 +100,14 @@  discard block
 block discarded – undo
100 100
 	 * @param int             $time
101 101
 	 * @throws \Exception
102 102
 	 */
103
-	private function selectValue(DocumentElement $page, $field, $value, $time=5)
103
+	private function selectValue(DocumentElement $page, $field, $value, $time = 5)
104 104
 	{
105 105
 		$this->waitForLoadingResults($time);
106 106
 		
107 107
 		$chosenResults = $page->findAll('css', '.select2-results li');
108 108
 		foreach ($chosenResults as $result) {
109 109
 			$text = $result->getText();
110
-			if (false!==strpos($text,$value)) {
110
+			if (false !== strpos($text, $value)) {
111 111
 				$result->click();
112 112
 				return;
113 113
 			}
@@ -118,8 +118,8 @@  discard block
 block discarded – undo
118 118
 	
119 119
 	private function openField(DocumentElement $page, $field)
120 120
 	{
121
-		$inputField = $page->find('css',$field);
122
-		if(!$inputField){
121
+		$inputField = $page->find('css', $field);
122
+		if (!$inputField) {
123 123
 			$fieldName = sprintf('select[name="%s"] + .select2-container', $field);
124 124
 			$inputField = $page->find('css', $fieldName);
125 125
 		}
Please login to merge, or discard this patch.
module/Behat/src/UserContext.php 4 patches
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -198,6 +198,9 @@  discard block
 block discarded – undo
198 198
 		$this->startLogin($user,'test');
199 199
 	}
200 200
 	
201
+	/**
202
+	 * @param string $password
203
+	 */
201 204
 	private function startLogin(UserInterface $user, $password)
202 205
 	{
203 206
 		$currentUser = $this->currentUser;
@@ -242,7 +245,7 @@  discard block
 block discarded – undo
242 245
 	 * @param string $fullname
243 246
 	 * @param string $role
244 247
 	 *
245
-	 * @return \Auth\Entity\UserInterface
248
+	 * @return \Core\Entity\EntityInterface
246 249
 	 */
247 250
 	public function createUser($email,$password,$role=User::ROLE_RECRUITER,$fullname="Test Recruiter")
248 251
 	{
Please login to merge, or discard this patch.
Spacing   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      */
65 65
     protected $currentUser;
66 66
 	
67
-	public function __construct($parameters=[])
67
+	public function __construct($parameters = [])
68 68
 	{
69 69
 		$defaultLoginInfo = [
70 70
 			'facebook' => [
@@ -76,8 +76,8 @@  discard block
 block discarded – undo
76 76
 				'session_password-login' => getenv('LINKEDIN_USER_PASSWORD')
77 77
 			],
78 78
 		];
79
-		$socialLoginConfig = isset($parameters['social_login_info']) ? $parameters['social_login_info']:[];
80
-		$this->socialLoginInfo = array_merge($defaultLoginInfo,$socialLoginConfig);
79
+		$socialLoginConfig = isset($parameters['social_login_info']) ? $parameters['social_login_info'] : [];
80
+		$this->socialLoginInfo = array_merge($defaultLoginInfo, $socialLoginConfig);
81 81
 	}
82 82
 
83 83
 	/**
@@ -87,13 +87,13 @@  discard block
 block discarded – undo
87 87
 	static public function afterSuite(AfterSuiteScope $scope)
88 88
 	{
89 89
 		$repo = static::$userRepo;
90
-		foreach(static::$users as $user){
91
-			if($repo->findByLogin($user->getLogin())){
92
-				try{
90
+		foreach (static::$users as $user) {
91
+			if ($repo->findByLogin($user->getLogin())) {
92
+				try {
93 93
 					JobContext::removeJobByUser($user);
94
-					$repo->remove($user,true);
94
+					$repo->remove($user, true);
95 95
 					$repo->getDocumentManager()->refresh($user);
96
-				}catch (\Exception $e){
96
+				} catch (\Exception $e) {
97 97
 				
98 98
 				}
99 99
 			}
@@ -118,8 +118,8 @@  discard block
 block discarded – undo
118 118
 	{
119 119
 		$provider = strtolower($provider);
120 120
 		$mink = $this->minkContext;
121
-		foreach($this->socialLoginInfo[$provider] as $field=>$value){
122
-			$mink->fillField($field,$value);
121
+		foreach ($this->socialLoginInfo[$provider] as $field=>$value) {
122
+			$mink->fillField($field, $value);
123 123
 		}
124 124
 	}
125 125
 	
@@ -127,15 +127,15 @@  discard block
 block discarded – undo
127 127
 	 * @Given I am logged in as a recruiter
128 128
 	 * @Given I am logged in as a recruiter with :organization as organization
129 129
 	 */
130
-	public function iAmLoggedInAsARecruiter($organization=null)
130
+	public function iAmLoggedInAsARecruiter($organization = null)
131 131
 	{
132 132
 		$user = $this->thereIsAUserIdentifiedBy(
133 133
 			'[email protected]',
134
-			'test',User::ROLE_RECRUITER,
134
+			'test', User::ROLE_RECRUITER,
135 135
 			'Test Recruiter',
136 136
 			$organization
137 137
 		);
138
-		$this->startLogin($user,'test');
138
+		$this->startLogin($user, 'test');
139 139
 	}
140 140
 	
141 141
 	/**
@@ -145,9 +145,9 @@  discard block
 block discarded – undo
145 145
 	public function iDonTHaveUser($login)
146 146
 	{
147 147
 		$repo = $this->getUserRepository();
148
-		$user=$repo->findByLogin($login);
149
-		if($user instanceof UserInterface){
150
-			$repo->remove($user,true);
148
+		$user = $repo->findByLogin($login);
149
+		if ($user instanceof UserInterface) {
150
+			$repo->remove($user, true);
151 151
 		}
152 152
 	}
153 153
 	
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 	 * @param $role
157 157
 	 * @param TableNode $fields
158 158
 	 */
159
-	public function iHaveUserWithTheFollowing($role,TableNode $fields)
159
+	public function iHaveUserWithTheFollowing($role, TableNode $fields)
160 160
 	{
161 161
 		$normalizedFields = [
162 162
 			'login' => '[email protected]',
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 			'password' => 'test',
166 166
 			'organization' => 'Cross Solution'
167 167
 		];
168
-		foreach($fields->getRowsHash() as $field=>$value){
168
+		foreach ($fields->getRowsHash() as $field=>$value) {
169 169
 			$field = Inflector::camelize($field);
170 170
 			$normalizedFields[$field] = $value;
171 171
 		}
@@ -184,14 +184,14 @@  discard block
 block discarded – undo
184 184
 	 */
185 185
 	public function iAmLoggedInAsAnAdmin()
186 186
 	{
187
-		$user = $this->thereIsAUserIdentifiedBy('[email protected]','test',User::ROLE_ADMIN);
188
-		$this->startLogin($user,'test');
187
+		$user = $this->thereIsAUserIdentifiedBy('[email protected]', 'test', User::ROLE_ADMIN);
188
+		$this->startLogin($user, 'test');
189 189
 	}
190 190
 	
191 191
 	private function startLogin(UserInterface $user, $password)
192 192
 	{
193 193
 		$currentUser = $this->currentUser;
194
-		if(!is_object($currentUser) || $user->getId()!=$currentUser->getId()){
194
+		if (!is_object($currentUser) || $user->getId() != $currentUser->getId()) {
195 195
 			$this->iWantToLogIn();
196 196
 			$this->iSpecifyTheUsernameAs($user->getLogin());
197 197
 			$this->iSpecifyThePasswordAs($password);
@@ -211,16 +211,16 @@  discard block
 block discarded – undo
211 211
 	/**
212 212
 	 * @Given there is a user :email identified by :password
213 213
 	 */
214
-	public function thereIsAUserIdentifiedBy($email, $password,$role=User::ROLE_RECRUITER,$fullname="Test Recruiter",$organization=null)
214
+	public function thereIsAUserIdentifiedBy($email, $password, $role = User::ROLE_RECRUITER, $fullname = "Test Recruiter", $organization = null)
215 215
 	{
216 216
 		$repo = $this->getUserRepository();
217 217
 
218
-		if(!is_object($user=$repo->findByEmail($email))){
219
-			$user = $this->createUser($email,$password,$role,$fullname,$organization);
218
+		if (!is_object($user = $repo->findByEmail($email))) {
219
+			$user = $this->createUser($email, $password, $role, $fullname, $organization);
220 220
 		}
221 221
 		
222
-		if(!is_null($organization)){
223
-			$this->iHaveMainOrganization($user,$organization);
222
+		if (!is_null($organization)) {
223
+			$this->iHaveMainOrganization($user, $organization);
224 224
 		}
225 225
 		$this->addCreatedUser($user);
226 226
 		return $user;
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 	 *
236 236
 	 * @return \Auth\Entity\UserInterface
237 237
 	 */
238
-	public function createUser($email,$password,$role=User::ROLE_RECRUITER,$fullname="Test Recruiter")
238
+	public function createUser($email, $password, $role = User::ROLE_RECRUITER, $fullname = "Test Recruiter")
239 239
 	{
240 240
 		/* @var Register $service */
241 241
 		/* @var User $user */
@@ -246,10 +246,10 @@  discard block
 block discarded – undo
246 246
 		$user->setRole($role);
247 247
 		$settings = $user->getSettings('Applications');
248 248
 		
249
-		$expFullName = explode(' ',$fullname);
249
+		$expFullName = explode(' ', $fullname);
250 250
 		$info = $user->getInfo();
251 251
 		$info->setFirstName(array_shift($expFullName));
252
-		$info->setLastName(count($expFullName)>0 ? implode(' ',$expFullName):'');
252
+		$info->setLastName(count($expFullName) > 0 ? implode(' ', $expFullName) : '');
253 253
 		$info->setEmail($email);
254 254
 		$info->setEmailVerified(true);
255 255
 		$repo->store($user);
@@ -269,19 +269,19 @@  discard block
 block discarded – undo
269 269
 	 * @When I have :organization as my main organization
270 270
 	 * @param $orgName
271 271
 	 */
272
-	public function iHaveMainOrganization(UserInterface $user,$orgName)
272
+	public function iHaveMainOrganization(UserInterface $user, $orgName)
273 273
 	{
274 274
 		/* @var $repoOrganization OrganizationRepository */
275 275
 		$repoOrganization = $this->coreContext->getRepositories()->get('Organizations/Organization');
276
-		$organization=$repoOrganization->findByName($orgName);
277
-		if(!$organization instanceof Organization){
276
+		$organization = $repoOrganization->findByName($orgName);
277
+		if (!$organization instanceof Organization) {
278 278
 			$organization = new Organization();
279 279
 			$organizationName = new OrganizationName($orgName);
280 280
 			$organization->setOrganizationName($organizationName);
281 281
 			$permissions = $organization->getPermissions();
282
-			$permissions->grant($user,Permissions::PERMISSION_ALL);
283
-		}else {
284
-			$organization->getPermissions()->grant($user,Permissions::PERMISSION_ALL);
282
+			$permissions->grant($user, Permissions::PERMISSION_ALL);
283
+		} else {
284
+			$organization->getPermissions()->grant($user, Permissions::PERMISSION_ALL);
285 285
 		}
286 286
 		$organization->setUser($user);
287 287
 		$repoOrganization->store($organization);
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
 	 */
304 304
 	public function iSpecifyTheUsernameAs($username)
305 305
 	{
306
-		$this->minkContext->fillField('Login name',$username);
306
+		$this->minkContext->fillField('Login name', $username);
307 307
 	}
308 308
 	
309 309
 	/**
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 	 */
312 312
 	public function iSpecifyThePasswordAs($password)
313 313
 	{
314
-		$this->minkContext->fillField('Password',$password);
314
+		$this->minkContext->fillField('Password', $password);
315 315
 	}
316 316
 	
317 317
 	/**
@@ -322,8 +322,8 @@  discard block
 block discarded – undo
322 322
 		$repo = $this->getUserRepository();
323 323
 		$user = $repo->findByLogin($username);
324 324
 		
325
-		if(!$user instanceof User){
326
-			throw new \Exception(sprintf('There is no user with this login: "%s"',$username));
325
+		if (!$user instanceof User) {
326
+			throw new \Exception(sprintf('There is no user with this login: "%s"', $username));
327 327
 		}
328 328
 		$this->iWantToLogIn();
329 329
 		$this->iSpecifyTheUsernameAs($username);
@@ -379,13 +379,13 @@  discard block
 block discarded – undo
379 379
 	{
380 380
 		$repo = $this->getUserRepository();
381 381
 		$data = $table->getRowsHash();
382
-		$email = isset($data['email']) ? $data['email']:'[email protected]';
383
-		$password = isset($data['password']) ? $data['password']:'test';
384
-		$fullname = isset($data['fullname']) ? $data['fullname']:'Test User';
385
-		$role = isset($data['role']) ? $data['role']:User::ROLE_RECRUITER;
382
+		$email = isset($data['email']) ? $data['email'] : '[email protected]';
383
+		$password = isset($data['password']) ? $data['password'] : 'test';
384
+		$fullname = isset($data['fullname']) ? $data['fullname'] : 'Test User';
385
+		$role = isset($data['role']) ? $data['role'] : User::ROLE_RECRUITER;
386 386
 		
387
-		if(!is_object($user=$repo->findByLogin($email))){
388
-			$user = $this->createUser($email,$password,$role,$fullname);
387
+		if (!is_object($user = $repo->findByLogin($email))) {
388
+			$user = $this->createUser($email, $password, $role, $fullname);
389 389
 		}
390 390
 		$this->currentUser = $user;
391 391
 		$this->addCreatedUser($user);
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
 	
394 394
 	private function addCreatedUser(UserInterface $user)
395 395
 	{
396
-		if(!in_array($user,static::$users)){
396
+		if (!in_array($user, static::$users)) {
397 397
 			static::$users[] = $user;
398 398
 		}
399 399
 	}
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 					JobContext::removeJobByUser($user);
94 94
 					$repo->remove($user,true);
95 95
 					$repo->getDocumentManager()->refresh($user);
96
-				}catch (\Exception $e){
96
+				} catch (\Exception $e){
97 97
 				
98 98
 				}
99 99
 			}
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 			$organization->setOrganizationName($organizationName);
281 281
 			$permissions = $organization->getPermissions();
282 282
 			$permissions->grant($user,Permissions::PERMISSION_ALL);
283
-		}else {
283
+		} else {
284 284
 			$organization->getPermissions()->grant($user,Permissions::PERMISSION_ALL);
285 285
 		}
286 286
 		$organization->setUser($user);
Please login to merge, or discard this patch.
Indentation   +326 added lines, -326 removed lines patch added patch discarded remove patch
@@ -37,380 +37,380 @@
 block discarded – undo
37 37
 {
38 38
     use CommonContextTrait;
39 39
 	
40
-	/**
41
-	 * @var User[]
42
-	 */
43
-	static private $users = [];
40
+    /**
41
+     * @var User[]
42
+     */
43
+    static private $users = [];
44 44
 	
45
-	/**
46
-	 * @var UserRepository
47
-	 */
48
-	static private $userRepo;
45
+    /**
46
+     * @var UserRepository
47
+     */
48
+    static private $userRepo;
49 49
 	
50
-	/**
51
-	 * @var string
52
-	 */
53
-	static private $currentSession;
50
+    /**
51
+     * @var string
52
+     */
53
+    static private $currentSession;
54 54
 	
55
-	private $socialLoginInfo = [];
55
+    private $socialLoginInfo = [];
56 56
 	
57
-	/**
58
-	 * @var UserInterface
59
-	 */
60
-	private $loggedInUser;
57
+    /**
58
+     * @var UserInterface
59
+     */
60
+    private $loggedInUser;
61 61
 
62 62
     /**
63 63
      * @var User
64 64
      */
65 65
     protected $currentUser;
66 66
 	
67
-	public function __construct($parameters=[])
68
-	{
69
-		$defaultLoginInfo = [
70
-			'facebook' => [
71
-				'email' => getenv('FACEBOOK_USER_EMAIL'),
72
-				'pass' => getenv('FACEBOOK_USER_PASSWORD')
73
-			],
74
-			'linkedin' => [
75
-				'session_key-login' => getenv('LINKEDIN_USER_EMAIL'),
76
-				'session_password-login' => getenv('LINKEDIN_USER_PASSWORD')
77
-			],
78
-		];
79
-		$socialLoginConfig = isset($parameters['social_login_info']) ? $parameters['social_login_info']:[];
80
-		$this->socialLoginInfo = array_merge($defaultLoginInfo,$socialLoginConfig);
81
-	}
67
+    public function __construct($parameters=[])
68
+    {
69
+        $defaultLoginInfo = [
70
+            'facebook' => [
71
+                'email' => getenv('FACEBOOK_USER_EMAIL'),
72
+                'pass' => getenv('FACEBOOK_USER_PASSWORD')
73
+            ],
74
+            'linkedin' => [
75
+                'session_key-login' => getenv('LINKEDIN_USER_EMAIL'),
76
+                'session_password-login' => getenv('LINKEDIN_USER_PASSWORD')
77
+            ],
78
+        ];
79
+        $socialLoginConfig = isset($parameters['social_login_info']) ? $parameters['social_login_info']:[];
80
+        $this->socialLoginInfo = array_merge($defaultLoginInfo,$socialLoginConfig);
81
+    }
82 82
 
83
-	/**
84
-	 * @AfterSuite
85
-	 * @param AfterSuiteScope $scope
86
-	 */
87
-	static public function afterSuite(AfterSuiteScope $scope)
88
-	{
89
-		$repo = static::$userRepo;
90
-		foreach(static::$users as $user){
91
-			if($repo->findByLogin($user->getLogin())){
92
-				try{
93
-					JobContext::removeJobByUser($user);
94
-					$repo->remove($user,true);
95
-					$repo->getDocumentManager()->refresh($user);
96
-				}catch (\Exception $e){
83
+    /**
84
+     * @AfterSuite
85
+     * @param AfterSuiteScope $scope
86
+     */
87
+    static public function afterSuite(AfterSuiteScope $scope)
88
+    {
89
+        $repo = static::$userRepo;
90
+        foreach(static::$users as $user){
91
+            if($repo->findByLogin($user->getLogin())){
92
+                try{
93
+                    JobContext::removeJobByUser($user);
94
+                    $repo->remove($user,true);
95
+                    $repo->getDocumentManager()->refresh($user);
96
+                }catch (\Exception $e){
97 97
 				
98
-				}
99
-			}
100
-		}
101
-	}
98
+                }
99
+            }
100
+        }
101
+    }
102 102
 	
103
-	/**
104
-	 * @BeforeScenario
105
-	 * @param BeforeScenarioScope $scope
106
-	 */
107
-	public function beforeScenario(BeforeScenarioScope $scope)
108
-	{
109
-		$this->minkContext = $scope->getEnvironment()->getContext(MinkContext::class);
110
-		$this->coreContext = $scope->getEnvironment()->getContext(CoreContext::class);
111
-		static::$userRepo = $this->getUserRepository();
112
-	}
103
+    /**
104
+     * @BeforeScenario
105
+     * @param BeforeScenarioScope $scope
106
+     */
107
+    public function beforeScenario(BeforeScenarioScope $scope)
108
+    {
109
+        $this->minkContext = $scope->getEnvironment()->getContext(MinkContext::class);
110
+        $this->coreContext = $scope->getEnvironment()->getContext(CoreContext::class);
111
+        static::$userRepo = $this->getUserRepository();
112
+    }
113 113
 	
114
-	/**
115
-	 * @When I fill in login form with :provider user
116
-	 */
117
-	public function iSignInWithSocialUser($provider)
118
-	{
119
-		$provider = strtolower($provider);
120
-		$mink = $this->minkContext;
121
-		foreach($this->socialLoginInfo[$provider] as $field=>$value){
122
-			$mink->fillField($field,$value);
123
-		}
124
-	}
114
+    /**
115
+     * @When I fill in login form with :provider user
116
+     */
117
+    public function iSignInWithSocialUser($provider)
118
+    {
119
+        $provider = strtolower($provider);
120
+        $mink = $this->minkContext;
121
+        foreach($this->socialLoginInfo[$provider] as $field=>$value){
122
+            $mink->fillField($field,$value);
123
+        }
124
+    }
125 125
 	
126
-	/**
127
-	 * @Given I am logged in as a recruiter
128
-	 * @Given I am logged in as a recruiter with :organization as organization
129
-	 */
130
-	public function iAmLoggedInAsARecruiter($organization=null)
131
-	{
132
-		$user = $this->thereIsAUserIdentifiedBy(
133
-			'[email protected]',
134
-			'test',User::ROLE_RECRUITER,
135
-			'Test Recruiter',
136
-			$organization
137
-		);
138
-		$this->startLogin($user,'test');
139
-	}
126
+    /**
127
+     * @Given I am logged in as a recruiter
128
+     * @Given I am logged in as a recruiter with :organization as organization
129
+     */
130
+    public function iAmLoggedInAsARecruiter($organization=null)
131
+    {
132
+        $user = $this->thereIsAUserIdentifiedBy(
133
+            '[email protected]',
134
+            'test',User::ROLE_RECRUITER,
135
+            'Test Recruiter',
136
+            $organization
137
+        );
138
+        $this->startLogin($user,'test');
139
+    }
140 140
 	
141
-	/**
142
-	 * @Given I don't have :login user
143
-	 * @param string $login
144
-	 */
145
-	public function iDonTHaveUser($login)
146
-	{
147
-		$repo = $this->getUserRepository();
148
-		$user=$repo->findByLogin($login);
149
-		if($user instanceof UserInterface){
150
-			$repo->remove($user,true);
151
-		}
152
-	}
141
+    /**
142
+     * @Given I don't have :login user
143
+     * @param string $login
144
+     */
145
+    public function iDonTHaveUser($login)
146
+    {
147
+        $repo = $this->getUserRepository();
148
+        $user=$repo->findByLogin($login);
149
+        if($user instanceof UserInterface){
150
+            $repo->remove($user,true);
151
+        }
152
+    }
153 153
 	
154
-	/**
155
-	 * @Given I have a :role with the following:
156
-	 * @param $role
157
-	 * @param TableNode $fields
158
-	 */
159
-	public function iHaveUserWithTheFollowing($role,TableNode $fields)
160
-	{
161
-		$normalizedFields = [
162
-			'login' => '[email protected]',
163
-			'fullname' => 'Test Login',
164
-			'role' => User::ROLE_USER,
165
-			'password' => 'test',
166
-			'organization' => 'Cross Solution'
167
-		];
168
-		foreach($fields->getRowsHash() as $field=>$value){
169
-			$field = Inflector::camelize($field);
170
-			$normalizedFields[$field] = $value;
171
-		}
154
+    /**
155
+     * @Given I have a :role with the following:
156
+     * @param $role
157
+     * @param TableNode $fields
158
+     */
159
+    public function iHaveUserWithTheFollowing($role,TableNode $fields)
160
+    {
161
+        $normalizedFields = [
162
+            'login' => '[email protected]',
163
+            'fullname' => 'Test Login',
164
+            'role' => User::ROLE_USER,
165
+            'password' => 'test',
166
+            'organization' => 'Cross Solution'
167
+        ];
168
+        foreach($fields->getRowsHash() as $field=>$value){
169
+            $field = Inflector::camelize($field);
170
+            $normalizedFields[$field] = $value;
171
+        }
172 172
 		
173
-		$this->currentUser = $this->thereIsAUserIdentifiedBy(
174
-			$normalizedFields['login'],
175
-			$normalizedFields['password'],
176
-			$role,
177
-			$normalizedFields['fullname'],
178
-			$normalizedFields['organization']
179
-		);
180
-	}
173
+        $this->currentUser = $this->thereIsAUserIdentifiedBy(
174
+            $normalizedFields['login'],
175
+            $normalizedFields['password'],
176
+            $role,
177
+            $normalizedFields['fullname'],
178
+            $normalizedFields['organization']
179
+        );
180
+    }
181 181
 	
182
-	/**
183
-	 * @Given I am logged in as an administrator
184
-	 */
185
-	public function iAmLoggedInAsAnAdmin()
186
-	{
187
-		$user = $this->thereIsAUserIdentifiedBy('[email protected]','test',User::ROLE_ADMIN);
188
-		$this->startLogin($user,'test');
189
-	}
182
+    /**
183
+     * @Given I am logged in as an administrator
184
+     */
185
+    public function iAmLoggedInAsAnAdmin()
186
+    {
187
+        $user = $this->thereIsAUserIdentifiedBy('[email protected]','test',User::ROLE_ADMIN);
188
+        $this->startLogin($user,'test');
189
+    }
190 190
 	
191
-	private function startLogin(UserInterface $user, $password)
192
-	{
193
-		$currentUser = $this->currentUser;
194
-		if(!is_object($currentUser) || $user->getId()!=$currentUser->getId()){
195
-			$this->iWantToLogIn();
196
-			$this->iSpecifyTheUsernameAs($user->getLogin());
197
-			$this->iSpecifyThePasswordAs($password);
198
-			$this->iLogIn();
199
-			$this->currentUser = $user;
200
-		}
201
-	}
191
+    private function startLogin(UserInterface $user, $password)
192
+    {
193
+        $currentUser = $this->currentUser;
194
+        if(!is_object($currentUser) || $user->getId()!=$currentUser->getId()){
195
+            $this->iWantToLogIn();
196
+            $this->iSpecifyTheUsernameAs($user->getLogin());
197
+            $this->iSpecifyThePasswordAs($password);
198
+            $this->iLogIn();
199
+            $this->currentUser = $user;
200
+        }
201
+    }
202 202
 	
203
-	/**
204
-	 * @return UserRepository
205
-	 */
206
-	public function getUserRepository()
207
-	{
208
-		return $this->coreContext->getRepositories()->get('Auth\Entity\User');
209
-	}
203
+    /**
204
+     * @return UserRepository
205
+     */
206
+    public function getUserRepository()
207
+    {
208
+        return $this->coreContext->getRepositories()->get('Auth\Entity\User');
209
+    }
210 210
 	
211
-	/**
212
-	 * @Given there is a user :email identified by :password
213
-	 */
214
-	public function thereIsAUserIdentifiedBy($email, $password,$role=User::ROLE_RECRUITER,$fullname="Test Recruiter",$organization=null)
215
-	{
216
-		$repo = $this->getUserRepository();
211
+    /**
212
+     * @Given there is a user :email identified by :password
213
+     */
214
+    public function thereIsAUserIdentifiedBy($email, $password,$role=User::ROLE_RECRUITER,$fullname="Test Recruiter",$organization=null)
215
+    {
216
+        $repo = $this->getUserRepository();
217 217
 
218
-		if(!is_object($user=$repo->findByEmail($email))){
219
-			$user = $this->createUser($email,$password,$role,$fullname,$organization);
220
-		}
218
+        if(!is_object($user=$repo->findByEmail($email))){
219
+            $user = $this->createUser($email,$password,$role,$fullname,$organization);
220
+        }
221 221
 		
222
-		if(!is_null($organization)){
223
-			$this->iHaveMainOrganization($user,$organization);
224
-		}
225
-		$this->addCreatedUser($user);
226
-		return $user;
227
-	}
222
+        if(!is_null($organization)){
223
+            $this->iHaveMainOrganization($user,$organization);
224
+        }
225
+        $this->addCreatedUser($user);
226
+        return $user;
227
+    }
228 228
 	
229
-	/**
230
-	 * @param $email
231
-	 * @param $password
232
-	 * @param $username
233
-	 * @param string $fullname
234
-	 * @param string $role
235
-	 *
236
-	 * @return \Auth\Entity\UserInterface
237
-	 */
238
-	public function createUser($email,$password,$role=User::ROLE_RECRUITER,$fullname="Test Recruiter")
239
-	{
240
-		/* @var Register $service */
241
-		/* @var User $user */
242
-		$repo = $this->getUserRepository();
243
-		$user = $repo->create([]);
244
-		$user->setLogin($email);
245
-		$user->setPassword($password);
246
-		$user->setRole($role);
247
-		$settings = $user->getSettings('Applications');
229
+    /**
230
+     * @param $email
231
+     * @param $password
232
+     * @param $username
233
+     * @param string $fullname
234
+     * @param string $role
235
+     *
236
+     * @return \Auth\Entity\UserInterface
237
+     */
238
+    public function createUser($email,$password,$role=User::ROLE_RECRUITER,$fullname="Test Recruiter")
239
+    {
240
+        /* @var Register $service */
241
+        /* @var User $user */
242
+        $repo = $this->getUserRepository();
243
+        $user = $repo->create([]);
244
+        $user->setLogin($email);
245
+        $user->setPassword($password);
246
+        $user->setRole($role);
247
+        $settings = $user->getSettings('Applications');
248 248
 		
249
-		$expFullName = explode(' ',$fullname);
250
-		$info = $user->getInfo();
251
-		$info->setFirstName(array_shift($expFullName));
252
-		$info->setLastName(count($expFullName)>0 ? implode(' ',$expFullName):'');
253
-		$info->setEmail($email);
254
-		$info->setEmailVerified(true);
255
-		$repo->store($user);
249
+        $expFullName = explode(' ',$fullname);
250
+        $info = $user->getInfo();
251
+        $info->setFirstName(array_shift($expFullName));
252
+        $info->setLastName(count($expFullName)>0 ? implode(' ',$expFullName):'');
253
+        $info->setEmail($email);
254
+        $info->setEmailVerified(true);
255
+        $repo->store($user);
256 256
 
257
-		$repo->getDocumentManager()->refresh($user);
257
+        $repo->getDocumentManager()->refresh($user);
258 258
 		
259
-		$eventArgs = new LifecycleEventArgs($user, $repo->getDocumentManager());
260
-		$repo->getDocumentManager()->getEventManager()->dispatchEvent(
261
-			Events::postLoad,
262
-			$eventArgs
263
-		);
259
+        $eventArgs = new LifecycleEventArgs($user, $repo->getDocumentManager());
260
+        $repo->getDocumentManager()->getEventManager()->dispatchEvent(
261
+            Events::postLoad,
262
+            $eventArgs
263
+        );
264 264
 
265
-		return $user;
266
-	}
265
+        return $user;
266
+    }
267 267
 	
268
-	/**
269
-	 * @When I have :organization as my main organization
270
-	 * @param $orgName
271
-	 */
272
-	public function iHaveMainOrganization(UserInterface $user,$orgName)
273
-	{
274
-		/* @var $repoOrganization OrganizationRepository */
275
-		$repoOrganization = $this->coreContext->getRepositories()->get('Organizations/Organization');
276
-		$organization=$repoOrganization->findByName($orgName);
277
-		if(!$organization instanceof Organization){
278
-			$organization = new Organization();
279
-			$organizationName = new OrganizationName($orgName);
280
-			$organization->setOrganizationName($organizationName);
281
-			$permissions = $organization->getPermissions();
282
-			$permissions->grant($user,Permissions::PERMISSION_ALL);
283
-		}else {
284
-			$organization->getPermissions()->grant($user,Permissions::PERMISSION_ALL);
285
-		}
286
-		$organization->setUser($user);
287
-		$repoOrganization->store($organization);
288
-		$repoOrganization->getDocumentManager()->refresh($organization);
289
-	}
268
+    /**
269
+     * @When I have :organization as my main organization
270
+     * @param $orgName
271
+     */
272
+    public function iHaveMainOrganization(UserInterface $user,$orgName)
273
+    {
274
+        /* @var $repoOrganization OrganizationRepository */
275
+        $repoOrganization = $this->coreContext->getRepositories()->get('Organizations/Organization');
276
+        $organization=$repoOrganization->findByName($orgName);
277
+        if(!$organization instanceof Organization){
278
+            $organization = new Organization();
279
+            $organizationName = new OrganizationName($orgName);
280
+            $organization->setOrganizationName($organizationName);
281
+            $permissions = $organization->getPermissions();
282
+            $permissions->grant($user,Permissions::PERMISSION_ALL);
283
+        }else {
284
+            $organization->getPermissions()->grant($user,Permissions::PERMISSION_ALL);
285
+        }
286
+        $organization->setUser($user);
287
+        $repoOrganization->store($organization);
288
+        $repoOrganization->getDocumentManager()->refresh($organization);
289
+    }
290 290
 	
291
-	/**
292
-	 * @When I want to log in
293
-	 */
294
-	public function iWantToLogIn()
295
-	{
296
-		$session = $this->minkContext->getSession();
297
-		$url = $this->buildUrl('lang/auth');
298
-		$session->visit($url);
299
-	}
291
+    /**
292
+     * @When I want to log in
293
+     */
294
+    public function iWantToLogIn()
295
+    {
296
+        $session = $this->minkContext->getSession();
297
+        $url = $this->buildUrl('lang/auth');
298
+        $session->visit($url);
299
+    }
300 300
 	
301
-	/**
302
-	 * @When I specify the username as :username
303
-	 */
304
-	public function iSpecifyTheUsernameAs($username)
305
-	{
306
-		$this->minkContext->fillField('Login name',$username);
307
-	}
301
+    /**
302
+     * @When I specify the username as :username
303
+     */
304
+    public function iSpecifyTheUsernameAs($username)
305
+    {
306
+        $this->minkContext->fillField('Login name',$username);
307
+    }
308 308
 	
309
-	/**
310
-	 * @When I specify the password as :password
311
-	 */
312
-	public function iSpecifyThePasswordAs($password)
313
-	{
314
-		$this->minkContext->fillField('Password',$password);
315
-	}
309
+    /**
310
+     * @When I specify the password as :password
311
+     */
312
+    public function iSpecifyThePasswordAs($password)
313
+    {
314
+        $this->minkContext->fillField('Password',$password);
315
+    }
316 316
 	
317
-	/**
318
-	 * @Given I am logged in as :username identified by :password
319
-	 */
320
-	public function iAmLoggedInAsIdentifiedBy($username, $password)
321
-	{
322
-		$repo = $this->getUserRepository();
323
-		$user = $repo->findByLogin($username);
317
+    /**
318
+     * @Given I am logged in as :username identified by :password
319
+     */
320
+    public function iAmLoggedInAsIdentifiedBy($username, $password)
321
+    {
322
+        $repo = $this->getUserRepository();
323
+        $user = $repo->findByLogin($username);
324 324
 		
325
-		if(!$user instanceof User){
326
-			throw new \Exception(sprintf('There is no user with this login: "%s"',$username));
327
-		}
328
-		$this->iWantToLogIn();
329
-		$this->iSpecifyTheUsernameAs($username);
330
-		$this->iSpecifyThePasswordAs($password);
331
-		$this->iLogIn();
325
+        if(!$user instanceof User){
326
+            throw new \Exception(sprintf('There is no user with this login: "%s"',$username));
327
+        }
328
+        $this->iWantToLogIn();
329
+        $this->iSpecifyTheUsernameAs($username);
330
+        $this->iSpecifyThePasswordAs($password);
331
+        $this->iLogIn();
332 332
         $this->currentUser = $user;
333
-	}
333
+    }
334 334
 	
335
-	/**
336
-	 * @When I log in
337
-	 */
338
-	public function iLogIn()
339
-	{
340
-		$this->minkContext->pressButton('login');
341
-	}
335
+    /**
336
+     * @When I log in
337
+     */
338
+    public function iLogIn()
339
+    {
340
+        $this->minkContext->pressButton('login');
341
+    }
342 342
 	
343
-	/**
344
-	 * @When I press logout link
345
-	 */
346
-	public function iPressLogoutLink()
347
-	{
348
-		$url = $this->buildUrl('auth-logout');
349
-		$this->visit($url);
350
-	}
343
+    /**
344
+     * @When I press logout link
345
+     */
346
+    public function iPressLogoutLink()
347
+    {
348
+        $url = $this->buildUrl('auth-logout');
349
+        $this->visit($url);
350
+    }
351 351
 	
352
-	/**
353
-	 * @Given I log in with username :username and password :password
354
-	 */
355
-	public function iLogInWith($username, $password)
356
-	{
357
-		$repo = $this->getUserRepository();
358
-		$user = $repo->findByLogin($username);
359
-		$this->iWantToLogIn();
360
-		$this->iSpecifyTheUsernameAs($username);
361
-		$this->iSpecifyThePasswordAs($password);
362
-		$this->iLogIn();
363
-		$this->loggedInUser = $user;
364
-	}
352
+    /**
353
+     * @Given I log in with username :username and password :password
354
+     */
355
+    public function iLogInWith($username, $password)
356
+    {
357
+        $repo = $this->getUserRepository();
358
+        $user = $repo->findByLogin($username);
359
+        $this->iWantToLogIn();
360
+        $this->iSpecifyTheUsernameAs($username);
361
+        $this->iSpecifyThePasswordAs($password);
362
+        $this->iLogIn();
363
+        $this->loggedInUser = $user;
364
+    }
365 365
 	
366
-	/**
367
-	 * @When I go to profile page
368
-	 */
369
-	public function iGoToProfilePage()
370
-	{
371
-		$url = $this->buildUrl('lang/my');
372
-		$this->visit($url);
373
-	}
366
+    /**
367
+     * @When I go to profile page
368
+     */
369
+    public function iGoToProfilePage()
370
+    {
371
+        $url = $this->buildUrl('lang/my');
372
+        $this->visit($url);
373
+    }
374 374
 	
375
-	/**
376
-	 * @Given there is a user with the following:
377
-	 */
378
-	public function thereIsAUserWithTheFollowing(TableNode $table)
379
-	{
380
-		$repo = $this->getUserRepository();
381
-		$data = $table->getRowsHash();
382
-		$email = isset($data['email']) ? $data['email']:'[email protected]';
383
-		$password = isset($data['password']) ? $data['password']:'test';
384
-		$fullname = isset($data['fullname']) ? $data['fullname']:'Test User';
385
-		$role = isset($data['role']) ? $data['role']:User::ROLE_RECRUITER;
375
+    /**
376
+     * @Given there is a user with the following:
377
+     */
378
+    public function thereIsAUserWithTheFollowing(TableNode $table)
379
+    {
380
+        $repo = $this->getUserRepository();
381
+        $data = $table->getRowsHash();
382
+        $email = isset($data['email']) ? $data['email']:'[email protected]';
383
+        $password = isset($data['password']) ? $data['password']:'test';
384
+        $fullname = isset($data['fullname']) ? $data['fullname']:'Test User';
385
+        $role = isset($data['role']) ? $data['role']:User::ROLE_RECRUITER;
386 386
 		
387
-		if(!is_object($user=$repo->findByLogin($email))){
388
-			$user = $this->createUser($email,$password,$role,$fullname);
389
-		}
390
-		$this->currentUser = $user;
391
-		$this->addCreatedUser($user);
392
-	}
387
+        if(!is_object($user=$repo->findByLogin($email))){
388
+            $user = $this->createUser($email,$password,$role,$fullname);
389
+        }
390
+        $this->currentUser = $user;
391
+        $this->addCreatedUser($user);
392
+    }
393 393
 	
394
-	private function addCreatedUser(UserInterface $user)
395
-	{
396
-		if(!in_array($user,static::$users)){
397
-			static::$users[] = $user;
398
-		}
399
-	}
394
+    private function addCreatedUser(UserInterface $user)
395
+    {
396
+        if(!in_array($user,static::$users)){
397
+            static::$users[] = $user;
398
+        }
399
+    }
400 400
 	
401
-	/**
402
-	 * @When I want to change my password
403
-	 */
404
-	public function iWantToChangeMyPassword()
405
-	{
406
-		$url = $this->buildUrl('lang/my-password');
407
-		$this->visit($url);
408
-	}
401
+    /**
402
+     * @When I want to change my password
403
+     */
404
+    public function iWantToChangeMyPassword()
405
+    {
406
+        $url = $this->buildUrl('lang/my-password');
407
+        $this->visit($url);
408
+    }
409 409
 
410 410
     /**
411 411
      * @return User
412 412
      */
413
-	public function getCurrentUser()
413
+    public function getCurrentUser()
414 414
     {
415 415
         return $this->currentUser;
416 416
     }
Please login to merge, or discard this patch.
module/Core/src/Core/Controller/Plugin/CreatePaginator.php 3 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -128,7 +128,6 @@
 block discarded – undo
128 128
     }
129 129
     
130 130
     /**
131
-     * @param ControllerManager $controllerManager
132 131
      * @return CreatePaginator
133 132
      * @codeCoverageIgnore
134 133
      */
Please login to merge, or discard this patch.
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -44,12 +44,12 @@  discard block
 block discarded – undo
44 44
      */
45 45
     protected $request;
46 46
 	
47
-	/**
48
-	 * CreatePaginator constructor.
49
-	 *
50
-	 * @param ContainerInterface $container
51
-	 * @param HttpRequest $request
52
-	 */
47
+    /**
48
+     * CreatePaginator constructor.
49
+     *
50
+     * @param ContainerInterface $container
51
+     * @param HttpRequest $request
52
+     */
53 53
     public function __construct(ContainerInterface $container, HttpRequest $request)
54 54
     {
55 55
         $this->serviceManager = $container->get('ServiceManager');
@@ -105,9 +105,9 @@  discard block
 block discarded – undo
105 105
         /* @var \Core\EventManager\EventManager $events */
106 106
         /* @var \Zend\Paginator\Paginator $paginator */
107 107
         /* @var CreatePaginatorEvent $event */
108
-	    $events = $this->serviceManager->get('Core/CreatePaginator/Events');
108
+        $events = $this->serviceManager->get('Core/CreatePaginator/Events');
109 109
 
110
-	    $event = $events->getEvent(CreatePaginatorEvent::EVENT_CREATE_PAGINATOR,$this,[
110
+        $event = $events->getEvent(CreatePaginatorEvent::EVENT_CREATE_PAGINATOR,$this,[
111 111
             'paginatorParams' => $params,
112 112
             'paginators' => $paginators,
113 113
             'paginatorName' => $paginatorName
@@ -121,8 +121,8 @@  discard block
 block discarded – undo
121 121
             $paginator = $paginators->get($paginatorName,$params);
122 122
         }
123 123
         $paginator->setCurrentPageNumber(isset($params['page']) ? $params['page'] : 1)
124
-                  ->setItemCountPerPage(isset($params['count']) ? $params['count'] : 10)
125
-                  ->setPageRange(isset($params['range']) ? $params['range'] : 5);
124
+                    ->setItemCountPerPage(isset($params['count']) ? $params['count'] : 10)
125
+                    ->setPageRange(isset($params['range']) ? $params['range'] : 5);
126 126
 
127 127
         return $paginator;
128 128
     }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         /* @var CreatePaginatorEvent $event */
108 108
 	    $events = $this->serviceManager->get('Core/CreatePaginator/Events');
109 109
 
110
-	    $event = $events->getEvent(CreatePaginatorEvent::EVENT_CREATE_PAGINATOR,$this,[
110
+	    $event = $events->getEvent(CreatePaginatorEvent::EVENT_CREATE_PAGINATOR, $this, [
111 111
             'paginatorParams' => $params,
112 112
             'paginators' => $paginators,
113 113
             'paginatorName' => $paginatorName
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
 
117 117
         $paginator = $event->getPaginator();
118 118
 
119
-        if(!$paginator instanceof Paginator){
119
+        if (!$paginator instanceof Paginator) {
120 120
             // no paginator created by listener, so let's create default paginator
121
-            $paginator = $paginators->get($paginatorName,$params);
121
+            $paginator = $paginators->get($paginatorName, $params);
122 122
         }
123 123
         $paginator->setCurrentPageNumber(isset($params['page']) ? $params['page'] : 1)
124 124
                   ->setItemCountPerPage(isset($params['count']) ? $params['count'] : 10)
Please login to merge, or discard this patch.