Completed
Push — master ( d35089...49036b )
by Thibaud
05:48 queued 02:58
created
src/PhraseanetSDK/Cache/BackendCacheFactory.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -18,6 +18,9 @@  discard block
 block discarded – undo
18 18
 
19 19
 class BackendCacheFactory
20 20
 {
21
+    /**
22
+     * @param string $type
23
+     */
21 24
     public function create($type, $host = null, $port = null)
22 25
     {
23 26
         $host = $host ? $host : '127.0.0.1';
@@ -48,6 +51,9 @@  discard block
 block discarded – undo
48 51
         return new ArrayCache();
49 52
     }
50 53
 
54
+    /**
55
+     * @param integer $port
56
+     */
51 57
     private function createMemcache($host, $port)
52 58
     {
53 59
         $memcache = new \Memcache();
@@ -70,6 +76,9 @@  discard block
 block discarded – undo
70 76
         return $cache;
71 77
     }
72 78
 
79
+    /**
80
+     * @param integer $port
81
+     */
73 82
     private function createMemcached($host, $port)
74 83
     {
75 84
         $memcached = new \Memcached();
Please login to merge, or discard this patch.
src/PhraseanetSDK/Entity/Story.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,6 @@
 block discarded – undo
12 12
 namespace PhraseanetSDK\Entity;
13 13
 
14 14
 use Doctrine\Common\Collections\ArrayCollection;
15
-use PhraseanetSDK\Annotation\ApiField as ApiField;
16
-use PhraseanetSDK\Annotation\ApiRelation as ApiRelation;
17 15
 use PhraseanetSDK\EntityManager;
18 16
 
19 17
 class Story
Please login to merge, or discard this patch.
Spacing   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
      */
131 131
     public function getThumbnail()
132 132
     {
133
-        if (! isset($this->source->thumbnail)) {
133
+        if (!isset($this->source->thumbnail)) {
134 134
             return null;
135 135
         }
136 136
 
@@ -183,8 +183,7 @@  discard block
 block discarded – undo
183 183
     public function getRecordCount()
184 184
     {
185 185
         return $this->recordCount !== null ?
186
-            $this->recordCount :
187
-            $this->recordCount = (isset($this->source->record_count) ? $this->source->record_count : count($this->getRecords()));
186
+            $this->recordCount : $this->recordCount = (isset($this->source->record_count) ? $this->source->record_count : count($this->getRecords()));
188 187
     }
189 188
 
190 189
     /**
@@ -192,7 +191,7 @@  discard block
 block discarded – undo
192 191
      */
193 192
     public function getRecords()
194 193
     {
195
-        if (! isset($this->source->records)) {
194
+        if (!isset($this->source->records)) {
196 195
             $this->records = new ArrayCollection();
197 196
         }
198 197
 
@@ -204,7 +203,7 @@  discard block
 block discarded – undo
204 203
      */
205 204
     public function getMetadata()
206 205
     {
207
-        if (! isset($this->source->metadata)) {
206
+        if (!isset($this->source->metadata)) {
208 207
             $this->metadata = new ArrayCollection();
209 208
         }
210 209
 
@@ -216,7 +215,7 @@  discard block
 block discarded – undo
216 215
      */
217 216
     public function getStatus()
218 217
     {
219
-        if (! isset($this->status)) {
218
+        if (!isset($this->status)) {
220 219
             $this->status = $this->entityManager->getRepository('recordStatus')->findByRecord(
221 220
                 $this->getDataboxId(),
222 221
                 $this->getStoryId()
@@ -231,7 +230,7 @@  discard block
 block discarded – undo
231 230
      */
232 231
     public function getCaption()
233 232
     {
234
-        if (! isset($this->caption)) {
233
+        if (!isset($this->caption)) {
235 234
             $this->caption = $this->entityManager->getRepository('caption')->findByRecord(
236 235
                 $this->getDataboxId(),
237 236
                 $this->getStoryId()
Please login to merge, or discard this patch.
src/PhraseanetSDK/Recorder/Player.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -70,6 +70,9 @@
 block discarded – undo
70 70
         }
71 71
     }
72 72
 
73
+    /**
74
+     * @param string $message
75
+     */
73 76
     private function output($message, OutputInterface $output = null)
74 77
     {
75 78
         if (null !== $output) {
Please login to merge, or discard this patch.
src/PhraseanetSDK/Repository/DataboxCollection.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
      * Find all collection in the provided databox
22 22
      *
23 23
      * @param  integer          $databoxId the databox id
24
-     * @return ArrayCollection|\PhraseanetSDK\Entity\DataboxCollection[]
24
+     * @return ArrayCollection
25 25
      * @throws RuntimeException
26 26
      */
27 27
     public function findByDatabox($databoxId)
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,6 @@
 block discarded – undo
11 11
 
12 12
 namespace PhraseanetSDK\Repository;
13 13
 
14
-use PhraseanetSDK\EntityHydrator;
15 14
 use PhraseanetSDK\Exception\RuntimeException;
16 15
 
17 16
 class User extends AbstractRepository
Please login to merge, or discard this patch.
src/PhraseanetSDK/Repository/Entry.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
      * Retrieve the entry identified by its id
23 23
      *
24 24
      * @param  integer $id The entry id
25
-     * @return \PhraseanetSDK\Entity\Feed
25
+     * @return FeedEntry
26 26
      * @throws RuntimeException
27 27
      */
28 28
     public function findById($id)
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,6 @@
 block discarded – undo
11 11
 
12 12
 namespace PhraseanetSDK\Repository;
13 13
 
14
-use PhraseanetSDK\EntityHydrator;
15 14
 use PhraseanetSDK\Exception\RuntimeException;
16 15
 
17 16
 class User extends AbstractRepository
Please login to merge, or discard this patch.
src/PhraseanetSDK/Repository/User.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,6 @@
 block discarded – undo
11 11
 
12 12
 namespace PhraseanetSDK\Repository;
13 13
 
14
-use PhraseanetSDK\EntityHydrator;
15 14
 use PhraseanetSDK\Exception\RuntimeException;
16 15
 
17 16
 class User extends AbstractRepository
Please login to merge, or discard this patch.
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.
src/PhraseanetSDK/Entity/Basket.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@
 block discarded – undo
166 166
      */
167 167
     public function getValidationUsers()
168 168
     {
169
-        if (! $this->isValidationBasket()) {
169
+        if (!$this->isValidationBasket()) {
170 170
             return null;
171 171
         }
172 172
 
Please login to merge, or discard this patch.
src/PhraseanetSDK/Entity/BasketElement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
      */
111 111
     public function getValidationChoices()
112 112
     {
113
-        if (! isset($this->source->validation_choices)) {
113
+        if (!isset($this->source->validation_choices)) {
114 114
             $this->validationChoices = new ArrayCollection();
115 115
         }
116 116
 
Please login to merge, or discard this patch.
src/PhraseanetSDK/Entity/FeedEntry.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@
 block discarded – undo
146 146
      */
147 147
     public function getItems()
148 148
     {
149
-        if (! isset($this->source->items)) {
149
+        if (!isset($this->source->items)) {
150 150
             $this->items = new ArrayCollection();
151 151
         }
152 152
 
Please login to merge, or discard this patch.