@@ -371,12 +371,13 @@ public function process($data, Context $options, $path = '#', $result = null)
371371 ) {
372372 $ refString = $ data ->{self ::REF };
373373 // TODO consider process # by reference here ?
374- $ preRefScope = $ options ->refResolver ->getResolutionScope ();
374+ $ refResolver = $ options ->refResolver ;
375+ $ preRefScope = $ refResolver ->getResolutionScope ();
375376 /** @noinspection PhpUnusedLocalVariableInspection */
376- $ deferRefScope = new ScopeExit (function () use ($ preRefScope , $ options ) {
377- $ options -> refResolver ->setResolutionScope ($ preRefScope );
377+ $ deferRefScope = new ScopeExit (function () use ($ preRefScope , $ refResolver ) {
378+ $ refResolver ->setResolutionScope ($ preRefScope );
378379 });
379- $ ref = $ options -> refResolver ->resolveReference ($ refString );
380+ $ ref = $ refResolver ->resolveReference ($ refString );
380381 if ($ ref ->isImported ()) {
381382 $ refResult = $ ref ->getImported ();
382383 return $ refResult ;
@@ -597,27 +598,6 @@ public function setUseObjectAsArray($useObjectAsArray)
597598 return $ this ;
598599 }
599600
600- /**
601- * @param bool|Schema $additionalProperties
602- * @return Schema
603- */
604- public function setAdditionalProperties ($ additionalProperties )
605- {
606- $ this ->additionalProperties = $ additionalProperties ;
607- return $ this ;
608- }
609-
610- /**
611- * @param Schema|Schema[] $items
612- * @return Schema
613- */
614- public function setItems ($ items )
615- {
616- $ this ->items = $ items ;
617- return $ this ;
618- }
619-
620-
621601 private function fail (InvalidValue $ exception , $ path )
622602 {
623603 if ($ path !== '# ' ) {
@@ -676,13 +656,6 @@ public static function null()
676656 }
677657
678658
679- public static function create ()
680- {
681- $ schema = new static ();
682- return $ schema ;
683- }
684-
685-
686659 /**
687660 * @param Properties $properties
688661 * @return Schema
0 commit comments