Passed
Push — master ( cfb92e...8c1c43 )
by Francis
01:10
created
phpunit/GMailAPITest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
    * @covers JWT::__construct
21 21
    */
22 22
   public static function setUpBeforeClass(): void {
23
-    self::$ci =& get_instance();
23
+    self::$ci = & get_instance();
24 24
   }
25 25
   /**
26 26
    * [testLoadPackage description]
Please login to merge, or discard this patch.
libraries/GMail.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
    *       config items]
17 17
    * @param array $config Associative Config Array.
18 18
    */
19
-  public function init(array $config=null):void {
19
+  public function init(array $config = null):void {
20 20
     $this->clientId = $config['client_id'] ?? $this->clientId;
21 21
   }
22 22
   /**
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
    * @param  string $responseType Response type. 'code' by default.
29 29
    * @return string               Authorize URL
30 30
    */
31
-  public function getAuthorizeUrl(string $scope, string $redirectUri='urn:ietf:wg:oauth:2.0:oob', string $responseType='code', string $accessType='offline'):string {
31
+  public function getAuthorizeUrl(string $scope, string $redirectUri = 'urn:ietf:wg:oauth:2.0:oob', string $responseType = 'code', string $accessType = 'offline'):string {
32 32
     if ($scope == null) throw new Exception("GMail scope cannot be null");
33 33
     return self::AUTH_URL."?client_id=$this->clientId&redirect_uri=$redirectUri&scope=$scope&response_type=$responseType&access_type=$accessType";
34 34
   }
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
    * [getClientId Get Client ID.]
37 37
    * @return null|string Client ID.
38 38
    */
39
-  public function getClientId():?string {
39
+  public function getClientId(): ?string {
40 40
     return $this->clientId;
41 41
   }
42 42
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,9 @@
 block discarded – undo
29 29
    * @return string               Authorize URL
30 30
    */
31 31
   public function getAuthorizeUrl(string $scope, string $redirectUri='urn:ietf:wg:oauth:2.0:oob', string $responseType='code', string $accessType='offline'):string {
32
-    if ($scope == null) throw new Exception("GMail scope cannot be null");
32
+    if ($scope == null) {
33
+      throw new Exception("GMail scope cannot be null");
34
+    }
33 35
     return self::AUTH_URL."?client_id=$this->clientId&redirect_uri=$redirectUri&scope=$scope&response_type=$responseType&access_type=$accessType";
34 36
   }
35 37
   /**
Please login to merge, or discard this patch.
libraries/GMailUtil.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
    */
11 11
   private $query = [];
12 12
 
13
-  function __construct(array $query=null) {
13
+  function __construct(array $query = null) {
14 14
     if ($query != null) {
15 15
       foreach ($query as $key => $val) {
16 16
         $this->query[$key] = $val;
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
    */
32 32
   function build():string {
33 33
     $queryString = '?';
34
-    foreach($this->query as $key => $val) {
34
+    foreach ($this->query as $key => $val) {
35 35
       $queryString += $key."=".rawurlencode($val)."&";
36 36
     }
37 37
     return substr($queryString, 0, strlen($queryString) - 1);
Please login to merge, or discard this patch.