| | |
| | | $text = preg_replace('/\s+/', ' ', $text); |
| | | |
| | | // Trim |
| | | $text = trim($text); |
| | | |
| | | return $text; |
| | | return trim($text); |
| | | } |
| | | /** |
| | | * Format date for GMB API |
| | |
| | | |
| | | // Validate hour and minute ranges |
| | | if ($hour >= 0 && $hour <= 23 && $minute >= 0 && $minute <= 59) { |
| | | $result = [ |
| | | return [ |
| | | 'hours' => $hour, |
| | | 'minutes' => $minute |
| | | ]; |
| | | return $result; |
| | | } |
| | | } |
| | | |
| | |
| | | [], |
| | | 'posts' |
| | | ); |
| | | $result = $response['foodMenus'] ?? []; |
| | | |
| | | return $result; |
| | | return $response['foodMenus'] ?? []; |
| | | } |
| | | |
| | | /** |
| | |
| | | 'dailyRange.endDate.day' => date('j', strtotime($end_date)) |
| | | ]; |
| | | |
| | | $response = $this->getRequest( |
| | | "/v1/{$location_name}:fetchMultiDailyMetricsTimeSeries?" . http_build_query($params), |
| | | $params, |
| | | 'performance' |
| | | ); |
| | | return $response; |
| | | return $this->getRequest( |
| | | "/v1/{$location_name}:fetchMultiDailyMetricsTimeSeries?" . http_build_query($params), |
| | | $params, |
| | | 'performance' |
| | | ); |
| | | } |
| | | |
| | | /** |