Parse COMPOUNDCURVE value

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

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

            $type = $this->readType();

            switch ($type) {
                case ($this->getDimensionedPrimitive(self::WKB_TYPE_LINESTRING)):
                    // no break
                case ($this->getDimensionedPrimitive(self::WKB_TYPE_CIRCULARSTRING)):
                    $value = $this->readPoints($this->readCount());
                    break;
                default:
                    throw new UnexpectedValueException($this->getBadTypeInTypeMessage($type, self::WKB_TYPE_COMPOUNDCURVE, array(self::WKB_TYPE_LINESTRING, self::WKB_TYPE_CIRCULARSTRING)));
            }

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

        return $values;
    }
23571
protected function convertValue()
    {
        $values = array();

        if (is_array($this->getValue())) {
            $values = array_map('intval', $this->getValue());
        } elseif ($this->getValue() != null) {
            $values[] = (int) $this->getValue();
        }

        return $values;
    }
718369
public function val() {
		if (isset($_POST[$this->paramName])) {
			$value = $_POST[$this->paramName];
			if (get_magic_quotes_gpc()==1)
			{
				// we check first for arrays
				if (is_array($value)){
					if (!array_walk_recursive($value, "stripslashes")) {
						throw new \Exception('<b>Error!</b> An error occured while walking GET array "'.$this->paramName.'".');
					}
						
					return $value;
				}
				
				return stripslashes($value);
			}
			else
			{
				return $value;
			}
		} else {
			if ($this->defaultValue instanceof ValueInterface) {
				return $this->defaultValue->val();
			} else {
				return $this->defaultValue;
			}
		}
	}
721407
private function parseDouble($data)
    {
        if (!isset($data[7])) {
            throw new UnexpectedValueException();
        }
        $unpacked = unpack('E', $data);

        return array_shift($unpacked);
    }
226192
public static function arrayValueParse(string $str) : array {
        $data = [];
        $tempArr = explode('|' , $str);
        foreach ($tempArr as $v){
            $dataArr = explode(':' , $v);
            $data[$dataArr[0]] = $dataArr[1];
        }
        return $data;
    }
241424
public function getDiagonalEigenvalues(): array
    {
        $D = [];

        for ($i = 0; $i < $this->n; ++$i) {
            $D[$i] = array_fill(0, $this->n, 0.0);
            $D[$i][$i] = $this->d[$i];
            if ($this->e[$i] == 0) {
                continue;
            }

            $o = $this->e[$i] > 0 ? $i + 1 : $i - 1;
            $D[$i][$o] = $this->e[$i];
        }

        return $D;
    }
1243385
public function parseFromArray()
    {
        parent::parseFromArray();

        $saved = $this->value;
        $this->value = round($this->value / 2);
        if ($saved % 2 === 1) {
            $this->value = -($this->value);
        }
    }
241111
public function get()
    {
        if ($this->date) {
            $result = $this->historical($this->date, $this->base, $this->targets);
        } else {
            $result = $this->latest($this->base, $this->targets);
        }

        // Ensure the result object is valid.
        if (!$result instanceof ResultContract) {
            throw new UnexpectedValueException('Invalid result type');
        }

        // Perform conversion if requested.
        if ($this->amount !== 1) {
            $converted = $result->rates;

            foreach ($converted as $key => $value) {
                $converted[$key] = round($this->amount * $value, 2);
            }

            // Attach converted values to results.
            $result->setConverted($converted);
        }

        return $result;
    }
841366
public function valuesInUnitInterval()
    {
        return [
            $this->hue() / 360,
            $this->saturation() / 100,
            (property_exists($this, 'lightness') ? $this->lightness() : $this->value()) / 100
        ];
    }
166133
public function getDatatypes() {
        if (empty($this->data)) {
            $this->data = $this->parse_string();
        }
        if (!is_array($this->data)) {
            throw new \UnexpectedValueException('No data set yet.');
        }

        $result = [];
        foreach ($this->titles as $cName) {
            $column = array_column($this->data, $cName);
            $cDatatypes = array_map(DatatypeEnum::class . '::getValidTypeFromSample', $column);

            $result[$cName] = $this->getMostFrequentDatatypeForColumn($cDatatypes);
        }

        $this->data_types = $result;

        return !empty($this->data_types) ? $this->data_types : [];
    }
255404
private function getIntStringFromValue($mix_val)
    {
        $int = null;
        $str = null;
        if($mix_val instanceof Value) {
            if($mix_val->hasIntegerValue()) {
                $int = $mix_val->getIntegerValue();
            } else {
                $str = $mix_val->getStringValue();
            }
        } else {
            if(is_numeric($mix_val)) {
                $int = $mix_val;
            } else {
                $str = $mix_val;
            }
        }
        return [$int, $str];
    }
1161310
public function asInteger(): Primitive\Integer
    {
        if (!$this->_element instanceof Primitive\Integer) {
            throw new \UnexpectedValueException(
                $this->_generateExceptionMessage(Element::TYPE_INTEGER));
        }
        return $this->_element;
    }
530492
public function getEdges()
    {
        $this->numEdges = count($this->graph->getVertices());
        if ($this->numEdges < 3) {
            throw new UnderflowException('Needs at least 3 vertices');
        }

        // numEdges 3-12 should work

        $this->bestWeight = $this->upperLimit;
        $this->startVertex = $this->getVertexStart();

        $result = $this->step($this->startVertex,
                              0,
                              array(),
                              array()
                  );

        if ($result === NULL) {
            throw new UnexpectedValueException('No resulting solution for TSP found');
        }

        return new Edges($result);
    }
1003447
private function parseField()
    {
        $type = $this->buffer[0];
        $this->buffer = substr($this->buffer, 1);

        // @todo bench switch vs if vs method map
        switch ($type) {
            case 's':
                return $this->parseSignedInt16();
            case 'l':
                return $this->parseSignedInt64();
            case 'x':
                return $this->parseByteArray();
            case 't':
                return $this->parseUnsignedInt8() !== 0;
            case 'b':
                return $this->parseSignedInt8();
            case 'I':
                return $this->parseSignedInt32();
            case 'f':
                return $this->parseFloat();
            case 'd':
                return $this->parseDouble();
            case 'D':
                return $this->parseDecimal();
            case 'S':
                return $this->parseLongString();
            case 'A':
                return $this->parseArray();
            case 'T':
                return $this->parseUnsignedInt64();
            case 'F':
                return $this->parseTable();
            case 'V':
                return null;
        }

        throw new AMQPProtocolException(
            sprintf(
                'table value type (0x%02x) is invalid or unrecognised.',
                ord($type)
            )
        );
    }
438066
public function str($value)
    {
        if (is_array($value)) {
            $allScalar = function ($a, $b) {
                return $a && is_scalar($b);
            };
            if (!array_reduce($value, $allScalar, true)) {
                throw new UnexpectedValueException("Unexpected complex type " . Util::toPhp($value));
            }
            return join(' ', $value);
        }
        return (string)$value;
    }
192725
protected function parseValue($value){
		switch( true ){
			case ($value === 'false' || $value === 'true'):
				return  ( $value === 'true' ) ? true : false ;
			
			case ctype_digit($value):
				return (int) $value; 

			case is_float($value):
				return (float) $value;

			default:
				return $value;
		}
	}
530797
public function getRawValues()
    {
        $values = array();
        foreach ($this->_inputs as $name => $input) {
            /** @var Input $input */
            $values[$name] = call_user_func_array(
                [$input, 'getRawValue'],
                [$name]
            );
        }
        return $values;
    }