laravel-whisper /
hetzner-cloud
| 1 | <?php |
||||||
| 2 | /** |
||||||
| 3 | * Created by PhpStorm. |
||||||
| 4 | * User: sergio.rodenas |
||||||
| 5 | * Date: 30/7/18 |
||||||
| 6 | * Time: 11:28 |
||||||
| 7 | */ |
||||||
| 8 | |||||||
| 9 | namespace Whisper\HetznerCloud\Clients; |
||||||
| 10 | |||||||
| 11 | use LaravelWhisper\Whisper\ClientInterface; |
||||||
| 12 | |||||||
| 13 | class Server implements ClientInterface |
||||||
| 14 | { |
||||||
| 15 | public static $uri = 'servers'; |
||||||
| 16 | |||||||
| 17 | public static function all(): array |
||||||
| 18 | { |
||||||
| 19 | return HetznerCloud::get(static::$uri)['servers']; |
||||||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||||||
| 20 | } |
||||||
| 21 | |||||||
| 22 | public static function find($identifier): array |
||||||
| 23 | { |
||||||
| 24 | return HetznerCloud::get(static::$uri.'/'.$identifier)['server']; |
||||||
| 25 | } |
||||||
| 26 | |||||||
| 27 | public static function create(array $data): array |
||||||
| 28 | { |
||||||
| 29 | return HetznerCloud::post(static::$uri, $data)['server']; |
||||||
|
0 ignored issues
–
show
The method
post() does not exist on Whisper\HetznerCloud\Clients\HetznerCloud. Since you implemented __callStatic, consider adding a @method annotation.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||||
| 30 | } |
||||||
| 31 | |||||||
| 32 | public static function update($identifier, array $data): void |
||||||
| 33 | { |
||||||
| 34 | HetznerCloud::put(static::$uri.'/'.$identifier, $data); |
||||||
|
0 ignored issues
–
show
The method
put() does not exist on Whisper\HetznerCloud\Clients\HetznerCloud. Since you implemented __callStatic, consider adding a @method annotation.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||||
| 35 | } |
||||||
| 36 | |||||||
| 37 | public static function delete($identifier): ?bool |
||||||
| 38 | { |
||||||
| 39 | return ! isset(HetznerCloud::delete(static::$uri.'/'.$identifier)['error']); |
||||||
|
0 ignored issues
–
show
The method
delete() does not exist on Whisper\HetznerCloud\Clients\HetznerCloud. Since you implemented __callStatic, consider adding a @method annotation.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||||
| 40 | } |
||||||
| 41 | } |