1111/**
1212 * @phpstan-type MetadataShape = array{
1313 * maxCrawlDepth: int,
14+ * numBlocked: int,
1415 * numFailed: int,
1516 * numSkipped: int,
1617 * numSucceeded: int,
@@ -25,6 +26,12 @@ final class Metadata implements BaseModel
2526 #[Required]
2627 public int $ maxCrawlDepth ;
2728
29+ /**
30+ * Number of crawled pages excluded because they were anti-bot challenges, error pages, or parked-domain placeholders.
31+ */
32+ #[Required]
33+ public int $ numBlocked ;
34+
2835 #[Required]
2936 public int $ numFailed ;
3037
@@ -44,6 +51,7 @@ final class Metadata implements BaseModel
4451 * ```
4552 * Metadata::with(
4653 * maxCrawlDepth: ...,
54+ * numBlocked: ...,
4755 * numFailed: ...,
4856 * numSkipped: ...,
4957 * numSucceeded: ...,
@@ -56,6 +64,7 @@ final class Metadata implements BaseModel
5664 * ```
5765 * (new Metadata)
5866 * ->withMaxCrawlDepth(...)
67+ * ->withNumBlocked(...)
5968 * ->withNumFailed(...)
6069 * ->withNumSkipped(...)
6170 * ->withNumSucceeded(...)
@@ -74,6 +83,7 @@ public function __construct()
7483 */
7584 public static function with (
7685 int $ maxCrawlDepth ,
86+ int $ numBlocked ,
7787 int $ numFailed ,
7888 int $ numSkipped ,
7989 int $ numSucceeded ,
@@ -82,6 +92,7 @@ public static function with(
8292 $ self = new self ;
8393
8494 $ self ['maxCrawlDepth ' ] = $ maxCrawlDepth ;
95+ $ self ['numBlocked ' ] = $ numBlocked ;
8596 $ self ['numFailed ' ] = $ numFailed ;
8697 $ self ['numSkipped ' ] = $ numSkipped ;
8798 $ self ['numSucceeded ' ] = $ numSucceeded ;
@@ -98,6 +109,17 @@ public function withMaxCrawlDepth(int $maxCrawlDepth): self
98109 return $ self ;
99110 }
100111
112+ /**
113+ * Number of crawled pages excluded because they were anti-bot challenges, error pages, or parked-domain placeholders.
114+ */
115+ public function withNumBlocked (int $ numBlocked ): self
116+ {
117+ $ self = clone $ this ;
118+ $ self ['numBlocked ' ] = $ numBlocked ;
119+
120+ return $ self ;
121+ }
122+
101123 public function withNumFailed (int $ numFailed ): self
102124 {
103125 $ self = clone $ this ;
0 commit comments