Skip to content

Commit

Permalink
Fix service typo (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
cesargb authored Oct 4, 2023
1 parent 8336f87 commit 15925d8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/Contracts/Runnable.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ interface Runnable
{
/**
* Must run parent::run() to validate request
*
* @return void
*/
public function run(): void;
public function run(): mixed;
}
4 changes: 3 additions & 1 deletion src/Services/AbstractService.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ public function __construct(array|Request $request)
: new Request($request);
}

public function run(): void
public function run(): mixed
{
$this->validate();

return null;
}

protected function validations(): array
Expand Down
4 changes: 2 additions & 2 deletions tests/Feature/Services/ServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ protected function validations(): array
];
}

public function run(): void
public function run(): mixed
{
parent::run();

// Do something
return null;
}
}

0 comments on commit 15925d8

Please sign in to comment.