Vision/src/Image.php
private function normalizeFeatures(array $features)
    {
        $result = [];

        foreach ($features as $key => $feature) {
            $maxResults = $this->maxResult($feature);

            if (array_key_exists($feature, $this->featureShortNames)) {
                $feature = $this->featureShortNames[$feature];
            }

            $result[] = array_filter([
                'type' => $feature,
                'maxResults' => $maxResults
            ]);
        }

        return $result;
    }
private function normalizeFeatures(array $features)
    {
        $result = [];

        foreach ($features as $key => $feature) {
            $maxResults = $this->maxResult($feature);

            if (array_key_exists($feature, $this->featureShortNames)) {
                $feature = $this->featureShortNames[$feature];
            }

            $result[] = array_filter([
                'type' => $feature,
                'maxResults' => $maxResults
            ]);
        }

        return $result;
    }
private function normalizeFeatures ( array $ features ) { $ result = [ ] ; foreach ( $ features as $ key => $ feature ) { $ maxResults = $ this -> maxResult ( $ feature ) ; if ( array_key_exists ( $ feature , $ this -> featureShortNames ) ) { $ feature = $ this -> featureShortNames [ $ feature ] ; } $ result [ ] = array_filter ( [ 'type' => $ feature , 'maxResults' => $ maxResults ] ) ; } return $ result ; }
Normalizes short feature names to identifiers compatible with the vision
API and adds maxResults if specified.

@param  array $features
@return array A list of type [Feature](https://cloud.google.com/vision/reference/rest/v1/images/annotate#feature)
Normalizes short feature names to identifiers compatible with the vision API and adds maxResults if specified .