src/DataDefinition/ModelRelationship/ParentChildCondition.php
private function guardProviderNames($child, $parent = null)
    {
        if (null !== $child && $child->getProviderName() !== $this->destinationProvider) {
            throw new \InvalidArgumentException(
                \sprintf('provider name %s is not equal to %s', $child->getProviderName(), $this->destinationProvider)
            );
        }
        if (null !== $parent && $parent->getProviderName() !== $this->sourceProvider) {
            throw new \InvalidArgumentException(
                \sprintf('provider name %s is not equal to %s', $parent->getProviderName(), $this->sourceProvider)
            );
        }
    }
private function guardProviderNames($child, $parent = null)
    {
        if (null !== $child && $child->getProviderName() !== $this->destinationProvider) {
            throw new \InvalidArgumentException(
                \sprintf('provider name %s is not equal to %s', $child->getProviderName(), $this->destinationProvider)
            );
        }
        if (null !== $parent && $parent->getProviderName() !== $this->sourceProvider) {
            throw new \InvalidArgumentException(
                \sprintf('provider name %s is not equal to %s', $parent->getProviderName(), $this->sourceProvider)
            );
        }
    }
private function guardProviderNames ( $ child , $ parent = null ) { if ( null !== $ child && $ child -> getProviderName ( ) !== $ this -> destinationProvider ) { throw new \ InvalidArgumentException ( \ sprintf ( 'provider name %s is not equal to %s' , $ child -> getProviderName ( ) , $ this -> destinationProvider ) ) ; } if ( null !== $ parent && $ parent -> getProviderName ( ) !== $ this -> sourceProvider ) { throw new \ InvalidArgumentException ( \ sprintf ( 'provider name %s is not equal to %s' , $ parent -> getProviderName ( ) , $ this -> sourceProvider ) ) ; } }
Guard that the data provider names match.

@param ModelInterface|null $child  The child model.
@param ModelInterface|null $parent The parent model.

@return void

@throws \InvalidArgumentException When any provider name mismatches.
Guard that the data provider names match .