@@ -65,11 +65,17 @@ |
||
| 65 | 65 | } |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | + /** |
|
| 69 | + * @param string $method |
|
| 70 | + */ |
|
| 68 | 71 | private function isMagicMethod($method) |
| 69 | 72 | { |
| 70 | 73 | return in_array($method, ['__sleep', '__wakeup', 'offsetGet', 'offsetSet', 'offsetExists', 'offsetUnset', 'count', 'ksort', 'asort', 'jsonSerialize'], true); |
| 71 | 74 | } |
| 72 | 75 | |
| 76 | + /** |
|
| 77 | + * @param string $method |
|
| 78 | + */ |
|
| 73 | 79 | private function saveNamedParam(NamedParameterInterface $namedParameter, $instance, $method) |
| 74 | 80 | { |
| 75 | 81 | // named parameter |
@@ -73,7 +73,7 @@ |
||
| 73 | 73 | private function saveNamedParam(NamedParameterInterface $namedParameter, $instance, $method) |
| 74 | 74 | { |
| 75 | 75 | // named parameter |
| 76 | - if (! in_array($method, ['onGet', 'onPost', 'onPut', 'onPatch', 'onDelete', 'onHead'], true)) { |
|
| 76 | + if (!in_array($method, ['onGet', 'onPost', 'onPut', 'onPatch', 'onDelete', 'onHead'], true)) { |
|
| 77 | 77 | return; |
| 78 | 78 | } |
| 79 | 79 | try { |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | */ |
| 31 | 31 | public function __construct(AbstractAppMeta $appMeta, $namespace) |
| 32 | 32 | { |
| 33 | - $this->cacheDir = $appMeta->tmpDir . '/cache'; |
|
| 33 | + $this->cacheDir = $appMeta->tmpDir.'/cache'; |
|
| 34 | 34 | $this->namespace = $namespace; |
| 35 | 35 | } |
| 36 | 36 | |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | { |
| 62 | 62 | $isCacheable = is_int(strpos($contexts, 'prod-')) || is_int(strpos($contexts, 'stage-')); |
| 63 | 63 | $cache = $cache ?: ($isCacheable ? new ChainCache([new ApcuCache, new FilesystemCache($appMeta->tmpDir)]) : new VoidCache); |
| 64 | - $appId = $appMeta->name . $contexts . filemtime($appMeta->appDir . '/src'); |
|
| 64 | + $appId = $appMeta->name.$contexts.filemtime($appMeta->appDir.'/src'); |
|
| 65 | 65 | list($app) = $cache->fetch($appId); // $scriptInjector set cached single instance in wakeup |
| 66 | 66 | if ($app && $app instanceof AbstractApp) { |
| 67 | 67 | return $app; |