src/mako/http/request/Body.php
protected function parseBody($rawBody, $contentType): array
	{
		if($contentType === 'application/x-www-form-urlencoded')
		{
			$parsed = [];

			parse_str($rawBody, $parsed);

			return $parsed;
		}
		elseif($contentType === 'application/json' || $contentType === 'text/json' || strpos($contentType, '+json') !== false)
		{
			return json_decode($rawBody, true) ?? [];
		}

		return [];
	}
protected function parseBody($rawBody, $contentType): array
	{
		if($contentType === 'application/x-www-form-urlencoded')
		{
			$parsed = [];

			parse_str($rawBody, $parsed);

			return $parsed;
		}
		elseif($contentType === 'application/json' || $contentType === 'text/json' || strpos($contentType, '+json') !== false)
		{
			return json_decode($rawBody, true) ?? [];
		}

		return [];
	}
protected function parseBody ( $ rawBody , $ contentType ) : array { if ( $ contentType === 'application/x-www-form-urlencoded' ) { $ parsed = [ ] ; parse_str ( $ rawBody , $ parsed ) ; return $ parsed ; } elseif ( $ contentType === 'application/json' || $ contentType === 'text/json' || strpos ( $ contentType , '+json' ) !== false ) { return json_decode ( $ rawBody , true ) ?? [ ] ; } return [ ] ; }
Converts the request body into an associative array.

@param  string $rawBody     Raw request body
@param  string $contentType Content type
@return array
Converts the request body into an associative array .