Parse MULTISURFACE value

@return array
@throws UnexpectedValueException
491318
private function multiSurface()
    {
        $values = array();
        $count  = $this->readCount();

        for ($i = 0; $i < $count; $i++) {
            $this->readByteOrder();

            $type = $this->readType();

            switch ($type) {
                case ($this->getDimensionedPrimitive(self::WKB_TYPE_POLYGON)):
                    $value = $this->polygon();
                    break;
                case ($this->getDimensionedPrimitive(self::WKB_TYPE_CURVEPOLYGON)):
                    $value = $this->curvePolygon();
                    break;
                default:
                    throw new UnexpectedValueException($this->getBadTypeInTypeMessage($type, self::WKB_TYPE_MULTISURFACE, array(self::WKB_TYPE_POLYGON, self::WKB_TYPE_CURVEPOLYGON)));
            }

            $values[] = array(
                'type'  => $this->getTypeName($type),
                'value' => $value,
            );
        }

        return $values;
    }
1051290
public function getModel()
    {
        if(!$this->_model instanceof ModelInterface)
        {
            $this->_model = $this->getObject($this->_model);

            if(!$this->_model instanceof ModelInterface)
            {
                throw new \UnexpectedValueException(
                    'Model: '.get_class($this->_model).' does not implement ModelInterface'
                );
            }

            //Inject the request into the model state
            $this->_model->setState($this->getRequest()->query->toArray());
        }

        return $this->_model;
    }
1242095
private function getValues()
    {
        $tokens = array();

        // check if a value list is given
        if ($this->lexer->isNextToken(DocLexer::T_OPEN_PARENTHESIS)) {
            $this->match(DocLexer::T_OPEN_PARENTHESIS);

            $tokens[] = array(DocLexer::T_OPEN_PARENTHESIS);

            // skip if we are given an empty list: @example()
            if ($this->lexer->isNextToken(DocLexer::T_CLOSE_PARENTHESIS)) {
                $this->match(DocLexer::T_CLOSE_PARENTHESIS);

                $tokens[] = array(DocLexer::T_CLOSE_PARENTHESIS);

                return $tokens;
            }

            // skip if no list is given
        } else {
            return $tokens;
        }

        // collect the first value
        $tokens = array_merge($tokens, $this->getValue());

        // check for comma separated values and collect those too
        while ($this->lexer->isNextToken(DocLexer::T_COMMA)) {
            $this->match(DocLexer::T_COMMA);

            $tokens[] = array(DocLexer::T_COMMA);

            $token = $this->lexer->lookahead;
            $value = $this->getValue();

            // no multiple trailing commas
            if (empty($value)) {
                throw SyntaxException::expectedToken('Value', $token);
            }

            $tokens = array_merge($tokens, $value);
        }

        // end the list
        $this->match(DocLexer::T_CLOSE_PARENTHESIS);

        $tokens[] = array(DocLexer::T_CLOSE_PARENTHESIS);

        return $tokens;
    }
1246043
public function toMappedArray()
    {
        $values = $this->toArray();
        $mappedValues = [];
        foreach ($values as $key => $value) {
            $mappedValues[$key] = $this->readMapped($key);
        }

        return $mappedValues;
    }
1110940
public function getUser()
    {
        if(!$this->_user instanceof UserInterface)
        {
            $this->_user = $this->getObject('user', ObjectConfig::unbox($this->_user));

            if(!$this->_user instanceof UserInterface)
            {
                throw new \UnexpectedValueException(
                    'User: '.get_class($this->_user).' does not implement UserInterface'
                );
            }
        }

        return $this->_user;
    }
712139
public function getServerInstance()
    {
        if (null === $this->serverUrl) {
            throw new \UnexpectedValueException('Server URL must be set');
        }

        $match = preg_match(
            '/https:\/\/(?<instance>.+)\.salesforce\.com/',
            $this->serverUrl,
            $matches
        );

        if (!$match || !isset($matches['instance'])) {
            throw new \RuntimeException('Server instance could not be determined');
        }

        return $matches['instance'];
    }
1289737
public function getValueList()
    {

        //$list = $this->valueList;
        $list=[];
        if (isset($_POST[$this->requestName])) {
            foreach ($_POST[$this->requestName] as $value) {
                $list[] = trim($value);
            }
        }

        return $list;

    }
919213
public function val() {
		if ($this->key instanceof ScalarValueInterface) {
			$key = $this->key->val();
		} else {
			$key = $this->key;
		}
		if ($this->array instanceof ArrayValueInterface) {
			$array = $this->array->val();
		} else {
			$array = $this->array;
		}
		
		if (isset($array[$key])) {
			return $array[$key];
		} else {
			if ($this->defaultValue instanceof ValueInterface) {
				return $this->defaultValue->val();
			} else {
				return $this->defaultValue;
			}
		}
	}
