@@ -16,9 +16,9 @@ |
||
16 | 16 | $configuration = new Configuration(); |
17 | 17 | $config = $this->processConfiguration($configuration, $configs); |
18 | 18 | |
19 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
19 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
20 | 20 | $loader->load('services.xml'); |
21 | - $ymlLoader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
21 | + $ymlLoader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
22 | 22 | $ymlLoader->load('data_grid.yml'); |
23 | 23 | |
24 | 24 | $container->getDefinition('data_grid.configuration') |
@@ -26,7 +26,7 @@ |
||
26 | 26 | { |
27 | 27 | $this->container = $container; |
28 | 28 | foreach ($config as $key => $value) { |
29 | - $setter = 'set' . ucfirst($key); |
|
29 | + $setter = 'set'.ucfirst($key); |
|
30 | 30 | if (method_exists($this, $setter)) { |
31 | 31 | $this->$setter($value); |
32 | 32 | } |
@@ -75,7 +75,7 @@ |
||
75 | 75 | public function addDateFilter(string $attribute, string $comparison = 'equal'): DataGridFiltersBuilderInterface |
76 | 76 | { |
77 | 77 | if (array_key_exists($attribute, $this->params)) { |
78 | - $comparisonFunc = lcfirst($comparison) . 'Date'; |
|
78 | + $comparisonFunc = lcfirst($comparison).'Date'; |
|
79 | 79 | if (method_exists($this, $comparisonFunc)) { |
80 | 80 | $this->$comparisonFunc($attribute); |
81 | 81 | } else { |
@@ -51,9 +51,9 @@ |
||
51 | 51 | { |
52 | 52 | $manager = $this->container['doctrine']->getRepository($this->entityClass); |
53 | 53 | $queryResult = $manager->createQueryBuilder('dgq') |
54 | - ->select(['dgq.id', 'dgq.' . $this->label])->orderBy('dgq.id')->getQuery()->getArrayResult(); |
|
54 | + ->select(['dgq.id', 'dgq.'.$this->label])->orderBy('dgq.id')->getQuery()->getArrayResult(); |
|
55 | 55 | $choices = []; |
56 | - array_walk($queryResult, function ($val) use (&$choices) { |
|
56 | + array_walk($queryResult, function($val) use (&$choices) { |
|
57 | 57 | $choices[$val['id']] = $val[$this->label]; |
58 | 58 | }); |
59 | 59 | return [ |
@@ -43,7 +43,7 @@ |
||
43 | 43 | protected function setConfiguration($config) |
44 | 44 | { |
45 | 45 | foreach ($config as $key => $value) { |
46 | - $setter = 'set' . ucfirst($key); |
|
46 | + $setter = 'set'.ucfirst($key); |
|
47 | 47 | if (method_exists($this, $setter)) { |
48 | 48 | $this->$setter($value); |
49 | 49 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $this->filterBuilder = new DataGridFiltersBuilder($this->container); |
64 | 64 | $this->options['filtersCriteria'] = $this->filterBuilder->getCriteria(); |
65 | 65 | foreach ($configs->getConfigs() as $key => $value) { |
66 | - $setter = 'setDefault' . ucfirst($key); |
|
66 | + $setter = 'setDefault'.ucfirst($key); |
|
67 | 67 | if (method_exists($this, $setter)) { |
68 | 68 | $this->$setter($value); |
69 | 69 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | public function createGrid(string $gridType, ServiceEntityRepository $repository): DataGrid |
75 | 75 | { |
76 | 76 | if (!is_subclass_of($gridType, AbstractGridType::class)) { |
77 | - throw new InvalidArgumentException('Expected subclass of ' . AbstractGridType::class); |
|
77 | + throw new InvalidArgumentException('Expected subclass of '.AbstractGridType::class); |
|
78 | 78 | } |
79 | 79 | $this->repository = $repository; |
80 | 80 | /** @var AbstractGridType $type */ |
@@ -17,7 +17,7 @@ |
||
17 | 17 | public function __construct(array $config) |
18 | 18 | { |
19 | 19 | foreach ($config as $key => $value) { |
20 | - $setter = 'set' . ucfirst($key); |
|
20 | + $setter = 'set'.ucfirst($key); |
|
21 | 21 | if (method_exists($this, $setter)) { |
22 | 22 | $this->$setter($value); |
23 | 23 | } |
@@ -45,7 +45,7 @@ |
||
45 | 45 | { |
46 | 46 | $this->container = $container; |
47 | 47 | foreach ($this->container as $key => $value) { |
48 | - $setter = 'set' . ucfirst($key); |
|
48 | + $setter = 'set'.ucfirst($key); |
|
49 | 49 | if (method_exists($this, $setter)) { |
50 | 50 | $this->$setter($value); |
51 | 51 | } |
@@ -43,7 +43,7 @@ |
||
43 | 43 | public function addColumn(string $columnClass, array $config = []): DataGridBuilderInterface |
44 | 44 | { |
45 | 45 | if (!is_subclass_of($columnClass, AbstractColumn::class)) { |
46 | - throw new InvalidArgumentException('Expected subclass of' . AbstractColumn::class); |
|
46 | + throw new InvalidArgumentException('Expected subclass of'.AbstractColumn::class); |
|
47 | 47 | } |
48 | 48 | $this->columns[] = new $columnClass($this->container, array_merge(['template' => $this->options['template']], $config)); |
49 | 49 | return $this; |