Test Failed
Push — master ( 0e2768...e624a7 )
by PHPLicengine
580:59 queued 579:06
created
lib/PHPLicengine/Cache/Cache.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
  
29 29
       private $config;
30 30
       
31
-      public function __construct (array $config)
31
+      public function __construct(array $config)
32 32
       {
33 33
              $this->config = $config;       
34 34
       }
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
       Whatever option you need to setup the cache type, must be passed as array to constructor.
39 39
       https://www.doctrine-project.org/projects/doctrine-cache/en/1.8/index.html
40 40
       */
41
-      public function getCache ()
41
+      public function getCache()
42 42
       {
43 43
              switch ($this->config['type']) {
44 44
                      case 'apc':
Please login to merge, or discard this patch.
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -26,21 +26,21 @@  discard block
 block discarded – undo
26 26
 
27 27
 class Cache {
28 28
  
29
-      private $config;
29
+       private $config;
30 30
       
31
-      public function __construct (array $config)
32
-      {
33
-             $this->config = $config;       
34
-      }
31
+       public function __construct (array $config)
32
+       {
33
+              $this->config = $config;       
34
+       }
35 35
 
36
-      /*
36
+       /*
37 37
       This class uses Doctrine Cache. You can look at its doc to add more cache type.
38 38
       Whatever option you need to setup the cache type, must be passed as array to constructor.
39 39
       https://www.doctrine-project.org/projects/doctrine-cache/en/1.8/index.html
40 40
       */
41
-      public function getCache ()
42
-      {
43
-             switch ($this->config['type']) {
41
+       public function getCache ()
42
+       {
43
+              switch ($this->config['type']) {
44 44
                      case 'apc':
45 45
                           $cache = new \Doctrine\Common\Cache\ApcuCache();
46 46
                      break;
@@ -49,12 +49,12 @@  discard block
 block discarded – undo
49 49
                      break;
50 50
                      case 'sqlite3':
51 51
                           $db = new \SQLite3($this->config['sqlite3_db']);
52
-                          $cache = new \Doctrine\Common\Cache\SQLite3Cache($db, $this->config['sqlite3_table']);
52
+                            $cache = new \Doctrine\Common\Cache\SQLite3Cache($db, $this->config['sqlite3_table']);
53 53
                      break;
54
-                      default:
54
+                            default:
55 55
                           throw new CacheException('Invalid cache system');
56
-                      break;
57
-             } 
58
-             return $cache;
59
-      }
56
+                            break;
57
+              } 
58
+              return $cache;
59
+       }
60 60
 }
Please login to merge, or discard this patch.
lib/PHPLicengine/Service/User.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
       private $url;
32 32
       private $api;      
33 33
       
34
-      public function __construct (ApiInterface $api)
34
+      public function __construct(ApiInterface $api)
35 35
       {
36 36
              $this->api = $api;
37 37
              $this->url = 'https://api-ssl.bitly.com/v4/user';       
Please login to merge, or discard this patch.
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -28,40 +28,40 @@
 block discarded – undo
28 28
 
29 29
 class User {
30 30
  
31
-      private $url;
32
-      private $api;      
31
+       private $url;
32
+       private $api;      
33 33
       
34
-      public function __construct (ApiInterface $api)
35
-      {
36
-             $this->api = $api;
37
-             $this->url = 'https://api-ssl.bitly.com/v4/user';       
38
-      }
34
+       public function __construct (ApiInterface $api)
35
+       {
36
+              $this->api = $api;
37
+              $this->url = 'https://api-ssl.bitly.com/v4/user';       
38
+       }
39 39
  
40
-      /*
40
+       /*
41 41
       Update a User
42 42
       https://dev.bitly.com/api-reference#updateUser
43 43
       */
44
-      public function updateUser(array $params) 
45
-      {
46
-             return $this->api->patch($this->url, $params);
47
-      }
44
+       public function updateUser(array $params) 
45
+       {
46
+              return $this->api->patch($this->url, $params);
47
+       }
48 48
       
49
-      /*
49
+       /*
50 50
       Retrieve a User
51 51
       https://dev.bitly.com/api-reference#getUser
52 52
       */
53
-      public function getUser() 
54
-      {
55
-             return $this->api->get($this->url);
56
-      }
53
+       public function getUser() 
54
+       {
55
+              return $this->api->get($this->url);
56
+       }
57 57
  
58
-      /*
58
+       /*
59 59
       Get Platform Limits
60 60
       https://dev.bitly.com/api-reference#getPlatformLimits
61 61
       */
62
-      public function getPlatformLimits(array $params = array()) 
63
-      {
64
-             return $this->api->get($this->url."/platform_limits", $params);
65
-      }
62
+       public function getPlatformLimits(array $params = array()) 
63
+       {
64
+              return $this->api->get($this->url."/platform_limits", $params);
65
+       }
66 66
       
67 67
 }
Please login to merge, or discard this patch.
lib/PHPLicengine/Service/Auth.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
       private $url;
32 32
       private $api;      
33 33
 
34
-      public function __construct (ApiInterface $api, array $config)
34
+      public function __construct(ApiInterface $api, array $config)
35 35
       {
36 36
              $this->api = $api;
37 37
              $this->url = 'https://api-ssl.bitly.com/oauth/access_token';    
Please login to merge, or discard this patch.
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -28,37 +28,37 @@
 block discarded – undo
28 28
 
29 29
 class Auth {
30 30
  
31
-      private $url;
32
-      private $api;      
31
+       private $url;
32
+       private $api;      
33 33
 
34
-      public function __construct (ApiInterface $api, array $config)
35
-      {
36
-             $this->api = $api;
37
-             $this->url = 'https://api-ssl.bitly.com/oauth/access_token';    
38
-             $key = base64_encode($config['clientid_username'].":".$config['clientsecret_password']);
39
-             $api->setApiKey($key);
40
-      }
34
+       public function __construct (ApiInterface $api, array $config)
35
+       {
36
+              $this->api = $api;
37
+              $this->url = 'https://api-ssl.bitly.com/oauth/access_token';    
38
+              $key = base64_encode($config['clientid_username'].":".$config['clientsecret_password']);
39
+              $api->setApiKey($key);
40
+       }
41 41
  
42 42
  
43
-      /*
43
+       /*
44 44
       Exchanging a Username and Password for an Access Token
45 45
       https://dev.bitly.com/docs/getting-started/authentication
46 46
       */
47
-      public function exchangeToken(array $params)
48
-      {
49
-             $params['grant_type'] = 'password';
50
-             $result = $this->api->post($this->url, $params);
51
-             return json_decode($result->getResponse(), true)['access_token'];
52
-      }
47
+       public function exchangeToken(array $params)
48
+       {
49
+              $params['grant_type'] = 'password';
50
+              $result = $this->api->post($this->url, $params);
51
+              return json_decode($result->getResponse(), true)['access_token'];
52
+       }
53 53
 
54
-      /*
54
+       /*
55 55
       HTTP Basic Authentication Flow
56 56
       https://dev.bitly.com/docs/getting-started/authentication
57 57
       */
58
-      public function basicAuthFlow(array $params)
59
-      {
60
-             $result = $this->api->post($this->url, $params);
61
-             return $result->getResponse();
62
-      }
58
+       public function basicAuthFlow(array $params)
59
+       {
60
+              $result = $this->api->post($this->url, $params);
61
+              return $result->getResponse();
62
+       }
63 63
  
64 64
 }
Please login to merge, or discard this patch.
lib/PHPLicengine/Service/Campaign.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
       private $url;
32 32
       private $api;      
33 33
       
34
-      public function __construct (ApiInterface $api)
34
+      public function __construct(ApiInterface $api)
35 35
       {
36 36
              $this->api = $api;
37 37
              $this->url = 'https://api-ssl.bitly.com/v4';       
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
       */
44 44
       public function createChannel(array $params)
45 45
       {
46
-             return $this->api->post($this->url . '/channels', $params);
46
+             return $this->api->post($this->url.'/channels', $params);
47 47
       }
48 48
 
49 49
       /*
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
       */
53 53
       public function getChannels(array $params)
54 54
       {
55
-             return $this->api->get($this->url . '/channels', $params);
55
+             return $this->api->get($this->url.'/channels', $params);
56 56
       }
57 57
       
58 58
       /*
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
       */
62 62
       public function createCampaign(array $params)
63 63
       {
64
-             return $this->api->post($this->url . '/campaigns', $params);
64
+             return $this->api->post($this->url.'/campaigns', $params);
65 65
       }
66 66
       
67 67
       /*
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
       */
71 71
       public function getCampaigns(array $params)
72 72
       {
73
-             return $this->api->get($this->url . '/campaigns', $params);
73
+             return $this->api->get($this->url.'/campaigns', $params);
74 74
       }
75 75
       
76 76
       /*
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
       */
80 80
       public function getCampaign(string $campaign_guid)
81 81
       {
82
-             return $this->api->get($this->url . '/campaigns/'.$campaign_guid);
82
+             return $this->api->get($this->url.'/campaigns/'.$campaign_guid);
83 83
       }
84 84
       
85 85
       /*
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
       */
89 89
       public function updateCampaign(string $campaign_guid, array $params)
90 90
       {
91
-             return $this->api->patch($this->url . '/campaigns/'.$campaign_guid, $params);
91
+             return $this->api->patch($this->url.'/campaigns/'.$campaign_guid, $params);
92 92
       }
93 93
       
94 94
       /*
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
       */
98 98
       public function getChannel(string $channel_guid)
99 99
       {
100
-             return $this->api->get($this->url . '/channels/'.$channel_guid);
100
+             return $this->api->get($this->url.'/channels/'.$channel_guid);
101 101
       }
102 102
       
103 103
       /*
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
       */
107 107
       public function updateChannel(string $channel_guid, array $params)
108 108
       {
109
-             return $this->api->patch($this->url . '/channels/'.$channel_guid, $params);
109
+             return $this->api->patch($this->url.'/channels/'.$channel_guid, $params);
110 110
       }      
111 111
  
112 112
 }
Please login to merge, or discard this patch.
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -28,85 +28,85 @@
 block discarded – undo
28 28
 
29 29
 class Campaign {
30 30
  
31
-      private $url;
32
-      private $api;      
31
+       private $url;
32
+       private $api;      
33 33
       
34
-      public function __construct (ApiInterface $api)
35
-      {
36
-             $this->api = $api;
37
-             $this->url = 'https://api-ssl.bitly.com/v4';       
38
-      }
34
+       public function __construct (ApiInterface $api)
35
+       {
36
+              $this->api = $api;
37
+              $this->url = 'https://api-ssl.bitly.com/v4';       
38
+       }
39 39
  
40
-      /*
40
+       /*
41 41
       Create Channel
42 42
       https://dev.bitly.com/api-reference#createChannel
43 43
       */
44
-      public function createChannel(array $params)
45
-      {
46
-             return $this->api->post($this->url . '/channels', $params);
47
-      }
44
+       public function createChannel(array $params)
45
+       {
46
+              return $this->api->post($this->url . '/channels', $params);
47
+       }
48 48
 
49
-      /*
49
+       /*
50 50
       Retrieve Channels
51 51
       https://dev.bitly.com/api-reference#getChannels
52 52
       */
53
-      public function getChannels(array $params)
54
-      {
55
-             return $this->api->get($this->url . '/channels', $params);
56
-      }
53
+       public function getChannels(array $params)
54
+       {
55
+              return $this->api->get($this->url . '/channels', $params);
56
+       }
57 57
       
58
-      /*
58
+       /*
59 59
       Create Campaign
60 60
       https://dev.bitly.com/api-reference#createCampaign
61 61
       */
62
-      public function createCampaign(array $params)
63
-      {
64
-             return $this->api->post($this->url . '/campaigns', $params);
65
-      }
62
+       public function createCampaign(array $params)
63
+       {
64
+              return $this->api->post($this->url . '/campaigns', $params);
65
+       }
66 66
       
67
-      /*
67
+       /*
68 68
       Retrieve Campaigns
69 69
       https://dev.bitly.com/api-reference#getCampaigns
70 70
       */
71
-      public function getCampaigns(array $params)
72
-      {
73
-             return $this->api->get($this->url . '/campaigns', $params);
74
-      }
71
+       public function getCampaigns(array $params)
72
+       {
73
+              return $this->api->get($this->url . '/campaigns', $params);
74
+       }
75 75
       
76
-      /*
76
+       /*
77 77
       Retrieve a Campaign
78 78
       https://dev.bitly.com/api-reference#getCampaign
79 79
       */
80
-      public function getCampaign(string $campaign_guid)
81
-      {
82
-             return $this->api->get($this->url . '/campaigns/'.$campaign_guid);
83
-      }
80
+       public function getCampaign(string $campaign_guid)
81
+       {
82
+              return $this->api->get($this->url . '/campaigns/'.$campaign_guid);
83
+       }
84 84
       
85
-      /*
85
+       /*
86 86
       Update Campaign
87 87
       https://dev.bitly.com/api-reference#updateCampaign
88 88
       */
89
-      public function updateCampaign(string $campaign_guid, array $params)
90
-      {
91
-             return $this->api->patch($this->url . '/campaigns/'.$campaign_guid, $params);
92
-      }
89
+       public function updateCampaign(string $campaign_guid, array $params)
90
+       {
91
+              return $this->api->patch($this->url . '/campaigns/'.$campaign_guid, $params);
92
+       }
93 93
       
94
-      /*
94
+       /*
95 95
       Get A Channel
96 96
       https://dev.bitly.com/api-reference#getChannel
97 97
       */
98
-      public function getChannel(string $channel_guid)
99
-      {
100
-             return $this->api->get($this->url . '/channels/'.$channel_guid);
101
-      }
98
+       public function getChannel(string $channel_guid)
99
+       {
100
+              return $this->api->get($this->url . '/channels/'.$channel_guid);
101
+       }
102 102
       
103
-      /*
103
+       /*
104 104
       Update A Channel
105 105
       https://dev.bitly.com/api-reference#updateChannel
106 106
       */
107
-      public function updateChannel(string $channel_guid, array $params)
108
-      {
109
-             return $this->api->patch($this->url . '/channels/'.$channel_guid, $params);
110
-      }      
107
+       public function updateChannel(string $channel_guid, array $params)
108
+       {
109
+              return $this->api->patch($this->url . '/channels/'.$channel_guid, $params);
110
+       }      
111 111
  
112 112
 }
Please login to merge, or discard this patch.
lib/PHPLicengine/Service/Bsd.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
       private $url;
32 32
       private $api;      
33 33
       
34
-      public function __construct (ApiInterface $api)
34
+      public function __construct(ApiInterface $api)
35 35
       {
36 36
              $this->api = $api;
37 37
              $this->url = 'https://api-ssl.bitly.com/v4/bsds';       
Please login to merge, or discard this patch.
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -28,22 +28,22 @@
 block discarded – undo
28 28
 
29 29
 class Bsd {
30 30
  
31
-      private $url;
32
-      private $api;      
31
+       private $url;
32
+       private $api;      
33 33
       
34
-      public function __construct (ApiInterface $api)
35
-      {
36
-             $this->api = $api;
37
-             $this->url = 'https://api-ssl.bitly.com/v4/bsds';       
38
-      }
34
+       public function __construct (ApiInterface $api)
35
+       {
36
+              $this->api = $api;
37
+              $this->url = 'https://api-ssl.bitly.com/v4/bsds';       
38
+       }
39 39
  
40
-      /*
40
+       /*
41 41
       Get BSDs
42 42
       https://dev.bitly.com/api-reference#getBSDs
43 43
       */
44
-      public function getBSDs() 
45
-      {
46
-             return $this->api->get($this->url);
47
-      }
44
+       public function getBSDs() 
45
+       {
46
+              return $this->api->get($this->url);
47
+       }
48 48
       
49 49
 }
Please login to merge, or discard this patch.
lib/PHPLicengine/Service/Custom.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,12 +26,12 @@  discard block
 block discarded – undo
26 26
 use PHPLicengine\Exception\CurlException;
27 27
 use PHPLicengine\Api\ApiInterface;
28 28
 
29
-class Custom  {
29
+class Custom {
30 30
  
31 31
       private $url;
32 32
       private $api;      
33 33
       
34
-      public function __construct (ApiInterface $api)
34
+      public function __construct(ApiInterface $api)
35 35
       {
36 36
              $this->api = $api;
37 37
              $this->url = 'https://api-ssl.bitly.com/v4/custom_bitlinks';       
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
       */
44 44
       public function updateCustomBitlink(string $custom_bitlink, array $params)
45 45
       {
46
-             return $this->api->patch($this->url . '/'.$custom_bitlink, $params);
46
+             return $this->api->patch($this->url.'/'.$custom_bitlink, $params);
47 47
       }
48 48
 
49 49
       /*
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
       */
53 53
       public function getCustomBitlink(string $custom_bitlink)
54 54
       {
55
-             return $this->api->get($this->url . '/'.$custom_bitlink);
55
+             return $this->api->get($this->url.'/'.$custom_bitlink);
56 56
       }
57 57
       
58 58
       /*
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
       */
71 71
       public function getCustomBitlinkMetricsByDestination(string $custom_bitlink)
72 72
       {
73
-             return $this->api->get($this->url . '/'.$custom_bitlink.'/clicks_by_destination');
73
+             return $this->api->get($this->url.'/'.$custom_bitlink.'/clicks_by_destination');
74 74
       }
75 75
       
76 76
       /*
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
       */
80 80
       public function getClicksForCustomBitlink(string $custom_bitlink, array $params)
81 81
       {
82
-             return $this->api->get($this->url . '/'.$custom_bitlink."/clicks", $params);
82
+             return $this->api->get($this->url.'/'.$custom_bitlink."/clicks", $params);
83 83
       }
84 84
  
85 85
 }
Please login to merge, or discard this patch.
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -28,58 +28,58 @@
 block discarded – undo
28 28
 
29 29
 class Custom  {
30 30
  
31
-      private $url;
32
-      private $api;      
31
+       private $url;
32
+       private $api;      
33 33
       
34
-      public function __construct (ApiInterface $api)
35
-      {
36
-             $this->api = $api;
37
-             $this->url = 'https://api-ssl.bitly.com/v4/custom_bitlinks';       
38
-      }
34
+       public function __construct (ApiInterface $api)
35
+       {
36
+              $this->api = $api;
37
+              $this->url = 'https://api-ssl.bitly.com/v4/custom_bitlinks';       
38
+       }
39 39
  
40
-      /*
40
+       /*
41 41
       Update Custom Bitlink
42 42
       https://dev.bitly.com/api-reference#updateCustomBitlink
43 43
       */
44
-      public function updateCustomBitlink(string $custom_bitlink, array $params)
45
-      {
46
-             return $this->api->patch($this->url . '/'.$custom_bitlink, $params);
47
-      }
44
+       public function updateCustomBitlink(string $custom_bitlink, array $params)
45
+       {
46
+              return $this->api->patch($this->url . '/'.$custom_bitlink, $params);
47
+       }
48 48
 
49
-      /*
49
+       /*
50 50
       Retrieve Custom Bitlink
51 51
       https://dev.bitly.com/api-reference#getCustomBitlink
52 52
       */
53
-      public function getCustomBitlink(string $custom_bitlink)
54
-      {
55
-             return $this->api->get($this->url . '/'.$custom_bitlink);
56
-      }
53
+       public function getCustomBitlink(string $custom_bitlink)
54
+       {
55
+              return $this->api->get($this->url . '/'.$custom_bitlink);
56
+       }
57 57
       
58
-      /*
58
+       /*
59 59
       Add Custom Bitlink
60 60
       https://dev.bitly.com/api-reference#addCustomBitlink
61 61
       */
62
-      public function addCustomBitlink(array $params)
63
-      {
64
-             return $this->api->post($this->url, $params);
65
-      }
62
+       public function addCustomBitlink(array $params)
63
+       {
64
+              return $this->api->post($this->url, $params);
65
+       }
66 66
       
67
-      /*
67
+       /*
68 68
       Get Metrics for a Custom Bitlink by destination
69 69
       https://dev.bitly.com/api-reference#getCustomBitlinkMetricsByDestination
70 70
       */
71
-      public function getCustomBitlinkMetricsByDestination(string $custom_bitlink)
72
-      {
73
-             return $this->api->get($this->url . '/'.$custom_bitlink.'/clicks_by_destination');
74
-      }
71
+       public function getCustomBitlinkMetricsByDestination(string $custom_bitlink)
72
+       {
73
+              return $this->api->get($this->url . '/'.$custom_bitlink.'/clicks_by_destination');
74
+       }
75 75
       
76
-      /*
76
+       /*
77 77
       Get Clicks for a Custom Bitlink's Entire History
78 78
       https://dev.bitly.com/api-reference#getClicksForCustomBitlink
79 79
       */
80
-      public function getClicksForCustomBitlink(string $custom_bitlink, array $params)
81
-      {
82
-             return $this->api->get($this->url . '/'.$custom_bitlink."/clicks", $params);
83
-      }
80
+       public function getClicksForCustomBitlink(string $custom_bitlink, array $params)
81
+       {
82
+              return $this->api->get($this->url . '/'.$custom_bitlink."/clicks", $params);
83
+       }
84 84
  
85 85
 }
Please login to merge, or discard this patch.
lib/PHPLicengine/Service/Webhook.php 2 patches
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -28,58 +28,58 @@
 block discarded – undo
28 28
 
29 29
 class Webhook {
30 30
  
31
-      private $url;
32
-      private $api;      
31
+       private $url;
32
+       private $api;      
33 33
       
34
-      public function __construct (ApiInterface $api)
35
-      {
36
-             $this->api = $api;
37
-             $this->url = 'https://api-ssl.bitly.com/v4/webhooks';       
38
-      }
34
+       public function __construct (ApiInterface $api)
35
+       {
36
+              $this->api = $api;
37
+              $this->url = 'https://api-ssl.bitly.com/v4/webhooks';       
38
+       }
39 39
  
40
-      /*
40
+       /*
41 41
       Create Webhook
42 42
       https://dev.bitly.com/api-reference#createWebhook
43 43
       */
44
-      public function createWebhook(array $params) 
45
-      {
46
-             return $this->api->post($this->url, $params);
47
-      }
44
+       public function createWebhook(array $params) 
45
+       {
46
+              return $this->api->post($this->url, $params);
47
+       }
48 48
 
49
-      /*
49
+       /*
50 50
       Get Webhooks
51 51
       https://dev.bitly.com/api-reference#getWebhooks
52 52
       */
53
-      public function getWebhooks(string $organization_guid) 
54
-      {
55
-             return $this->api->get("https://api-ssl.bitly.com/v4/organizations/".$organization_guid."/webhooks");
56
-      }
53
+       public function getWebhooks(string $organization_guid) 
54
+       {
55
+              return $this->api->get("https://api-ssl.bitly.com/v4/organizations/".$organization_guid."/webhooks");
56
+       }
57 57
       
58
-      /*
58
+       /*
59 59
       Retrieve Webhook
60 60
       https://dev.bitly.com/api-reference#getWebhook
61 61
       */
62
-      public function getWebhook(string $webhook_guid) 
63
-      {
64
-             return $this->api->get($this->url."/".$webhook_guid);
65
-      }      
62
+       public function getWebhook(string $webhook_guid) 
63
+       {
64
+              return $this->api->get($this->url."/".$webhook_guid);
65
+       }      
66 66
 
67
-      /*
67
+       /*
68 68
       Update Webhook
69 69
       https://dev.bitly.com/api-reference#updateWebhook
70 70
       */
71
-      public function updateWebhook(string $webhook_guid, array $params) 
72
-      {
73
-             return $this->api->patch($this->url."/".$webhook_guid, $params);
74
-      }      
71
+       public function updateWebhook(string $webhook_guid, array $params) 
72
+       {
73
+              return $this->api->patch($this->url."/".$webhook_guid, $params);
74
+       }      
75 75
 
76
-      /*
76
+       /*
77 77
       Delete Webhook
78 78
       https://dev.bitly.com/api-reference#deleteWebhook
79 79
       */
80
-      public function deleteWebhook(string $webhook_guid) 
81
-      {
82
-             return $this->api->delete($this->url."/".$webhook_guid);
83
-      }      
80
+       public function deleteWebhook(string $webhook_guid) 
81
+       {
82
+              return $this->api->delete($this->url."/".$webhook_guid);
83
+       }      
84 84
 
85 85
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
       private $url;
32 32
       private $api;      
33 33
       
34
-      public function __construct (ApiInterface $api)
34
+      public function __construct(ApiInterface $api)
35 35
       {
36 36
              $this->api = $api;
37 37
              $this->url = 'https://api-ssl.bitly.com/v4/webhooks';       
Please login to merge, or discard this patch.
lib/PHPLicengine/Service/Organization.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
       private $url;
32 32
       private $api;      
33 33
       
34
-      public function __construct (ApiInterface $api)
34
+      public function __construct(ApiInterface $api)
35 35
       {
36 36
              $this->api = $api;
37 37
              $this->url = 'https://api-ssl.bitly.com/v4/organizations';       
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
       */
53 53
       public function getOrganizationShortenCounts(string $organization_guid) 
54 54
       {
55
-             return $this->api->get($this->url . '/'.$organization_guid.'/shorten_counts');
55
+             return $this->api->get($this->url.'/'.$organization_guid.'/shorten_counts');
56 56
       }
57 57
       
58 58
       /*
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
       */
62 62
       public function getOrganization(string $organization_guid) 
63 63
       {
64
-             return $this->api->get($this->url . '/'.$organization_guid);
64
+             return $this->api->get($this->url.'/'.$organization_guid);
65 65
       }      
66 66
  
67 67
       /*
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
       */
71 71
       public function getPlanLimits(string $organization_guid) 
72 72
       {
73
-             return $this->api->get($this->url . '/'.$organization_guid."/plan_limits");
73
+             return $this->api->get($this->url.'/'.$organization_guid."/plan_limits");
74 74
       }
75 75
  
76 76
 }
Please login to merge, or discard this patch.
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -28,49 +28,49 @@
 block discarded – undo
28 28
 
29 29
 class Organization {
30 30
  
31
-      private $url;
32
-      private $api;      
31
+       private $url;
32
+       private $api;      
33 33
       
34
-      public function __construct (ApiInterface $api)
35
-      {
36
-             $this->api = $api;
37
-             $this->url = 'https://api-ssl.bitly.com/v4/organizations';       
38
-      }
34
+       public function __construct (ApiInterface $api)
35
+       {
36
+              $this->api = $api;
37
+              $this->url = 'https://api-ssl.bitly.com/v4/organizations';       
38
+       }
39 39
  
40
-      /*
40
+       /*
41 41
       Retrieve Organizations
42 42
       https://dev.bitly.com/api-reference#getOrganizations
43 43
       */
44
-      public function getOrganizations() 
45
-      {
46
-             return $this->api->get($this->url);
47
-      }
44
+       public function getOrganizations() 
45
+       {
46
+              return $this->api->get($this->url);
47
+       }
48 48
       
49
-      /*
49
+       /*
50 50
       Retrieve Organization Shorten Counts
51 51
       https://dev.bitly.com/api-reference#getOrganizationShortenCounts
52 52
       */
53
-      public function getOrganizationShortenCounts(string $organization_guid) 
54
-      {
55
-             return $this->api->get($this->url . '/'.$organization_guid.'/shorten_counts');
56
-      }
53
+       public function getOrganizationShortenCounts(string $organization_guid) 
54
+       {
55
+              return $this->api->get($this->url . '/'.$organization_guid.'/shorten_counts');
56
+       }
57 57
       
58
-      /*
58
+       /*
59 59
       Retrieve an Organization
60 60
       https://dev.bitly.com/api-reference#getOrganization
61 61
       */
62
-      public function getOrganization(string $organization_guid) 
63
-      {
64
-             return $this->api->get($this->url . '/'.$organization_guid);
65
-      }      
62
+       public function getOrganization(string $organization_guid) 
63
+       {
64
+              return $this->api->get($this->url . '/'.$organization_guid);
65
+       }      
66 66
  
67
-      /*
67
+       /*
68 68
       Get Plan Limits
69 69
       https://dev.bitly.com/api-reference#getPlanLimits
70 70
       */
71
-      public function getPlanLimits(string $organization_guid) 
72
-      {
73
-             return $this->api->get($this->url . '/'.$organization_guid."/plan_limits");
74
-      }
71
+       public function getPlanLimits(string $organization_guid) 
72
+       {
73
+              return $this->api->get($this->url . '/'.$organization_guid."/plan_limits");
74
+       }
75 75
  
76 76
 }
Please login to merge, or discard this patch.
lib/PHPLicengine/Service/Group.php 2 patches
Indentation   +77 added lines, -77 removed lines patch added patch discarded remove patch
@@ -28,139 +28,139 @@
 block discarded – undo
28 28
 
29 29
 class Group {
30 30
  
31
-      private $url;
32
-      private $api;      
31
+       private $url;
32
+       private $api;      
33 33
       
34
-      public function __construct (ApiInterface $api)
35
-      {
36
-             $this->api = $api;
37
-             $this->url = 'https://api-ssl.bitly.com/v4/groups';       
38
-      }
34
+       public function __construct (ApiInterface $api)
35
+       {
36
+              $this->api = $api;
37
+              $this->url = 'https://api-ssl.bitly.com/v4/groups';       
38
+       }
39 39
  
40
-      /*
40
+       /*
41 41
       Retrieve Tags by Group
42 42
       https://dev.bitly.com/api-reference#getGroupTags
43 43
       */
44
-      public function getGroupTags(string $group_guid) 
45
-      {
46
-             return $this->api->get($this->url . '/'.$group_guid.'/tags');
47
-      }
44
+       public function getGroupTags(string $group_guid) 
45
+       {
46
+              return $this->api->get($this->url . '/'.$group_guid.'/tags');
47
+       }
48 48
       
49
-      /*
49
+       /*
50 50
       Get Click Metrics for a Group by referring networks
51 51
       https://dev.bitly.com/api-reference#GetGroupMetricsByReferringNetworks
52 52
       */
53
-      public function getGroupMetricsByReferringNetworks(string $group_guid) 
54
-      {
55
-             return $this->api->get($this->url . '/'.$group_guid.'/referring_networks');
56
-      }
53
+       public function getGroupMetricsByReferringNetworks(string $group_guid) 
54
+       {
55
+              return $this->api->get($this->url . '/'.$group_guid.'/referring_networks');
56
+       }
57 57
       
58
-      /*
58
+       /*
59 59
       Retrieve Group Shorten Counts
60 60
       https://dev.bitly.com/api-reference#getGroupShortenCounts
61 61
       */
62
-      public function getGroupShortenCounts(string $group_guid) 
63
-      {
64
-             return $this->api->get($this->url . '/'.$group_guid.'/shorten_counts');
65
-      }
62
+       public function getGroupShortenCounts(string $group_guid) 
63
+       {
64
+              return $this->api->get($this->url . '/'.$group_guid.'/shorten_counts');
65
+       }
66 66
 
67
-      /*
67
+       /*
68 68
       Retrieve Groups
69 69
       https://dev.bitly.com/api-reference#getGroups
70 70
       */
71
-      public function getGroups(array $params = array()) 
72
-      {
73
-             return $this->api->get($this->url, $params);
74
-      }
71
+       public function getGroups(array $params = array()) 
72
+       {
73
+              return $this->api->get($this->url, $params);
74
+       }
75 75
       
76
-      /*
76
+       /*
77 77
       Retrieve Group Preferences
78 78
       https://dev.bitly.com/api-reference#getGroupPreferences
79 79
       */
80
-      public function getGroupPreferences(string $group_guid) 
81
-      {
82
-             return $this->api->get($this->url . '/'.$group_guid.'/preferences');
83
-      }
80
+       public function getGroupPreferences(string $group_guid) 
81
+       {
82
+              return $this->api->get($this->url . '/'.$group_guid.'/preferences');
83
+       }
84 84
       
85
-      /*
85
+       /*
86 86
       Update Group Preferences
87 87
       https://dev.bitly.com/api-reference#updateGroupPreferences
88 88
       */
89
-      public function updateGroupPreferences(string $group_guid, array $params) 
90
-      {
91
-             return $this->api->patch($this->url . '/'.$group_guid.'/preferences', $params);
92
-      }
89
+       public function updateGroupPreferences(string $group_guid, array $params) 
90
+       {
91
+              return $this->api->patch($this->url . '/'.$group_guid.'/preferences', $params);
92
+       }
93 93
 
94
-      /*
94
+       /*
95 95
       Retrieve Bitlinks by Group
96 96
       https://dev.bitly.com/api-reference#getBitlinksByGroup
97 97
       */
98
-      public function getBitlinksByGroup(string $group_guid, array $params = array()) 
99
-      {
100
-             return $this->api->get($this->url . '/'.$group_guid.'/bitlinks', $params);
101
-      }
98
+       public function getBitlinksByGroup(string $group_guid, array $params = array()) 
99
+       {
100
+              return $this->api->get($this->url . '/'.$group_guid.'/bitlinks', $params);
101
+       }
102 102
 
103
-      /*
103
+       /*
104 104
       Get Click Metrics for a Group by countries
105 105
       https://dev.bitly.com/api-reference#getGroupMetricsByCountries
106 106
       */
107
-      public function getGroupMetricsByCountries(string $group_guid) 
108
-      {
109
-             return $this->api->get($this->url . '/'.$group_guid.'/countries');
110
-      }
107
+       public function getGroupMetricsByCountries(string $group_guid) 
108
+       {
109
+              return $this->api->get($this->url . '/'.$group_guid.'/countries');
110
+       }
111 111
       
112
-      /*
112
+       /*
113 113
       Retrieve Sorted Bitlinks for Group
114 114
       https://dev.bitly.com/api-reference#getSortedBitlinks
115 115
       */
116
-      public function getSortedBitlinks(string $group_guid, array $params = array(), string $sort = 'clicks') 
117
-      {
118
-             return $this->api->get($this->url . '/'.$group_guid.'/bitlinks/'.$sort, $params);
119
-      }
116
+       public function getSortedBitlinks(string $group_guid, array $params = array(), string $sort = 'clicks') 
117
+       {
118
+              return $this->api->get($this->url . '/'.$group_guid.'/bitlinks/'.$sort, $params);
119
+       }
120 120
 
121
-      /*
121
+       /*
122 122
       Update a Group
123 123
       https://dev.bitly.com/api-reference#updateGroup
124 124
       */
125
-      public function updateGroup(string $group_guid, array $params) 
126
-      {
127
-             return $this->api->patch($this->url . '/'.$group_guid, $params);
128
-      }      
125
+       public function updateGroup(string $group_guid, array $params) 
126
+       {
127
+              return $this->api->patch($this->url . '/'.$group_guid, $params);
128
+       }      
129 129
       
130
-      /*
130
+       /*
131 131
       Retrieve a Group
132 132
       https://dev.bitly.com/api-reference#getGroup
133 133
       */
134
-      public function getGroup(string $group_guid) 
135
-      {
136
-             return $this->api->get($this->url . '/'.$group_guid);
137
-      }      
134
+       public function getGroup(string $group_guid) 
135
+       {
136
+              return $this->api->get($this->url . '/'.$group_guid);
137
+       }      
138 138
       
139
-      /*
139
+       /*
140 140
       Delete a Group
141 141
       https://dev.bitly.com/v4/#operation/deleteGroup
142 142
       */
143
-      public function deleteGroup(string $group_guid) 
144
-      {
145
-             return $this->api->delete($this->url . '/'.$group_guid);
146
-      }      
143
+       public function deleteGroup(string $group_guid) 
144
+       {
145
+              return $this->api->delete($this->url . '/'.$group_guid);
146
+       }      
147 147
  
148
-      /*
148
+       /*
149 149
       Get Click Metrics for a Group by City
150 150
       https://dev.bitly.com/api-reference#getGroupMetricsByCities
151 151
       */
152
-      public function getGroupMetricsByCities(string $group_guid, array $params = array()) 
153
-      {
154
-             return $this->api->get($this->url . '/'.$group_guid."/cities", $params);
155
-      }      
152
+       public function getGroupMetricsByCities(string $group_guid, array $params = array()) 
153
+       {
154
+              return $this->api->get($this->url . '/'.$group_guid."/cities", $params);
155
+       }      
156 156
 
157
-      /*
157
+       /*
158 158
       Get Click Metrics for a Group by Device Type
159 159
       https://dev.bitly.com/api-reference#getGroupMetricsByDevices
160 160
       */
161
-      public function getGroupMetricsByDevices(string $group_guid, array $params = array()) 
162
-      {
163
-             return $this->api->get($this->url . '/'.$group_guid."/devices", $params);
164
-      }   
161
+       public function getGroupMetricsByDevices(string $group_guid, array $params = array()) 
162
+       {
163
+              return $this->api->get($this->url . '/'.$group_guid."/devices", $params);
164
+       }   
165 165
      
166 166
 }
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
       private $url;
32 32
       private $api;      
33 33
       
34
-      public function __construct (ApiInterface $api)
34
+      public function __construct(ApiInterface $api)
35 35
       {
36 36
              $this->api = $api;
37 37
              $this->url = 'https://api-ssl.bitly.com/v4/groups';       
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
       */
44 44
       public function getGroupTags(string $group_guid) 
45 45
       {
46
-             return $this->api->get($this->url . '/'.$group_guid.'/tags');
46
+             return $this->api->get($this->url.'/'.$group_guid.'/tags');
47 47
       }
48 48
       
49 49
       /*
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
       */
53 53
       public function getGroupMetricsByReferringNetworks(string $group_guid) 
54 54
       {
55
-             return $this->api->get($this->url . '/'.$group_guid.'/referring_networks');
55
+             return $this->api->get($this->url.'/'.$group_guid.'/referring_networks');
56 56
       }
57 57
       
58 58
       /*
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
       */
62 62
       public function getGroupShortenCounts(string $group_guid) 
63 63
       {
64
-             return $this->api->get($this->url . '/'.$group_guid.'/shorten_counts');
64
+             return $this->api->get($this->url.'/'.$group_guid.'/shorten_counts');
65 65
       }
66 66
 
67 67
       /*
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
       */
80 80
       public function getGroupPreferences(string $group_guid) 
81 81
       {
82
-             return $this->api->get($this->url . '/'.$group_guid.'/preferences');
82
+             return $this->api->get($this->url.'/'.$group_guid.'/preferences');
83 83
       }
84 84
       
85 85
       /*
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
       */
89 89
       public function updateGroupPreferences(string $group_guid, array $params) 
90 90
       {
91
-             return $this->api->patch($this->url . '/'.$group_guid.'/preferences', $params);
91
+             return $this->api->patch($this->url.'/'.$group_guid.'/preferences', $params);
92 92
       }
93 93
 
94 94
       /*
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
       */
98 98
       public function getBitlinksByGroup(string $group_guid, array $params = array()) 
99 99
       {
100
-             return $this->api->get($this->url . '/'.$group_guid.'/bitlinks', $params);
100
+             return $this->api->get($this->url.'/'.$group_guid.'/bitlinks', $params);
101 101
       }
102 102
 
103 103
       /*
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
       */
107 107
       public function getGroupMetricsByCountries(string $group_guid) 
108 108
       {
109
-             return $this->api->get($this->url . '/'.$group_guid.'/countries');
109
+             return $this->api->get($this->url.'/'.$group_guid.'/countries');
110 110
       }
111 111
       
112 112
       /*
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
       */
116 116
       public function getSortedBitlinks(string $group_guid, array $params = array(), string $sort = 'clicks') 
117 117
       {
118
-             return $this->api->get($this->url . '/'.$group_guid.'/bitlinks/'.$sort, $params);
118
+             return $this->api->get($this->url.'/'.$group_guid.'/bitlinks/'.$sort, $params);
119 119
       }
120 120
 
121 121
       /*
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
       */
125 125
       public function updateGroup(string $group_guid, array $params) 
126 126
       {
127
-             return $this->api->patch($this->url . '/'.$group_guid, $params);
127
+             return $this->api->patch($this->url.'/'.$group_guid, $params);
128 128
       }      
129 129
       
130 130
       /*
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
       */
134 134
       public function getGroup(string $group_guid) 
135 135
       {
136
-             return $this->api->get($this->url . '/'.$group_guid);
136
+             return $this->api->get($this->url.'/'.$group_guid);
137 137
       }      
138 138
       
139 139
       /*
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
       */
143 143
       public function deleteGroup(string $group_guid) 
144 144
       {
145
-             return $this->api->delete($this->url . '/'.$group_guid);
145
+             return $this->api->delete($this->url.'/'.$group_guid);
146 146
       }      
147 147
  
148 148
       /*
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
       */
152 152
       public function getGroupMetricsByCities(string $group_guid, array $params = array()) 
153 153
       {
154
-             return $this->api->get($this->url . '/'.$group_guid."/cities", $params);
154
+             return $this->api->get($this->url.'/'.$group_guid."/cities", $params);
155 155
       }      
156 156
 
157 157
       /*
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
       */
161 161
       public function getGroupMetricsByDevices(string $group_guid, array $params = array()) 
162 162
       {
163
-             return $this->api->get($this->url . '/'.$group_guid."/devices", $params);
163
+             return $this->api->get($this->url.'/'.$group_guid."/devices", $params);
164 164
       }   
165 165
      
166 166
 }
Please login to merge, or discard this patch.