410146
public function getCachedIssues()
    {
        $cache_directory = $this->config->getCacheDirectory();

        if (!$cache_directory) {
            return null;
        }

        $issues_cache_location = $cache_directory . DIRECTORY_SEPARATOR . self::ISSUES_CACHE_NAME;

        if (!is_readable($issues_cache_location)) {
            return null;
        }

        $issues_cache = unserialize((string) file_get_contents($issues_cache_location));

        if (!is_array($issues_cache)) {
            throw new \UnexpectedValueException('The reference cache must be an array');
        }

        return $issues_cache;
    }
587625
private function polyhedralSurface()
    {
        $values = array();
        $count  = $this->readCount();

        for ($i = 0; $i < $count; $i++) {
            $this->readByteOrder();

            $type = $this->readType();

            switch ($type) {
                case ($this->getDimensionedPrimitive(self::WKB_TYPE_POLYGON)):
                    $value = $this->polygon();
                    break;
                // is polygon the only one?
                default:
                    throw new UnexpectedValueException($this->getBadTypeInTypeMessage($type, self::WKB_TYPE_POLYHEDRALSURFACE, array(self::WKB_TYPE_POLYGON)));
            }

            $values[] = array(
                'type'  => $this->getTypeName($type),
                'value' => $value,
            );
        }

        return $values;
    }
1304273
public function peek()
    {
        $c = count($this->stack);
        if ($c == 0) {
            throw new \UnexpectedValueException("The stack is empty. You should probably peek() before the last end() call.");
        }
        $ret = $this->stack[$c -1];
        return $ret;
    }
785487
protected function getSubmittedFormValues()
    {
        $result = [];
        $formName = $this->getFormObject()->getName();
        $originalRequest = $this->getControllerContext()
            ->getRequest()
            ->getOriginalRequest();

        if (null !== $originalRequest
            && $originalRequest->hasArgument($formName)
        ) {
            $result = $originalRequest->getArgument($formName);
        }

        return $result;
    }
350471
function getValues()
    {
        $values = $this->getValue();
        $v = is_array($values)? $values : [$values];
        $r = [];
        foreach ($v as $name => $value){
            $r[$name] = new Values($value);
        }
        return $r;
    }
1349239
public function getUser()
    {
        if(!$this->_user instanceof KUserInterface)
        {
            $this->_user = $this->getObject($this->_user, array(
                'request' => $this->getRequest(),
            ));

            if(!$this->_user instanceof KUserInterface)
            {
                throw new UnexpectedValueException(
                    'User: '.get_class($this->_user).' does not implement KUserInterface'
                );
            }
        }

        return $this->_user;
    }
187095
protected function getValueTags(): CollectionInterface
    {
        return $this->tagsManager->findMultiple(['values' => \is_array($this->varValue) ? $this->varValue : []]);
    }
779085
public function parse() : array
    {
        $fileLines = $this->getFileLines();

        $data = [];

        $currentSection  = '';
        $currentDivision = '';

        for ($line = 0, $count = count($fileLines); $line < $count; ++$line) {
            $currentLine       = ($fileLines[$line]);
            $currentLineLength = mb_strlen($currentLine);

            if (0 === $currentLineLength) {
                continue;
            }

            if (';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;' === mb_substr($currentLine, 0, 40)) {
                $currentDivision = trim(mb_substr($currentLine, 41));

                continue;
            }

            // We only skip comments that *start* with semicolon
            if (';' === $currentLine[0]) {
                continue;
            }

            if ('[' === $currentLine[0]) {
                $currentSection = mb_substr($currentLine, 1, ($currentLineLength - 2));

                continue;
            }

            $bits = explode('=', $currentLine);

            if (2 < count($bits)) {
                throw new \RuntimeException("Too many equals in line: {$currentLine}, in Division: {$currentDivision}");
            }

            if (2 > count($bits)) {
                $bits[1] = '';
            }

            $data[$currentSection][$bits[0]]   = $bits[1];
            $data[$currentSection]['Division'] = $currentDivision;
        }

        if ($this->shouldSort()) {
            $data = $this->sortArrayAndChildArrays($data);
        }

        $this->data = $data;

        return $data;
    }
366135
public function getJsonValue()
    {
        // Structured text values should always be returned as a single
        // array-item. Multi-value text should be returned as multiple items in
        // the top-array.
        if (in_array($this->name, $this->structuredValues)) {
            return [$this->getParts()];
        }

        return $this->getParts();
    }