From 46fbc39788c53ecc7fd24dc8effec680c8631033 Mon Sep 17 00:00:00 2001 From: Guillermo Dev Date: Tue, 9 Oct 2018 00:08:59 +0200 Subject: [PATCH] formatter hardcoded not inferred from header --- Lib/Formatter/Formatter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/Formatter/Formatter.php b/Lib/Formatter/Formatter.php index 1ab2b30..bced18d 100644 --- a/Lib/Formatter/Formatter.php +++ b/Lib/Formatter/Formatter.php @@ -48,6 +48,7 @@ abstract class Formatter { * @return string The class name to instantiate in accord to the Accept header */ private static function getFormatFromHeader() { + //TODO this is ugly return 'BSR\Lib\Formatter\Json'; if(isset($_SERVER['HTTP_ACCEPT'])) { $formats = array_map(function($f) { @@ -74,4 +75,4 @@ abstract class Formatter { * @param array $data */ abstract public function render($data); -} \ No newline at end of file +}