fix code style

This commit is contained in:
Daniel Seifert 2023-11-23 15:05:40 +01:00
parent 53a9effeac
commit dd077688ad
Signed by: DanielS
GPG Key ID: 8A7C4C6ED1915C6F
4 changed files with 38 additions and 16 deletions

13
.php-cs-fixer.php Normal file
View 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)
;

View File

@ -127,7 +127,8 @@ class d3DicHandler implements d3DicHandlerInterface
public function d3GetFileLoader(ContainerBuilder $container): YamlFileLoader
{
/** @var YamlFileLoader $fileLoader */
$fileLoader = oxNew(YamlFileLoader::class,
$fileLoader = oxNew(
YamlFileLoader::class,
$container,
oxNew(FileLocator::class, d3DicUtilities::getVendorDir())
);
@ -161,7 +162,9 @@ class d3DicHandler implements d3DicHandlerInterface
*/
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();
@ -180,12 +183,14 @@ class d3DicHandler implements d3DicHandlerInterface
if (! defined('OXID_PHP_UNIT')) {
$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;
}
@ -198,10 +203,14 @@ class d3DicHandler implements d3DicHandlerInterface
/**
* clone
*/
public function __clone() {}
public function __clone()
{
}
/**
* constructor
*/
public function __construct() {}
public function __construct()
{
}
}

View File

@ -22,11 +22,11 @@ class definitionFileContainer
public const TYPE_YAML = 'yml';
protected array $definitionFiles = [
self::TYPE_YAML => []
self::TYPE_YAML => [],
];
protected array $allowedTypes = [
self::TYPE_YAML
self::TYPE_YAML,
];
public function __construct()