fix code style

This commit is contained in:
Daniel Seifert 2024-06-15 23:10:49 +02:00
parent 2300246ab8
commit c07fb6c714
Signed by: DanielS
GPG Key ID: 6A513E13AEE66170
14 changed files with 106 additions and 47 deletions

View File

@ -1,13 +1,34 @@
<?php <?php
declare(strict_types=1);
$finder = PhpCsFixer\Finder::create() $finder = PhpCsFixer\Finder::create()
->in(__DIR__) ->in(__DIR__)
; ;
$header = <<<EOF
Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
For the full copyright and license information, please view
the LICENSE file that was distributed with this source code.
https://www.d3data.de
@copyright (C) D3 Data Development (Inh. Thomas Dartsch)
@author D3 Data Development - Daniel Seifert <info@shopmodule.com>
@link https://www.oxidmodule.com
EOF;
$config = new PhpCsFixer\Config(); $config = new PhpCsFixer\Config();
return $config->setRules([ return $config->setRules([
'@PHP80Migration' => true, '@PHP80Migration' => true,
'@PSR12' => true '@PSR12' => true,
'header_comment' => [
'comment_type' => 'PHPDoc',
'header' => $header,
'location' => 'after_open',
'separate' => 'both',
],
]) ])
->setFinder($finder) ->setFinder($finder)
; ;

View File

@ -1,13 +1,15 @@
<?php <?php
/** /**
* For the full copyright and license information, please view the LICENSE * Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
* file that was distributed with this source code. *
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
* *
* https://www.d3data.de * https://www.d3data.de
* *
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch) * @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com> * @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com * @link https://www.oxidmodule.com
*/ */

View File

@ -1,13 +1,15 @@
<?php <?php
/** /**
* For the full copyright and license information, please view the LICENSE * Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
* file that was distributed with this source code. *
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
* *
* https://www.d3data.de * https://www.d3data.de
* *
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch) * @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com> * @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com * @link https://www.oxidmodule.com
*/ */

View File

@ -1,13 +1,15 @@
<?php <?php
/** /**
* For the full copyright and license information, please view the LICENSE * Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
* file that was distributed with this source code. *
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
* *
* https://www.d3data.de * https://www.d3data.de
* *
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch) * @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com> * @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com * @link https://www.oxidmodule.com
*/ */
@ -19,7 +21,6 @@ use d3DIContainerCache;
use Exception; use Exception;
use OxidEsales\Eshop\Core\Config; use OxidEsales\Eshop\Core\Config;
use OxidEsales\Eshop\Core\Registry; use OxidEsales\Eshop\Core\Registry;
use OxidEsales\Facts\Config\ConfigFile;
use Symfony\Component\Config\FileLocator; use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\Container; use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;
@ -176,6 +177,6 @@ class d3DicHandler implements d3DicHandlerInterface
public function getPhpDumper(ContainerBuilder $containerBuilder): PhpDumper public function getPhpDumper(ContainerBuilder $containerBuilder): PhpDumper
{ {
return new PhpDumper( $containerBuilder); return new PhpDumper($containerBuilder);
} }
} }

View File

@ -1,13 +1,15 @@
<?php <?php
/** /**
* For the full copyright and license information, please view the LICENSE * Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
* file that was distributed with this source code. *
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
* *
* https://www.d3data.de * https://www.d3data.de
* *
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch) * @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com> * @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com * @link https://www.oxidmodule.com
*/ */

View File

@ -1,13 +1,15 @@
<?php <?php
/** /**
* For the full copyright and license information, please view the LICENSE * Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
* file that was distributed with this source code. *
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
* *
* https://www.d3data.de * https://www.d3data.de
* *
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch) * @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com> * @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com * @link https://www.oxidmodule.com
*/ */

View File

@ -1,13 +1,15 @@
<?php <?php
/** /**
* For the full copyright and license information, please view the LICENSE * Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
* file that was distributed with this source code. *
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
* *
* https://www.d3data.de * https://www.d3data.de
* *
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch) * @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com> * @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com * @link https://www.oxidmodule.com
*/ */

