private function validateFieldsExistence(ObjectDefinition $object, InterfaceDefinition $interface): void
    {
        foreach ($interface->getFields() as $field) {
            $this->getCallStack()->push($field);

            $exists = $object->hasField($field->getName());

            if (! $exists) {
                $this->throwFieldNotDefined($interface, $object, $field);
            }

            $this->validateFieldCompatibility($field, $object->getField($field->getName()));

            $this->getCallStack()->pop();
        }
    }
private function validateFieldsExistence(ObjectDefinition $object, InterfaceDefinition $interface): void
    {
        foreach ($interface->getFields() as $field) {
            $this->getCallStack()->push($field);

            $exists = $object->hasField($field->getName());

            if (! $exists) {
                $this->throwFieldNotDefined($interface, $object, $field);
            }

            $this->validateFieldCompatibility($field, $object->getField($field->getName()));

            $this->getCallStack()->pop();
        }
    }
private function validateFieldsExistence ( ObjectDefinition $ object , InterfaceDefinition $ interface ) : void { foreach ( $ interface -> getFields ( ) as $ field ) { $ this -> getCallStack ( ) -> push ( $ field ) ; $ exists = $ object -> hasField ( $ field -> getName ( ) ) ; if ( ! $ exists ) { $ this -> throwFieldNotDefined ( $ interface , $ object , $ field ) ; } $ this -> validateFieldCompatibility ( $ field , $ object -> getField ( $ field -> getName ( ) ) ) ; $ this -> getCallStack ( ) -> pop ( ) ; } }
Make sure that all the interface fields are implemented.

@param InterfaceDefinition $interface
@param ObjectDefinition $object
@return void
@throws \OutOfBoundsException
@throws \Railt\Component\SDL\Exceptions\TypeConflictException
Make sure that all the interface fields are implemented .