@@ -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 | ); |
@@ -31,7 +31,7 @@ |
||
31 | 31 | */ |
32 | 32 | class AdAccountRoles extends AbstractEnum |
33 | 33 | { |
34 | - const ADMIN = 'ADMIN'; |
|
34 | + const ADMIN = 'ADMIN'; |
|
35 | 35 | const GENERAL_USER = 'GENERAL_USER'; |
36 | 36 | const REPORTS_ONLY = 'REPORTS_ONLY'; |
37 | 37 | } |
@@ -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'; |
@@ -29,8 +29,7 @@ |
||
29 | 29 | /** |
30 | 30 | * @method static CallToActionTypes getInstance() |
31 | 31 | */ |
32 | -class CallToActionTypes extends AbstractEnum |
|
33 | -{ |
|
32 | +class CallToActionTypes extends AbstractEnum { |
|
34 | 33 | const BOOK_TRAVEL = 'BOOK_TRAVEL'; |
35 | 34 | const BUY_NOW = 'BUY_NOW'; |
36 | 35 | const CALL_NOW = 'CALL_NOW'; |
@@ -38,5 +38,5 @@ |
||
38 | 38 | const MOBILE_INTERSTITIAL = 'MOBILE_INTERSTITIAL'; |
39 | 39 | const MOBILE_FEED_BASIC = 'MOBILE_FEED_BASIC'; |
40 | 40 | const MOBILE_NATIVE = 'MOBILE_NATIVE'; |
41 | - const INSTAGRAM_STANDARD= 'INSTAGRAM_STANDARD'; |
|
41 | + const INSTAGRAM_STANDARD = 'INSTAGRAM_STANDARD'; |
|
42 | 42 | } |
@@ -29,8 +29,7 @@ |
||
29 | 29 | /** |
30 | 30 | * @method static AdFormats getInstance() |
31 | 31 | */ |
32 | -class AdFormats extends AbstractEnum |
|
33 | -{ |
|
32 | +class AdFormats extends AbstractEnum { |
|
34 | 33 | const RIGHT_COLUMN_STANDARD = 'RIGHT_COLUMN_STANDARD'; |
35 | 34 | const DESKTOP_FEED_STANDARD = 'DESKTOP_FEED_STANDARD'; |
36 | 35 | const MOBILE_FEED_STANDARD = 'MOBILE_FEED_STANDARD'; |