Completed
Push — develop ( cc6530...59407f )
by Mathias
08:03
created
module/Geo/src/Geo/Service/AbstractClient.php 3 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -38,6 +38,9 @@  discard block
 block discarded – undo
38 38
     protected $country;
39 39
 
40 40
 
41
+    /**
42
+     * @param string $uri
43
+     */
41 44
     public function __construct($uri, $country="DE", $cache = false)
42 45
     {
43 46
         $this->country = $country;
@@ -92,6 +95,9 @@  discard block
 block discarded – undo
92 95
         return isset($result[0]) ? $result[0] : false;
93 96
     }
94 97
 
98
+    /**
99
+     * @param string $result
100
+     */
95 101
     protected function processResult($result)
96 102
     {
97 103
         return $result;
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -62,10 +62,10 @@
 block discarded – undo
62 62
 
63 63
     public function query($term, array $params = [])
64 64
     {
65
-    	/* @TODO: [ZF3] overriding $term value because it always returns null */
66
-    	if(is_null($term)){
67
-		    $term = $_REQUEST['q'];
68
-	    }
65
+        /* @TODO: [ZF3] overriding $term value because it always returns null */
66
+        if(is_null($term)){
67
+            $term = $_REQUEST['q'];
68
+        }
69 69
         $cacheId = md5($term);
70 70
 
71 71
         if ($this->cache && ($result = $this->cache->getItem($cacheId))) {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     protected $country;
39 39
 
40 40
 
41
-    public function __construct($uri, $country="DE", $cache = false)
41
+    public function __construct($uri, $country = "DE", $cache = false)
42 42
     {
43 43
         $this->country = $country;
44 44
         $this->client = $this->setupClient($uri);
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     public function query($term, array $params = [])
64 64
     {
65 65
     	/* @TODO: [ZF3] overriding $term value because it always returns null */
66
-    	if(is_null($term)){
66
+    	if (is_null($term)) {
67 67
 		    $term = $_REQUEST['q'];
68 68
 	    }
69 69
         $cacheId = md5($term);
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 
77 77
         $response = $this->client->send();
78 78
         if ($response->getStatusCode() !== 200) {
79
-            throw new \RuntimeException('Query failed, because ' . $response->getReasonPhrase());
79
+            throw new \RuntimeException('Query failed, because '.$response->getReasonPhrase());
80 80
         }
81 81
 
82 82
         $result = $response->getBody();
Please login to merge, or discard this patch.
module/Auth/src/Auth/Adapter/ExternalApplication.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         }
116 116
                 
117 117
         $identity      = $this->getIdentity();
118
-        $applicationId = '@' . $this->getApplicationIdentifier();
118
+        $applicationId = '@'.$this->getApplicationIdentifier();
119 119
         $applicationIdIndex = strrpos($identity, $applicationId);
120 120
         //$login         = (0 < $applicationIdIndex &&  strlen($identity) - strlen($applicationId) == $applicationIdIndex)?substr($identity, 0, $applicationIdIndex):$identity;
121 121
         $login         = $identity;
@@ -128,8 +128,8 @@  discard block
 block discarded – undo
128 128
         $loginSuccess = false;
129 129
         $loginResult = array();
130 130
         
131
-        if (0 < $applicationIdIndex &&  strlen($identity) - strlen($applicationId) == $applicationIdIndex) {
132
-            $this->serviceManager->get('Core/Log')->debug('User ' . $login . ', login with correct suffix: ');
131
+        if (0 < $applicationIdIndex && strlen($identity) - strlen($applicationId) == $applicationIdIndex) {
132
+            $this->serviceManager->get('Core/Log')->debug('User '.$login.', login with correct suffix: ');
133 133
             // the login ends with the applicationID, therefore use the secret key
134 134
             // the external login must be the form 'xxxxx@yyyy' where yyyy is the matching suffix to the external application key
135 135
             if (isset($user)) {
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
                     $loginSuccess = true;
138 138
                 } else {
139 139
                     $loginSuccess = false;
140
-                    $this->serviceManager->get('Core/Log')->info('User ' . $login . ', secret: ' . $user->getSecret() . ' != loginPassword: ' . $filter->filter($credential) . ' (' . $credential . ')');
140
+                    $this->serviceManager->get('Core/Log')->info('User '.$login.', secret: '.$user->getSecret().' != loginPassword: '.$filter->filter($credential).' ('.$credential.')');
141 141
                 }
142 142
             } else {
143 143
                 $user = $users->create(
@@ -153,17 +153,17 @@  discard block
 block discarded – undo
153 153
                 $loginResult = array('firstLogin' => true);
154 154
             }
155 155
         } elseif (isset($user)) {
156
-            $this->serviceManager->get('Core/Log')->debug('User ' . $login . ', login with incorrect suffix: ');
156
+            $this->serviceManager->get('Core/Log')->debug('User '.$login.', login with incorrect suffix: ');
157 157
             if ($user->getCredential() == $filter->filter($credential)) {
158
-                $this->serviceManager->get('Core/Log')->debug('User ' . $login . ', credentials are equal');
158
+                $this->serviceManager->get('Core/Log')->debug('User '.$login.', credentials are equal');
159 159
                 $loginSuccess = true;
160 160
             } elseif (!empty($applicationId)) {
161
-                $this->serviceManager->get('Core/Log')->debug('User ' . $login . ', credentials are not equal');
161
+                $this->serviceManager->get('Core/Log')->debug('User '.$login.', credentials are not equal');
162 162
                 // TODO: remove this code as soon as the secret key has been fully established
163 163
                 // basically this does allow an external login with an applicationIndex match against the User-Password
164 164
                 // the way it had been used in the start
165 165
                 if ($user->getCredential() == $filter->filter($credential)) {
166
-                    $this->serviceManager->get('Core/Log')->debug('User ' . $login . ', credentials2 test');
166
+                    $this->serviceManager->get('Core/Log')->debug('User '.$login.', credentials2 test');
167 167
                     $loginSuccess = true;
168 168
                 }
169 169
             }
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,9 +42,9 @@
 block discarded – undo
42 42
         $this->setApplicationKey($applicationKey);
43 43
     }
44 44
 	
45
-	/**
46
-	 * @param ContainerInterface $serviceManager
47
-	 */
45
+    /**
46
+     * @param ContainerInterface $serviceManager
47
+     */
48 48
     public function setServiceLocator(ContainerInterface $serviceManager)
49 49
     {
50 50
         $this->serviceManager = $serviceManager;
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Factory/Form/ActiveOrganizationSelectFactory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,13 +53,13 @@
 block discarded – undo
53 53
         if ($initialId) {
54 54
             /* @var $serviceLocator \Zend\ServiceManager\AbstractPluginManager
55 55
              * @var $repository \Organizations\Repository\Organization */
56
-            $repositories   = $container->get('repositories');
56
+            $repositories = $container->get('repositories');
57 57
             $repository = $repositories->get('Organizations');
58
-            $organization  = $repository->find($initialId);
58
+            $organization = $repository->find($initialId);
59 59
             $organizations[] = $organization;
60 60
         }
61 61
 
62
-        $select         = new OrganizationSelect();
62
+        $select = new OrganizationSelect();
63 63
 
64 64
         $select->setSelectableOrganizations($organizations);
65 65
         $select->setAttribute('data-ajax', '?ajax=jobs.admin.activeorganizations');
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Listener/LoadActiveOrganizations.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -51,11 +51,11 @@
 block discarded – undo
51 51
             $imageUrl = $image ? $image->getUri() : '';
52 52
 
53 53
             $options[] = [ 'id' => $org->getId(),
54
-                           'text' => $name . '|'
55
-                                      . $contact->getCity() . '|'
56
-                                      . $contact->getStreet() . '|'
57
-                                      . $contact->getHouseNumber() . '|'
58
-                                      . $imageUrl
54
+                            'text' => $name . '|'
55
+                                        . $contact->getCity() . '|'
56
+                                        . $contact->getStreet() . '|'
57
+                                        . $contact->getHouseNumber() . '|'
58
+                                        . $imageUrl
59 59
             ];
60 60
         }
61 61
 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -50,11 +50,11 @@
 block discarded – undo
50 50
             $image    = $org->getImage();
51 51
             $imageUrl = $image ? $image->getUri() : '';
52 52
 
53
-            $options[] = [ 'id' => $org->getId(),
54
-                           'text' => $name . '|'
55
-                                      . $contact->getCity() . '|'
56
-                                      . $contact->getStreet() . '|'
57
-                                      . $contact->getHouseNumber() . '|'
53
+            $options[] = ['id' => $org->getId(),
54
+                           'text' => $name.'|'
55
+                                      . $contact->getCity().'|'
56
+                                      . $contact->getStreet().'|'
57
+                                      . $contact->getHouseNumber().'|'
58 58
                                       . $imageUrl
59 59
             ];
60 60
         }
Please login to merge, or discard this patch.
module/Core/src/Core/Entity/Hydrator/Strategy/FileCopyStrategy.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         
79 79
         // ensures garbage removal
80 80
         register_shutdown_function(
81
-            function ($filename) {
81
+            function($filename) {
82 82
                 @unlink($filename);
83 83
             },
84 84
             $tmp
@@ -92,10 +92,10 @@  discard block
 block discarded – undo
92 92
 
93 93
         $return = ["file" => $tmp];
94 94
 
95
-        foreach(['user', 'name', 'type'] as $key) {
95
+        foreach (['user', 'name', 'type'] as $key) {
96 96
             $v = $value->{"get$key"}();
97
-            if($v) {
98
-                $return[$key]=$v;
97
+            if ($v) {
98
+                $return[$key] = $v;
99 99
             }
100 100
         }
101 101
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 
123 123
         $entity = $this->getTargetEntity();
124 124
 
125
-        foreach($value as $key=>$v) {
125
+        foreach ($value as $key=>$v) {
126 126
             $entity->{"set$key"}($v);
127 127
         }
128 128
         return $entity;
Please login to merge, or discard this patch.
module/Applications/src/Applications/Paginator/JobSelectPaginator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
     {
43 43
         /* @var \Doctrine\ODM\MongoDB\Query\Builder $qb */
44 44
         $qb = $this->repository->createQueryBuilder();
45
-        $qb->field('title')->equals(new \MongoRegex('/' . addslashes($q) . '/i'));
45
+        $qb->field('title')->equals(new \MongoRegex('/'.addslashes($q).'/i'));
46 46
         $cursor = $qb->getQuery()->execute();
47 47
 
48 48
         $adapter = new DoctrineMongoCursor($cursor);
Please login to merge, or discard this patch.
module/Applications/src/Applications/Form/Element/JobSelect.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
  */
23 23
 class JobSelect extends Select implements HeadscriptProviderInterface
24 24
 {
25
-    private $scripts = [ 'Applications/js/form.job-select.js' ];
25
+    private $scripts = ['Applications/js/form.job-select.js'];
26 26
 
27 27
     /**
28 28
      * Sets the array of script names.
Please login to merge, or discard this patch.
module/Applications/src/Applications/Form/ApplicationsFilter.php 1 patch
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -36,50 +36,50 @@
 block discarded – undo
36 36
     {
37 37
 
38 38
         $this->add(
39
-             [
40
-                 'type' => JobSelect::class,
41
-                 'name' => 'job',
42
-                 'options' => [
43
-                     'label' => /* @translate */ 'Enter job title',
44
-                     //'empty_option' => 'Enter job title',
45
-                 ],
46
-                 'attributes' => [
47
-                     'id' => 'job-filter',
48
-                     'class' => 'form-control',
49
-                     'data-placeholder' => 'Enter job title',
50
-                     'data-autoinit' => 'false',
51
-                     'data-submit-on-change' => 'true',
52
-                 ]
53
-             ]
39
+                [
40
+                    'type' => JobSelect::class,
41
+                    'name' => 'job',
42
+                    'options' => [
43
+                        'label' => /* @translate */ 'Enter job title',
44
+                        //'empty_option' => 'Enter job title',
45
+                    ],
46
+                    'attributes' => [
47
+                        'id' => 'job-filter',
48
+                        'class' => 'form-control',
49
+                        'data-placeholder' => 'Enter job title',
50
+                        'data-autoinit' => 'false',
51
+                        'data-submit-on-change' => 'true',
52
+                    ]
53
+                ]
54 54
         );
55 55
 
56 56
         $this->add(
57
-             [
58
-                 'type' => 'Applications\Form\Element\StatusSelect',
59
-                 'name' => 'status',
60
-                 'options' => [
61
-                     'label' => /* @translate */ 'Status',
62
-                 ],
63
-                 'attributes' => [
64
-                     'data-width' => '100%',
65
-                     'data-submit-on-change' => 'true',
66
-                     'data-placeholder' => /*@translate*/ 'all',
67
-                 ]
68
-             ]
57
+                [
58
+                    'type' => 'Applications\Form\Element\StatusSelect',
59
+                    'name' => 'status',
60
+                    'options' => [
61
+                        'label' => /* @translate */ 'Status',
62
+                    ],
63
+                    'attributes' => [
64
+                        'data-width' => '100%',
65
+                        'data-submit-on-change' => 'true',
66
+                        'data-placeholder' => /*@translate*/ 'all',
67
+                    ]
68
+                ]
69 69
         );
70 70
 
71 71
         $this->add(
72
-             ['type' => 'ToggleButton',
73
-                   'name' => 'unread',
74
-                   'options' => [
75
-                       'checked_value' => '1',
76
-                       'unchecked_value' => '0',
77
-                       'label' => 'unread',
78
-                   ],
79
-                 'attributes' => [
80
-                     'data-submit-on-change' => 'true',
81
-                 ]
82
-             ]
72
+                ['type' => 'ToggleButton',
73
+                    'name' => 'unread',
74
+                    'options' => [
75
+                        'checked_value' => '1',
76
+                        'unchecked_value' => '0',
77
+                        'label' => 'unread',
78
+                    ],
79
+                    'attributes' => [
80
+                        'data-submit-on-change' => 'true',
81
+                    ]
82
+                ]
83 83
         );
84 84
 
85 85
         $this->setButtonElement('unread');
Please login to merge, or discard this patch.
module/Cv/src/Cv/Form/PreferredJobFieldset.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@
 block discarded – undo
128 128
         );
129 129
 
130 130
         $this->setName('preferredJob')
131
-             ->setHydrator(new EntityHydrator())
132
-             ->setObject(new PreferredJob());
131
+                ->setHydrator(new EntityHydrator())
132
+                ->setObject(new PreferredJob());
133 133
     }
134 134
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     
18 18
     use EmptySummaryAwareTrait, HydratorStrategyAwareTrait, ViewPartialProviderTrait;
19 19
 
20
-    private $defaultEmptySummaryNotice =  /*@translate*/ 'Click here to enter your employment expectation';
20
+    private $defaultEmptySummaryNotice = /*@translate*/ 'Click here to enter your employment expectation';
21 21
     private $defaultPartial = 'cv/form/preferred-job-fieldset';
22 22
     
23 23
     /**
Please login to merge, or discard this patch.