I'm using a micro framework, generated by the command line tools, and want to (as a proof of concept) use functional programming.
I have a file (app/Library/Responses/JsonResponse.php - namespace OfficeApi\Library\Responses) with a function (json _ response) inside it. In app.php i've added the appropriate use statement:
use function OfficeApi\Library\Responses\json_response;
but when I try to call json _ response if get the following:
Fatal error: Uncaught Error: Call to undefined function OfficeApi\Library\Responses\json_response() in /Users/.../office-api-micro/app/app.php on line 18
Can anyone help me?