Failed Conditions
Pull Request — master (#191)
by Emanuele
03:09
created
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/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.
src/FacebookAds/Object/AdsPixel.php 1 patch
Braces   +10 added lines, -20 removed lines patch added patch discarded remove patch
@@ -30,24 +30,21 @@  discard block
 block discarded – undo
30 30
 use FacebookAds\Object\Traits\CannotDelete;
31 31
 use FacebookAds\Object\Traits\FieldValidation;
32 32
 
33
-class AdsPixel extends AbstractCrudObject
34
-{
33
+class AdsPixel extends AbstractCrudObject {
35 34
     use CannotDelete;
36 35
     use FieldValidation;
37 36
 
38 37
     /**
39 38
      * @return AdsPixelsFields
40 39
      */
41
-    public static function getFieldsEnum()
42
-    {
40
+    public static function getFieldsEnum() {
43 41
         return AdsPixelsFields::getInstance();
44 42
     }
45 43
 
46 44
     /**
47 45
      * @return string
48 46
      */
49
-    protected function getEndpoint()
50
-    {
47
+    protected function getEndpoint() {
51 48
         return 'adspixels';
52 49
     }
53 50
 
@@ -55,8 +52,7 @@  discard block
 block discarded – undo
55 52
      * @param int $business_id
56 53
      * @param string $account_id
57 54
      */
58
-    public function sharePixelWithAdAccount($business_id, $account_id)
59
-    {
55
+    public function sharePixelWithAdAccount($business_id, $account_id) {
60 56
         $this->getApi()->call(
61 57
             '/'.$this->assureId().'/shared_accounts',
62 58
             RequestInterface::METHOD_POST,
@@ -70,8 +66,7 @@  discard block
 block discarded – undo
70 66
      * @param $business_id
71 67
      * @param $account_id
72 68
      */
73
-    public function unsharePixelWithAdAccount($business_id, $account_id)
74
-    {
69
+    public function unsharePixelWithAdAccount($business_id, $account_id) {
75 70
         $this->getApi()->call(
76 71
             '/'.$this->assureId().'/shared_accounts',
77 72
             RequestInterface::METHOD_DELETE,
@@ -85,8 +80,7 @@  discard block
 block discarded – undo
85 80
      * @param int $business_id
86 81
      * @param int $agency_id
87 82
      */
88
-    public function sharePixelWithAgency($business_id, $agency_id)
89
-    {
83
+    public function sharePixelWithAgency($business_id, $agency_id) {
90 84
         $this->getApi()->call(
91 85
             '/'.$this->assureId().'/shared_agencies',
92 86
             RequestInterface::METHOD_POST,
@@ -100,8 +94,7 @@  discard block
 block discarded – undo
100 94
      * @param int $business_id
101 95
      * @param int $agency_id
102 96
      */
103
-    public function unsharePixelWithAgency($business_id, $agency_id)
104
-    {
97
+    public function unsharePixelWithAgency($business_id, $agency_id) {
105 98
         $this->getApi()->call(
106 99
             '/'.$this->assureId().'/shared_agencies',
107 100
             RequestInterface::METHOD_DELETE,
@@ -117,8 +110,7 @@  discard block
 block discarded – undo
117 110
      * @return Cursor
118 111
      */
119 112
     public function getAdAccounts(
120
-        array $fields = array(), array $params = array())
121
-    {
113
+        array $fields = array(), array $params = array()) {
122 114
         return $this->getManyByConnection(
123 115
             AdAccount::className(), $fields, $params, 'shared_accounts');
124 116
     }
@@ -129,8 +121,7 @@  discard block
 block discarded – undo
129 121
      * @return Cursor
130 122
      */
131 123
     public function getAgencies(
132
-        array $fields = array(), array $params = array())
133
-    {
124
+        array $fields = array(), array $params = array()) {
134 125
         return $this->getManyByConnection(
135 126
             Business::className(), $fields, $params, 'shared_agencies');
136 127
     }
@@ -141,8 +132,7 @@  discard block
 block discarded – undo
141 132
      * @return Cursor
142 133
      */
143 134
     public function getStats(
144
-        array $fields = array(), array $params = array())
145
-    {
135
+        array $fields = array(), array $params = array()) {
146 136
         return $this->getManyByConnection(
147 137
             AdsPixelStat::className(), $fields, $params, 'stats');
148 138
     }
Please login to merge, or discard this patch.
src/FacebookAds/Object/ReachFrequencyPrediction.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@  discard block
 block discarded – undo
29 29
 use FacebookAds\Object\Traits\FieldValidation;
30 30
 use FacebookAds\Object\Values\ReachFrequencyPredictionActions;
31 31
 
32
-class ReachFrequencyPrediction extends AbstractCrudObject
33
-{
32
+class ReachFrequencyPrediction extends AbstractCrudObject {
34 33
     use FieldValidation;
35 34
 
36 35
     /**
@@ -46,16 +45,14 @@  discard block
 block discarded – undo
46 45
     /**
47 46
      * @return string
48 47
      */
49
-    protected function getEndpoint()
50
-    {
48
+    protected function getEndpoint() {
51 49
         return 'reachfrequencypredictions';
52 50
     }
53 51
 
54 52
     /**
55 53
      * @return ReachFrequencyPredictionFields
56 54
      */
57
-    public static function getFieldsEnum()
58
-    {
55
+    public static function getFieldsEnum() {
59 56
         return ReachFrequencyPredictionFields::getInstance();
60 57
     }
61 58
 
@@ -70,8 +67,7 @@  discard block
 block discarded – undo
70 67
         $preciction_to_release = null,
71 68
         $reach = null,
72 69
         $budget = null,
73
-        $impression = null)
74
-    {
70
+        $impression = null) {
75 71
         $params = array_filter(array(
76 72
             ReachFrequencyPredictionFields::PREDICTION_ID => $this->assureId(),
77 73
             ReachFrequencyPredictionFields::PREDICTION_ID_TO_RELEASE
@@ -94,8 +90,7 @@  discard block
 block discarded – undo
94 90
     /**
95 91
      * @return ReachFrequencyPrediction
96 92
      */
97
-    public function cancel()
98
-    {
93
+    public function cancel() {
99 94
         $params = array(
100 95
             ReachFrequencyPredictionFields::PREDICTION_ID => $this->assureId(),
101 96
             ReachFrequencyPredictionFields::ACTION
Please login to merge, or discard this patch.