Provider/LocationProvider.php
protected function decorateResults(Coordinates $searchCenter, array $results)
    {
        $search = new Search();
        $search->setCenter($searchCenter);

        foreach ($results as $result) {
            $distanceInMiles = UnitConverter::kmToMiles($result['distance']);
            $search->addResult(new Result($result[0], $distanceInMiles));
        }

        return $search;
    }
protected function decorateResults(Coordinates $searchCenter, array $results)
    {
        $search = new Search();
        $search->setCenter($searchCenter);

        foreach ($results as $result) {
            $distanceInMiles = UnitConverter::kmToMiles($result['distance']);
            $search->addResult(new Result($result[0], $distanceInMiles));
        }

        return $search;
    }
protected function decorateResults ( Coordinates $ searchCenter , array $ results ) { $ search = new Search ( ) ; $ search -> setCenter ( $ searchCenter ) ; foreach ( $ results as $ result ) { $ distanceInMiles = UnitConverter :: kmToMiles ( $ result [ 'distance' ] ) ; $ search -> addResult ( new Result ( $ result [ 0 ] , $ distanceInMiles ) ) ; } return $ search ; }
Helper method to decorate search results

@param  Coordinates $searchCenter
@param  array           $results
@return Search
Helper method to decorate search results