Skip to content

Commit

Permalink
Add chaining method (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
tfirdaus authored Oct 10, 2024
1 parent 4cdddc8 commit 27ee215
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@ public function __construct(Extendable $ext)
$this->container = new Container($this->pimple);
}

public function setPluginFilePath(string $pluginFilePath): void
public function setPluginFilePath(string $pluginFilePath): self
{
$this->pluginFilePath = $pluginFilePath;

return $this;
}

/**
Expand All @@ -76,9 +78,11 @@ public function setPluginFilePath(string $pluginFilePath): void
* @param array<string> $services
* @phpstan-param array<class-string> $services
*/
public function addServices(array $services): void
public function addServices(array $services): self
{
$this->services = $services;

return $this;
}

public function boot(): void
Expand Down

0 comments on commit 27ee215

Please sign in to comment.