Skip to content

Commit

Permalink
fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanTreffler committed Apr 5, 2024
1 parent 104d278 commit d092545
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 31 deletions.
10 changes: 5 additions & 5 deletions lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ public function __construct() {
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 {
}
}
6 changes: 3 additions & 3 deletions lib/Listener/SabrePluginAddListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ public function __construct(private ContainerInterface $container) {}

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);
}
}
}
2 changes: 1 addition & 1 deletion lib/PushTransports/WebPushTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
use OCA\DavPush\Transport\Transport;

class WebPushTransport extends Transport {
protected $id = "web-push";
protected $id = "web-push";
}
14 changes: 7 additions & 7 deletions lib/Transport/Transport.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
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 [];
}
}
30 changes: 15 additions & 15 deletions lib/Transport/TransportManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,28 @@
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;
}
Expand Down

0 comments on commit d092545

Please sign in to comment.