src/Braincrafted/ArrayQuery/ArrayQuery.php
protected function evaluateSelect(array $item, $scalar)
    {
        $resultItem = [];
        foreach ($item as $key => $value) {
            if (true === isset($this->select['*']) || true === isset($this->select[$key])) {
                if (true === isset($this->select[$key])) {
                    $value = $this->selectEvaluation->evaluate($value, $this->select[$key]);
                }
                if (true === $scalar) {
                    $resultItem = $value;
                } else {
                    $resultItem[$key] = $value;
                }
            }
        }

        return $resultItem;
    }
protected function evaluateSelect(array $item, $scalar)
    {
        $resultItem = [];
        foreach ($item as $key => $value) {
            if (true === isset($this->select['*']) || true === isset($this->select[$key])) {
                if (true === isset($this->select[$key])) {
                    $value = $this->selectEvaluation->evaluate($value, $this->select[$key]);
                }
                if (true === $scalar) {
                    $resultItem = $value;
                } else {
                    $resultItem[$key] = $value;
                }
            }
        }

        return $resultItem;
    }
protected function evaluateSelect ( array $ item , $ scalar ) { $ resultItem = [ ] ; foreach ( $ item as $ key => $ value ) { if ( true === isset ( $ this -> select [ '*' ] ) || true === isset ( $ this -> select [ $ key ] ) ) { if ( true === isset ( $ this -> select [ $ key ] ) ) { $ value = $ this -> selectEvaluation -> evaluate ( $ value , $ this -> select [ $ key ] ) ; } if ( true === $ scalar ) { $ resultItem = $ value ; } else { $ resultItem [ $ key ] = $ value ; } } } return $ resultItem ; }
Evaluates the select.

@param array   $item
@param boolean $scalar

@return mixed
Evaluates the select .