|
@@ -66,11 +66,11 @@ discard block |
|
|
block discarded – undo |
|
66
|
66
|
protected function addMacro(): void |
|
67
|
67
|
{ |
|
68
|
68
|
if (class_exists('SimpleCMS\Framework\Services\SimpleService')) { |
|
69
|
|
- \SimpleCMS\Framework\Services\SimpleService::macro('queryDistance', function (\SimpleCMS\Framework\Services\SimpleService $service, float $lat, float $lng, float $maxDistance = 50, string $geoColumn) { |
|
|
69
|
+ \SimpleCMS\Framework\Services\SimpleService::macro('queryDistance', function(\SimpleCMS\Framework\Services\SimpleService $service, float $lat, float $lng, float $maxDistance = 50, string $geoColumn) { |
|
70
|
70
|
$distanceService = new DistanceService; |
|
71
|
71
|
return $distanceService->queryDistance($service, $lat, $lng, $maxDistance, $geoColumn); |
|
72
|
72
|
}); |
|
73
|
|
- \SimpleCMS\Framework\Services\SimpleService::macro('selectDistance', function (\SimpleCMS\Framework\Services\SimpleService $service, float $lat, float $lng, string $geoColumn, string $alias) { |
|
|
73
|
+ \SimpleCMS\Framework\Services\SimpleService::macro('selectDistance', function(\SimpleCMS\Framework\Services\SimpleService $service, float $lat, float $lng, string $geoColumn, string $alias) { |
|
74
|
74
|
$distanceService = new DistanceService; |
|
75
|
75
|
return $distanceService->selectDistance($service, $lat, $lng, $geoColumn, $alias); |
|
76
|
76
|
}); |
|
@@ -86,11 +86,11 @@ discard block |
|
|
block discarded – undo |
|
86
|
86
|
protected function addService(): void |
|
87
|
87
|
{ |
|
88
|
88
|
if (class_exists('SimpleCMS\Framework\Services\SimpleService')) { |
|
89
|
|
- \SimpleCMS\Framework\Services\SimpleService::macro('queryDistance', function (\SimpleCMS\Framework\Services\SimpleService $service, float $lat, float $lng, float $maxDistance = 50, string $geoColumn) { |
|
|
89
|
+ \SimpleCMS\Framework\Services\SimpleService::macro('queryDistance', function(\SimpleCMS\Framework\Services\SimpleService $service, float $lat, float $lng, float $maxDistance = 50, string $geoColumn) { |
|
90
|
90
|
$distanceService = new DistanceService; |
|
91
|
91
|
return $distanceService->queryDistance($service, $lat, $lng, $maxDistance, $geoColumn); |
|
92
|
92
|
}); |
|
93
|
|
- \SimpleCMS\Framework\Services\SimpleService::macro('selectDistance', function (\SimpleCMS\Framework\Services\SimpleService $service, float $lat, float $lng, string $geoColumn) { |
|
|
93
|
+ \SimpleCMS\Framework\Services\SimpleService::macro('selectDistance', function(\SimpleCMS\Framework\Services\SimpleService $service, float $lat, float $lng, string $geoColumn) { |
|
94
|
94
|
$distanceService = new DistanceService; |
|
95
|
95
|
return $distanceService->selectDistance($service, $lat, $lng, $geoColumn); |
|
96
|
96
|
}); |