Completed
Pull Request — master (#375)
by
unknown
03:05
created
src/FacebookAds/Object/CustomAudienceMultiKey.php 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -145,8 +145,7 @@
 block discarded – undo
145 145
         $normalizers = new \ArrayObject(array(
146 146
           new HashNormalizer()
147 147
         ));
148
-      }
149
-      else {
148
+      } else {
150 149
         $normalizers = clone $this->getNormalizers();
151 150
         $normalizers->append(new HashNormalizer());
152 151
       }
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@
 block discarded – undo
38 38
   const HASH_TYPE_SHA256 = 'sha256';
39 39
 
40 40
   /**
41
-  * @var \ArrayObject
42
-  */
41
+   * @var \ArrayObject
42
+   */
43 43
   protected $normalizers;
44 44
 
45 45
   /**
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,6 @@
 block discarded – undo
25 25
 namespace FacebookAds\Object;
26 26
 
27 27
 use FacebookAds\Http\RequestInterface;
28
-use FacebookAds\Object\Values\CustomAudienceTypes;
29 28
 use FacebookAds\Object\Fields\CustomAudienceFields;
30 29
 use FacebookAds\Object\CustomAudienceNormalizers\HashNormalizer;
31 30
 use FacebookAds\Object\Fields\CustomAudienceMultikeySchemaFields;
Please login to merge, or discard this patch.
src/FacebookAds/Http/Exception/RequestException.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@
 block discarded – undo
115 115
 
116 116
   /**
117 117
    * @param array $array
118
-   * @param string|int $key
118
+   * @param string $key
119 119
    * @param mixed $default
120 120
    * @return mixed
121 121
    */
Please login to merge, or discard this patch.
src/FacebookAds/ApiRequest.php 2 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -21,6 +21,10 @@
 block discarded – undo
21 21
   private $allow_file_upload;
22 22
   private $file_counter;
23 23
 
24
+  /**
25
+   * @param string $endpoint
26
+   * @param string $api_type
27
+   */
24 28
   public function __construct(
25 29
     Api $api,
26 30
     $id,
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace FacebookAds;
4 4
 
5 5
 use FacebookAds\Cursor;
6
-use FacebookAds\AbstractObject;
7 6
 
8 7
 class ApiRequest {
9 8
   protected $api;
Please login to merge, or discard this patch.
src/FacebookAds/TypeChecker.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -156,6 +156,9 @@  discard block
 block discarded – undo
156 156
     return false;
157 157
   }
158 158
 
159
+  /**
160
+   * @param string $prefix
161
+   */
159 162
   private function startsWith($string, $prefix) {
160 163
     return $prefix === "" ||
161 164
       strrpos($string, $prefix, -strlen($string)) !== false;
@@ -182,12 +185,18 @@  discard block
 block discarded – undo
182 185
     return false;
183 186
   }
184 187
 
188
+  /**
189
+   * @param string $collection
190
+   */
185 191
   public function isTypeCollection($type, $collection) {
186 192
     $len_of_collection = strlen($collection);
187 193
     $typeCollection = substr($type, 0, $len_of_collection);
188 194
     return ($collection === $typeCollection);
189 195
   }
190 196
 
197
+  /**
198
+   * @param string $collection
199
+   */
191 200
   public function getTypeFromCollection($type, $collection) {
192 201
     return explode(",", trim(substr($type, strlen($collection)), "<>"));
193 202
   }
Please login to merge, or discard this patch.
src/FacebookAds/Object/AbstractCrudObject.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -331,7 +331,7 @@
 block discarded – undo
331 331
    * @param array $fields Fields to request
332 332
    * @param array $params Additional filters for the reading
333 333
    * @param string|null $endpoint
334
-   * @return AbstractObject
334
+   * @return null|AbstractCrudObject
335 335
    */
336 336
   protected function getOneByConnection(
337 337
     $prototype_class,
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -208,7 +208,7 @@
 block discarded – undo
208 208
       array_merge($this->exportData(), $params));
209 209
     $this->clearHistory();
210 210
     $data = $response->getContent();
211
-    if (!isset($params['execution_options'])){
211
+    if (!isset($params['execution_options'])) {
212 212
       $id = is_string($data) ? $data : $data[static::FIELD_ID];
213 213
     /** @var AbstractCrudObject $this */
214 214
       if ($this instanceof CanRedownloadInterface
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     $this->data[static::FIELD_ID] = $id;
60 60
 
61 61
     if (!is_null($parent_id)) {
62
-      $warning_message = "\$parent_id as a parameter of constructor is being " .
62
+      $warning_message = "\$parent_id as a parameter of constructor is being ".
63 63
         "deprecated, please try not to use this in new code.\n";
64 64
       error_log($warning_message);
65 65
     }
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
       array_merge($this->exportData(), $params));
220 220
     $this->clearHistory();
221 221
     $data = $response->getContent();
222
-    if (!isset($params['execution_options'])){
222
+    if (!isset($params['execution_options'])) {
223 223
       $id = is_string($data) ? $data : $data[static::FIELD_ID];
224 224
     /** @var AbstractCrudObject $this */
225 225
       if ($this instanceof CanRedownloadInterface
Please login to merge, or discard this patch.
src/FacebookAds/Object/AdImage.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,6 @@
 block discarded – undo
25 25
 namespace FacebookAds\Object;
26 26
 
27 27
 use FacebookAds\ApiRequest;
28
-use FacebookAds\Cursor;
29 28
 use FacebookAds\Http\RequestInterface;
30 29
 use FacebookAds\TypeChecker;
31 30
 use FacebookAds\Object\Fields\AdImageFields;
Please login to merge, or discard this patch.