logger->warning('Method ' . $request->getMethod() . ' is not valid for ' . $request->getUri()->getPath()); return $c['response'] ->withHeader('Allow', \implode(', ', $methods)) ->withJson(array('error' => 'Method ' . $request->getMethod() . ' is not valid use on of ' . implode(', ', $methods)), 405); }; } }