Created
November 10, 2021 06:30
-
-
Save a-yasui/df39ccfc5ebe3036c847a62999a23b59 to your computer and use it in GitHub Desktop.
Dummy class to repository
This file contains hidden or 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
<?php | |
namespace Main\Repository; | |
interface HogeRepository | |
{ | |
public getVolumes(): int; | |
} | |
namespace Tests\Dummy; | |
final class Hoge implements HogeRepository | |
{ | |
public $getVolumes; | |
// もっと楽に書ける方法はないものか… | |
public getVolumes(): int | |
{ | |
$mt = __FUNCTION__; | |
return $this->{$mt}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment