@@ -29,8 +29,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -28,23 +28,20 @@ discard block |
||
28 | 28 | use FacebookAds\Object\Fields\ProductFeedFields; |
29 | 29 | use FacebookAds\Object\Traits\FieldValidation; |
30 | 30 | |
31 | -class ProductFeed extends AbstractCrudObject |
|
32 | -{ |
|
31 | +class ProductFeed extends AbstractCrudObject { |
|
33 | 32 | use FieldValidation; |
34 | 33 | |
35 | 34 | /** |
36 | 35 | * @return string |
37 | 36 | */ |
38 | - protected function getEndpoint() |
|
39 | - { |
|
37 | + protected function getEndpoint() { |
|
40 | 38 | return 'product_feeds'; |
41 | 39 | } |
42 | 40 | |
43 | 41 | /** |
44 | 42 | * @return ProductFeedFields |
45 | 43 | */ |
46 | - public static function getFieldsEnum() |
|
47 | - { |
|
44 | + public static function getFieldsEnum() { |
|
48 | 45 | return ProductFeedFields::getInstance(); |
49 | 46 | } |
50 | 47 | |
@@ -53,8 +50,7 @@ discard block |
||
53 | 50 | * @param array $params |
54 | 51 | * @return Cursor |
55 | 52 | */ |
56 | - public function getUploads(array $fields = array(), array $params = array()) |
|
57 | - { |
|
53 | + public function getUploads(array $fields = array(), array $params = array()) { |
|
58 | 54 | return $this->getManyByConnection( |
59 | 55 | ProductFeedUpload::className(), $fields, $params); |
60 | 56 | } |
@@ -66,8 +62,7 @@ discard block |
||
66 | 62 | */ |
67 | 63 | public function getProducts( |
68 | 64 | array $fields = array(), |
69 | - array $params = array()) |
|
70 | - { |
|
65 | + array $params = array()) { |
|
71 | 66 | return $this->getManyByConnection( |
72 | 67 | Product::className(), $fields, $params); |
73 | 68 | } |
@@ -24,6 +24,5 @@ |
||
24 | 24 | |
25 | 25 | namespace FacebookAds\Object; |
26 | 26 | |
27 | -class Persona extends AbstractObject |
|
28 | -{ |
|
27 | +class Persona extends AbstractObject { |
|
29 | 28 | } |
@@ -24,6 +24,5 @@ |
||
24 | 24 | |
25 | 25 | namespace FacebookAds\Object; |
26 | 26 | |
27 | -class BusinessProductCatalog extends AbstractObject |
|
28 | -{ |
|
27 | +class BusinessProductCatalog extends AbstractObject { |
|
29 | 28 | } |
@@ -27,23 +27,20 @@ |
||
27 | 27 | use FacebookAds\Object\Fields\AdLabelFields; |
28 | 28 | use FacebookAds\Object\Traits\FieldValidation; |
29 | 29 | |
30 | -class AdLabel extends AbstractCrudObject |
|
31 | -{ |
|
30 | +class AdLabel extends AbstractCrudObject { |
|
32 | 31 | use FieldValidation; |
33 | 32 | |
34 | 33 | /** |
35 | 34 | * @return string |
36 | 35 | */ |
37 | - protected function getEndpoint() |
|
38 | - { |
|
36 | + protected function getEndpoint() { |
|
39 | 37 | return 'adlabels'; |
40 | 38 | } |
41 | 39 | |
42 | 40 | /** |
43 | 41 | * @return AdLabelFields |
44 | 42 | */ |
45 | - public static function getFieldsEnum() |
|
46 | - { |
|
43 | + public static function getFieldsEnum() { |
|
47 | 44 | return AdLabelFields::getInstance(); |
48 | 45 | } |
49 | 46 | } |
@@ -27,15 +27,13 @@ discard block |
||
27 | 27 | use FacebookAds\Object\Fields\ReachEstimateFields; |
28 | 28 | use FacebookAds\Object\Traits\FieldValidation; |
29 | 29 | |
30 | -class ReachEstimate extends AbstractObject |
|
31 | -{ |
|
30 | +class ReachEstimate extends AbstractObject { |
|
32 | 31 | use FieldValidation; |
33 | 32 | |
34 | 33 | /** |
35 | 34 | * @return ReachEstimateFields |
36 | 35 | */ |
37 | - public static function getFieldsEnum() |
|
38 | - { |
|
36 | + public static function getFieldsEnum() { |
|
39 | 37 | return ReachEstimateFields::getInstance(); |
40 | 38 | } |
41 | 39 | |
@@ -43,8 +41,7 @@ discard block |
||
43 | 41 | * @param array $data |
44 | 42 | * @return array |
45 | 43 | */ |
46 | - protected function normalizeData(array $data) |
|
47 | - { |
|
44 | + protected function normalizeData(array $data) { |
|
48 | 45 | return array_key_exists('data', $data) |
49 | 46 | ? $data['data'] |
50 | 47 | : $data; |
@@ -54,8 +51,7 @@ discard block |
||
54 | 51 | * @param array |
55 | 52 | * @return $this |
56 | 53 | */ |
57 | - public function setData(array $data) |
|
58 | - { |
|
54 | + public function setData(array $data) { |
|
59 | 55 | return parent::setData($this->normalizeData($data)); |
60 | 56 | } |
61 | 57 | |
@@ -63,8 +59,7 @@ discard block |
||
63 | 59 | * @param array |
64 | 60 | * @return $this |
65 | 61 | */ |
66 | - public function setDataWithoutValidation(array $data) |
|
67 | - { |
|
62 | + public function setDataWithoutValidation(array $data) { |
|
68 | 63 | return parent::setDataWithoutValidation($this->normalizeData($data)); |
69 | 64 | } |
70 | 65 | } |
@@ -26,13 +26,11 @@ |
||
26 | 26 | |
27 | 27 | use FacebookAds\Object\Fields\ActivityFields; |
28 | 28 | |
29 | -class Activity extends AbstractObject |
|
30 | -{ |
|
29 | +class Activity extends AbstractObject { |
|
31 | 30 | /** |
32 | 31 | * @return ActivityFields |
33 | 32 | */ |
34 | - public static function getFieldsEnum() |
|
35 | - { |
|
33 | + public static function getFieldsEnum() { |
|
36 | 34 | return ActivityFields::getInstance(); |
37 | 35 | } |
38 | 36 | } |
@@ -29,23 +29,20 @@ discard block |
||
29 | 29 | use FacebookAds\Object\Fields\ProjectFields; |
30 | 30 | use FacebookAds\Object\Traits\FieldValidation; |
31 | 31 | |
32 | -class Project extends AbstractCrudObject |
|
33 | -{ |
|
32 | +class Project extends AbstractCrudObject { |
|
34 | 33 | use FieldValidation; |
35 | 34 | |
36 | 35 | /** |
37 | 36 | * @return string |
38 | 37 | */ |
39 | - protected function getEndpoint() |
|
40 | - { |
|
38 | + protected function getEndpoint() { |
|
41 | 39 | return 'businessprojects'; |
42 | 40 | } |
43 | 41 | |
44 | 42 | /** |
45 | 43 | * @return ProjectFields |
46 | 44 | */ |
47 | - public static function getFieldsEnum() |
|
48 | - { |
|
45 | + public static function getFieldsEnum() { |
|
49 | 46 | return ProjectFields::getInstance(); |
50 | 47 | } |
51 | 48 | |
@@ -55,8 +52,7 @@ discard block |
||
55 | 52 | * @return Cursor |
56 | 53 | */ |
57 | 54 | public function getPages( |
58 | - array $fields = array(), array $params = array()) |
|
59 | - { |
|
55 | + array $fields = array(), array $params = array()) { |
|
60 | 56 | return $this->getManyByConnection( |
61 | 57 | Page::className(), $fields, $params); |
62 | 58 | } |
@@ -67,8 +63,7 @@ discard block |
||
67 | 63 | * @return Cursor |
68 | 64 | */ |
69 | 65 | public function getAdAccounts( |
70 | - array $fields = array(), array $params = array()) |
|
71 | - { |
|
66 | + array $fields = array(), array $params = array()) { |
|
72 | 67 | return $this->getManyByConnection( |
73 | 68 | AdAccount::className(), $fields, $params); |
74 | 69 | } |
@@ -79,8 +74,7 @@ discard block |
||
79 | 74 | * @return Cursor |
80 | 75 | */ |
81 | 76 | public function getApps( |
82 | - array $fields = array(), array $params = array()) |
|
83 | - { |
|
77 | + array $fields = array(), array $params = array()) { |
|
84 | 78 | return $this->getManyByConnection( |
85 | 79 | App::className(), $fields, $params, 'apps'); |
86 | 80 | } |
@@ -88,8 +82,7 @@ discard block |
||
88 | 82 | /** |
89 | 83 | * @param int $page_id |
90 | 84 | */ |
91 | - public function addPage($page_id) |
|
92 | - { |
|
85 | + public function addPage($page_id) { |
|
93 | 86 | $params = array( |
94 | 87 | 'page_id' => $page_id, |
95 | 88 | ); |
@@ -102,8 +95,7 @@ discard block |
||
102 | 95 | /** |
103 | 96 | * @param int $page_id |
104 | 97 | */ |
105 | - public function deletePage($page_id) |
|
106 | - { |
|
98 | + public function deletePage($page_id) { |
|
107 | 99 | $params = array( |
108 | 100 | 'page_id' => $page_id, |
109 | 101 | ); |
@@ -116,8 +108,7 @@ discard block |
||
116 | 108 | /** |
117 | 109 | * @param int $account_id |
118 | 110 | */ |
119 | - public function adAdAccount($account_id) |
|
120 | - { |
|
111 | + public function adAdAccount($account_id) { |
|
121 | 112 | $params = array( |
122 | 113 | 'adaccount_id' => $account_id, |
123 | 114 | ); |
@@ -130,8 +121,7 @@ discard block |
||
130 | 121 | /** |
131 | 122 | * @param int $account_id |
132 | 123 | */ |
133 | - public function deleteAdAccount($account_id) |
|
134 | - { |
|
124 | + public function deleteAdAccount($account_id) { |
|
135 | 125 | $params = array( |
136 | 126 | 'adaccount_id' => $account_id, |
137 | 127 | ); |
@@ -144,8 +134,7 @@ discard block |
||
144 | 134 | /** |
145 | 135 | * @param int $app_id |
146 | 136 | */ |
147 | - public function addApp($app_id) |
|
148 | - { |
|
137 | + public function addApp($app_id) { |
|
149 | 138 | $params = array( |
150 | 139 | 'app_id' => $app_id, |
151 | 140 | ); |
@@ -158,8 +147,7 @@ discard block |
||
158 | 147 | /** |
159 | 148 | * @param int $app_id |
160 | 149 | */ |
161 | - public function deleteApp($app_id) |
|
162 | - { |
|
150 | + public function deleteApp($app_id) { |
|
163 | 151 | $params = array( |
164 | 152 | 'app_id' => $app_id, |
165 | 153 | ); |
@@ -29,8 +29,7 @@ |
||
29 | 29 | /** |
30 | 30 | * @method static AdAccountRoles getInstance() |
31 | 31 | */ |
32 | -class AdAccountRoles extends AbstractEnum |
|
33 | -{ |
|
32 | +class AdAccountRoles extends AbstractEnum { |
|
34 | 33 | const ADMIN = 'ADMIN'; |
35 | 34 | const GENERAL_USER = 'GENERAL_USER'; |
36 | 35 | const REPORTS_ONLY = 'REPORTS_ONLY'; |