Use constants for default values
This commit is contained in:
@@ -10,6 +10,9 @@ use Symfony\Component\Config\Definition\ConfigurationInterface;
|
|||||||
|
|
||||||
class Configuration implements ConfigurationInterface
|
class Configuration implements ConfigurationInterface
|
||||||
{
|
{
|
||||||
|
public const DEFAULT_SIZE = 32;
|
||||||
|
public const DEFAULT_COLOUR = 'primary';
|
||||||
|
|
||||||
public function getConfigTreeBuilder(): TreeBuilder
|
public function getConfigTreeBuilder(): TreeBuilder
|
||||||
{
|
{
|
||||||
$treeBuilder = new TreeBuilder('pcm_icon');
|
$treeBuilder = new TreeBuilder('pcm_icon');
|
||||||
@@ -28,8 +31,8 @@ class Configuration implements ConfigurationInterface
|
|||||||
->arrayNode('default')
|
->arrayNode('default')
|
||||||
->addDefaultsIfNotSet()
|
->addDefaultsIfNotSet()
|
||||||
->children()
|
->children()
|
||||||
->scalarNode('colour')->defaultValue('primary')->end()
|
->scalarNode('colour')->defaultValue(self::DEFAULT_COLOUR)->end()
|
||||||
->integerNode('size')->defaultValue(32)->end()
|
->integerNode('size')->defaultValue(self::DEFAULT_SIZE)->end()
|
||||||
->end()
|
->end()
|
||||||
->end()
|
->end()
|
||||||
->end()
|
->end()
|
||||||
|
|||||||
Reference in New Issue
Block a user