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