From 58e8ae0759ccfa97c478ccae4e0778bdce70966f Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Thu, 22 Jan 2026 22:40:02 +0000
Subject: [PATCH] =DirectoryManager.php updates, some javascript tweaks for CRUD.js, and minor style changes

---
 inc/integrations/GoogleMyBusiness.php |   26 +++++++++++---------------
 1 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/inc/integrations/GoogleMyBusiness.php b/inc/integrations/GoogleMyBusiness.php
index e818d5b..6e823b2 100644
--- a/inc/integrations/GoogleMyBusiness.php
+++ b/inc/integrations/GoogleMyBusiness.php
@@ -129,7 +129,9 @@
 			]
 		);
 
-//		$this->cache->clear();
+		if (JVB_TESTING) {
+			$this->cache->clear();
+		}
 	}
 
 	protected function initialize(): void
@@ -1737,9 +1739,7 @@
 		$text = preg_replace('/\s+/', ' ', $text);
 
 		// Trim
-		$text = trim($text);
-
-		return $text;
+		return trim($text);
 	}
 	/**
 	 * Format date for GMB API
@@ -1780,11 +1780,10 @@
 
 			// Validate hour and minute ranges
 			if ($hour >= 0 && $hour <= 23 && $minute >= 0 && $minute <= 59) {
-				$result = [
+				return [
 					'hours' => $hour,
 					'minutes' => $minute
 				];
-				return $result;
 			}
 		}
 
@@ -2074,9 +2073,7 @@
 			[],
 			'posts'
 		);
-		$result = $response['foodMenus'] ?? [];
-
-		return $result;
+		return $response['foodMenus'] ?? [];
 	}
 
 	/**
@@ -2351,12 +2348,11 @@
 				'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'
+		);
 	}
 
 	/**

--
Gitblit v1.10.0