This commit is contained in:
2023-04-19 10:51:08 +08:00
parent d95e0709c9
commit a16bb3a19c
4 changed files with 4 additions and 25 deletions
-21
View File
@@ -1,21 +0,0 @@
<?php
declare(strict_types=1);
namespace Kiri\Router;
/**
*
*/
#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_CLASS)]
class Aspect
{
/**
* @param array|string $actions
*/
public function __construct(readonly public array|string $actions)
{
}
}
+1 -2
View File
@@ -29,9 +29,8 @@ class HttpResponseEmitter implements ResponseEmitter
/** /**
* @param Response $proxy * @param Response $proxy
* @param \Swoole\Http\Response $response * @param object $response
* @return void * @return void
* @throws Exception
*/ */
private function writeParams(ResponseInterface $proxy, object $response): void private function writeParams(ResponseInterface $proxy, object $response): void
{ {
+1 -1
View File
@@ -220,7 +220,7 @@ class Response implements ResponseInterface
/** /**
* Retrieves a comma-separated string of the values for a single header. * Retrieves a comma-separated string of the values for a single header.
* *
* This method returns all of the header values of the given * This method returns all the header values of the given
* case-insensitive header name as a string concatenated together using * case-insensitive header name as a string concatenated together using
* a comma. * a comma.
* *
+2 -1
View File
@@ -55,8 +55,9 @@ class RouterCollector implements \ArrayAccess, \IteratorAggregate
* @param array $method * @param array $method
* @param string $route * @param string $route
* @param string|array|Closure $closure * @param string|array|Closure $closure
* @throws ReflectionException
*/ */
public function addRoute(array $method, string $route, string|array|Closure $closure) public function addRoute(array $method, string $route, string|array|Closure $closure): void
{ {
try { try {
$route = $this->_splicing_routing($route); $route = $this->_splicing_routing($route);