@@ -72,7 +72,7 @@ public function __construct(String $prefix, String $config)
7272 $ this ->memcache ->addServer ($ address , $ port );
7373 }
7474
75- protected function create (): object
75+ protected function create (): stdClass
7676 {
7777 return new \Memcache ();
7878 }
@@ -97,7 +97,7 @@ public function clear(): bool
9797
9898class MemcachedCache extends MemcacheCache
9999{
100- protected function create (): object
100+ protected function create (): stdClass
101101 {
102102 return new \Memcached ();
103103 }
@@ -2014,7 +2014,7 @@ public function getColumnType(ReflectedColumn $column, bool $update): String
20142014 if ($ this ->driver == 'pgsql ' && !$ update && $ column ->getPk () && $ this ->canAutoIncrement ($ column )) {
20152015 return 'serial ' ;
20162016 }
2017- $ type = $ this ->typeConverter ->fromJdbc ($ column ->getType (), $ column -> getPk () );
2017+ $ type = $ this ->typeConverter ->fromJdbc ($ column ->getType ());
20182018 if ($ column ->hasPrecision () && $ column ->hasScale ()) {
20192019 $ size = '( ' . $ column ->getPrecision () . ', ' . $ column ->getScale () . ') ' ;
20202020 } else if ($ column ->hasPrecision ()) {
@@ -2739,7 +2739,8 @@ class SimpleRouter implements Router
27392739 private $ ttl ;
27402740 private $ registration ;
27412741 private $ routes ;
2742- private $ midlewares ;
2742+ private $ routeHandlers ;
2743+ private $ middlewares ;
27432744
27442745 public function __construct (Responder $ responder , Cache $ cache , int $ ttl )
27452746 {
@@ -3276,18 +3277,17 @@ private function set(String $path, String $value) /*: void*/
32763277 $ current = $ value ;
32773278 }
32783279
3279- public function setPaths (DatabaseDefinition $ database ) /*: void*/
3280+ public function setPaths (ReflectedDatabase $ database ) /*: void*/
32803281 {
3281- $ result = [];
3282- foreach ($ database ->getTables () as $ table ) {
3283- $ path = sprintf ('/records/%s ' , $ table ->getName ());
3282+ foreach ($ database ->getTableNames () as $ tableName ) {
3283+ $ path = sprintf ('/records/%s ' , $ tableName );
32843284 foreach (['get ' , 'post ' , 'put ' , 'patch ' , 'delete ' ] as $ method ) {
32853285 $ this ->set ("/paths/ $ path/ $ method/description " , "$ method operation " );
32863286 }
32873287 }
32883288 }
32893289
3290- private function fillParametersWithPrimaryKey (String $ method , TableDefinition $ table ) /*: void*/
3290+ private function fillParametersWithPrimaryKey (String $ method , ReflectedTable $ table ) /*: void*/
32913291 {
32923292 if ($ table ->getPk () != null ) {
32933293 $ pathWithId = sprintf ('/records/%s/{%s} ' , $ table ->getName (), $ table ->getPk ()->getName ());
@@ -4231,7 +4231,6 @@ private function getFkEmptyValues(ReflectedTable $t1, ReflectedTable $t2, array
42314231
42324232 private function addFkRecords (ReflectedTable $ t2 , array $ fkValues , array $ params , GenericDB $ db , array &$ records ) /*: void*/
42334233 {
4234- $ pk = $ t2 ->getPk ();
42354234 $ columnNames = $ this ->columns ->getNames ($ t2 , false , $ params );
42364235 $ fkIds = array_keys ($ fkValues );
42374236
0 commit comments