mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-07 08:52:35 +00:00
Add phpstan level 7(#544)
This commit is contained in:
@ -7,10 +7,5 @@
|
||||
|
||||
abstract class AbstractStorageProvider implements StorageProviderContract
|
||||
{
|
||||
protected StorageProvider $storageProvider;
|
||||
|
||||
public function __construct(StorageProvider $storageProvider)
|
||||
{
|
||||
$this->storageProvider = $storageProvider;
|
||||
}
|
||||
public function __construct(protected StorageProvider $storageProvider) {}
|
||||
}
|
||||
|
@ -8,6 +8,9 @@
|
||||
|
||||
class FTP extends AbstractStorageProvider
|
||||
{
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function validationRules(): array
|
||||
{
|
||||
return [
|
||||
@ -63,8 +66,8 @@ private function connection(): bool|Connection
|
||||
|
||||
return \App\Facades\FTP::connect(
|
||||
$credentials['host'],
|
||||
$credentials['port'],
|
||||
$credentials['ssl']
|
||||
(int) $credentials['port'],
|
||||
(bool) $credentials['ssl']
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,9 @@ class S3 extends AbstractStorageProvider
|
||||
|
||||
protected ?S3Client $client = null;
|
||||
|
||||
/**
|
||||
* @var array<string, mixed>
|
||||
*/
|
||||
protected array $clientConfig = [];
|
||||
|
||||
public function getApiUrl(): string
|
||||
@ -37,6 +40,8 @@ public function getClient(): S3Client
|
||||
/**
|
||||
* Build the configuration array for the S3 client.
|
||||
* This method can be overridden by child classes to modify the configuration.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function buildClientConfig(): array
|
||||
{
|
||||
|
@ -7,8 +7,15 @@
|
||||
|
||||
interface StorageProvider
|
||||
{
|
||||
/**
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public function validationRules(): array;
|
||||
|
||||
/**
|
||||
* @param array<string, mixed> $input
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function credentialData(array $input): array;
|
||||
|
||||
public function connect(): bool;
|
||||
|
Reference in New Issue
Block a user