improve code style
This commit is contained in:
parent
1aac154bcb
commit
fae28866eb
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)
|
||||
;
|
@ -9,6 +9,7 @@
|
||||
"firephp/firephp-core": "^0.5.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "~3.13.0",
|
||||
"phpstan/phpstan": "^1.10"
|
||||
},
|
||||
"license": "GPL-3.0",
|
||||
@ -32,6 +33,8 @@
|
||||
}
|
||||
],
|
||||
"scripts": {
|
||||
"php-cs-fixer": "./vendor/bin/php-cs-fixer fix --config=vendor/d3/oxid-sql-logger/.php-cs-fixer.php",
|
||||
|
||||
"phpstan": "./vendor/bin/phpstan --configuration=vendor/d3/oxid-sql-logger/phpstan.neon analyse"
|
||||
}
|
||||
}
|
||||
|
@ -73,8 +73,8 @@ class d3FirePHP extends FirePHP
|
||||
*/
|
||||
public function trace($label): bool
|
||||
{
|
||||
return $this->fb($label, $label, FirePHP::TRACE, array(
|
||||
'trace' => debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS)
|
||||
));
|
||||
return $this->fb($label, $label, FirePHP::TRACE, [
|
||||
'trace' => debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS),
|
||||
]);
|
||||
}
|
||||
}
|
@ -22,7 +22,7 @@ use OxidEsales\Eshop\Core\Registry;
|
||||
|
||||
class d3FirePHPHandler extends AbstractProcessingHandler
|
||||
{
|
||||
const ADD_TRACE = 'addTrace';
|
||||
public const ADD_TRACE = 'addTrace';
|
||||
|
||||
/**
|
||||
* @param array $record
|
||||
|
@ -37,7 +37,7 @@ class LoggerFactory
|
||||
$handlers = (isset($configuredHandlers) && is_iterable($configuredHandlers)) ?
|
||||
$this->getInstancesFromHandlerList($configuredHandlers) :
|
||||
[
|
||||
$this->getStreamHandler()
|
||||
$this->getStreamHandler(),
|
||||
];
|
||||
} else {
|
||||
$configuredHandlers = Registry::getConfig()->getConfigParam('SqlLoggerGUIHandlers');
|
||||
@ -46,7 +46,7 @@ class LoggerFactory
|
||||
$this->getInstancesFromHandlerList($configuredHandlers) :
|
||||
[
|
||||
$this->getBrowserConsoleHandler(),
|
||||
$this->getFirePHPHandler()
|
||||
$this->getFirePHPHandler(),
|
||||
];
|
||||
}
|
||||
|
||||
@ -122,7 +122,7 @@ class LoggerFactory
|
||||
[
|
||||
'D3\\OxidSqlLogger',
|
||||
'Doctrine\\DBAL\\Connection',
|
||||
'OxidEsales\\EshopCommunity\\Core\\Database\\Adapter\\Doctrine\\Database'
|
||||
'OxidEsales\\EshopCommunity\\Core\\Database\\Adapter\\Doctrine\\Database',
|
||||
]
|
||||
),
|
||||
new Monolog\Processor\PsrLogMessageProcessor(),
|
||||
|
Loading…
Reference in New Issue
Block a user