Proje dosyaları eklendi
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Serp\Data;
|
||||
|
||||
final readonly class SerpTaskResult
|
||||
{
|
||||
private function __construct(public bool $ready, public ?SerpResponse $response, public ?float $cost, public string $currency, public ?int $statusCode) {}
|
||||
|
||||
public static function waiting(?int $statusCode = null): self
|
||||
{
|
||||
return new self(false, null, null, 'USD', $statusCode);
|
||||
}
|
||||
|
||||
public static function ready(SerpResponse $response, ?float $cost = null, string $currency = 'USD', ?int $statusCode = null): self
|
||||
{
|
||||
return new self(true, $response, $cost, $currency, $statusCode);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user