@@ -87,7 +87,7 @@ public function __construct()
8787 /**
8888 * Set Response Format into CI_Output
8989 *
90- * @param string Response format
90+ * @param string $format Response format
9191 */
9292 public function setFormat ($ format )
9393 {
@@ -105,7 +105,7 @@ public function setFormat($format)
105105 *
106106 * @todo Format data before send
107107 *
108- * @param mixed Response data
108+ * @param mixed $data Response data
109109 *
110110 * @return object self
111111 */
@@ -189,10 +189,10 @@ public function send()
189189 }
190190
191191 /**
192- * Common format funciton by format types. {FORMAT}Format()
192+ * Common format function by format types. {FORMAT}Format()
193193 *
194- * @param array Pre-handle array data
195- * @param string Format
194+ * @param array $data Pre-handle array data
195+ * @param string $format Format
196196 *
197197 * @return string Formatted data by specified formatter
198198 */
@@ -207,16 +207,16 @@ public function format($data, $format)
207207 $ data = $ this ->{$ formatFunc }($ data );
208208 } elseif (is_array ($ data )) {
209209 // Use JSON while the Formatter not found and the data is array
210- $ data = $ this -> formatJson ($ data );
210+ $ data = self :: formatJson ($ data );
211211 }
212212
213213 return $ data ;
214214 }
215215
216216 /**
217- * Common format funciton by format types. {FORMAT}Format()
217+ * Common format function by format types. {FORMAT}Format()
218218 *
219- * @param array Pre-handle array data
219+ * @param array $data Pre-handle array data
220220 *
221221 * @return string Formatted data
222222 */
@@ -228,10 +228,10 @@ public static function formatJson($data)
228228 /**
229229 * JSON output shortcut
230230 *
231- * @param array|mixed Callback data body, false will remove body key
232- * @param int Callback status code
231+ * @param array|mixed $data Callback data body, false will remove body key
232+ * @param int $statusCode Callback status code
233233 *
234- * @return string Response body data
234+ * @return string|void Response body data
235235 * @throws \Exception
236236 */
237237 public function json ($ data , $ statusCode = null )
@@ -241,7 +241,7 @@ public function json($data, $statusCode = null)
241241 $ this ->setStatusCode ($ statusCode );
242242 }
243243
244- $ this ->setFormat (Response ::FORMAT_JSON );
244+ $ this ->setFormat (self ::FORMAT_JSON );
245245
246246 if (!is_null ($ data )) {
247247 $ this ->setData ($ data );
0 commit comments