Completed
Push — master ( 55313e...5b7cf9 )
by PROSPER
02:01
created
src/Jusibe.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     private function prepareRequest()
65 65
     {
66
-        $this->client = new Client(['base_uri' => self::baseURL]);
66
+        $this->client = new Client([ 'base_uri' => self::baseURL ]);
67 67
     }
68 68
 
69 69
     /**
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     private function performGetRequest($relativeUrl)
75 75
     {
76 76
         $this->response = $this->client->request('GET', $relativeUrl, [
77
-            'auth' => [$this->publicKey, $this->accessToken]
77
+            'auth' => [ $this->publicKey, $this->accessToken ]
78 78
         ]);
79 79
     }
80 80
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     private function performPostRequest($relativeUrl, $data)
88 88
     {
89 89
         $this->response = $this->client->request('POST', $relativeUrl, [
90
-            'auth' => [$this->publicKey, $this->accessToken],
90
+            'auth' => [ $this->publicKey, $this->accessToken ],
91 91
             'form_params' => $data
92 92
         ]);
93 93
     }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      * @param  array $payload
98 98
      * @return $this
99 99
      */
100
-    public function sendSMS($payload = [])
100
+    public function sendSMS($payload = [ ])
101 101
     {
102 102
         if (empty($payload)) {
103 103
             throw IsEmpty::create("Message Payload can not be empty. Please fill the appropriate details");
Please login to merge, or discard this patch.
src/Helper.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     */
23 23
      public function loadEnv()
24 24
      {
25
-         if (! getenv('APP_ENV')) {
25
+         if (!getenv('APP_ENV')) {
26 26
              $dotenv = new Dotenv(__DIR__.'/../');
27 27
              $dotenv->load();
28 28
          }
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
       */
115 115
      public function correctPayload()
116 116
      {
117
-        $message  = "I LOVE YOU, BABY";
117
+        $message = "I LOVE YOU, BABY";
118 118
 
119 119
         return [
120 120
             'to' => '8038142771',
Please login to merge, or discard this patch.
Indentation   +105 added lines, -105 removed lines patch added patch discarded remove patch
@@ -18,49 +18,49 @@  discard block
 block discarded – undo
18 18
 trait Helper {
19 19
 
20 20
     /**
21
-    * Load Dotenv to grant getenv() access to environment variables in .env file.
22
-    */
23
-     public function loadEnv()
24
-     {
25
-         if (! getenv('APP_ENV')) {
26
-             $dotenv = new Dotenv(__DIR__.'/../');
27
-             $dotenv->load();
28
-         }
29
-     }
30
-
31
-     /**
32
-      * Get Valid Message ID
33
-      * @return string
34
-      */
35
-     public function getValidMessageID()
36
-     {
21
+     * Load Dotenv to grant getenv() access to environment variables in .env file.
22
+     */
23
+        public function loadEnv()
24
+        {
25
+            if (! getenv('APP_ENV')) {
26
+                $dotenv = new Dotenv(__DIR__.'/../');
27
+                $dotenv->load();
28
+            }
29
+        }
30
+
31
+        /**
32
+         * Get Valid Message ID
33
+         * @return string
34
+         */
35
+        public function getValidMessageID()
36
+        {
37 37
         return getenv('VALID_MESSAGE_ID');
38
-     }
39
-
40
-     /**
41
-      * Get Invalid Message ID
42
-      * @return string
43
-      */
44
-     public function getInvalidMessageID()
45
-     {
38
+        }
39
+
40
+        /**
41
+         * Get Invalid Message ID
42
+         * @return string
43
+         */
44
+        public function getInvalidMessageID()
45
+        {
46 46
         return getenv('INVALID_MESSAGE_ID');
47
-     }
48
-
49
-     /**
50
-      * Get Valid Access Token
51
-      * @return string
52
-      */
53
-     public function getValidAccessToken()
54
-     {
47
+        }
48
+
49
+        /**
50
+         * Get Valid Access Token
51
+         * @return string
52
+         */
53
+        public function getValidAccessToken()
54
+        {
55 55
         return getenv('VALID_ACCESS_TOKEN');
56
-     }
57
-
58
-     /**
59
-      * Stubbed checkDeliveryStatusResponse
60
-      * @return object
61
-      */
62
-     public function checkDeliveryStatusResponse()
63
-     {
56
+        }
57
+
58
+        /**
59
+         * Stubbed checkDeliveryStatusResponse
60
+         * @return object
61
+         */
62
+        public function checkDeliveryStatusResponse()
63
+        {
64 64
         $response = new StdClass;
65 65
         $response->message_id = $this->getValidMessageID();
66 66
         $response->status = 'Delivered';
@@ -68,64 +68,64 @@  discard block
 block discarded – undo
68 68
         $response->date_delivered = time();
69 69
 
70 70
         return $response;
71
-     }
72
-
73
-     /**
74
-      * Stubbed Invalid Keys Response
75
-      * @return object
76
-      */
77
-     public function invalidKeysResponse()
78
-     {
71
+        }
72
+
73
+        /**
74
+         * Stubbed Invalid Keys Response
75
+         * @return object
76
+         */
77
+        public function invalidKeysResponse()
78
+        {
79 79
         $response = new StdClass;
80 80
         $response->error = "Invalid API Key!";
81 81
 
82 82
         return $response;
83
-     }
84
-
85
-     /**
86
-      * Stubbed Invalid Message ID Response
87
-      * @return object
88
-      */
89
-     public function invalidMessageIDResponse()
90
-     {
83
+        }
84
+
85
+        /**
86
+         * Stubbed Invalid Message ID Response
87
+         * @return object
88
+         */
89
+        public function invalidMessageIDResponse()
90
+        {
91 91
         $response = new StdClass;
92 92
         $response->invalid_message_id = "Invalid message ID";
93 93
 
94 94
         return $response;
95
-     }
96
-
97
-     /**
98
-      * Stubbed sendSMSResponse
99
-      * @return object
100
-      */
101
-     public function sendSMSResponse()
102
-     {
95
+        }
96
+
97
+        /**
98
+         * Stubbed sendSMSResponse
99
+         * @return object
100
+         */
101
+        public function sendSMSResponse()
102
+        {
103 103
         $response = new StdClass;
104 104
         $response->status = 'Sent';
105 105
         $response->message_id = $this->getValidMessageID();
106 106
         $response->sms_credits_used = 1;
107 107
 
108 108
         return $response;
109
-     }
110
-
111
-     /**
112
-      * Stubbed checkAvailableCreditsResponse
113
-      * @return object
114
-      */
115
-     public function checkAvailableCreditsResponse()
116
-     {
109
+        }
110
+
111
+        /**
112
+         * Stubbed checkAvailableCreditsResponse
113
+         * @return object
114
+         */
115
+        public function checkAvailableCreditsResponse()
116
+        {
117 117
         $response = new StdClass;
118 118
         $response->sms_credits = 200;
119 119
 
120 120
         return $response;
121
-     }
122
-
123
-     /**
124
-      * Stubbed correct Payload
125
-      * @return array
126
-      */
127
-     public function correctPayload()
128
-     {
121
+        }
122
+
123
+        /**
124
+         * Stubbed correct Payload
125
+         * @return array
126
+         */
127
+        public function correctPayload()
128
+        {
129 129
         $message  = "I LOVE YOU, BABY";
130 130
 
131 131
         return [
@@ -133,34 +133,34 @@  discard block
 block discarded – undo
133 133
             'from' => 'TEST JUSIBE',
134 134
             'message' => $message
135 135
         ];
136
-     }
137
-
138
-     /**
139
-      * Get Invalid Access Token
140
-      * @return string
141
-      */
142
-     public function getInvalidAccessToken()
143
-     {
136
+        }
137
+
138
+        /**
139
+         * Get Invalid Access Token
140
+         * @return string
141
+         */
142
+        public function getInvalidAccessToken()
143
+        {
144 144
         return getenv('INVALID_ACCESS_TOKEN');
145
-     }
146
-
147
-     /**
148
-      * Get Valid Public Key
149
-      * @return string
150
-      */
151
-     public function getValidPublicKey()
152
-     {
145
+        }
146
+
147
+        /**
148
+         * Get Valid Public Key
149
+         * @return string
150
+         */
151
+        public function getValidPublicKey()
152
+        {
153 153
         return getenv('VALID_PUBLIC_KEY');
154
-     }
155
-
156
-     /**
157
-      * Get Valid Public Key
158
-      * @return string
159
-      */
160
-     public function getInvalidPublicKey()
161
-     {
154
+        }
155
+
156
+        /**
157
+         * Get Valid Public Key
158
+         * @return string
159
+         */
160
+        public function getInvalidPublicKey()
161
+        {
162 162
         return getenv('INVALID_PUBLIC_KEY');
163
-     }
163
+        }
164 164
 }
165 165
 
166 166
 
Please login to merge, or discard this patch.