style: lint

Signed-off-by: 李东云 <dongyu.li@luxcreo.ai>
This commit is contained in:
李东云
2023-12-18 15:58:52 +08:00
parent f2f7e67d0e
commit 9d2e4ca9f8
2 changed files with 12 additions and 5 deletions

View File

@@ -22,4 +22,5 @@ parameters:
- '#Call to an undefined method Hyperf\\Database\\Query\\Builder::firstOrFail\(\).#' - '#Call to an undefined method Hyperf\\Database\\Query\\Builder::firstOrFail\(\).#'
- '#Call to an undefined method Hyperf\\Contract\\SessionInterface::isValidId\(\).#' - '#Call to an undefined method Hyperf\\Contract\\SessionInterface::isValidId\(\).#'
- '#Call to an undefined method LightSaml\\Model\\Protocol\\SamlMessage::setInResponseTo\(\).#' - '#Call to an undefined method LightSaml\\Model\\Protocol\\SamlMessage::setInResponseTo\(\).#'
- '#Class App\\Constants\\ErrorCode not found.#' - '#Class App\\Constants\\ErrorCode not found.#'
- '#Undefined variable: \$this#'

View File

@@ -12,12 +12,12 @@ declare(strict_types=1);
namespace Tests; namespace Tests;
use function Hyperf\Config\config;
use Hyperf\Testing\Client; use Hyperf\Testing\Client;
use Lmc\HttpConstants\Header; use Lmc\HttpConstants\Header;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Singularity\HDK\Core\Enumerations\Http\Header\RFCs\RFC7617; use Singularity\HDK\Core\Enumerations\Http\Header\RFCs\RFC7617;
use function Hyperf\Config\config;
use function Hyperf\Support\make; use function Hyperf\Support\make;
/** /**
@@ -35,13 +35,19 @@ abstract class HttpTestCase extends TestCase
{ {
protected Client $client; protected Client $client;
public function __construct($name = null, array $data = [], $dataName = '') public function __construct(?string $name = null)
{ {
parent::__construct($name, $data, $dataName); parent::__construct($name);
$this->client = make(Client::class); $this->client = make(Client::class);
} }
public function __call($name, $arguments) /**
* @param string $name
* @param array<int, mixed> $arguments
*
* @return array<string, mixed>
*/
public function __call(string $name, array $arguments): array
{ {
$uri = $arguments[0]; $uri = $arguments[0];
$data = $arguments[1] ?? []; $data = $arguments[1] ?? [];