protected function hasUnmappedPartsBefore(array $parts, $index): bool
    {
        foreach ($parts as $k => $part) {
            if ($k === $index) {
                break;
            }

            if (!($part instanceof AbstractPart)) {
                return true;
            }
        }

        return false;
    }
protected function hasUnmappedPartsBefore(array $parts, $index): bool
    {
        foreach ($parts as $k => $part) {
            if ($k === $index) {
                break;
            }

            if (!($part instanceof AbstractPart)) {
                return true;
            }
        }

        return false;
    }
protected function hasUnmappedPartsBefore ( array $ parts , $ index ) : bool { foreach ( $ parts as $ k => $ part ) { if ( $ k === $ index ) { break ; } if ( ! ( $ part instanceof AbstractPart ) ) { return true ; } } return false ; }
checks if there are still unmapped parts left before the given position

@param array $parts
@param $index
@return bool
checks if there are still unmapped parts left before the given position