fix indentation
This commit is contained in:
parent
104d278c06
commit
d09254523f
5 changed files with 31 additions and 31 deletions
|
@ -21,10 +21,10 @@ class Application extends App implements IBootstrap {
|
|||
parent::__construct(self::APP_ID);
|
||||
}
|
||||
|
||||
public function register(IRegistrationContext $context): void {
|
||||
$context->registerEventListener(SabrePluginAddEvent::class, SabrePluginAddListener::class);
|
||||
}
|
||||
public function register(IRegistrationContext $context): void {
|
||||
$context->registerEventListener(SabrePluginAddEvent::class, SabrePluginAddListener::class);
|
||||
}
|
||||
|
||||
public function boot(IBootContext $context): void {
|
||||
}
|
||||
public function boot(IBootContext $context): void {
|
||||
}
|
||||
}
|
|
@ -17,9 +17,9 @@ class SabrePluginAddListener implements IEventListener {
|
|||
|
||||
public function handle(Event $event): void {
|
||||
if ($event instanceof SabrePluginAddEvent) {
|
||||
$serviceDetectionPlugin = $this->container->get(ServiceDetectionPlugin::class);
|
||||
$serviceDetectionPlugin = $this->container->get(ServiceDetectionPlugin::class);
|
||||
|
||||
$event->getServer()->addPlugin($serviceDetectionPlugin);
|
||||
}
|
||||
$event->getServer()->addPlugin($serviceDetectionPlugin);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -7,5 +7,5 @@ namespace OCA\DavPush\PushTransports;
|
|||
use OCA\DavPush\Transport\Transport;
|
||||
|
||||
class WebPushTransport extends Transport {
|
||||
protected $id = "web-push";
|
||||
protected $id = "web-push";
|
||||
}
|
|
@ -5,13 +5,13 @@ declare(strict_types=1);
|
|||
namespace OCA\DavPush\Transport;
|
||||
|
||||
abstract class Transport {
|
||||
protected $id;
|
||||
protected $id;
|
||||
|
||||
public function getId() {
|
||||
return $this->id;
|
||||
}
|
||||
public function getId() {
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getAdditionalInformation() {
|
||||
return [];
|
||||
}
|
||||
public function getAdditionalInformation() {
|
||||
return [];
|
||||
}
|
||||
}
|
|
@ -10,28 +10,28 @@ use OCA\DavPush\Event\RegisterTransportsEvent;
|
|||
use OCA\DavPush\PushTransports\WebPushTransport;
|
||||
|
||||
class TransportManager {
|
||||
/**
|
||||
/**
|
||||
* @var Transport[]
|
||||
*/
|
||||
private array $transports = [];
|
||||
|
||||
public function __construct(IEventDispatcher $dispatcher) {
|
||||
// register integrated transports
|
||||
$this->registerTransport(new WebPushTransport());
|
||||
public function __construct(IEventDispatcher $dispatcher) {
|
||||
// register integrated transports
|
||||
$this->registerTransport(new WebPushTransport());
|
||||
|
||||
// register transports provided by other apps
|
||||
$event = new RegisterTransportsEvent($this);
|
||||
$dispatcher->dispatchTyped($event);
|
||||
}
|
||||
// register transports provided by other apps
|
||||
$event = new RegisterTransportsEvent($this);
|
||||
$dispatcher->dispatchTyped($event);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Transport[]
|
||||
*/
|
||||
public function getTransports(): array {
|
||||
return $this->transports;
|
||||
}
|
||||
/**
|
||||
* @return Transport[]
|
||||
*/
|
||||
public function getTransports(): array {
|
||||
return $this->transports;
|
||||
}
|
||||
|
||||
public function registerTransport(Transport $transport): self {
|
||||
public function registerTransport(Transport $transport): self {
|
||||
$this->transports[] = $transport;
|
||||
return $this;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue