Skip to content

Commit

Permalink
Restore Aspect as beforeEachMethodOfService return type
Browse files Browse the repository at this point in the history
  • Loading branch information
m1k3lm committed Oct 9, 2024
1 parent 9a9c356 commit 4769c18
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/BusinessLogic/AdminAPI/AdminAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ protected function __construct()
/**
* Gets an AdminAPI instance.
*
* @return AdminAPI
* @return Aspects
*/
public static function get(): object
{
Expand Down
11 changes: 5 additions & 6 deletions src/BusinessLogic/Bootstrap/Aspect/Aspects.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ protected function __construct(Aspect $aspect)
$this->aspect = $aspect;
}

public static function run(Aspect $aspect): self
public static function run(Aspect $aspect): Aspects
{
return new static($aspect);
}

public function andRun(Aspect $aspect): self
public function andRun(Aspect $aspect): Aspects
{
$this->aspect = new CompositeAspect($this->aspect);
$this->aspect->append($aspect);
Expand All @@ -50,12 +50,11 @@ public function andRun(Aspect $aspect): self
}

/**
* @template T
* @param T $subject
* @param object $subject
*
* @return T
* @return Aspects
*/
public function beforeEachMethodOfInstance($subject)
public function beforeEachMethodOfInstance($subject): Aspects
{
$this->subject = $subject;
$this->subjectClassName = null;
Expand Down
2 changes: 1 addition & 1 deletion src/BusinessLogic/CheckoutAPI/CheckoutAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protected function __construct()
/**
* Gets an CheckoutAPI instance.
*
* @return CheckoutAPI
* @return Aspects
*/
public static function get(): object
{
Expand Down

0 comments on commit 4769c18

Please sign in to comment.