Failed Conditions
Pull Request — master (#191)
by Emanuele
03:09
created
src/FacebookAds/Object/ProductGroup.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,6 +24,5 @@
 block discarded – undo
24 24
 
25 25
 namespace FacebookAds\Object;
26 26
 
27
-class ProductGroup extends AbstractObject
28
-{
27
+class ProductGroup extends AbstractObject {
29 28
 }
Please login to merge, or discard this patch.
src/FacebookAds/Object/RateCard.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,13 +26,11 @@
 block discarded – undo
26 26
 
27 27
 use FacebookAds\Object\Fields\RateCardFields;
28 28
 
29
-class RateCard extends AbstractObject
30
-{
29
+class RateCard extends AbstractObject {
31 30
     /**
32 31
      * @return RateCardFields
33 32
      */
34
-    public static function getFieldsEnum()
35
-    {
33
+    public static function getFieldsEnum() {
36 34
         return RateCardFields::getInstance();
37 35
     }
38 36
 }
Please login to merge, or discard this patch.
src/FacebookAds/Object/AdAccount.php 1 patch
Braces   +36 added lines, -72 removed lines patch added patch discarded remove patch
@@ -31,8 +31,7 @@  discard block
 block discarded – undo
31 31
 use FacebookAds\Object\Traits\CannotDelete;
32 32
 use FacebookAds\Object\Traits\FieldValidation;
33 33
 
34
-class AdAccount extends AbstractCrudObject
35
-{
34
+class AdAccount extends AbstractCrudObject {
36 35
     use FieldValidation;
37 36
     use CannotCreate;
38 37
     use CannotDelete;
@@ -40,16 +39,14 @@  discard block
 block discarded – undo
40 39
     /**
41 40
      * @return string
42 41
      */
43
-    protected function getEndpoint()
44
-    {
42
+    protected function getEndpoint() {
45 43
         return 'adaccounts';
46 44
     }
47 45
 
48 46
     /**
49 47
      * @return AdAccountFields
50 48
      */
51
-    public static function getFieldsEnum()
52
-    {
49
+    public static function getFieldsEnum() {
53 50
         return AdAccountFields::getInstance();
54 51
     }
55 52
 
@@ -59,8 +56,7 @@  discard block
 block discarded – undo
59 56
      * @return Cursor
60 57
      */
61 58
     public function getActivities(
62
-        array $fields = array(), array $params = array())
63
-    {
59
+        array $fields = array(), array $params = array()) {
64 60
         return $this->getManyByConnection(
65 61
             Activity::className(), $fields, $params, 'activities');
66 62
     }
@@ -70,8 +66,7 @@  discard block
 block discarded – undo
70 66
      * @param array $params
71 67
      * @return Cursor
72 68
      */
73
-    public function getAdUsers(array $fields = array(), array $params = array())
74
-    {
69
+    public function getAdUsers(array $fields = array(), array $params = array()) {
75 70
         return $this->getManyByConnection(AdUser::className(), $fields, $params);
76 71
     }
77 72
 
@@ -81,8 +76,7 @@  discard block
 block discarded – undo
81 76
      * @return Cursor
82 77
      */
83 78
     public function getCampaigns(
84
-        array $fields = array(), array $params = array())
85
-    {
79
+        array $fields = array(), array $params = array()) {
86 80
         return $this->getManyByConnection(
87 81
             Campaign::className(), $fields, $params);
88 82
     }
@@ -92,8 +86,7 @@  discard block
 block discarded – undo
92 86
      * @param array $params
93 87
      * @return Cursor
94 88
      */
95
-    public function getAdSets(array $fields = array(), array $params = array())
96
-    {
89
+    public function getAdSets(array $fields = array(), array $params = array()) {
97 90
         return $this->getManyByConnection(AdSet::className(), $fields, $params);
98 91
     }
99 92
 
@@ -103,8 +96,7 @@  discard block
 block discarded – undo
103 96
      * @return Cursor
104 97
      */
105 98
     public function getAds(
106
-        array $fields = array(), array $params = array())
107
-    {
99
+        array $fields = array(), array $params = array()) {
108 100
         return $this->getManyByConnection(Ad::className(), $fields, $params);
109 101
     }
110 102
 
@@ -114,8 +106,7 @@  discard block
 block discarded – undo
114 106
      * @return Cursor
115 107
      */
116 108
     public function getAdCreatives(
117
-        array $fields = array(), array $params = array())
118
-    {
109
+        array $fields = array(), array $params = array()) {
119 110
         return $this->getManyByConnection(
120 111
             AdCreative::className(), $fields, $params);
121 112
     }
@@ -126,8 +117,7 @@  discard block
 block discarded – undo
126 117
      * @return Cursor
127 118
      */
128 119
     public function getAdImages(
129
-        array $fields = array(), array $params = array())
130
-    {
120
+        array $fields = array(), array $params = array()) {
131 121
         return $this->getManyByConnection(AdImage::className(), $fields, $params);
132 122
     }
133 123
 
@@ -137,8 +127,7 @@  discard block
 block discarded – undo
137 127
      * @return Cursor
138 128
      */
139 129
     public function getAdsPixels(
140
-        array $fields = array(), array $params = array())
141
-    {
130
+        array $fields = array(), array $params = array()) {
142 131
         return $this->getManyByConnection(AdsPixel::className(), $fields, $params);
143 132
     }
144 133
 
@@ -148,8 +137,7 @@  discard block
 block discarded – undo
148 137
      * @return Cursor
149 138
      */
150 139
     public function getAdVideos(
151
-        array $fields = array(), array $params = array())
152
-    {
140
+        array $fields = array(), array $params = array()) {
153 141
         return $this->getManyByConnection(AdVideo::className(), $fields, $params);
154 142
     }
155 143
 
@@ -159,8 +147,7 @@  discard block
 block discarded – undo
159 147
      * @return Cursor
160 148
      */
161 149
     public function getBroadCategoryTargeting(
162
-        array $fields = array(), array $params = array())
163
-    {
150
+        array $fields = array(), array $params = array()) {
164 151
         return $this->getManyByConnection(
165 152
             BroadCategoryTargeting::className(),
166 153
             $fields,
@@ -175,8 +162,7 @@  discard block
 block discarded – undo
175 162
      * @return Cursor
176 163
      */
177 164
     public function getConnectionObjects(
178
-        array $fields = array(), array $params = array())
179
-    {
165
+        array $fields = array(), array $params = array()) {
180 166
         return $this->getManyByConnection(
181 167
             ConnectionObject::className(), $fields, $params, 'connectionobjects');
182 168
     }
@@ -187,8 +173,7 @@  discard block
 block discarded – undo
187 173
      * @return Cursor
188 174
      */
189 175
     public function getCustomAudiences(
190
-        array $fields = array(), array $params = array())
191
-    {
176
+        array $fields = array(), array $params = array()) {
192 177
         return $this->getManyByConnection(
193 178
             CustomAudience::className(), $fields, $params);
194 179
     }
@@ -199,8 +184,7 @@  discard block
 block discarded – undo
199 184
      * @return Cursor
200 185
      */
201 186
     public function getConversionPixels(
202
-        array $fields = array(), array $params = array())
203
-    {
187
+        array $fields = array(), array $params = array()) {
204 188
         return $this->getManyByConnection(
205 189
             AdConversionPixel::className(), $fields, $params);
206 190
     }
@@ -211,8 +195,7 @@  discard block
 block discarded – undo
211 195
      * @return Cursor
212 196
      */
213 197
     public function getPartnerCategories(
214
-        array $fields = array(), array $params = array())
215
-    {
198
+        array $fields = array(), array $params = array()) {
216 199
         return $this->getManyByConnection(
217 200
             PartnerCategory::className(), $fields, $params);
218 201
     }
@@ -223,8 +206,7 @@  discard block
 block discarded – undo
223 206
      * @return Cursor
224 207
      */
225 208
     public function getRateCards(
226
-        array $fields = array(), array $params = array())
227
-    {
209
+        array $fields = array(), array $params = array()) {
228 210
         return $this->getManyByConnection(
229 211
             RateCard::className(), $fields, $params, 'ratecard');
230 212
     }
@@ -235,8 +217,7 @@  discard block
 block discarded – undo
235 217
      * @return ReachEstimate
236 218
      */
237 219
     public function getReachEstimate(
238
-        array $fields = array(), array $params = array())
239
-    {
220
+        array $fields = array(), array $params = array()) {
240 221
         return $this->getOneByConnection(
241 222
             ReachEstimate::className(), $fields, $params, 'reachestimate');
242 223
     }
@@ -247,8 +228,7 @@  discard block
 block discarded – undo
247 228
      * @return Cursor
248 229
      */
249 230
     public function getReachFrequencyPredictions(
250
-        array $fields = array(), array $params = array())
251
-    {
231
+        array $fields = array(), array $params = array()) {
252 232
         return $this->getManyByConnection(
253 233
             ReachFrequencyPrediction::className(), $fields, $params);
254 234
     }
@@ -259,8 +239,7 @@  discard block
 block discarded – undo
259 239
      * @return TargetingDescription
260 240
      */
261 241
     public function getTargetingDescription(
262
-        array $fields = array(), array $params = array())
263
-    {
242
+        array $fields = array(), array $params = array()) {
264 243
         return $this->getOneByConnection(
265 244
             TargetingDescription::className(),
266 245
             $fields,
@@ -274,8 +253,7 @@  discard block
 block discarded – undo
274 253
      * @return Cursor
275 254
      */
276 255
     public function getTransactions(
277
-        array $fields = array(), array $params = array())
278
-    {
256
+        array $fields = array(), array $params = array()) {
279 257
         return $this->getManyByConnection(
280 258
             Transaction::className(), $fields, $params, 'transactions');
281 259
     }
@@ -286,8 +264,7 @@  discard block
 block discarded – undo
286 264
      * @return Cursor
287 265
      */
288 266
     public function getAdPreviews(
289
-        array $fields = array(), array $params = array())
290
-    {
267
+        array $fields = array(), array $params = array()) {
291 268
         return $this->getManyByConnection(
292 269
             AdPreview::classname(), $fields, $params, 'generatepreviews');
293 270
     }
@@ -298,8 +275,7 @@  discard block
 block discarded – undo
298 275
      * @return Cursor
299 276
      */
300 277
     public function getInsights(
301
-        array $fields = array(), array $params = array())
302
-    {
278
+        array $fields = array(), array $params = array()) {
303 279
         return $this->getManyByConnection(
304 280
             Insights::classname(), $fields, $params, 'insights');
305 281
     }
@@ -310,8 +286,7 @@  discard block
 block discarded – undo
310 286
      * @return AsyncJobInsights
311 287
      */
312 288
     public function getInsightsAsync(
313
-        array $fields = array(), array $params = array())
314
-    {
289
+        array $fields = array(), array $params = array()) {
315 290
         return $this->createAsyncJob(
316 291
             AsyncJobInsights::className(), $fields, $params);
317 292
     }
@@ -322,8 +297,7 @@  discard block
 block discarded – undo
322 297
      * @return Cursor
323 298
      */
324 299
     public function getAgencies(
325
-        array $fields = array(), array $params = array())
326
-    {
300
+        array $fields = array(), array $params = array()) {
327 301
         return $this->getManyByConnection(
328 302
             Agency::className(), $fields, $params, 'agencies');
329 303
     }
@@ -332,8 +306,7 @@  discard block
 block discarded – undo
332 306
      * @param int $business_id
333 307
      * @param array $permitted_roles
334 308
      */
335
-    public function grantAgencyAcccess($business_id, $permitted_roles)
336
-    {
309
+    public function grantAgencyAcccess($business_id, $permitted_roles) {
337 310
         $params = array(
338 311
             'business' => $business_id,
339 312
             'permitted_roles' => $permitted_roles,
@@ -348,8 +321,7 @@  discard block
 block discarded – undo
348 321
     /**
349 322
      * @param int $business_id
350 323
      */
351
-    public function revokeAgencyAccess($business_id)
352
-    {
324
+    public function revokeAgencyAccess($business_id) {
353 325
         $params = array(
354 326
             'business' => $business_id,
355 327
         );
@@ -366,8 +338,7 @@  discard block
 block discarded – undo
366 338
      * @return Cursor
367 339
      */
368 340
     public function getMinimumBudgets(
369
-        array $fields = array(), array $params = array())
370
-    {
341
+        array $fields = array(), array $params = array()) {
371 342
         return $this->getManyByConnection(
372 343
             MinimumBudget::className(), $fields, $params, 'minimum_budgets');
373 344
     }
@@ -378,8 +349,7 @@  discard block
 block discarded – undo
378 349
      * @return Cursor
379 350
      */
380 351
     public function getAdPlacePageSets(
381
-        array $fields = array(), array $params = array())
382
-    {
352
+        array $fields = array(), array $params = array()) {
383 353
         return $this->getManyByConnection(
384 354
             AdPlacePageSet::className(), $fields, $params);
385 355
     }
@@ -390,8 +360,7 @@  discard block
 block discarded – undo
390 360
      * @return Cursor
391 361
      */
392 362
     public function getAdLabels(
393
-        array $fields = array(), array $params = array())
394
-    {
363
+        array $fields = array(), array $params = array()) {
395 364
         return $this->getManyByConnection(
396 365
             AdLabel::className(), $fields, $params);
397 366
     }
@@ -402,8 +371,7 @@  discard block
 block discarded – undo
402 371
      * @return Cursor
403 372
      */
404 373
     public function getCampaignsByLabel(
405
-        array $fields = array(), array $params = array())
406
-    {
374
+        array $fields = array(), array $params = array()) {
407 375
         return $this->getManyByConnection(
408 376
             Campaign::classname(), $fields, $params, 'campaignsbylabels');
409 377
     }
@@ -414,8 +382,7 @@  discard block
 block discarded – undo
414 382
      * @return Cursor
415 383
      */
416 384
     public function getAdSetsByLabel(
417
-        array $fields = array(), array $params = array())
418
-    {
385
+        array $fields = array(), array $params = array()) {
419 386
         return $this->getManyByConnection(
420 387
             AdSet::classname(), $fields, $params, 'adsetsbylabels');
421 388
     }
@@ -426,8 +393,7 @@  discard block
 block discarded – undo
426 393
      * @return Cursor
427 394
      */
428 395
     public function getAdsByLabel(
429
-        array $fields = array(), array $params = array())
430
-    {
396
+        array $fields = array(), array $params = array()) {
431 397
         return $this->getManyByConnection(
432 398
             Ad::classname(), $fields, $params, 'adsbylabels');
433 399
     }
@@ -438,8 +404,7 @@  discard block
 block discarded – undo
438 404
      * @return Cursor
439 405
      */
440 406
     public function getAdCreativesByLabel(
441
-        array $fields = array(), array $params = array())
442
-    {
407
+        array $fields = array(), array $params = array()) {
443 408
         return $this->getManyByConnection(
444 409
             AdCreative::classname(), $fields, $params, 'adcreativesbylabels');
445 410
     }
@@ -450,8 +415,7 @@  discard block
 block discarded – undo
450 415
      * @return Cursor
451 416
      */
452 417
     public function getCustomConversions(
453
-        array $fields = array(), array $params = array())
454
-    {
418
+        array $fields = array(), array $params = array()) {
455 419
         return $this->getManyByConnection(
456 420
             CustomConversion::className(), $fields, $params);
457 421
     }
Please login to merge, or discard this patch.
src/FacebookAds/Object/MinimumBudget.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,13 +26,11 @@
 block discarded – undo
26 26
 
27 27
 use FacebookAds\Object\Fields\MinimumBudgetFields;
28 28
 
29
-class MinimumBudget extends AbstractObject
30
-{
29
+class MinimumBudget extends AbstractObject {
31 30
     /**
32 31
      * @return MinimumBudgetFields
33 32
      */
34
-    public static function getFieldsEnum()
35
-    {
33
+    public static function getFieldsEnum() {
36 34
         return MinimumBudgetFields::getInstance();
37 35
     }
38 36
 }
Please login to merge, or discard this patch.
src/FacebookAds/Object/ProductFeedUploadErrorSample.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@  discard block
 block discarded – undo
29 29
 use FacebookAds\Object\Traits\CannotDelete;
30 30
 use FacebookAds\Object\Traits\CannotUpdate;
31 31
 
32
-class ProductFeedUploadErrorSample extends AbstractObject
33
-{
32
+class ProductFeedUploadErrorSample extends AbstractObject {
34 33
     use CannotDelete;
35 34
     use CannotCreate;
36 35
     use CannotUpdate;
@@ -38,16 +37,14 @@  discard block
 block discarded – undo
38 37
     /**
39 38
      * @return string
40 39
      */
41
-    protected function getEndpoint()
42
-    {
40
+    protected function getEndpoint() {
43 41
         return 'samples';
44 42
     }
45 43
 
46 44
     /**
47 45
      * @return ProductFeedUploadErrorSampleFields
48 46
      */
49
-    public static function getFieldsEnum()
50
-    {
47
+    public static function getFieldsEnum() {
51 48
         return ProductFeedUploadErrorSampleFields::getInstance();
52 49
     }
53 50
 }
Please login to merge, or discard this patch.
src/FacebookAds/Object/AdPreview.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,13 +26,11 @@
 block discarded – undo
26 26
 
27 27
 use FacebookAds\Object\Fields\AdPreviewFields;
28 28
 
29
-class AdPreview extends AbstractObject
30
-{
29
+class AdPreview extends AbstractObject {
31 30
     /**
32 31
      * @return AdPreviewFields
33 32
      */
34
-    public static function getFieldsEnum()
35
-    {
33
+    public static function getFieldsEnum() {
36 34
         return AdPreviewFields::getInstance();
37 35
     }
38 36
 }
Please login to merge, or discard this patch.
src/FacebookAds/Object/AsyncJobInsights.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -27,29 +27,25 @@
 block discarded – undo
27 27
 use FacebookAds\Cursor;
28 28
 use FacebookAds\Object\Fields\AsyncJobFields;
29 29
 
30
-class AsyncJobInsights extends AbstractAsyncJobObject
31
-{
30
+class AsyncJobInsights extends AbstractAsyncJobObject {
32 31
     /**
33 32
      * @return AsyncJobFields
34 33
      */
35
-    public static function getFieldsEnum()
36
-    {
34
+    public static function getFieldsEnum() {
37 35
         return AsyncJobFields::getInstance();
38 36
     }
39 37
 
40 38
     /**
41 39
      * @return string
42 40
      */
43
-    protected function getCreateIdFieldName()
44
-    {
41
+    protected function getCreateIdFieldName() {
45 42
         return 'report_run_id';
46 43
     }
47 44
 
48 45
     /**
49 46
      * @return string
50 47
      */
51
-    public function getEndpoint()
52
-    {
48
+    public function getEndpoint() {
53 49
         return 'insights';
54 50
     }
55 51
 
Please login to merge, or discard this patch.
src/FacebookAds/Object/AdPlacePageSet.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -28,24 +28,21 @@
 block discarded – undo
28 28
 use FacebookAds\Object\Traits\CannotDelete;
29 29
 use FacebookAds\Object\Traits\FieldValidation;
30 30
 
31
-class AdPlacePageSet extends AbstractCrudObject
32
-{
31
+class AdPlacePageSet extends AbstractCrudObject {
33 32
     use FieldValidation;
34 33
     use CannotDelete;
35 34
 
36 35
     /**
37 36
      * @return string
38 37
      */
39
-    protected function getEndpoint()
40
-    {
38
+    protected function getEndpoint() {
41 39
         return 'ad_place_page_sets';
42 40
     }
43 41
 
44 42
     /**
45 43
      * @return AdPlacePageSetFields
46 44
      */
47
-    public static function getFieldsEnum()
48
-    {
45
+    public static function getFieldsEnum() {
49 46
         return AdPlacePageSetFields::getInstance();
50 47
     }
51 48
 }
Please login to merge, or discard this patch.
src/FacebookAds/Object/Product.php 1 patch
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -31,24 +31,21 @@  discard block
 block discarded – undo
31 31
 use FacebookAds\Object\Traits\CannotCreate;
32 32
 use FacebookAds\Object\Traits\FieldValidation;
33 33
 
34
-class Product extends AbstractCrudObject
35
-{
34
+class Product extends AbstractCrudObject {
36 35
     use CannotCreate;
37 36
     use FieldValidation;
38 37
 
39 38
     /**
40 39
      * @return string
41 40
      */
42
-    protected function getEndpoint()
43
-    {
41
+    protected function getEndpoint() {
44 42
         return 'products';
45 43
     }
46 44
 
47 45
     /**
48 46
      * @return ProductFields
49 47
      */
50
-    public static function getFieldsEnum()
51
-    {
48
+    public static function getFieldsEnum() {
52 49
         return ProductFields::getInstance();
53 50
     }
54 51
 
@@ -63,8 +60,7 @@  discard block
 block discarded – undo
63 60
         $retailer_id,
64 61
         $catalog_id,
65 62
         array $fields = array(),
66
-        array $params = array())
67
-    {
63
+        array $params = array()) {
68 64
         $response = Api::instance()->call(
69 65
             self::buildCatalogUrlForRetailerId($retailer_id, $catalog_id),
70 66
             RequestInterface::METHOD_GET,
@@ -83,8 +79,7 @@  discard block
 block discarded – undo
83 79
      * @return bool
84 80
      */
85 81
     public static function updateProductInCatalogByRetailerId(
86
-        $retailer_id, $catalog_id, array $data = array(), array $params = array())
87
-    {
82
+        $retailer_id, $catalog_id, array $data = array(), array $params = array()) {
88 83
         $product = new static();
89 84
         $product->setDataWithoutValidation($data);
90 85
 
@@ -101,8 +96,7 @@  discard block
 block discarded – undo
101 96
      * @return Cursor
102 97
      */
103 98
     public function getProductSets(
104
-        array $fields = array(), array $params = array())
105
-    {
99
+        array $fields = array(), array $params = array()) {
106 100
         return $this->getManyByConnection(
107 101
             ProductSet::className(), $fields, $params, 'product_sets');
108 102
     }
@@ -113,8 +107,7 @@  discard block
 block discarded – undo
113 107
      * @return string
114 108
      */
115 109
     public static function buildCatalogUrlForRetailerId(
116
-        $retailer_id, $catalog_id)
117
-    {
110
+        $retailer_id, $catalog_id) {
118 111
         return '/catalog:'.$catalog_id.':'.Api::base64UrlEncode($retailer_id);
119 112
     }
120 113
 }
Please login to merge, or discard this patch.