Passed
Branch account (d43697)
by vincent
02:17
created
src/VfacTmdb/Tmdb.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
      * Send request to TMDB API with GET method
121 121
      * @param string $action API action to request
122 122
      * @param array $options Array of options of the request (optional)
123
-     * @return \stdClass|null
123
+     * @return string
124 124
      */
125 125
     public function getRequest(string $action, array $options = array()) : ?\stdClass
126 126
     {
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      * @param string $action API action to request
135 135
      * @param array $options Array of options of the request (optional)
136 136
      * @param array $form_params form_params for request options
137
-     * @return \stdClass|null
137
+     * @return string
138 138
      */
139 139
     public function postRequest(string $action, array $options = array(), array $form_params = array()) : ?\stdClass
140 140
     {
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
      * Send request to TMDB API with DELETE method
148 148
      * @param  string $action  API action to request
149 149
      * @param  array  $options Array of options of the request (optional)
150
-     * @return \stdClass|null
150
+     * @return string
151 151
      */
152 152
     public function deleteRequest(string $action, array $options = array()) : ?\stdClass
153 153
     {
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
      * @param string $method HTTP method (GET, POST)
162 162
      * @param string $url API url to request
163 163
      * @param array $form_params form params request options
164
-     * @return \stdClass|null
164
+     * @return string
165 165
      */
166 166
     protected function sendRequest(string $method, string $url, array $form_params = array()) : ?\stdClass
167 167
     {
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -167,15 +167,15 @@
 block discarded – undo
167 167
     {
168 168
         $res = new \stdClass();
169 169
         switch ($method) {
170
-              case "GET":
170
+                case "GET":
171 171
                   $res = $this->http_request->getResponse($url);
172
-                  break;
173
-              case "POST":
172
+                    break;
173
+                case "POST":
174 174
                   $res = $this->http_request->postResponse($url, [], $form_params);
175
-                  break;
176
-              case "DELETE":
175
+                    break;
176
+                case "DELETE":
177 177
                   $res = $this->http_request->deleteResponse($url);
178
-                  break;
178
+                    break;
179 179
         }
180 180
         $response = $this->decodeRequest($res, $method, $url, $form_params);
181 181
         return $response;
Please login to merge, or discard this patch.