Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
a4c5004bd8 |
@ -1,21 +1,17 @@
|
||||
<?php
|
||||
namespace App\Contract;
|
||||
|
||||
use App\Definition\Contract;
|
||||
use App\Service\Auth as AuthService;
|
||||
|
||||
class Auth
|
||||
{
|
||||
use Contract;
|
||||
|
||||
protected static function newInstance()
|
||||
{
|
||||
return new AuthService();
|
||||
}
|
||||
protected static $instance;
|
||||
protected static function getInstance() {
|
||||
if (self::$instance === null) {
|
||||
self::$instance = self::newInstance();
|
||||
}
|
||||
return self::$instance;
|
||||
}
|
||||
public static function __callStatic($name, $params)
|
||||
{
|
||||
if (!method_exists(Response::class, $name)) {
|
||||
@ -28,4 +24,4 @@ class Auth
|
||||
return call_user_func_array([self, $name], $params);
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
@ -10,7 +10,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"nesbot/carbon": "^2.45"
|
||||
"aldarien/contract": "^1"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^8"
|
||||
|
Reference in New Issue
Block a user