Completed
Pull Request — master (#82)
by
unknown
06:37
created
src/PhraseanetSDK/Search/SearchResultInfo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@
 block discarded – undo
129 129
      */
130 130
     public function getFacets()
131 131
     {
132
-        if (! isset($this->source->facets)) {
132
+        if (!isset($this->source->facets)) {
133 133
             $this->facets = new ArrayCollection();
134 134
         }
135 135
 
Please login to merge, or discard this patch.
src/PhraseanetSDK/Entity/Record.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      */
100 100
     public function getId()
101 101
     {
102
-        return $this->getDataboxId() . '_' . $this->getRecordId();
102
+        return $this->getDataboxId().'_'.$this->getRecordId();
103 103
     }
104 104
 
105 105
     /**
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
      */
211 211
     public function getThumbnail()
212 212
     {
213
-        if (! isset($this->source->thumbnail)) {
213
+        if (!isset($this->source->thumbnail)) {
214 214
             return null;
215 215
         }
216 216
 
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
      */
245 245
     public function getTechnicalInformation()
246 246
     {
247
-        if (! isset($this->source->technical_informations)) {
247
+        if (!isset($this->source->technical_informations)) {
248 248
             $this->technicalInformation = new ArrayCollection();
249 249
         }
250 250
 
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
      */
261 261
     public function getSubdefs()
262 262
     {
263
-        if (! isset($this->source->subdefs)) {
263
+        if (!isset($this->source->subdefs)) {
264 264
             $this->subdefs = new ArrayCollection();
265 265
         }
266 266
 
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
      */
273 273
     public function getStatus()
274 274
     {
275
-        if (! isset($this->source->status)) {
275
+        if (!isset($this->source->status)) {
276 276
             $this->status = new ArrayCollection();
277 277
         }
278 278
 
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
      */
285 285
     public function getCaption()
286 286
     {
287
-        if (! isset($this->source->caption)) {
287
+        if (!isset($this->source->caption)) {
288 288
             $this->caption = new ArrayCollection();
289 289
         }
290 290
 
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
      */
297 297
     public function getMetadata()
298 298
     {
299
-        if (! isset($this->source->metadata)) {
299
+        if (!isset($this->source->metadata)) {
300 300
             $this->metadata = new ArrayCollection();
301 301
         }
302 302
 
Please login to merge, or discard this patch.
src/PhraseanetSDK/Repository/User.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -76,13 +76,13 @@  discard block
 block discarded – undo
76 76
      */
77 77
     public function requestPasswordReset($emailAddress)
78 78
     {
79
-        $response = $this->query('POST', 'v1/accounts/reset-password/' . $emailAddress . '/');
79
+        $response = $this->query('POST', 'v1/accounts/reset-password/'.$emailAddress.'/');
80 80
 
81 81
         if (!$response->hasProperty('reset_token')) {
82 82
             throw new RuntimeException('Missing "token" property in response content');
83 83
         }
84 84
 
85
-        return (string)$response->getProperty('reset_token');
85
+        return (string) $response->getProperty('reset_token');
86 86
     }
87 87
 
88 88
     /**
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      */
95 95
     public function resetPassword($token, $password)
96 96
     {
97
-        $response = $this->query('POST', 'v1/accounts/update-password/' . $token . '/', array(), array(
97
+        $response = $this->query('POST', 'v1/accounts/update-password/'.$token.'/', array(), array(
98 98
             'password' => $password
99 99
         ));
100 100
 
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
             throw new RuntimeException('Missing "success" property in response content');
103 103
         }
104 104
 
105
-        return (bool)$response->getProperty('success');
105
+        return (bool) $response->getProperty('success');
106 106
     }
107 107
 
108 108
     public function updatePassword($currentPassword, $newPassword)
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
             throw new RuntimeException('Missing "success" property in response content');
120 120
         }
121 121
 
122
-        return (bool)$response->getProperty('success');
122
+        return (bool) $response->getProperty('success');
123 123
     }
124 124
 
125 125
     /**
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
             throw new \RuntimeException('Missing "token" property in response content');
166 166
         }
167 167
 
168
-        return (string)$response->getProperty('token');
168
+        return (string) $response->getProperty('token');
169 169
     }
170 170
 
171 171
     public function updateUser(\PhraseanetSDK\Entity\User $user)
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
             throw new RuntimeException('Missing "success" property in response content');
195 195
         }
196 196
 
197
-        return (bool)$response->getProperty('success');
197
+        return (bool) $response->getProperty('success');
198 198
     }
199 199
 
200 200
     public function deleteAccount()
@@ -210,12 +210,12 @@  discard block
 block discarded – undo
210 210
      */
211 211
     public function unlockAccount($token)
212 212
     {
213
-        $response = $this->query('POST', 'v1/accounts/unlock/' . $token . '/', array(), array());
213
+        $response = $this->query('POST', 'v1/accounts/unlock/'.$token.'/', array(), array());
214 214
 
215 215
         if (!$response->hasProperty('success')) {
216 216
             throw new \RuntimeException('Missing "success" property in response content');
217 217
         }
218 218
 
219
-        return (bool)$response->getProperty('success');
219
+        return (bool) $response->getProperty('success');
220 220
     }
221 221
 }
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
12 12
 namespace PhraseanetSDK\Repository;
13 13
 
14 14
 use PhraseanetSDK\AbstractRepository;
15
-use PhraseanetSDK\EntityHydrator;
16 15
 use PhraseanetSDK\Exception\RuntimeException;
17 16
 
18 17
 class User extends AbstractRepository
Please login to merge, or discard this patch.
src/PhraseanetSDK/OAuth2Connector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
         try {
97 97
             $responseContent = $this->adapter->call(
98 98
                 'POST',
99
-                $this->getUrl() . static::TOKEN_ENDPOINT,
99
+                $this->getUrl().static::TOKEN_ENDPOINT,
100 100
                 array(),
101 101
                 $postFields
102 102
             );
Please login to merge, or discard this patch.
src/PhraseanetSDK/Monitor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -112,8 +112,8 @@
 block discarded – undo
112 112
     {
113 113
         $entity = new static::$mappings[$name]['entity']();
114 114
 
115
-        array_walk($data, function ($value, $property) use ($entity) {
116
-            $method = 'set'.implode('', array_map(function ($chunk) {
115
+        array_walk($data, function($value, $property) use ($entity) {
116
+            $method = 'set'.implode('', array_map(function($chunk) {
117 117
                     return ucfirst($chunk);
118 118
             }, preg_split('/[-_]/', $property)));
119 119
 
Please login to merge, or discard this patch.
src/PhraseanetSDK/Repository/Basket.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,6 @@
 block discarded – undo
14 14
 use PhraseanetSDK\AbstractRepository;
15 15
 use PhraseanetSDK\Exception\RuntimeException;
16 16
 use Doctrine\Common\Collections\ArrayCollection;
17
-use PhraseanetSDK\EntityHydrator;
18 17
 
19 18
 class Basket extends AbstractRepository
20 19
 {
Please login to merge, or discard this patch.
src/PhraseanetSDK/Repository/BasketElement.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,6 @@
 block discarded – undo
14 14
 use PhraseanetSDK\AbstractRepository;
15 15
 use PhraseanetSDK\Exception\RuntimeException;
16 16
 use Doctrine\Common\Collections\ArrayCollection;
17
-use PhraseanetSDK\EntityHydrator;
18 17
 
19 18
 class BasketElement extends AbstractRepository
20 19
 {
Please login to merge, or discard this patch.
src/PhraseanetSDK/Repository/Databox.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,6 @@
 block discarded – undo
14 14
 use PhraseanetSDK\AbstractRepository;
15 15
 use PhraseanetSDK\Exception\RuntimeException;
16 16
 use Doctrine\Common\Collections\ArrayCollection;
17
-use PhraseanetSDK\EntityHydrator;
18 17
 
19 18
 class Databox extends AbstractRepository
20 19
 {
Please login to merge, or discard this patch.
src/PhraseanetSDK/Repository/DataboxCollection.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,6 @@
 block discarded – undo
14 14
 use PhraseanetSDK\AbstractRepository;
15 15
 use PhraseanetSDK\Exception\RuntimeException;
16 16
 use Doctrine\Common\Collections\ArrayCollection;
17
-use PhraseanetSDK\EntityHydrator;
18 17
 
19 18
 class DataboxCollection extends AbstractRepository
20 19
 {
Please login to merge, or discard this patch.