Completed
Pull Request — master (#191)
by Emanuele
03:10
created
src/FacebookAds/Object/Page.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -27,13 +27,11 @@  discard block
 block discarded – undo
27 27
 use FacebookAds\Cursor;
28 28
 use FacebookAds\Http\RequestInterface;
29 29
 
30
-class Page extends AbstractCrudObject
31
-{
30
+class Page extends AbstractCrudObject {
32 31
     /**
33 32
      * @return string
34 33
      */
35
-    public function getEndpoint()
36
-    {
34
+    public function getEndpoint() {
37 35
         return 'pages';
38 36
     }
39 37
 
@@ -66,8 +64,7 @@  discard block
 block discarded – undo
66 64
      * @param int $user_id
67 65
      * @param string $role
68 66
      */
69
-    public function addUser($business_id, $user_id, $role)
70
-    {
67
+    public function addUser($business_id, $user_id, $role) {
71 68
         $params = array(
72 69
             'business_id' => $business_id,
73 70
             'user_id' => $user_id,
@@ -85,8 +82,7 @@  discard block
 block discarded – undo
85 82
      * @param int $business_id
86 83
      * @param int $user_id
87 84
      */
88
-    public function deleteUser($business_id, $user_id)
89
-    {
85
+    public function deleteUser($business_id, $user_id) {
90 86
         $params = array(
91 87
             'business_id' => $business_id,
92 88
             'user_id' => $user_id,
@@ -103,8 +99,7 @@  discard block
 block discarded – undo
103 99
      * @param int $business_id
104 100
      * @param array $roles
105 101
      */
106
-    public function grantBusinessAccess($business_id, $roles)
107
-    {
102
+    public function grantBusinessAccess($business_id, $roles) {
108 103
         $params = array(
109 104
             'business' => $business_id,
110 105
             'permitted_roles' => $roles,
@@ -120,8 +115,7 @@  discard block
 block discarded – undo
120 115
     /**
121 116
      * @param int $business_id
122 117
      */
123
-    public function revokeBusinessAccess($business_id)
124
-    {
118
+    public function revokeBusinessAccess($business_id) {
125 119
         $params = array(
126 120
             'business' => $business_id,
127 121
         );
Please login to merge, or discard this patch.
src/FacebookAds/Object/AdsPixelStat.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\AdsPixelStatFields;
28 28
 
29
-class AdsPixelStat extends AbstractObject
30
-{
29
+class AdsPixelStat extends AbstractObject {
31 30
     /**
32 31
      * @return AdsPixelStatFields
33 32
      */
34
-    public static function getFieldsEnum()
35
-    {
33
+    public static function getFieldsEnum() {
36 34
         return AdsPixelStatFields::getInstance();
37 35
     }
38 36
 }
Please login to merge, or discard this patch.
src/FacebookAds/Object/Agency.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 Agency extends AbstractObject
28
-{
27
+class Agency extends AbstractObject {
29 28
 }
Please login to merge, or discard this patch.
src/FacebookAds/Object/Transaction.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 Transaction extends AbstractObject
28
-{
27
+class Transaction extends AbstractObject {
29 28
 }
Please login to merge, or discard this patch.
src/FacebookAds/Object/CustomAudienceNormalizers/FirstNameNormalizer.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -28,15 +28,13 @@  discard block
 block discarded – undo
28 28
 use FacebookAds\Object\CustomAudienceNormalizers\ValueNormalizerInterface;
29 29
 use FacebookAds\Object\Fields\CustomAudienceMultikeySchemaFields;
30 30
 
31
-class FirstNameNormalizer implements ValueNormalizerInterface
32
-{
31
+class FirstNameNormalizer implements ValueNormalizerInterface {
33 32
     /**
34 33
      * @param string $key
35 34
      * @param string $key_value
36 35
      * @return boolean
37 36
      */
38
-    public function shouldNormalize($key, $key_value)
39
-    {
37
+    public function shouldNormalize($key, $key_value) {
40 38
         return $key === CustomAudienceMultikeySchemaFields::FIRST_NAME;
41 39
     }
42 40
 
@@ -45,8 +43,7 @@  discard block
 block discarded – undo
45 43
      * @param string $key_value
46 44
      * @return string
47 45
      */
48
-    public function normalize($key, $key_value)
49
-    {
46
+    public function normalize($key, $key_value) {
50 47
         return preg_replace('/[^a-zA-Z]/', '', strtolower(trim($key_value)));
51 48
     }
52 49
 }
Please login to merge, or discard this patch.
src/FacebookAds/Object/CustomAudienceNormalizers/BirthYearNormalizer.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -28,15 +28,13 @@  discard block
 block discarded – undo
28 28
 use FacebookAds\Object\CustomAudienceNormalizers\ValueNormalizerInterface;
29 29
 use FacebookAds\Object\Fields\CustomAudienceMultikeySchemaFields;
30 30
 
31
-class BirthYearNormalizer implements ValueNormalizerInterface
32
-{
31
+class BirthYearNormalizer implements ValueNormalizerInterface {
33 32
     /**
34 33
      * @param string $key
35 34
      * @param string $key_value
36 35
      * @return boolean
37 36
      */
38
-    public function shouldNormalize($key, $key_value)
39
-    {
37
+    public function shouldNormalize($key, $key_value) {
40 38
         return $key === CustomAudienceMultikeySchemaFields::BIRTH_YEAR;
41 39
     }
42 40
 
@@ -45,8 +43,7 @@  discard block
 block discarded – undo
45 43
      * @param string $key_value
46 44
      * @return string
47 45
      */
48
-    public function normalize($key, $key_value)
49
-    {
46
+    public function normalize($key, $key_value) {
50 47
         return preg_replace('/[^0-9]/', '', $key_value);
51 48
     }
52 49
 }
Please login to merge, or discard this patch.
src/FacebookAds/Object/CustomAudienceNormalizers/PhoneNormalizer.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -28,15 +28,13 @@  discard block
 block discarded – undo
28 28
 use FacebookAds\Object\CustomAudienceNormalizers\ValueNormalizerInterface;
29 29
 use FacebookAds\Object\Fields\CustomAudienceMultikeySchemaFields;
30 30
 
31
-class PhoneNormalizer implements ValueNormalizerInterface
32
-{
31
+class PhoneNormalizer implements ValueNormalizerInterface {
33 32
     /**
34 33
      * @param string $key
35 34
      * @param string $key_value
36 35
      * @return boolean
37 36
      */
38
-    public function shouldNormalize($key, $key_value)
39
-    {
37
+    public function shouldNormalize($key, $key_value) {
40 38
         return $key === CustomAudienceMultikeySchemaFields::PHONE;
41 39
     }
42 40
 
@@ -45,8 +43,7 @@  discard block
 block discarded – undo
45 43
      * @param string $key_value
46 44
      * @return string
47 45
      */
48
-    public function normalize($key, $key_value)
49
-    {
46
+    public function normalize($key, $key_value) {
50 47
         return preg_replace('/[^0-9]/', '', trim($key_value));
51 48
     }
52 49
 }
Please login to merge, or discard this patch.
src/FacebookAds/Object/CustomAudienceNormalizers/ZipNormalizer.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -28,15 +28,13 @@  discard block
 block discarded – undo
28 28
 use FacebookAds\Object\CustomAudienceNormalizers\ValueNormalizerInterface;
29 29
 use FacebookAds\Object\Fields\CustomAudienceMultikeySchemaFields;
30 30
 
31
-class ZipNormalizer implements ValueNormalizerInterface
32
-{
31
+class ZipNormalizer implements ValueNormalizerInterface {
33 32
     /**
34 33
      * @param string $key
35 34
      * @param string $key_value
36 35
      * @return boolean
37 36
      */
38
-    public function shouldNormalize($key, $key_value)
39
-    {
37
+    public function shouldNormalize($key, $key_value) {
40 38
         return $key === CustomAudienceMultikeySchemaFields::ZIP;
41 39
     }
42 40
 
@@ -45,8 +43,7 @@  discard block
 block discarded – undo
45 43
      * @param string $key_value
46 44
      * @return string
47 45
      */
48
-    public function normalize($key, $key_value)
49
-    {
46
+    public function normalize($key, $key_value) {
50 47
         return explode(
51 48
             '-',
52 49
             preg_replace('/[ ]/', '', strtolower(trim($key_value)))
Please login to merge, or discard this patch.
src/FacebookAds/Object/CustomAudienceNormalizers/HashNormalizer.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,8 +27,7 @@  discard block
 block discarded – undo
27 27
 use FacebookAds\Object\CustomAudienceMultiKey;
28 28
 use FacebookAds\Object\CustomAudienceNormalizers\ValueNormalizerInterface;
29 29
 
30
-class HashNormalizer implements ValueNormalizerInterface
31
-{
30
+class HashNormalizer implements ValueNormalizerInterface {
32 31
     /**
33 32
      *    @var string
34 33
      */
@@ -39,8 +38,7 @@  discard block
 block discarded – undo
39 38
      * @param string $key_value
40 39
      * @return boolean
41 40
      */
42
-    public function shouldNormalize($key, $key_value)
43
-    {
41
+    public function shouldNormalize($key, $key_value) {
44 42
         return true;
45 43
     }
46 44
 
@@ -49,8 +47,7 @@  discard block
 block discarded – undo
49 47
      * @param string $key_value
50 48
      * @return string
51 49
      */
52
-    public function normalize($key, $key_value)
53
-    {
50
+    public function normalize($key, $key_value) {
54 51
         return hash(self::HASH_TYPE_SHA256, $key_value);
55 52
     }
56 53
 }
Please login to merge, or discard this patch.