| Total Complexity | 3 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | class IndexNowSubmitJob implements ShouldBeUnique, ShouldQueue |
||
| 16 | { |
||
| 17 | use Dispatchable; |
||
| 18 | use InteractsWithQueue; |
||
|
|
|||
| 19 | use Queueable; |
||
| 20 | use SerializesModels; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var string|string[] |
||
| 24 | */ |
||
| 25 | protected array|string $urls; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param string|string[] $urls |
||
| 29 | */ |
||
| 30 | 3 | public function __construct(array|string $urls) |
|
| 31 | { |
||
| 32 | 3 | $this->urls = $urls; |
|
| 33 | } |
||
| 34 | |||
| 35 | 1 | public function handle(): void |
|
| 36 | { |
||
| 37 | 1 | IndexNow::submit($this->urls); |
|
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * The unique ID of the job. |
||
| 42 | * |
||
| 43 | * @return string |
||
| 44 | */ |
||
| 45 | 2 | public function uniqueId() |
|
| 48 | } |
||
| 49 | } |
||
| 50 |