|
@@ 62-79 (lines=18) @@
|
| 59 |
|
* |
| 60 |
|
* @param array<array-key, mixed> $config |
| 61 |
|
*/ |
| 62 |
|
private function configureUnderscoredBundlePrefixNamer(ContainerBuilder $container, array $config): void |
| 63 |
|
{ |
| 64 |
|
if (!isset($config['underscored_bundle_prefix'])) { |
| 65 |
|
return; |
| 66 |
|
} |
| 67 |
|
|
| 68 |
|
if (!$container->hasDefinition('runopencode.doctrine.orm.naming_strategy.underscored_bundle_prefix')) { |
| 69 |
|
return; |
| 70 |
|
} |
| 71 |
|
|
| 72 |
|
/** @psalm-suppress MissingThrowsDocblock */ |
| 73 |
|
$definition = $container->getDefinition('runopencode.doctrine.orm.naming_strategy.underscored_bundle_prefix'); |
| 74 |
|
$config['underscored_bundle_prefix']['case'] = ('uppercase' === $config['underscored_bundle_prefix']['case']) ? CASE_UPPER : CASE_LOWER; |
| 75 |
|
$args = $definition->getArguments(); |
| 76 |
|
$args[1] = $config['underscored_bundle_prefix']; |
| 77 |
|
|
| 78 |
|
$definition->setArguments($args); |
| 79 |
|
} |
| 80 |
|
|
| 81 |
|
/** |
| 82 |
|
* Configure 'runopencode.doctrine.orm.naming_strategy.underscored_class_namespace_prefix' naming strategy. |
|
@@ 86-103 (lines=18) @@
|
| 83 |
|
* |
| 84 |
|
* @param array<array-key, mixed> $config |
| 85 |
|
*/ |
| 86 |
|
private function configureUnderscoredClassNamespacePrefixNamer(ContainerBuilder $container, array $config): void |
| 87 |
|
{ |
| 88 |
|
if (!isset($config['underscored_class_namespace_prefix'])) { |
| 89 |
|
return; |
| 90 |
|
} |
| 91 |
|
|
| 92 |
|
if (!$container->hasDefinition('runopencode.doctrine.orm.naming_strategy.underscored_class_namespace_prefix')) { |
| 93 |
|
return; |
| 94 |
|
} |
| 95 |
|
|
| 96 |
|
/** @psalm-suppress MissingThrowsDocblock */ |
| 97 |
|
$definition = $container->getDefinition('runopencode.doctrine.orm.naming_strategy.underscored_class_namespace_prefix'); |
| 98 |
|
$config['underscored_class_namespace_prefix']['case'] = ('uppercase' === $config['underscored_class_namespace_prefix']['case']) ? CASE_UPPER : CASE_LOWER; |
| 99 |
|
$args = $definition->getArguments(); |
| 100 |
|
$args[0] = $config['underscored_class_namespace_prefix']; |
| 101 |
|
|
| 102 |
|
$definition->setArguments($args); |
| 103 |
|
} |
| 104 |
|
|
| 105 |
|
/** |
| 106 |
|
* Configure 'runopencode.doctrine.orm.naming_strategy.underscored_namer_collection' naming strategy. |