Dummy class to repository
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
<?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