mirror of
https://github.com/ambieco/scribe.git
synced 2026-01-13 08:40:53 +08:00
20 lines
418 B
PHP
20 lines
418 B
PHP
<?php
|
|
|
|
namespace Knuckles\Camel\Extraction;
|
|
|
|
use Knuckles\Camel\BaseDTOCollection;
|
|
|
|
/**
|
|
* @extends BaseDTOCollection<Response>
|
|
*/
|
|
class ResponseCollection extends BaseDTOCollection
|
|
{
|
|
public static string $base = Response::class;
|
|
|
|
public function hasSuccessResponse(): bool
|
|
{
|
|
return $this->first(
|
|
fn($response) => strval($response->status)[0] == '2'
|
|
) !== null;
|
|
}
|
|
} |