protected function isType(AbstractPart $part, string $type, bool $strict = false): bool
    {
        $className = sprintf('%s\\%s', self::PARTS_NAMESPACE, $type);

        if ($strict) {
            return get_class($part) === $className;
        }

        return is_a($part, $className);
    }
protected function isType(AbstractPart $part, string $type, bool $strict = false): bool
    {
        $className = sprintf('%s\\%s', self::PARTS_NAMESPACE, $type);

        if ($strict) {
            return get_class($part) === $className;
        }

        return is_a($part, $className);
    }
protected function isType ( AbstractPart $ part , string $ type , bool $ strict = false ) : bool { $ className = sprintf ( '%s\\%s' , self :: PARTS_NAMESPACE , $ type ) ; if ( $ strict ) { return get_class ( $ part ) === $ className ; } return is_a ( $ part , $ className ) ; }
helper method to check if a part is of the given type

@param AbstractPart $part
@param string $type
@param bool $strict
@return bool
helper method to check if a part is of the given type