Upgrade to 4.0.0
This commit is contained in:
@@ -50,17 +50,6 @@ class Remote
|
||||
public array $options = [];
|
||||
|
||||
/**
|
||||
* Magic getter for request info data
|
||||
*/
|
||||
public function __call(string $method, array $arguments = [])
|
||||
{
|
||||
$method = str_replace('-', '_', Str::kebab($method));
|
||||
return $this->info[$method] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @throws \Exception when the curl request failed
|
||||
*/
|
||||
public function __construct(string $url, array $options = [])
|
||||
@@ -76,8 +65,7 @@ class Remote
|
||||
|
||||
// update the defaults with App config if set;
|
||||
// request the App instance lazily
|
||||
$app = App::instance(null, true);
|
||||
if ($app !== null) {
|
||||
if ($app = App::instance(null, true)) {
|
||||
$defaults = array_merge($defaults, $app->option('remote', []));
|
||||
}
|
||||
|
||||
@@ -91,8 +79,19 @@ class Remote
|
||||
$this->fetch();
|
||||
}
|
||||
|
||||
public static function __callStatic(string $method, array $arguments = []): static
|
||||
/**
|
||||
* Magic getter for request info data
|
||||
*/
|
||||
public function __call(string $method, array $arguments = [])
|
||||
{
|
||||
$method = str_replace('-', '_', Str::kebab($method));
|
||||
return $this->info[$method] ?? null;
|
||||
}
|
||||
|
||||
public static function __callStatic(
|
||||
string $method,
|
||||
array $arguments = []
|
||||
): static {
|
||||
return new static(
|
||||
url: $arguments[0],
|
||||
options: array_merge(
|
||||
|
||||
Reference in New Issue
Block a user