Completed
Pull Request — develop (#491)
by Mathias
16:00
created
module/Core/src/Core/Filter/File/Entity.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
     public function getFileEntity()
94 94
     {
95
-        if (! $this->fileEntity instanceof FileInterface) {
95
+        if (!$this->fileEntity instanceof FileInterface) {
96 96
             throw new \RuntimeException('No file entity set or it does not implement \Core\Entity\FileInterface.');
97 97
         }
98 98
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 
102 102
     public function filter($value)
103 103
     {
104
-        if (! is_array($value) || ! isset($value['tmp_name']) || ((isset($value['error']) && UPLOAD_ERR_NO_FILE == $value['error']))) {
104
+        if (!is_array($value) || !isset($value['tmp_name']) || ((isset($value['error']) && UPLOAD_ERR_NO_FILE == $value['error']))) {
105 105
             return null;
106 106
         }
107 107
 
Please login to merge, or discard this patch.
module/Cv/src/Cv/Entity/Cv.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
      * @var array
83 83
      * @ODM\Field(type="collection")
84 84
      */
85
-    protected $nativeLanguages=[];
85
+    protected $nativeLanguages = [];
86 86
 
87 87
 
88 88
     /**
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
      */
268 268
     public function setIsDraft($isDraft)
269 269
     {
270
-        $this->isDraft=$isDraft;
270
+        $this->isDraft = $isDraft;
271 271
         return $this;
272 272
     }
273 273
 
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
      */
338 338
     public function setNativeLanguages($nativeLanguages)
339 339
     {
340
-        $this->nativeLanguages=$nativeLanguages;
340
+        $this->nativeLanguages = $nativeLanguages;
341 341
         return $this;
342 342
     }
343 343
 
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Entity/Decorator/JsonLdProvider.php 1 patch
Spacing   +6 added lines, -6 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(),
@@ -85,16 +85,16 @@  discard block
 block discarded – undo
85 85
      *
86 86
      * @return array
87 87
      */
88
-    private function getLocations($locations){
89
-        $array=[];
90
-        foreach($locations as $location){ /* @var \Core\Entity\LocationInterface $location */
88
+    private function getLocations($locations) {
89
+        $array = [];
90
+        foreach ($locations as $location) { /* @var \Core\Entity\LocationInterface $location */
91 91
             array_push(
92 92
                 $array,
93 93
                 [
94 94
                     '@type' => 'Place',
95 95
                     'address' => [
96 96
                         '@type' => 'PostalAddress',
97
-                        'streetAddress' => $location->getStreetname() .' '.$location->getStreetnumber(),
97
+                        'streetAddress' => $location->getStreetname().' '.$location->getStreetnumber(),
98 98
                         'postalCode' => $location->getPostalCode(),
99 99
                         'addressLocality' => $location->getCity(),
100 100
                         'addressCountry' => $location->getCountry(),
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      */
115 115
     private function getDescription(TemplateValuesInterface $values) {
116 116
 
117
-        $description=sprintf(
117
+        $description = sprintf(
118 118
             "<p>%s</p>".
119 119
             "<h1>%s</h1>".
120 120
             "<h3>Requirements</h3><p>%s</p>".
Please login to merge, or discard this patch.
module/Auth/src/Auth/Repository/User.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      * @see \Core\Repository\AbstractRepository::create()
95 95
      * @return UserInterface
96 96
      */
97
-    public function create(array $data = null, $persist=false)
97
+    public function create(array $data = null, $persist = false)
98 98
     {
99 99
         $entity = parent::create($data);
100 100
         
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      */
117 117
     public function findByProfileIdentifier($identifier, $provider, array $options = [])
118 118
     {
119
-        return $this->findOneBy(array('profiles.' . $provider . '.auth.identifier' => $identifier), $options) ?: $this->findOneBy(array('profile.identifier' => $identifier), $options);
119
+        return $this->findOneBy(array('profiles.'.$provider.'.auth.identifier' => $identifier), $options) ?: $this->findOneBy(array('profile.identifier' => $identifier), $options);
120 120
     }
121 121
     
122 122
     /**
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
         $qb->field('_id')->notEqual($curentUserId)
134 134
             ->addAnd(
135 135
                 $qb->expr()
136
-                    ->addOr($qb->expr()->field('profiles.' . $provider . '.auth.identifier' )->equals($identifier))
136
+                    ->addOr($qb->expr()->field('profiles.'.$provider.'.auth.identifier')->equals($identifier))
137 137
                     ->addOr($qb->expr()->field('profile.identifier')->equals($identifier))
138 138
             );
139 139
         
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
         return $this->findOneBy(
190 190
             array(
191 191
             '$or' => array(
192
-                array('login' => $identity . $suffix),
192
+                array('login' => $identity.$suffix),
193 193
                 array('info.email' => $identity)
194 194
             )
195 195
             )
@@ -238,10 +238,10 @@  discard block
 block discarded – undo
238 238
     public function findByQuery($query)
239 239
     {
240 240
         $qb = $this->createQueryBuilder();
241
-        $parts  = explode(' ', trim($query));
241
+        $parts = explode(' ', trim($query));
242 242
         
243 243
         foreach ($parts as $q) {
244
-            $regex = new \MongoRegex('/^' . $query . '/i');
244
+            $regex = new \MongoRegex('/^'.$query.'/i');
245 245
             $qb->addOr($qb->expr()->field('info.firstName')->equals($regex));
246 246
             $qb->addOr($qb->expr()->field('info.lastName')->equals($regex));
247 247
             $qb->addOr($qb->expr()->field('info.email')->equals($regex));
Please login to merge, or discard this patch.
module/Organizations/src/Organizations/Repository/Organization.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -197,7 +197,7 @@
 block discarded – undo
197 197
 	 * @param bool          $persist
198 198
 	 * @return \Organizations\Entity\Organization
199 199
 	 */
200
-    public function create(array $data = null, $persist=false)
200
+    public function create(array $data = null, $persist = false)
201 201
     {
202 202
         $entity = parent::create($data);
203 203
         $entity->isDraft(true);
Please login to merge, or discard this patch.
module/Install/src/Controller/Plugin/UserCreator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,9 +80,9 @@
 block discarded – undo
80 80
         $repo->setEntityPrototype(new User());
81 81
 
82 82
         $result = true;
83
-        try{
83
+        try {
84 84
             $repo->store($user);
85
-        }catch (\Exception $e){
85
+        } catch (\Exception $e) {
86 86
             throw $e;
87 87
         }
88 88
         return $result;
Please login to merge, or discard this patch.
module/Install/src/Controller/Index.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -114,13 +114,13 @@  discard block
 block discarded – undo
114 114
 
115 115
         $data = $form->getData();
116 116
 
117
-        try{
117
+        try {
118 118
             $options = [
119 119
                 'connection' => $data['db_conn'],
120 120
             ];
121
-            $userOk = $this->plugin('Install/UserCreator',$options)->process($data['username'], $data['password'], $data['email']);
121
+            $userOk = $this->plugin('Install/UserCreator', $options)->process($data['username'], $data['password'], $data['email']);
122 122
             $ok = $this->plugin('Install/ConfigCreator')->process($data['db_conn'], $data['email']);
123
-        }catch (\Exception $exception){
123
+        } catch (\Exception $exception) {
124 124
             /* @TODO: provide a way to handle global error message */
125 125
             return $this->createJsonResponse([
126 126
                 'ok'        => false,
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 	    parent::attachDefaultListeners();
154 154
 	
155 155
 	    $events = $this->getEventManager();
156
-	    $events->attach( MvcEvent::EVENT_DISPATCH, array( $this, 'preDispatch' ), 100 );
156
+	    $events->attach(MvcEvent::EVENT_DISPATCH, array($this, 'preDispatch'), 100);
157 157
     }
158 158
 
159 159
     /**
Please login to merge, or discard this patch.
module/Install/src/Factory/Controller/Plugin/UserCreatorFactory.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,9 +50,9 @@  discard block
 block discarded – undo
50 50
 
51 51
         $config = $container->get('doctrine.documentmanager.odm_default')->getConfiguration();
52 52
         $config->setDefaultDB($database);
53
-        $dm = $this->createDocumentManager($options['connection'],$config);
53
+        $dm = $this->createDocumentManager($options['connection'], $config);
54 54
 
55
-        $plugin = new UserCreator($credentialFilter,$dm);
55
+        $plugin = new UserCreator($credentialFilter, $dm);
56 56
         return $plugin;
57 57
     }
58 58
 
@@ -64,10 +64,10 @@  discard block
 block discarded – undo
64 64
      * @return DocumentManager
65 65
      * @codeCoverageIgnore
66 66
      */
67
-    public function createDocumentManager($connection,$config)
67
+    public function createDocumentManager($connection, $config)
68 68
     {
69 69
         $dbConn = new Connection($connection);
70
-        $dm = DocumentManager::create($dbConn,$config);
70
+        $dm = DocumentManager::create($dbConn, $config);
71 71
         return $dm;
72 72
     }
73 73
 }
Please login to merge, or discard this patch.
module/Install/src/Validator/MongoDbConnection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
             $this->error(self::NO_CONNECTION);
82 82
 
83 83
             return false;
84
-        }catch (\Exception $e){
84
+        } catch (\Exception $e) {
85 85
             $this->databaseError = $e->getMessage();
86 86
             $this->error(self::NO_CONNECTION);
87 87
             return false;
Please login to merge, or discard this patch.