fix code style
This commit is contained in:
parent
53a9effeac
commit
dd077688ad
13
.php-cs-fixer.php
Normal file
13
.php-cs-fixer.php
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$finder = PhpCsFixer\Finder::create()
|
||||||
|
->in(__DIR__)
|
||||||
|
;
|
||||||
|
|
||||||
|
$config = new PhpCsFixer\Config();
|
||||||
|
return $config->setRules([
|
||||||
|
'@PHP80Migration' => true,
|
||||||
|
'@PSR12' => true
|
||||||
|
])
|
||||||
|
->setFinder($finder)
|
||||||
|
;
|
@ -127,7 +127,8 @@ class d3DicHandler implements d3DicHandlerInterface
|
|||||||
public function d3GetFileLoader(ContainerBuilder $container): YamlFileLoader
|
public function d3GetFileLoader(ContainerBuilder $container): YamlFileLoader
|
||||||
{
|
{
|
||||||
/** @var YamlFileLoader $fileLoader */
|
/** @var YamlFileLoader $fileLoader */
|
||||||
$fileLoader = oxNew(YamlFileLoader::class,
|
$fileLoader = oxNew(
|
||||||
|
YamlFileLoader::class,
|
||||||
$container,
|
$container,
|
||||||
oxNew(FileLocator::class, d3DicUtilities::getVendorDir())
|
oxNew(FileLocator::class, d3DicUtilities::getVendorDir())
|
||||||
);
|
);
|
||||||
@ -161,7 +162,9 @@ class d3DicHandler implements d3DicHandlerInterface
|
|||||||
*/
|
*/
|
||||||
public function buildContainer(bool $compileAndDump = true): Container
|
public function buildContainer(bool $compileAndDump = true): Container
|
||||||
{
|
{
|
||||||
if (Registry::get( ConfigFile::class)->getVar( 'iDebug')) startProfile(__METHOD__);
|
if (Registry::get(ConfigFile::class)->getVar('iDebug')) {
|
||||||
|
startProfile(__METHOD__);
|
||||||
|
}
|
||||||
|
|
||||||
$config = $this->d3GetConfig();
|
$config = $this->d3GetConfig();
|
||||||
|
|
||||||
@ -180,12 +183,14 @@ class d3DicHandler implements d3DicHandlerInterface
|
|||||||
|
|
||||||
if (! defined('OXID_PHP_UNIT')) {
|
if (! defined('OXID_PHP_UNIT')) {
|
||||||
$dumper = new PhpDumper($container);
|
$dumper = new PhpDumper($container);
|
||||||
file_put_contents($this->d3GetCacheFilePath(), $dumper->dump(array('class' => 'd3DIContainerCache')));
|
file_put_contents($this->d3GetCacheFilePath(), $dumper->dump(['class' => 'd3DIContainerCache']));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Registry::get( ConfigFile::class)->getVar( 'iDebug')) stopProfile(__METHOD__);
|
if (Registry::get(ConfigFile::class)->getVar('iDebug')) {
|
||||||
|
stopProfile(__METHOD__);
|
||||||
|
}
|
||||||
|
|
||||||
return $container;
|
return $container;
|
||||||
}
|
}
|
||||||
@ -198,10 +203,14 @@ class d3DicHandler implements d3DicHandlerInterface
|
|||||||
/**
|
/**
|
||||||
* clone
|
* clone
|
||||||
*/
|
*/
|
||||||
public function __clone() {}
|
public function __clone()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* constructor
|
* constructor
|
||||||
*/
|
*/
|
||||||
public function __construct() {}
|
public function __construct()
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,11 +22,11 @@ class definitionFileContainer
|
|||||||
public const TYPE_YAML = 'yml';
|
public const TYPE_YAML = 'yml';
|
||||||
|
|
||||||
protected array $definitionFiles = [
|
protected array $definitionFiles = [
|
||||||
self::TYPE_YAML => []
|
self::TYPE_YAML => [],
|
||||||
];
|
];
|
||||||
|
|
||||||
protected array $allowedTypes = [
|
protected array $allowedTypes = [
|
||||||
self::TYPE_YAML
|
self::TYPE_YAML,
|
||||||
];
|
];
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
|
Loading…
Reference in New Issue
Block a user