fix code style
This commit is contained in:
parent
2300246ab8
commit
c07fb6c714
@ -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)
|
||||||
;
|
;
|
@ -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
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -33,7 +35,7 @@ function d3GetOxidDIC(): Container
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
return d3GetOxidDIC_withExceptions();
|
return d3GetOxidDIC_withExceptions();
|
||||||
// @codeCoverageIgnoreStart
|
// @codeCoverageIgnoreStart
|
||||||
} catch (d3DicException $exception) {
|
} catch (d3DicException $exception) {
|
||||||
trigger_error($exception->getMessage(), E_USER_ERROR);
|
trigger_error($exception->getMessage(), E_USER_ERROR);
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -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
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -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
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
13
rector.php
13
rector.php
@ -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;
|
||||||
|
@ -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
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -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
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -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
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -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
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -39,7 +41,7 @@ class d3DicHandlerTest extends TestCase
|
|||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
d3DicHandler::removeInstance();
|
d3DicHandler::removeInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -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)
|
||||||
|
@ -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
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -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
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user