src/Franzose/ClosureTable/Models/Entity.php
protected function getNewRealDepth($ancestor)
    {
        if (!$ancestor instanceof EntityInterface) {
            if (is_null($ancestor)) {
                return 0;
            } else {
                return static::find($ancestor)->real_depth + 1;
            }
        } else {
            return $ancestor->real_depth + 1;
        }
    }
protected function getNewRealDepth($ancestor)
    {
        if (!$ancestor instanceof EntityInterface) {
            if (is_null($ancestor)) {
                return 0;
            } else {
                return static::find($ancestor)->real_depth + 1;
            }
        } else {
            return $ancestor->real_depth + 1;
        }
    }
protected function getNewRealDepth ( $ ancestor ) { if ( ! $ ancestor instanceof EntityInterface ) { if ( is_null ( $ ancestor ) ) { return 0 ; } else { return static :: find ( $ ancestor ) -> real_depth + 1 ; } } else { return $ ancestor -> real_depth + 1 ; } }
Gets real depth of the new ancestor of the model.

@param Entity|int|null $ancestor
@return int
Gets real depth of the new ancestor of the model .