rules[] = $rule; } /** * @return MappingRule[] */ public function all(): array { return $this->rules; } }