fix code style

This commit is contained in:
Daniel Seifert 2024-06-15 23:10:49 +02:00
bovenliggende 2300246ab8
commit c07fb6c714
Getekend door: DanielS
GPG sleutel-ID: 6A513E13AEE66170
14 gewijzigde bestanden met toevoegingen van 106 en 47 verwijderingen

Bestand weergeven

@ -1,13 +1,34 @@
<?php
declare(strict_types=1);
$finder = PhpCsFixer\Finder::create()
->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();
return $config->setRules([
'@PHP80Migration' => true,
'@PSR12' => true
'@PSR12' => true,
'header_comment' => [
'comment_type' => 'PHPDoc',
'header' => $header,
'location' => 'after_open',
'separate' => 'both',
],
])
->setFinder($finder)
;
;

Bestand weergeven

@ -1,13 +1,15 @@
<?php
/**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
* 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 <support@shopmodule.com>
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
@ -33,7 +35,7 @@ function d3GetOxidDIC(): Container
{
try {
return d3GetOxidDIC_withExceptions();
// @codeCoverageIgnoreStart
// @codeCoverageIgnoreStart
} catch (d3DicException $exception) {
trigger_error($exception->getMessage(), E_USER_ERROR);
}

Bestand weergeven

@ -1,13 +1,15 @@
<?php
/**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
* 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 <support@shopmodule.com>
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/

Bestand weergeven

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

Bestand weergeven

@ -1,13 +1,15 @@
<?php
/**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
* 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 <support@shopmodule.com>
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/

Bestand weergeven

@ -1,13 +1,15 @@
<?php
/**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
* 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 <support@shopmodule.com>
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/

Bestand weergeven

@ -1,13 +1,15 @@
<?php
/**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
* 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 <support@shopmodule.com>
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/

Bestand weergeven

@ -1,5 +1,18 @@
<?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);
use Rector\Config\RectorConfig;

Bestand weergeven

@ -1,13 +1,15 @@
<?php
/**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
* 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 <support@shopmodule.com>
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/

Bestand weergeven

@ -1,13 +1,15 @@
<?php
/**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
* 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 <support@shopmodule.com>
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/

Bestand weergeven

@ -1,13 +1,15 @@
<?php
/**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
* 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 <support@shopmodule.com>
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
@ -47,4 +49,4 @@ class d3DicExceptionTest extends TestCase
$exception->getCode()
);
}
}
}

Bestand weergeven

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

Bestand weergeven

@ -1,13 +1,15 @@
<?php
/**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
* 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 <support@shopmodule.com>
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/

Bestand weergeven

@ -1,13 +1,15 @@
<?php
/**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
* 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 <support@shopmodule.com>
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/