mirror of
https://github.com/Chouchen/Shikiryu_Backup.git
synced 2021-06-30 16:02:14 +02:00
💚 Fix with PHPCS
This commit is contained in:
24
app/code/transport/Factory.php
Normal file
24
app/code/transport/Factory.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Shikiryu\Backup\Transport;
|
||||
|
||||
use Shikiryu\Backup\Backup\BackupAbstract;
|
||||
|
||||
class Factory
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @param BackupAbstract $backup
|
||||
* @param array $config
|
||||
*
|
||||
* @return TransportAbstract|null
|
||||
*/
|
||||
public static function build(BackupAbstract $backup, array $config)
|
||||
{
|
||||
$class = __NAMESPACE__.'\\'.array_keys($config)[0];
|
||||
if (class_exists($class)) {
|
||||
return new $class($backup, array_values($config)[0]);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user