Failed Conditions
Pull Request — master (#191)
by Emanuele
03:09
created
src/FacebookAds/Object/LookalikeAudience.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,21 +26,18 @@
 block discarded – undo
26 26
 
27 27
 use FacebookAds\Object\Fields\LookalikeAudienceFields;
28 28
 
29
-class LookalikeAudience extends AbstractCrudObject
30
-{
29
+class LookalikeAudience extends AbstractCrudObject {
31 30
     /**
32 31
      * @return string
33 32
      */
34
-    protected function getEndpoint()
35
-    {
33
+    protected function getEndpoint() {
36 34
         return 'customaudiences';
37 35
     }
38 36
 
39 37
     /**
40 38
      * @return LookalikeAudienceFields
41 39
      */
42
-    public static function getFieldsEnum()
43
-    {
40
+    public static function getFieldsEnum() {
44 41
         return LookalikeAudienceFields::getInstance();
45 42
     }
46 43
 }
Please login to merge, or discard this patch.
src/FacebookAds/Object/Insights.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\InsightsFields;
28 28
 
29
-class Insights extends AbstractObject
30
-{
29
+class Insights extends AbstractObject {
31 30
     /**
32 31
      * @return InsightsFields
33 32
      */
34
-    public static function getFieldsEnum()
35
-    {
33
+    public static function getFieldsEnum() {
36 34
         return InsightsFields::getInstance();
37 35
     }
38 36
 }
Please login to merge, or discard this patch.
src/FacebookAds/Object/AdAccountGroup.php 1 patch
Braces   +12 added lines, -24 removed lines patch added patch discarded remove patch
@@ -30,8 +30,7 @@  discard block
 block discarded – undo
30 30
 use FacebookAds\Object\Fields\AdAccountGroupFields;
31 31
 use FacebookAds\Object\Traits\FieldValidation;
32 32
 
33
-class AdAccountGroup extends AbstractCrudObject
34
-{
33
+class AdAccountGroup extends AbstractCrudObject {
35 34
     use FieldValidation;
36 35
 
37 36
     /**
@@ -39,24 +38,21 @@  discard block
 block discarded – undo
39 38
      * @param string $parent_id Parent ID for AdAccountGroup is always "me"
40 39
      * @param Api $api The Api instance this object should use to make calls
41 40
      */
42
-    public function __construct($id = null, $parent_id = null, Api $api = null)
43
-    {
41
+    public function __construct($id = null, $parent_id = null, Api $api = null) {
44 42
         parent::__construct($id, 'me', $api);
45 43
     }
46 44
 
47 45
     /**
48 46
      * @return string
49 47
      */
50
-    protected function getEndpoint()
51
-    {
48
+    protected function getEndpoint() {
52 49
         return 'adaccountgroups';
53 50
     }
54 51
 
55 52
     /**
56 53
      * @return AdAccountGroupFields
57 54
      */
58
-    public static function getFieldsEnum()
59
-    {
55
+    public static function getFieldsEnum() {
60 56
         return AdAccountGroupFields::getInstance();
61 57
     }
62 58
 
@@ -73,8 +69,7 @@  discard block
 block discarded – undo
73 69
         $prototype_class,
74 70
         array $fields = array(),
75 71
         array $params = array(),
76
-        $endpoint = null)
77
-    {
72
+        $endpoint = null) {
78 73
         $response = $this->fetchConnection(
79 74
             $fields, $params, $prototype_class, $endpoint);
80 75
 
@@ -97,8 +92,7 @@  discard block
 block discarded – undo
97 92
      * @param array $params
98 93
      * @return Cursor
99 94
      */
100
-    public function getUsers(array $fields = array(), array $params = array())
101
-    {
95
+    public function getUsers(array $fields = array(), array $params = array()) {
102 96
         return $this->getConnectedObjects(
103 97
             AdAccountGroupUser::className(), $fields, $params, 'users');
104 98
     }
@@ -109,8 +103,7 @@  discard block
 block discarded – undo
109 103
      * @return Cursor
110 104
      */
111 105
     public function getAdAccounts(
112
-        array $fields = array(), array $params = array())
113
-    {
106
+        array $fields = array(), array $params = array()) {
114 107
         return $this->getConnectedObjects(
115 108
             AdAccountGroupAccount::className(), $fields, $params, 'adaccounts');
116 109
     }
@@ -121,8 +114,7 @@  discard block
 block discarded – undo
121 114
      * @param array $roles list of user's roles indexed by user id
122 115
      * @return bool
123 116
      */
124
-    public function addUsers(array $roles)
125
-    {
117
+    public function addUsers(array $roles) {
126 118
         $params = array();
127 119
         foreach ($roles as $uid => $role) {
128 120
             $params[] = array(
@@ -143,8 +135,7 @@  discard block
 block discarded – undo
143 135
      * @param array $roles list of user's roles indexed by user id
144 136
      * @return bool
145 137
      */
146
-    public function updateUsers(array $roles)
147
-    {
138
+    public function updateUsers(array $roles) {
148 139
         $params = array();
149 140
         foreach ($roles as $uid => $role) {
150 141
             $params[] = array(
@@ -165,8 +156,7 @@  discard block
 block discarded – undo
165 156
      * @param $user_id
166 157
      * @return bool
167 158
      */
168
-    public function removeUser($user_id)
169
-    {
159
+    public function removeUser($user_id) {
170 160
         return $this->getApi()->call(
171 161
             '/'.$this->assureId().'/users/'.$user_id,
172 162
             RequestInterface::METHOD_DELETE)->getContent();
@@ -178,8 +168,7 @@  discard block
 block discarded – undo
178 168
      * @param array $account_ids list of ad account ids to be added
179 169
      * @return bool
180 170
      */
181
-    public function addAdAccounts(array $account_ids)
182
-    {
171
+    public function addAdAccounts(array $account_ids) {
183 172
         return $this->getApi()->call(
184 173
             '/'.$this->assureId().'/adaccounts',
185 174
             RequestInterface::METHOD_POST,
@@ -192,8 +181,7 @@  discard block
 block discarded – undo
192 181
      * @param $account_id
193 182
      * @return bool
194 183
      */
195
-    public function removeAdAccount($account_id)
196
-    {
184
+    public function removeAdAccount($account_id) {
197 185
         return $this->getApi()->call(
198 186
             '/'.$this->assureId().'/adaccounts/'.$account_id,
199 187
             RequestInterface::METHOD_DELETE)->getContent();
Please login to merge, or discard this patch.
src/FacebookAds/Object/AdSet.php 1 patch
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -31,8 +31,7 @@  discard block
 block discarded – undo
31 31
 use FacebookAds\Object\Traits\ObjectValidation;
32 32
 
33 33
 class AdSet extends AbstractArchivableCrudObject
34
-    implements CanRedownloadInterface
35
-{
34
+    implements CanRedownloadInterface {
36 35
     use FieldValidation;
37 36
     use ObjectValidation;
38 37
     use AdLabelAwareCrudObjectTrait;
@@ -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 'adsets';
46 44
     }
47 45
 
48 46
     /**
49 47
      * @return AdSetFields
50 48
      */
51
-    public static function getFieldsEnum()
52
-    {
49
+    public static function getFieldsEnum() {
53 50
         return AdSetFields::getInstance();
54 51
     }
55 52
 
@@ -59,8 +56,7 @@  discard block
 block discarded – undo
59 56
      * @return Cursor
60 57
      */
61 58
     public function getAds(
62
-        array $fields = array(), array $params = array())
63
-    {
59
+        array $fields = array(), array $params = array()) {
64 60
         return $this->getManyByConnection(Ad::className(), $fields, $params);
65 61
     }
66 62
 
@@ -70,8 +66,7 @@  discard block
 block discarded – undo
70 66
      * @return Cursor
71 67
      */
72 68
     public function getAdCreatives(
73
-        array $fields = array(), array $params = array())
74
-    {
69
+        array $fields = array(), array $params = array()) {
75 70
         return $this->getManyByConnection(
76 71
             AdCreative::className(), $fields, $params);
77 72
     }
@@ -82,8 +77,7 @@  discard block
 block discarded – undo
82 77
      * @return Cursor
83 78
      */
84 79
     public function getInsights(
85
-        array $fields = array(), array $params = array())
86
-    {
80
+        array $fields = array(), array $params = array()) {
87 81
         return $this->getManyByConnection(
88 82
             Insights::classname(), $fields, $params, 'insights');
89 83
     }
@@ -94,8 +88,7 @@  discard block
 block discarded – undo
94 88
      * @return AsyncJobInsights
95 89
      */
96 90
     public function getInsightsAsync(
97
-        array $fields = array(), array $params = array())
98
-    {
91
+        array $fields = array(), array $params = array()) {
99 92
         return $this->createAsyncJob(
100 93
             AsyncJobInsights::className(), $fields, $params);
101 94
     }
Please login to merge, or discard this patch.
src/FacebookAds/Object/ConnectionObject.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,15 +27,13 @@
 block discarded – undo
27 27
 use FacebookAds\Object\Fields\ConnectionObjectFields;
28 28
 use FacebookAds\Object\Traits\FieldValidation;
29 29
 
30
-class ConnectionObject extends AbstractObject
31
-{
30
+class ConnectionObject extends AbstractObject {
32 31
     use FieldValidation;
33 32
 
34 33
     /**
35 34
      * @return ConnectionObjectFields
36 35
      */
37
-    public static function getFieldsEnum()
38
-    {
36
+    public static function getFieldsEnum() {
39 37
         return ConnectionObjectFields::getInstance();
40 38
     }
41 39
 }
Please login to merge, or discard this patch.
src/FacebookAds/Object/TargetingSearch.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,8 @@
 block discarded – undo
41 41
      */
42 42
     public static function search(
43 43
         $type,
44
-        $class=null,
45
-        $query=null,
44
+        $class = null,
45
+        $query = null,
46 46
         array $params = array(),
47 47
         Api $api = null
48 48
     ) {
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,7 @@
 block discarded – undo
28 28
 use FacebookAds\Cursor;
29 29
 use FacebookAds\Http\RequestInterface;
30 30
 
31
-class TargetingSearch extends AbstractObject
32
-{
31
+class TargetingSearch extends AbstractObject {
33 32
     /**
34 33
      * @param string $query
35 34
      * @param string $type
Please login to merge, or discard this patch.
src/FacebookAds/Object/ProductAudience.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,21 +26,18 @@
 block discarded – undo
26 26
 
27 27
 use FacebookAds\Object\Fields\ProductAudienceFields;
28 28
 
29
-class ProductAudience extends AbstractCrudObject
30
-{
29
+class ProductAudience extends AbstractCrudObject {
31 30
     /**
32 31
      * @return string
33 32
      */
34
-    protected function getEndpoint()
35
-    {
33
+    protected function getEndpoint() {
36 34
         return 'product_audiences';
37 35
     }
38 36
 
39 37
     /**
40 38
      * @return ProductAudienceFields
41 39
      */
42
-    public static function getFieldsEnum()
43
-    {
40
+    public static function getFieldsEnum() {
44 41
         return ProductAudienceFields::getInstance();
45 42
     }
46 43
 }
Please login to merge, or discard this patch.
src/FacebookAds/Object/ExtendedCredit.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 ExtendedCredit extends AbstractObject
28
-{
27
+class ExtendedCredit extends AbstractObject {
29 28
 }
Please login to merge, or discard this patch.
src/FacebookAds/Object/VideoThumbnail.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\VideoThumbnailFields;
28 28
 
29
-class VideoThumbnail extends AbstractObject
30
-{
29
+class VideoThumbnail extends AbstractObject {
31 30
     /**
32 31
      * @return VideoThumbnailFields
33 32
      */
34
-    public static function getFieldsEnum()
35
-    {
33
+    public static function getFieldsEnum() {
36 34
         return VideoThumbnailFields::getInstance();
37 35
     }
38 36
 }
Please login to merge, or discard this patch.