@@ -36,7 +36,7 @@ public function __construct(
3636 * @throws InvariantViolation
3737 * @throws SerializationError
3838 */
39- public function isValidated (Schema $ schema , DocumentNode $ ast , array $ rules = null ): bool
39+ public function isValidated (Schema $ schema , DocumentNode $ ast , ? array $ rules = null ): bool
4040 {
4141 $ key = $ this ->buildKey ($ schema , $ ast );
4242
@@ -52,7 +52,7 @@ public function isValidated(Schema $schema, DocumentNode $ast, array $rules = nu
5252 * @throws InvariantViolation
5353 * @throws SerializationError
5454 */
55- public function markValidated (Schema $ schema , DocumentNode $ ast , array $ rules = null ): void
55+ public function markValidated (Schema $ schema , DocumentNode $ ast , ? array $ rules = null ): void
5656 {
5757 $ key = $ this ->buildKey ($ schema , $ ast );
5858
@@ -67,7 +67,7 @@ public function markValidated(Schema $schema, DocumentNode $ast, array $rules =
6767 * @throws InvariantViolation
6868 * @throws SerializationError
6969 */
70- private function buildKey (Schema $ schema , DocumentNode $ ast , array $ rules = null ): string
70+ private function buildKey (Schema $ schema , DocumentNode $ ast , ? array $ rules = null ): string
7171 {
7272 /**
7373 * This default strategy generates a cache key by hashing the printed schema and AST.
@@ -78,6 +78,6 @@ private function buildKey(Schema $schema, DocumentNode $ast, array $rules = null
7878 $ astHash = md5 (serialize ($ ast ));
7979 $ rulesHash = md5 (serialize ($ rules ));
8080
81- return "graphql_validation_ {$ schemaHash }_ {$ astHash }_ $ rulesHash " ;
81+ return "graphql_validation_ {$ schemaHash }_ {$ astHash }_ { $ rulesHash} " ;
8282 }
8383}
0 commit comments