Page MenuHomeDevCentral

D897.id2279.diff
No OneTemporary

D897.id2279.diff

diff --git a/app/Http/Controllers/Gate/GateController.php b/app/Http/Controllers/Gate/GateController.php
--- a/app/Http/Controllers/Gate/GateController.php
+++ b/app/Http/Controllers/Gate/GateController.php
@@ -48,7 +48,7 @@
*/
protected function logRequest (array $extraContextualData = []) : void {
Log::info('[Gate] New payload.', [
- 'service' => static::SERVICE_NAME,
+ 'service' => $this->getServiceName(),
'door' => $this->door,
] + $extraContextualData);
}
@@ -62,7 +62,7 @@
*/
protected function initializeReport () : void {
if (Features::isEnabled('ActionsReport')) {
- Report::attachToGate(static::SERVICE_NAME, $this->door);
+ Report::attachToGate($this->getServiceName(), $this->door);
}
}
@@ -92,7 +92,7 @@
* @return \Nasqueron\Notifications\Config\Services\Service|null The service information is found; otherwise, null.
*/
public function getService () : ?Service {
- return Services::findServiceByDoor(static::SERVICE_NAME, $this->door);
+ return Services::findServiceByDoor($this->getServiceName(), $this->door);
}
/**
@@ -117,4 +117,12 @@
return "";
}
+ ///
+ /// Helper methods
+ ///
+
+ protected function getServiceName () : string {
+ return static::SERVICE_NAME;
+ }
+
}

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 25, 22:29 (22 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2263364
Default Alt Text
D897.id2279.diff (1 KB)

Event Timeline