Completed
Push — master ( fe4a68...785df6 )
by PROSPER
04:33
created
src/Helper.php 2 patches
Indentation   +81 added lines, -81 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,60 +68,60 @@  discard block
 block discarded – undo
68 68
         $response->date_delivered = time();
69 69
 
70 70
         return $response;
71
-     }
72
-
73
-     /**
74
-      * Stubbed sendSMSResponse
75
-      * @return object
76
-      */
77
-     public function sendSMSResponse()
78
-     {
71
+        }
72
+
73
+        /**
74
+         * Stubbed sendSMSResponse
75
+         * @return object
76
+         */
77
+        public function sendSMSResponse()
78
+        {
79 79
         $response = new StdClass;
80 80
         $response->status = 'Sent';
81 81
         $response->message_id = $this->getValidMessageID();
82 82
         $response->sms_credits_used = 1;
83 83
 
84 84
         return $response;
85
-     }
86
-
87
-     /**
88
-      * Stubbed checkAvailableCreditsResponse
89
-      * @return object
90
-      */
91
-     public function checkAvailableCreditsResponse()
92
-     {
85
+        }
86
+
87
+        /**
88
+         * Stubbed checkAvailableCreditsResponse
89
+         * @return object
90
+         */
91
+        public function checkAvailableCreditsResponse()
92
+        {
93 93
         $response = new StdClass;
94 94
         $response->sms_credits = 200;
95 95
 
96 96
         return $response;
97
-     }
98
-
99
-     /**
100
-      * Get Invalid Access Token
101
-      * @return string
102
-      */
103
-     public function getInvalidAccessToken()
104
-     {
97
+        }
98
+
99
+        /**
100
+         * Get Invalid Access Token
101
+         * @return string
102
+         */
103
+        public function getInvalidAccessToken()
104
+        {
105 105
         return getenv('INVALID_ACCESS_TOKEN');
106
-     }
107
-
108
-     /**
109
-      * Get Valid Public Key
110
-      * @return string
111
-      */
112
-     public function getValidPublicKey()
113
-     {
106
+        }
107
+
108
+        /**
109
+         * Get Valid Public Key
110
+         * @return string
111
+         */
112
+        public function getValidPublicKey()
113
+        {
114 114
         return getenv('VALID_PUBLIC_KEY');
115
-     }
116
-
117
-     /**
118
-      * Get Valid Public Key
119
-      * @return string
120
-      */
121
-     public function getInvalidPublicKey()
122
-     {
115
+        }
116
+
117
+        /**
118
+         * Get Valid Public Key
119
+         * @return string
120
+         */
121
+        public function getInvalidPublicKey()
122
+        {
123 123
         return getenv('INVALID_PUBLIC_KEY');
124
-     }
124
+        }
125 125
 }
126 126
 
127 127
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 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
          }
Please login to merge, or discard this patch.