public function freeze(): void
    {
        $this->frozen = true;
        foreach ($this->data as $value) {
            if ($value instanceof self) {
                $value->freeze();
            }
        }
    }
public function freeze(): void
    {
        $this->frozen = true;
        foreach ($this->data as $value) {
            if ($value instanceof self) {
                $value->freeze();
            }
        }
    }
public function freeze ( ) : void { $ this -> frozen = true ; foreach ( $ this -> data as $ value ) { if ( $ value instanceof self ) { $ value -> freeze ( ) ; } } }
Freezes the container from further modification

@return void
Freezes the container from further modification