Completed
Push — master ( 45dd27...e0191e )
by PROSPER
02:00
created
src/Helper.php 2 patches
Doc Comments   +5 added lines, -5 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 Invalid Message ID Response
87
-      * @return object
87
+      * @return \stdClass
88 88
       */
89 89
      public function invalidMessageIDResponse()
90 90
      {
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 
97 97
      /**
98 98
       * Stubbed sendSMSResponse
99
-      * @return object
99
+      * @return \stdClass
100 100
       */
101 101
      public function sendSMSResponse()
102 102
      {
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
      /**
112 112
       * Stubbed checkAvailableCreditsResponse
113
-      * @return object
113
+      * @return \stdClass
114 114
       */
115 115
      public function checkAvailableCreditsResponse()
116 116
      {
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
-      * [correctPayload description]
125
-      * @return [type] [description]
126
-      */
127
-     public function correctPayload()
128
-     {
121
+        }
122
+
123
+        /**
124
+         * [correctPayload description]
125
+         * @return [type] [description]
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.