/**
* Setup routes with a single request method:
*
* $app->get('/', App\Handler\HomePageHandler::class, 'home');
* $app->post('/album', App\Handler\AlbumCreateHandler::class, 'album.create');
* $app->put('/album/:id', App\Handler\AlbumUpdateHandler::class, 'album.put');
* $app->patch('/album/:id', App\Handler\AlbumUpdateHandler::class, 'album.patch');
* $app->delete('/album/:id', App\Handler\AlbumDeleteHandler::class, 'album.delete');
*
* Or with multiple request methods:
*
* $app->route('/contact', App\Handler\ContactHandler::class, ['GET', 'POST', ...], 'contact');
*/
**Expected behavior**
The `$app->get` method can allow array or string type for second parameter (`$middleware`).
But above method only allows the `array` type for `$middleware` parameter.
** Result behavior**
App\Application\Http\Handler\ApiPage
<?php
class ApiPage implements RequestHandlerInterface { }
<?php
class ApiPage implements RequestHandlerInterface
Expected type 'array'. Found 'string'.
[Tue Jan 19 19:27:41 2021] 127.0.0.1:54546 [500]: GET /api - Uncaught TypeError: Argument 2 passed to Antidot\Application\Http\WebServerApplication::get() must be of the type array, string given, called in /data/cloud-printer-api/router/routes.php on line 26 and defined in /data/cloud-printer-api/vendor/antidot-fw/framework/src/Application/Http/WebServerApplication.php:43
Stack trace:
#0 /data/cloud-printer-api/router/routes.php(26): Antidot\Application\Http\WebServerApplication->get()
#1 /data/cloud-printer-api/public/index.php(26): {closure}()
#2 /data/cloud-printer-api/public/index.php(28): {closure}()
#3 {main}
thrown in /data/cloud-printer-api/vendor/antidot-fw/framework/src/Application/Http/WebServerApplication.php on line 43