@@ -41,47 +41,39 @@ public function call(string $call, array $params = array()) : iterable|\ApiClien
4141 [$ method , $ path ] = explode (' ' , $ call );
4242 $ pathChunks = explode ('/ ' , $ path );
4343 $ pathChunksCount = count ($ pathChunks );
44- $ matched = false ;
4544 if ($ method === 'GET ' ) {
4645 if ($ pathChunksCount === 2 ) {
47- $ matched = true ;
4846 if (\array_key_exists (Router \Get \Two::class, $ this ->router ) == false ) {
4947 $ this ->router [Router \Get \Two::class] = new Router \Get \Two (browser: $ this ->browser , authentication: $ this ->authentication , requestSchemaValidator: $ this ->requestSchemaValidator , responseSchemaValidator: $ this ->responseSchemaValidator , hydrators: $ this ->hydrators );
5048 }
5149 return $ this ->router [Router \Get \Two::class]->call ($ call , $ params , $ pathChunks );
5250 } elseif ($ pathChunksCount === 3 ) {
53- $ matched = true ;
5451 if (\array_key_exists (Router \Get \Three::class, $ this ->router ) == false ) {
5552 $ this ->router [Router \Get \Three::class] = new Router \Get \Three (browser: $ this ->browser , authentication: $ this ->authentication , requestSchemaValidator: $ this ->requestSchemaValidator , responseSchemaValidator: $ this ->responseSchemaValidator , hydrators: $ this ->hydrators );
5653 }
5754 return $ this ->router [Router \Get \Three::class]->call ($ call , $ params , $ pathChunks );
5855 }
5956 } elseif ($ method === 'LIST ' ) {
6057 if ($ pathChunksCount === 2 ) {
61- $ matched = true ;
6258 if (\array_key_exists (Router \List \Two::class, $ this ->router ) == false ) {
6359 $ this ->router [Router \List \Two::class] = new Router \List \Two (browser: $ this ->browser , authentication: $ this ->authentication , requestSchemaValidator: $ this ->requestSchemaValidator , responseSchemaValidator: $ this ->responseSchemaValidator , hydrators: $ this ->hydrators );
6460 }
6561 return $ this ->router [Router \List \Two::class]->call ($ call , $ params , $ pathChunks );
6662 } elseif ($ pathChunksCount === 3 ) {
67- $ matched = true ;
6863 if (\array_key_exists (Router \List \Three::class, $ this ->router ) == false ) {
6964 $ this ->router [Router \List \Three::class] = new Router \List \Three (browser: $ this ->browser , authentication: $ this ->authentication , requestSchemaValidator: $ this ->requestSchemaValidator , responseSchemaValidator: $ this ->responseSchemaValidator , hydrators: $ this ->hydrators );
7065 }
7166 return $ this ->router [Router \List \Three::class]->call ($ call , $ params , $ pathChunks );
7267 }
7368 } elseif ($ method === 'POST ' ) {
7469 if ($ pathChunksCount === 2 ) {
75- $ matched = true ;
7670 if (\array_key_exists (Router \Post \Two::class, $ this ->router ) == false ) {
7771 $ this ->router [Router \Post \Two::class] = new Router \Post \Two (browser: $ this ->browser , authentication: $ this ->authentication , requestSchemaValidator: $ this ->requestSchemaValidator , responseSchemaValidator: $ this ->responseSchemaValidator , hydrators: $ this ->hydrators );
7872 }
7973 return $ this ->router [Router \Post \Two::class]->call ($ call , $ params , $ pathChunks );
8074 }
8175 }
82- if ($ matched === false ) {
83- throw new \InvalidArgumentException ();
84- }
76+ throw new \InvalidArgumentException ();
8577 }
8678 public function operations () : OperationsInterface
8779 {
0 commit comments