Use more standardized phpcs
This commit is contained in:
parent
a043071e3c
commit
c449ca5155
493 changed files with 1116 additions and 3903 deletions
|
@ -42,8 +42,6 @@ class BackupManager
|
|||
|
||||
/**
|
||||
* BackupManager constructor.
|
||||
*
|
||||
* @param \Illuminate\Foundation\Application $app
|
||||
*/
|
||||
public function __construct(Application $app)
|
||||
{
|
||||
|
@ -54,7 +52,6 @@ class BackupManager
|
|||
/**
|
||||
* Returns a backup adapter instance.
|
||||
*
|
||||
* @param string|null $name
|
||||
* @return \League\Flysystem\AdapterInterface
|
||||
*/
|
||||
public function adapter(string $name = null)
|
||||
|
@ -65,8 +62,8 @@ class BackupManager
|
|||
/**
|
||||
* Set the given backup adapter instance.
|
||||
*
|
||||
* @param string $name
|
||||
* @param \League\Flysystem\AdapterInterface $disk
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function set(string $name, $disk)
|
||||
|
@ -79,7 +76,6 @@ class BackupManager
|
|||
/**
|
||||
* Gets a backup adapter.
|
||||
*
|
||||
* @param string $name
|
||||
* @return \League\Flysystem\AdapterInterface
|
||||
*/
|
||||
protected function get(string $name)
|
||||
|
@ -90,7 +86,6 @@ class BackupManager
|
|||
/**
|
||||
* Resolve the given backup disk.
|
||||
*
|
||||
* @param string $name
|
||||
* @return \League\Flysystem\AdapterInterface
|
||||
*/
|
||||
protected function resolve(string $name)
|
||||
|
@ -98,9 +93,7 @@ class BackupManager
|
|||
$config = $this->getConfig($name);
|
||||
|
||||
if (empty($config['adapter'])) {
|
||||
throw new InvalidArgumentException(
|
||||
"Backup disk [{$name}] does not have a configured adapter."
|
||||
);
|
||||
throw new InvalidArgumentException("Backup disk [{$name}] does not have a configured adapter.");
|
||||
}
|
||||
|
||||
$adapter = $config['adapter'];
|
||||
|
@ -124,7 +117,6 @@ class BackupManager
|
|||
/**
|
||||
* Calls a custom creator for a given adapter type.
|
||||
*
|
||||
* @param array $config
|
||||
* @return \League\Flysystem\AdapterInterface
|
||||
*/
|
||||
protected function callCustomCreator(array $config)
|
||||
|
@ -139,7 +131,6 @@ class BackupManager
|
|||
/**
|
||||
* Creates a new wings adapter.
|
||||
*
|
||||
* @param array $config
|
||||
* @return \League\Flysystem\AdapterInterface
|
||||
*/
|
||||
public function createWingsAdapter(array $config)
|
||||
|
@ -150,14 +141,13 @@ class BackupManager
|
|||
/**
|
||||
* Creates a new S3 adapter.
|
||||
*
|
||||
* @param array $config
|
||||
* @return \League\Flysystem\AdapterInterface
|
||||
*/
|
||||
public function createS3Adapter(array $config)
|
||||
{
|
||||
$config['version'] = 'latest';
|
||||
|
||||
if (! empty($config['key']) && ! empty($config['secret'])) {
|
||||
if (!empty($config['key']) && !empty($config['secret'])) {
|
||||
$config['credentials'] = Arr::only($config, ['key', 'secret', 'token']);
|
||||
}
|
||||
|
||||
|
@ -169,7 +159,6 @@ class BackupManager
|
|||
/**
|
||||
* Returns the configuration associated with a given backup type.
|
||||
*
|
||||
* @param string $name
|
||||
* @return array
|
||||
*/
|
||||
protected function getConfig(string $name)
|
||||
|
@ -189,8 +178,6 @@ class BackupManager
|
|||
|
||||
/**
|
||||
* Set the default session driver name.
|
||||
*
|
||||
* @param string $name
|
||||
*/
|
||||
public function setDefaultAdapter(string $name)
|
||||
{
|
||||
|
@ -201,6 +188,7 @@ class BackupManager
|
|||
* Unset the given adapter instances.
|
||||
*
|
||||
* @param string|string[] $adapter
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function forget($adapter)
|
||||
|
@ -215,8 +203,6 @@ class BackupManager
|
|||
/**
|
||||
* Register a custom adapter creator closure.
|
||||
*
|
||||
* @param string $adapter
|
||||
* @param \Closure $callback
|
||||
* @return $this
|
||||
*/
|
||||
public function extend(string $adapter, Closure $callback)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue