DamienHarper/DoctrineAuditBundle

View on GitHub

Showing 2 of 2 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

if (\array_key_exists('storage_services', $v['doctrine']) && \is_string($v['doctrine']['storage_services'])) {
$v['doctrine']['storage_services'] = [$v['doctrine']['storage_services']];
} elseif (!\array_key_exists('storage_services', $v['doctrine']) || !\is_array($v['doctrine']['storage_services'])) {
$v['doctrine']['storage_services'] = ['doctrine.orm.default_entity_manager'];
}
Severity: Major
Found in src/DependencyInjection/Configuration.php and 1 other location - About 2 hrs to fix
src/DependencyInjection/Configuration.php on lines 91..95

Similar blocks of code found in 2 locations. Consider refactoring.
Open

if (\array_key_exists('auditing_services', $v['doctrine']) && \is_string($v['doctrine']['auditing_services'])) {
$v['doctrine']['auditing_services'] = [$v['doctrine']['auditing_services']];
} elseif (!\array_key_exists('auditing_services', $v['doctrine']) || !\is_array($v['doctrine']['auditing_services'])) {
$v['doctrine']['auditing_services'] = ['doctrine.orm.default_entity_manager'];
}
Severity: Major
Found in src/DependencyInjection/Configuration.php and 1 other location - About 2 hrs to fix
src/DependencyInjection/Configuration.php on lines 84..88
Severity
Category
Status
Source
Language