Completed
Push — master ( 0257d4...45dd27 )
by PROSPER
02:03
created
src/Helper.php 4 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
      /**
59 59
       * Stubbed checkDeliveryStatusResponse
60
-      * @return object
60
+      * @return \stdClass
61 61
       */
62 62
      public function checkDeliveryStatusResponse()
63 63
      {
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
      /**
74 74
       * Stubbed Invalid Keys Response
75
-      * @return object
75
+      * @return \stdClass
76 76
       */
77 77
      public function invalidKeysResponse()
78 78
      {
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
      /**
86 86
       * Stubbed sendSMSResponse
87
-      * @return object
87
+      * @return \stdClass
88 88
       */
89 89
      public function sendSMSResponse()
90 90
      {
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
      /**
100 100
       * Stubbed checkAvailableCreditsResponse
101
-      * @return object
101
+      * @return \stdClass
102 102
       */
103 103
      public function checkAvailableCreditsResponse()
104 104
      {
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,6 @@
 block discarded – undo
12 12
 
13 13
 use StdClass;
14 14
 use Dotenv\Dotenv;
15
-use GuzzleHttp\Client;
16
-use Unicodeveloper\Jusibe\Exceptions\IsEmpty;
17 15
 
18 16
 trait Helper {
19 17
 
Please login to merge, or discard this patch.
Indentation   +97 added lines, -97 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,52 +68,52 @@  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 sendSMSResponse
87
-      * @return object
88
-      */
89
-     public function sendSMSResponse()
90
-     {
83
+        }
84
+
85
+        /**
86
+         * Stubbed sendSMSResponse
87
+         * @return object
88
+         */
89
+        public function sendSMSResponse()
90
+        {
91 91
         $response = new StdClass;
92 92
         $response->status = 'Sent';
93 93
         $response->message_id = $this->getValidMessageID();
94 94
         $response->sms_credits_used = 1;
95 95
 
96 96
         return $response;
97
-     }
98
-
99
-     /**
100
-      * Stubbed checkAvailableCreditsResponse
101
-      * @return object
102
-      */
103
-     public function checkAvailableCreditsResponse()
104
-     {
97
+        }
98
+
99
+        /**
100
+         * Stubbed checkAvailableCreditsResponse
101
+         * @return object
102
+         */
103
+        public function checkAvailableCreditsResponse()
104
+        {
105 105
         $response = new StdClass;
106 106
         $response->sms_credits = 200;
107 107
 
108 108
         return $response;
109
-     }
110
-
111
-     /**
112
-      * [correctPayload description]
113
-      * @return [type] [description]
114
-      */
115
-     public function correctPayload()
116
-     {
109
+        }
110
+
111
+        /**
112
+         * [correctPayload description]
113
+         * @return [type] [description]
114
+         */
115
+        public function correctPayload()
116
+        {
117 117
         $message  = "I LOVE YOU, BABY";
118 118
 
119 119
         return [
@@ -121,34 +121,34 @@  discard block
 block discarded – undo
121 121
             'from' => 'TEST JUSIBE',
122 122
             'message' => $message
123 123
         ];
124
-     }
125
-
126
-     /**
127
-      * Get Invalid Access Token
128
-      * @return string
129
-      */
130
-     public function getInvalidAccessToken()
131
-     {
124
+        }
125
+
126
+        /**
127
+         * Get Invalid Access Token
128
+         * @return string
129
+         */
130
+        public function getInvalidAccessToken()
131
+        {
132 132
         return getenv('INVALID_ACCESS_TOKEN');
133
-     }
134
-
135
-     /**
136
-      * Get Valid Public Key
137
-      * @return string
138
-      */
139
-     public function getValidPublicKey()
140
-     {
133
+        }
134
+
135
+        /**
136
+         * Get Valid Public Key
137
+         * @return string
138
+         */
139
+        public function getValidPublicKey()
140
+        {
141 141
         return getenv('VALID_PUBLIC_KEY');
142
-     }
143
-
144
-     /**
145
-      * Get Valid Public Key
146
-      * @return string
147
-      */
148
-     public function getInvalidPublicKey()
149
-     {
142
+        }
143
+
144
+        /**
145
+         * Get Valid Public Key
146
+         * @return string
147
+         */
148
+        public function getInvalidPublicKey()
149
+        {
150 150
         return getenv('INVALID_PUBLIC_KEY');
151
-     }
151
+        }
152 152
 }
153 153
 
154 154
 
Please login to merge, or discard this patch.
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.