protected function castArrayValuesToSimpleTypes(array $data)
    {
        foreach ($data as $key => $item) {
            if (is_array($item)) {
                $data[$key] = $this->castArrayValuesToSimpleTypes($item);
            } elseif (is_object($item)) {
                $data[$key] = $this->convertObjectToSimpleType($item);
            }
        }

        return $data;
    }
protected function castArrayValuesToSimpleTypes(array $data)
    {
        foreach ($data as $key => $item) {
            if (is_array($item)) {
                $data[$key] = $this->castArrayValuesToSimpleTypes($item);
            } elseif (is_object($item)) {
                $data[$key] = $this->convertObjectToSimpleType($item);
            }
        }

        return $data;
    }
protected function castArrayValuesToSimpleTypes ( array $ data ) { foreach ( $ data as $ key => $ item ) { if ( is_array ( $ item ) ) { $ data [ $ key ] = $ this -> castArrayValuesToSimpleTypes ( $ item ) ; } elseif ( is_object ( $ item ) ) { $ data [ $ key ] = $ this -> convertObjectToSimpleType ( $ item ) ; } } return $ data ; }
Cast values of an array to simple types

@param array $data
@return array
Cast values of an array to simple types