@@ -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 | } |
@@ -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 | } |
@@ -53,7 +53,7 @@ |
||
53 | 53 | if (!isset($cacheKeyInfo['isScalar'])) { |
54 | 54 | $dqlAlias = $cacheKeyInfo['dqlAlias']; |
55 | 55 | $type = $cacheKeyInfo['type']; |
56 | - $fieldName = $dqlAlias . $this->getFieldSeparator() . $fieldName; |
|
56 | + $fieldName = $dqlAlias.$this->getFieldSeparator().$fieldName; |
|
57 | 57 | $value = $type |
58 | 58 | ? $type->convertToPHPValue($value, $this->_platform) |
59 | 59 | : $value; |
@@ -47,7 +47,7 @@ |
||
47 | 47 | protected function checkConfiguration() |
48 | 48 | { |
49 | 49 | if ((!is_string($this->attribute) || empty($this->attribute)) && $this->value === null) { |
50 | - throw new DataGridException('attribute or value property must be set for ' . static::class); |
|
50 | + throw new DataGridException('attribute or value property must be set for '.static::class); |
|
51 | 51 | } |
52 | 52 | } |
53 | 53 |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | public function setOptions(array $options) |
38 | 38 | { |
39 | 39 | foreach ($options as $key => $value) { |
40 | - $setter = 'set' . ucfirst($key); |
|
40 | + $setter = 'set'.ucfirst($key); |
|
41 | 41 | if (method_exists($this, $setter)) { |
42 | 42 | $this->$setter($value); |
43 | 43 | } |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | */ |
50 | 50 | public function getFirst() |
51 | 51 | { |
52 | - return ($this->page - 1) * $this->limit; |
|
52 | + return ($this->page-1) * $this->limit; |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | /** |
@@ -123,10 +123,10 @@ discard block |
||
123 | 123 | if ($this->page < 5) { |
124 | 124 | return array_merge(range(1, 6), [null, $this->maxPage]); |
125 | 125 | } |
126 | - if ($this->page > $this->maxPage - 4) { |
|
127 | - return array_merge([1, null], range($this->maxPage - 5, $this->maxPage)); |
|
126 | + if ($this->page > $this->maxPage-4) { |
|
127 | + return array_merge([1, null], range($this->maxPage-5, $this->maxPage)); |
|
128 | 128 | } |
129 | - return array_merge([1, null], range($this->page - 2, $this->page + 2), [null, $this->maxPage]); |
|
129 | + return array_merge([1, null], range($this->page-2, $this->page+2), [null, $this->maxPage]); |
|
130 | 130 | } |
131 | 131 | |
132 | 132 | } |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | { |
27 | 27 | foreach ($config as $key => $value) { |
28 | 28 | $key = str_replace('_', '', $key); |
29 | - $setter = 'set' . $key; |
|
29 | + $setter = 'set'.$key; |
|
30 | 30 | if (method_exists($this, $setter)) { |
31 | 31 | $this->$setter($value); |
32 | 32 | } |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $result = clone $this; |
86 | 86 | foreach ($configuration->getConfigsArray() as $key => $value) { |
87 | 87 | if ($value !== null) { |
88 | - $setter = 'set' . ucfirst($key); |
|
88 | + $setter = 'set'.ucfirst($key); |
|
89 | 89 | $result->$setter($value); |
90 | 90 | } |
91 | 91 | } |
@@ -21,7 +21,7 @@ |
||
21 | 21 | 'pagination_limit' => 10, |
22 | 22 | 'translation_domain' => null |
23 | 23 | ]); |
24 | - if (!empty($config['instances'])){ |
|
24 | + if (!empty($config['instances'])) { |
|
25 | 25 | foreach ($config['instances'] as $key => $configuration) { |
26 | 26 | $this->instances[$key] = new Configuration($configuration); |
27 | 27 | } |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | |
44 | 44 | public function getCellContent($entity) |
45 | 45 | { |
46 | - return preg_replace_callback('/\{(\w+)\}/', function ($matches) use ($entity) { |
|
46 | + return preg_replace_callback('/\{(\w+)\}/', function($matches) use ($entity) { |
|
47 | 47 | if ($this->isButtonVisible($matches[1])) { |
48 | 48 | if (array_key_exists($matches[1], $this->buttons) && is_callable($this->buttons[$matches[1]])) { |
49 | 49 | return call_user_func_array($this->buttons[$matches[1]], [ |
@@ -72,15 +72,15 @@ discard block |
||
72 | 72 | if (is_callable($this->urlGenerator)) { |
73 | 73 | return call_user_func_array($this->urlGenerator, [$item, $action, $this->container->getRouter()]); |
74 | 74 | } elseif (!empty($this->identifier) && $item->has($this->identifier)) { |
75 | - return $this->container->getRouter()->generate($this->pathPrefix . $action, [ |
|
75 | + return $this->container->getRouter()->generate($this->pathPrefix.$action, [ |
|
76 | 76 | 'id' => $item->get($this->identifier) |
77 | 77 | ]); |
78 | 78 | } elseif ($item->hasIdentifier()) { |
79 | - return $this->container->getRouter()->generate($this->pathPrefix . $action, [ |
|
79 | + return $this->container->getRouter()->generate($this->pathPrefix.$action, [ |
|
80 | 80 | 'id' => $item->get($item->getIdentifier()) |
81 | 81 | ]); |
82 | 82 | } else { |
83 | - throw new DataGridException('Could not generate url for action: ' . $action); |
|
83 | + throw new DataGridException('Could not generate url for action: '.$action); |
|
84 | 84 | } |
85 | 85 | } |
86 | 86 |
@@ -30,7 +30,7 @@ |
||
30 | 30 | { |
31 | 31 | $obj = $this->getCellValue($entity); |
32 | 32 | if (is_object($obj)) { |
33 | - $result = $obj->{'get' . ucfirst($this->labelAttribute)}(); |
|
33 | + $result = $obj->{'get'.ucfirst($this->labelAttribute)}(); |
|
34 | 34 | return $this->format === 'html' |
35 | 35 | ? $result |
36 | 36 | : htmlspecialchars($result); |