@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | <small style="white-space: nowrap"> |
3 | 3 | <a |
4 | 4 | title="Sort ascending" |
5 | - <?php if($order === 'asc'): ?> |
|
5 | + <?php if ($order === 'asc'): ?> |
|
6 | 6 | style="text-decoration: none; color: green;" |
7 | 7 | <?php else: ?> |
8 | 8 | style="text-decoration: none; color:dodgerblue;" |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | </a> |
14 | 14 | <a |
15 | 15 | title="Sort descending" |
16 | - <?php if($order === 'desc'): ?> |
|
16 | + <?php if ($order === 'desc'): ?> |
|
17 | 17 | style="text-decoration: none; color: green;" |
18 | 18 | <?php else: ?> |
19 | 19 | style="text-decoration: none; color:dodgerblue;" |
@@ -334,7 +334,7 @@ |
||
334 | 334 | } |
335 | 335 | |
336 | 336 | /** |
337 | - * @return null|Grid |
|
337 | + * @return Compound|null |
|
338 | 338 | */ |
339 | 339 | protected function getGrid() |
340 | 340 | { |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | if ($this->dataCellPart === null) { |
312 | 312 | $this->dataCellPart = new Part( |
313 | 313 | $this->getDataCell(), |
314 | - 'column-' . $this->getId() . '-data-cell', |
|
314 | + 'column-'.$this->getId().'-data-cell', |
|
315 | 315 | 'record_view' |
316 | 316 | ); |
317 | 317 | } |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | if ($this->titleCellPart === null) { |
327 | 327 | $this->titleCellPart = new Part( |
328 | 328 | $this->titleCellPart = $this->getTitleCell(), |
329 | - 'column-' . $this->getId() . '-title-cell', |
|
329 | + 'column-'.$this->getId().'-title-cell', |
|
330 | 330 | 'title_row' |
331 | 331 | ); |
332 | 332 | } |
@@ -334,7 +334,7 @@ |
||
334 | 334 | } |
335 | 335 | |
336 | 336 | /** |
337 | - * @return null|Grid |
|
337 | + * @return Compound|null |
|
338 | 338 | */ |
339 | 339 | protected function getGrid() |
340 | 340 | { |
@@ -12,8 +12,8 @@ |
||
12 | 12 | public function register(ServiceContainer $container) |
13 | 13 | { |
14 | 14 | /** registers path to grid views */ |
15 | - $container->extend(ServiceId::TEMPLATE_FINDER, function (TemplateFinder $finder) { |
|
16 | - $finder->registerPath(dirname(__DIR__) . '/resources/views'); |
|
15 | + $container->extend(ServiceId::TEMPLATE_FINDER, function(TemplateFinder $finder) { |
|
16 | + $finder->registerPath(dirname(__DIR__).'/resources/views'); |
|
17 | 17 | return $finder; |
18 | 18 | }); |
19 | 19 | } |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | public function attachToCompound(Compound $root, $prepend = false) |
112 | 112 | { |
113 | 113 | // prepend component that will render results |
114 | - $root->children()->add(new DataView(function () { |
|
114 | + $root->children()->add(new DataView(function() { |
|
115 | 115 | if ($this->inputOption->hasValue()) { |
116 | 116 | $this->renderCsv(); |
117 | 117 | } |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | { |
132 | 132 | $file = fopen('php://output', 'w'); |
133 | 133 | header('Content-Type: text/csv'); |
134 | - header('Content-Disposition: attachment; filename="' . $this->getFileName() . '"'); |
|
134 | + header('Content-Disposition: attachment; filename="'.$this->getFileName().'"'); |
|
135 | 135 | header('Pragma: no-cache'); |
136 | 136 | set_time_limit(0); |
137 | 137 | /** @var Grid $grid */ |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | */ |
18 | 18 | public function __construct(callable $urlGenerator, ResourceManager $resourceManager = null) |
19 | 19 | { |
20 | - parent::__construct(new DataView(null, function ($url) { |
|
20 | + parent::__construct(new DataView(null, function($url) { |
|
21 | 21 | return "<div data-details-container='1' data-details-url='$url'></div>"; |
22 | 22 | }), $resourceManager); |
23 | 23 | $this->setUrlGenerator($urlGenerator); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | protected function getScriptSource() |
51 | 51 | { |
52 | - return parent::getScriptSource() . ' |
|
52 | + return parent::getScriptSource().' |
|
53 | 53 | jQuery(\'tr[data-row-with-details="1"]\').click(function() { |
54 | 54 | var $detailsRow = jQuery(this).next(); |
55 | 55 | var $detailsContainer; |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $this->id = 'page_totals_row'; |
68 | 68 | $this->destinationParentId = 'list_container'; |
69 | 69 | $this->operations = $operations; |
70 | - $this->dataCollectingCallback = function () { |
|
70 | + $this->dataCollectingCallback = function() { |
|
71 | 71 | if ($this->stopDataCollecting) { |
72 | 72 | return; |
73 | 73 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | $this->attachToCompoundInternal($root, $prepend); |
91 | 91 | /** @var CollectionView $collectionView */ |
92 | 92 | $collectionView = $root->getComponent('collection_view'); |
93 | - $collectionView->setDataInjector(function ($dataRow, $collectionView) use ($root) { |
|
93 | + $collectionView->setDataInjector(function($dataRow, $collectionView) use ($root) { |
|
94 | 94 | call_user_func([$root, 'setCurrentRow'], $dataRow, $collectionView); |
95 | 95 | call_user_func($this->dataCollectingCallback); |
96 | 96 | }); |
@@ -128,13 +128,13 @@ discard block |
||
128 | 128 | $valueCalculators[$column->getId()] = $column->getValueCalculator(); |
129 | 129 | $valueFormatters[$column->getId()] = $prevFormatter = $column->getValueFormatter(); |
130 | 130 | $column->setValueCalculator(null); |
131 | - $column->setValueFormatter(function ($value) use ($prevFormatter, $column) { |
|
131 | + $column->setValueFormatter(function($value) use ($prevFormatter, $column) { |
|
132 | 132 | if ($prevFormatter) { |
133 | 133 | $value = call_user_func($prevFormatter, $value); |
134 | 134 | } |
135 | 135 | $operation = $this->getOperation($column->getId()); |
136 | 136 | if ($value !== null && is_string($operation) && array_key_exists($operation, $this->valuePrefixes)) { |
137 | - $value = $this->valuePrefixes[$operation] . ' ' . $value; |
|
137 | + $value = $this->valuePrefixes[$operation].' '.$value; |
|
138 | 138 | } |
139 | 139 | return $value; |
140 | 140 | }); |
@@ -86,11 +86,11 @@ |
||
86 | 86 | { |
87 | 87 | $asc = UriFunctions::modifyQuery( |
88 | 88 | null, |
89 | - [$this->inputOption->getKey() => $this->columnId . static::DELIMITER . SortOperation::ASC] |
|
89 | + [$this->inputOption->getKey() => $this->columnId.static::DELIMITER.SortOperation::ASC] |
|
90 | 90 | ); |
91 | 91 | $desc = UriFunctions::modifyQuery( |
92 | 92 | null, |
93 | - [$this->inputOption->getKey() => $this->columnId . static::DELIMITER . SortOperation::DESC] |
|
93 | + [$this->inputOption->getKey() => $this->columnId.static::DELIMITER.SortOperation::DESC] |
|
94 | 94 | ); |
95 | 95 | $asc = UriFunctions::replaceFragment($asc, ''); |
96 | 96 | $desc = UriFunctions::replaceFragment($desc, ''); |