src/ImmutabilityBehaviour.php
final protected function checkImmutability(): void
    {
        $this->checkCallConstraints();

        $class = static::class;

        if (isset(static::$immutabilityCheckMap[$class])) {
            return;
        }

        $this->checkPropertiesAccessibility();
        $this->checkMethodsAccessibility();

        static::$immutabilityCheckMap[$class] = true;
    }
final protected function checkImmutability(): void
    {
        $this->checkCallConstraints();

        $class = static::class;

        if (isset(static::$immutabilityCheckMap[$class])) {
            return;
        }

        $this->checkPropertiesAccessibility();
        $this->checkMethodsAccessibility();

        static::$immutabilityCheckMap[$class] = true;
    }
final protected function checkImmutability ( ) : void { $ this -> checkCallConstraints ( ) ; $ class = static :: class ; if ( isset ( static :: $ immutabilityCheckMap [ $ class ] ) ) { return ; } $ this -> checkPropertiesAccessibility ( ) ; $ this -> checkMethodsAccessibility ( ) ; static :: $ immutabilityCheckMap [ $ class ] = true ; }
Check immutability.

@throws ImmutabilityViolationException
Check immutability .