forked from laravel-doctrine/orm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ef30dc0
commit 8f7e1c3
Showing
3 changed files
with
27 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,40 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaravelDoctrineTest\ORM\Assets\Middleware; | ||
|
||
use Illuminate\Http\Request; | ||
|
||
class EntityController | ||
{ | ||
public function index(BindableEntity $entity) | ||
public function index(BindableEntity $entity): string | ||
{ | ||
return $entity->getName(); | ||
} | ||
|
||
public function interfacer(BindableEntityWithInterface $entity) | ||
public function interfacer(BindableEntityWithInterface $entity): int | ||
{ | ||
return $entity->getId(); | ||
} | ||
|
||
public function returnValue(string $value) | ||
public function returnValue(string $value): string | ||
{ | ||
return $value; | ||
} | ||
|
||
public function returnEntity(BindableEntity $entity = null) { | ||
public function returnEntity(BindableEntity|null $entity = null): BindableEntity|null | ||
{ | ||
return $entity; | ||
} | ||
|
||
public function returnEntityName(BindableEntity $entity) { | ||
public function returnEntityName(BindableEntity $entity): string | ||
{ | ||
return $entity->getName(); | ||
} | ||
|
||
public function checkRequest(Request $request) { | ||
public function checkRequest(Request $request): string | ||
{ | ||
return $request instanceof Request ? 'request' : 'something else'; | ||
} | ||
} |