From f155c6b9ab2eded20cba6b77b5e737929b26193b Mon Sep 17 00:00:00 2001 From: Javier Lorenzana Date: Sat, 22 Nov 2014 00:49:05 -0300 Subject: [PATCH] The method should be static. --- JsonApi/Request/BodyParser.php | 1 + Util/ArrayHelper.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/JsonApi/Request/BodyParser.php b/JsonApi/Request/BodyParser.php index 3b3b3b3..82ee97e 100644 --- a/JsonApi/Request/BodyParser.php +++ b/JsonApi/Request/BodyParser.php @@ -62,6 +62,7 @@ public function __construct( */ public function parse(Request $request, Params $params) { + // @todo Use $params->action!! switch ($request->getMethod()) { case Parser::HTTP_POST: $data = $this->createBodyParser->parse($request, $params); diff --git a/Util/ArrayHelper.php b/Util/ArrayHelper.php index 3683ccb..8b6f9db 100644 --- a/Util/ArrayHelper.php +++ b/Util/ArrayHelper.php @@ -15,7 +15,7 @@ class ArrayHelper * @todo Move to helper in utils. * @see http://stackoverflow.com/a/173479 */ - public function isAssociative(array $array) + public static function isAssociative(array $array) { return array_keys($array) !== range(0, count($array) - 1); }