Skip to content
This repository was archived by the owner on Mar 20, 2022. It is now read-only.

Commit 7b112ef

Browse files
committed
added support for laravel58 ..
1 parent e0da3ec commit 7b112ef

File tree

4 files changed

+25
-31
lines changed

4 files changed

+25
-31
lines changed

composer.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"name": "nickurt/laravel-plesk-xml",
3-
"description": "Plesk Onyx 17.8 Xml for Laravel 5",
3+
"description": "Plesk Onyx 17.8 Xml for Laravel 5.8",
44
"keywords": ["plesk", "plesk onyx", "plesk onyx 17.8", "laravel"],
55
"license": "MIT",
66
"require": {
7-
"php": "^7.1.3",
8-
"laravel/framework": "5.7.*",
7+
"php": "^7.2",
8+
"laravel/framework": "5.8.*",
99
"guzzlehttp/guzzle": "6.*",
1010
"spatie/array-to-xml": "^2.7"
1111
},
1212
"require-dev": {
13-
"phpunit/phpunit" : "^6.2|^7.0"
13+
"phpunit/phpunit" : "^7.5"
1414
},
1515
"autoload": {
1616
"psr-4": {
@@ -21,6 +21,7 @@
2121
]
2222
},
2323
"minimum-stability": "dev",
24+
"prefer-stable": true,
2425
"extra": {
2526
"laravel": {
2627
"providers": [

src/Client.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function __call($method, $args)
7171
*/
7272
public function api($name)
7373
{
74-
if(!isset($this->classes[$name])) {
74+
if (!isset($this->classes[$name])) {
7575
throw new \InvalidArgumentException(sprintf('Undefined method called:"%s"', $name));
7676
}
7777

src/ServiceProvider.php

+18-25
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,6 @@
44

55
class ServiceProvider extends \Illuminate\Support\ServiceProvider
66
{
7-
/**
8-
* Indicates if loading of the provider is deferred.
9-
*
10-
* @var bool
11-
*/
12-
protected $defer = false;
13-
14-
/**
15-
* Register the service provider.
16-
*
17-
* @return void
18-
*/
19-
public function register()
20-
{
21-
$this->app->singleton('nickurt\PleskXml\Plesk', function ($app) {
22-
$plesk = new Plesk($app);
23-
$plesk->server($plesk->getDefaultServer());
24-
25-
return $plesk;
26-
});
27-
28-
$this->app->alias('nickurt\PleskXml\Plesk', 'PleskXml');
29-
}
30-
317
/**
328
* Bootstrap the application events.
339
*
@@ -36,7 +12,7 @@ public function register()
3612
public function boot()
3713
{
3814
$this->publishes([
39-
__DIR__.'/../config/plesk-xml.php' => config_path('plesk-xml.php')
15+
__DIR__ . '/../config/plesk-xml.php' => config_path('plesk-xml.php')
4016
], 'config');
4117
}
4218

@@ -49,4 +25,21 @@ public function provides()
4925
{
5026
return ['nickurt\Plesk\PleskXml', 'PleskXml'];
5127
}
28+
29+
/**
30+
* Register the service provider.
31+
*
32+
* @return void
33+
*/
34+
public function register()
35+
{
36+
$this->app->singleton('nickurt\PleskXml\Plesk', function ($app) {
37+
$plesk = new Plesk($app);
38+
$plesk->server($plesk->getDefaultServer());
39+
40+
return $plesk;
41+
});
42+
43+
$this->app->alias('nickurt\PleskXml\Plesk', 'PleskXml');
44+
}
5245
}

src/helpers.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
use nickurt\Plesk\PleskXml;
44

5-
if (! function_exists('plesk_xml')) {
5+
if (!function_exists('plesk_xml')) {
66
function plesk_xml()
77
{
88
return app(Plesk::class);

0 commit comments

Comments
 (0)