View File

@ -1,5 +1,18 @@
<?php <?php
/**
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
declare(strict_types=1); declare(strict_types=1);
use Rector\Config\RectorConfig; use Rector\Config\RectorConfig;

View File

@ -1,13 +1,15 @@
<?php <?php
/** /**
* For the full copyright and license information, please view the LICENSE * Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
* file that was distributed with this source code. *
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
* *
* https://www.d3data.de * https://www.d3data.de
* *
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch) * @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com> * @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com * @link https://www.oxidmodule.com
*/ */

View File

@ -1,13 +1,15 @@
<?php <?php
/** /**
* For the full copyright and license information, please view the LICENSE * Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
* file that was distributed with this source code. *
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
* *
* https://www.d3data.de * https://www.d3data.de
* *
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch) * @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com> * @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com * @link https://www.oxidmodule.com
*/ */

View File

@ -1,13 +1,15 @@
<?php <?php
/** /**
* For the full copyright and license information, please view the LICENSE * Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
* file that was distributed with this source code. *
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
* *
* https://www.d3data.de * https://www.d3data.de
* *
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch) * @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com> * @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com * @link https://www.oxidmodule.com
*/ */

View File

@ -1,13 +1,15 @@
<?php <?php
/** /**
* For the full copyright and license information, please view the LICENSE * Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
* file that was distributed with this source code. *
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
* *
* https://www.d3data.de * https://www.d3data.de
* *
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch) * @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com> * @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com * @link https://www.oxidmodule.com
*/ */
@ -145,12 +147,14 @@ class d3DicHandlerTest extends TestCase
$sut = $this->getMockBuilder(d3DicHandler::class) $sut = $this->getMockBuilder(d3DicHandler::class)
->onlyMethods(['buildContainer', 'getFunctionNameFromTrace']) ->onlyMethods(['buildContainer', 'getFunctionNameFromTrace'])
->getMock(); ->getMock();
if ($throwException) if ($throwException) {
$sut->method( 'buildContainer' )->willThrowException( new Exception( 'fixture' ) ); $sut->method('buildContainer')->willThrowException(new Exception('fixture'));
}
$sut->method('getFunctionNameFromTrace')->willReturn($circularReferenceMethod); $sut->method('getFunctionNameFromTrace')->willReturn($circularReferenceMethod);
if ($expectException) if ($expectException) {
$this->expectException(d3DicException::class); $this->expectException(d3DicException::class);
}
$this->callMethod( $this->callMethod(
$sut, $sut,
@ -400,7 +404,7 @@ class d3DicHandlerTest extends TestCase
->onlyMethods(['isProductiveMode', 'getConfigParam']) ->onlyMethods(['isProductiveMode', 'getConfigParam'])
->getMock(); ->getMock();
$configMock->method('isProductiveMode')->willReturn($productive); $configMock->method('isProductiveMode')->willReturn($productive);
$configMock->method('getConfigParam')->willReturnMap([['iDebug', NULL, $debug]]); $configMock->method('getConfigParam')->willReturnMap([['iDebug', null, $debug]]);
/** @var d3DicHandler|MockObject $sut */ /** @var d3DicHandler|MockObject $sut */
$sut = $this->getMockBuilder(d3DicHandler::class) $sut = $this->getMockBuilder(d3DicHandler::class)

View File

@ -1,13 +1,15 @@
<?php <?php
/** /**
* For the full copyright and license information, please view the LICENSE * Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
* file that was distributed with this source code. *
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
* *
* https://www.d3data.de * https://www.d3data.de
* *
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch) * @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com> * @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com * @link https://www.oxidmodule.com
*/ */

View File

@ -1,13 +1,15 @@
<?php <?php
/** /**
* For the full copyright and license information, please view the LICENSE * Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
* file that was distributed with this source code. *
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
* *
* https://www.d3data.de * https://www.d3data.de
* *
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch) * @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com> * @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com * @link https://www.oxidmodule.com
*/ */