Skip to content

Commit

Permalink
修复
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurunsoft committed Oct 17, 2023
1 parent 588fce5 commit ce00e67
Show file tree
Hide file tree
Showing 7 changed files with 247 additions and 255 deletions.
2 changes: 1 addition & 1 deletion phpstan-components.neon
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
parameters:
level: 6

phpVersion: 80000
phpVersion: 80100

paths:
- src/Components
Expand Down
6 changes: 1 addition & 5 deletions src/Facade/Cli/FacadeGenerate.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,10 @@ public function generate(string $facadeClass, string $class, bool $request): voi
if (false !== $docComment && preg_match('/@return\s+([^\s]+)/', $docComment, $matches) > 0)
{
$class = $matches[1];
if ('self' === $class)
if ('self' === $class || 'static' === $class)
{
$returnType = '\\' . $method->getDeclaringClass()->getName();
}
elseif ('static' === $class)
{
$returnType = 'static';
}
elseif ('\\' === $class[0])
{
$returnType = $class;
Expand Down
6 changes: 1 addition & 5 deletions src/RequestContextProxy/Cli/RequestContextProxyGenerate.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,10 @@ public function generate(string $target, string $class, string $name, ?string $b
if (false !== $docComment && preg_match('/@return\s+([^\s]+)/', $docComment, $matches) > 0)
{
$class = $matches[1];
if ('self' === $class)
if ('self' === $class || 'static' === $class)
{
$returnType = '\\' . $method->getDeclaringClass()->getName();
}
elseif ('static' === $class)
{
$returnType = 'static';
}
elseif ('\\' === $class[0])
{
$returnType = $class;
Expand Down
220 changes: 110 additions & 110 deletions src/Server/Http/Message/Proxy/RequestProxy.php

Large diffs are not rendered by default.

220 changes: 110 additions & 110 deletions src/Server/Http/Message/Proxy/RequestProxyObject.php

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions src/Server/Http/Message/Proxy/ResponseProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@
* @method static static setTrailer(string $name, string $value)
* @method int getStatusCode()
* @method static int getStatusCode()
* @method static withStatus(int $code, string $reasonPhrase = '')
* @method static static withStatus(int $code, string $reasonPhrase = '')
* @method \Psr\Http\Message\ResponseInterface withStatus(int $code, string $reasonPhrase = '')
* @method static \Psr\Http\Message\ResponseInterface withStatus(int $code, string $reasonPhrase = '')
* @method string getReasonPhrase()
* @method static string getReasonPhrase()
* @method string getProtocolVersion()
* @method static string getProtocolVersion()
* @method static withProtocolVersion(string $version)
* @method static static withProtocolVersion(string $version)
* @method \Psr\Http\Message\MessageInterface withProtocolVersion(string $version)
* @method static \Psr\Http\Message\MessageInterface withProtocolVersion(string $version)
* @method string[][] getHeaders()
* @method static string[][] getHeaders()
* @method bool hasHeader(string $name)
Expand All @@ -64,16 +64,16 @@
* @method static string[] getHeader(string $name)
* @method string getHeaderLine(string $name)
* @method static string getHeaderLine(string $name)
* @method static withHeader(string $name, $value)
* @method static static withHeader(string $name, $value)
* @method static withAddedHeader(string $name, $value)
* @method static static withAddedHeader(string $name, $value)
* @method static withoutHeader(string $name)
* @method static static withoutHeader(string $name)
* @method \Psr\Http\Message\MessageInterface withHeader(string $name, $value)
* @method static \Psr\Http\Message\MessageInterface withHeader(string $name, $value)
* @method \Psr\Http\Message\MessageInterface withAddedHeader(string $name, $value)
* @method static \Psr\Http\Message\MessageInterface withAddedHeader(string $name, $value)
* @method \Psr\Http\Message\MessageInterface withoutHeader(string $name)
* @method static \Psr\Http\Message\MessageInterface withoutHeader(string $name)
* @method \Psr\Http\Message\StreamInterface getBody()
* @method static \Psr\Http\Message\StreamInterface getBody()
* @method static withBody(\Psr\Http\Message\StreamInterface $body)
* @method static static withBody(\Psr\Http\Message\StreamInterface $body)
* @method \Psr\Http\Message\MessageInterface withBody(\Psr\Http\Message\StreamInterface $body)
* @method static \Psr\Http\Message\MessageInterface withBody(\Psr\Http\Message\StreamInterface $body)
* @method static setProtocolVersion(string $version)
* @method static static setProtocolVersion(string $version)
* @method static setHeader(string $name, array|string $value)
Expand Down
24 changes: 12 additions & 12 deletions src/Server/Http/Message/Proxy/ResponseProxyObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@
* @method static static setTrailer(string $name, string $value)
* @method int getStatusCode()
* @method static int getStatusCode()
* @method static withStatus(int $code, string $reasonPhrase = '')
* @method static static withStatus(int $code, string $reasonPhrase = '')
* @method \Psr\Http\Message\ResponseInterface withStatus(int $code, string $reasonPhrase = '')
* @method static \Psr\Http\Message\ResponseInterface withStatus(int $code, string $reasonPhrase = '')
* @method string getReasonPhrase()
* @method static string getReasonPhrase()
* @method string getProtocolVersion()
* @method static string getProtocolVersion()
* @method static withProtocolVersion(string $version)
* @method static static withProtocolVersion(string $version)
* @method \Psr\Http\Message\MessageInterface withProtocolVersion(string $version)
* @method static \Psr\Http\Message\MessageInterface withProtocolVersion(string $version)
* @method string[][] getHeaders()
* @method static string[][] getHeaders()
* @method bool hasHeader(string $name)
Expand All @@ -67,16 +67,16 @@
* @method static string[] getHeader(string $name)
* @method string getHeaderLine(string $name)
* @method static string getHeaderLine(string $name)
* @method static withHeader(string $name, $value)
* @method static static withHeader(string $name, $value)
* @method static withAddedHeader(string $name, $value)
* @method static static withAddedHeader(string $name, $value)
* @method static withoutHeader(string $name)
* @method static static withoutHeader(string $name)
* @method \Psr\Http\Message\MessageInterface withHeader(string $name, $value)
* @method static \Psr\Http\Message\MessageInterface withHeader(string $name, $value)
* @method \Psr\Http\Message\MessageInterface withAddedHeader(string $name, $value)
* @method static \Psr\Http\Message\MessageInterface withAddedHeader(string $name, $value)
* @method \Psr\Http\Message\MessageInterface withoutHeader(string $name)
* @method static \Psr\Http\Message\MessageInterface withoutHeader(string $name)
* @method \Psr\Http\Message\StreamInterface getBody()
* @method static \Psr\Http\Message\StreamInterface getBody()
* @method static withBody(\Psr\Http\Message\StreamInterface $body)
* @method static static withBody(\Psr\Http\Message\StreamInterface $body)
* @method \Psr\Http\Message\MessageInterface withBody(\Psr\Http\Message\StreamInterface $body)
* @method static \Psr\Http\Message\MessageInterface withBody(\Psr\Http\Message\StreamInterface $body)
* @method static setProtocolVersion(string $version)
* @method static static setProtocolVersion(string $version)
* @method static setHeader(string $name, array|string $value)
Expand Down

0 comments on commit ce00e67

Please sign in to comment.