sanitizers = $sanitizers; } /** * Run the Meta through the collection of sanitizers. * * @param Meta $meta The Meta object. * * @return Meta The sanitized Meta object. */ public function sanitize( Meta $meta ): Meta { return array_reduce( $this->sanitizers, static fn( Meta $carry, Sanitizer $sanitizer ) => $sanitizer->sanitize( $carry ), $meta ); } /** * The number of sanitizers in the collection. * * @return int */ public function count(): int { return count( $this->sanitizers ); } }