Completed
Pull Request — master (#648)
by
unknown
32:38 queued 12:41
created
src/DataGrid.php 2 patches
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1532,7 +1532,6 @@  discard block
 block discarded – undo
1532 1532
 	/**
1533 1533
 	 * If we want to sent some initial filter
1534 1534
 	 *
1535
-	 * @param array $filter
1536 1535
 	 * @param bool  $use_on_reset
1537 1536
 	 * @return static
1538 1537
 	 */
@@ -2766,7 +2765,7 @@  discard block
 block discarded – undo
2766 2765
 /**
2767 2766
  * Set options of select "items_per_page"
2768 2767
  *
2769
- * @param array $items_per_page_list
2768
+ * @param integer[] $items_per_page_list
2770 2769
  * @return static
2771 2770
  */
2772 2771
 	public function setItemsPerPageList(array $items_per_page_list, $include_all = true)
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -673,7 +673,7 @@  discard block
 block discarded – undo
673 673
 	 */
674 674
 	public function getOriginalTemplateFile(): string
675 675
 	{
676
-		return __DIR__ . '/templates/datagrid.latte';
676
+		return __DIR__.'/templates/datagrid.latte';
677 677
 	}
678 678
 
679 679
 
@@ -929,7 +929,7 @@  discard block
 block discarded – undo
929 929
 		 * Set tree view template file
930 930
 		 */
931 931
 		if (!$this->template_file) {
932
-			$this->setTemplateFile(__DIR__ . '/templates/datagrid_tree.latte');
932
+			$this->setTemplateFile(__DIR__.'/templates/datagrid_tree.latte');
933 933
 		}
934 934
 
935 935
 		return $this;
@@ -3006,7 +3006,7 @@  discard block
 block discarded – undo
3006 3006
  */
3007 3007
 	public function getSessionSectionName(): string
3008 3008
 	{
3009
-		return $this->getPresenter()->getName() . ':' . $this->getUniqueId();
3009
+		return $this->getPresenter()->getName().':'.$this->getUniqueId();
3010 3010
 	}
3011 3011
 
3012 3012
 
@@ -3596,7 +3596,7 @@  discard block
 block discarded – undo
3596 3596
 
3597 3597
 		if (!($parent instanceof PresenterComponent)) {
3598 3598
 			throw new DataGridHasToBeAttachedToPresenterComponentException(
3599
-				"DataGrid is attached to: '" . get_class($parent) . "', but instance of PresenterComponent is needed."
3599
+				"DataGrid is attached to: '".get_class($parent)."', but instance of PresenterComponent is needed."
3600 3600
 			);
3601 3601
 		}
3602 3602
 
Please login to merge, or discard this patch.
src/Filter/Filter.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
 	/**
96 96
 	 * Get filter key
97 97
 	 *
98
-	 * @return mixed
98
+	 * @return string
99 99
 	 */
100 100
 	public function getKey()
101 101
 	{
Please login to merge, or discard this patch.
src/Traits/TButtonRenderer.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@
 block discarded – undo
117 117
 	 * Set column replacements
118 118
 	 *
119 119
 	 * @param  array $replacements
120
-	 * @return Column
120
+	 * @return TButtonRenderer
121 121
 	 */
122 122
 	public function setReplacement(array $replacements): Column
123 123
 	{
Please login to merge, or discard this patch.
src/Traits/TLink.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -79,6 +79,7 @@
 block discarded – undo
79 79
 
80 80
 	/**
81 81
 	 * @throws DataGridLinkCreationException
82
+	 * @param string $href
82 83
 	 */
83 84
 	private function throwHierarchyLookupException(DataGrid $grid, $href, $params): void
84 85
 	{
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -82,14 +82,14 @@
 block discarded – undo
82 82
 	 */
83 83
 	private function throwHierarchyLookupException(DataGrid $grid, $href, $params): void
84 84
 	{
85
-		$desiredHandler = get_class($grid->getParent()) . '::handle' . ucfirst($href) . '()';
85
+		$desiredHandler = get_class($grid->getParent()).'::handle'.ucfirst($href).'()';
86 86
 
87 87
 		throw new DataGridLinkCreationException(
88 88
 			'DataGrid could not create link "'
89
-			. $href . '" - did not find any signal handler in componenet hierarchy from '
90
-			. get_class($grid->getParent()) . ' up to the '
91
-			. get_class($grid->getPresenter()) . '. '
92
-			. 'Try adding handler ' . $desiredHandler
89
+			. $href.'" - did not find any signal handler in componenet hierarchy from '
90
+			. get_class($grid->getParent()).' up to the '
91
+			. get_class($grid->getPresenter()).'. '
92
+			. 'Try adding handler '.$desiredHandler
93 93
 		);
94 94
 	}
95 95
 
Please login to merge, or discard this patch.
src/DataSource/NextrasDataSource.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -105,8 +105,8 @@  discard block
 block discarded – undo
105 105
 			$date_end = clone $date;
106 106
 
107 107
 			$this->data_source = $this->data_source->findBy([
108
-				$this->prepareColumn($column) . '>=' => $date->setTime(0, 0, 0),
109
-				$this->prepareColumn($column) . '<=' => $date_end->setTime(23, 59, 59),
108
+				$this->prepareColumn($column).'>=' => $date->setTime(0, 0, 0),
109
+				$this->prepareColumn($column).'<=' => $date_end->setTime(23, 59, 59),
110 110
 			]);
111 111
 		}
112 112
 
@@ -130,12 +130,12 @@  discard block
 block discarded – undo
130 130
 		$dataCondition = [];
131 131
 		if ($value_from) {
132 132
 			$date_from = DateTimeHelper::tryConvertToDateTime($value_from, [$filter->getPhpFormat()]);
133
-			$dataCondition[$this->prepareColumn($filter->getColumn()) . '>='] = $date_from->setTime(0, 0, 0);
133
+			$dataCondition[$this->prepareColumn($filter->getColumn()).'>='] = $date_from->setTime(0, 0, 0);
134 134
 		}
135 135
 
136 136
 		if ($value_to) {
137 137
 			$date_to = DateTimeHelper::tryConvertToDateTime($value_to, [$filter->getPhpFormat()]);
138
-			$dataCondition[$this->prepareColumn($filter->getColumn()) . '<='] = $date_to->setTime(23, 59, 59);
138
+			$dataCondition[$this->prepareColumn($filter->getColumn()).'<='] = $date_to->setTime(23, 59, 59);
139 139
 		}
140 140
 
141 141
 		if (!empty($dataCondition)) {
@@ -160,11 +160,11 @@  discard block
 block discarded – undo
160 160
 		$dataCondition = [];
161 161
 
162 162
 		if ($value_from) {
163
-			$dataCondition[$this->prepareColumn($filter->getColumn()) . '>='] = $value_from;
163
+			$dataCondition[$this->prepareColumn($filter->getColumn()).'>='] = $value_from;
164 164
 		}
165 165
 
166 166
 		if ($value_to) {
167
-			$dataCondition[$this->prepareColumn($filter->getColumn()) . '<='] = $value_to;
167
+			$dataCondition[$this->prepareColumn($filter->getColumn()).'<='] = $value_to;
168 168
 		}
169 169
 
170 170
 		if (!empty($dataCondition)) {
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
 	private function prepareColumn(string $column): string
316 316
 	{
317 317
 		if (Strings::contains($column, '.')) {
318
-			return 'this->' . str_replace('.', '->', $column);
318
+			return 'this->'.str_replace('.', '->', $column);
319 319
 		}
320 320
 		return $column;
321 321
 	}
Please login to merge, or discard this patch.
src/DataSource/DoctrineDataSource.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 			$this->root_alias = current($this->root_alias);
88 88
 		}
89 89
 
90
-		return $this->root_alias . '.' . $column;
90
+		return $this->root_alias.'.'.$column;
91 91
 	}
92 92
 
93 93
 
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
 		$p = $this->getPlaceholder();
289 289
 
290 290
 		$values = $filter->getCondition()[$filter->getColumn()];
291
-		$expr = $this->data_source->expr()->in($c, ':' . $p);
291
+		$expr = $this->data_source->expr()->in($c, ':'.$p);
292 292
 
293 293
 		$this->data_source->andWhere($expr)->setParameter($p, $values);
294 294
 	}
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
 	 */
372 372
 	public function getPlaceholder(): int
373 373
 	{
374
-		return 'param' . ($this->placeholder++);
374
+		return 'param'.($this->placeholder++);
375 375
 	}
376 376
 
377 377
 
Please login to merge, or discard this patch.
src/DataSource/NetteDatabaseTableDataSource.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 		} catch (\LogicException $e) {
63 63
 			if ($data_source_sql_builder->getGroup() !== '') {
64 64
 				return $this->data_source->count(
65
-					'DISTINCT ' . Strings::replace($data_source_sql_builder->getGroup(), '~ (DESC|ASC)~')
65
+					'DISTINCT '.Strings::replace($data_source_sql_builder->getGroup(), '~ (DESC|ASC)~')
66 66
 				);
67 67
 			}
68 68
 
@@ -71,11 +71,11 @@  discard block
 block discarded – undo
71 71
 
72 72
 		if ($data_source_sql_builder->getGroup() !== '') {
73 73
 			return $this->data_source->count(
74
-				'DISTINCT ' . Strings::replace($data_source_sql_builder->getGroup(), '~ (DESC|ASC)~')
74
+				'DISTINCT '.Strings::replace($data_source_sql_builder->getGroup(), '~ (DESC|ASC)~')
75 75
 			);
76 76
 		} else {
77 77
 			return $this->data_source->count(
78
-				$this->data_source->getName() . '.' . (is_array($primary) ? reset($primary) : $primary)
78
+				$this->data_source->getName().'.'.(is_array($primary) ? reset($primary) : $primary)
79 79
 			);
80 80
 		}
81 81
 	}
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 					$args[] = "%$word%";
207 207
 				}
208 208
 			}
209
-			$like = substr($like, 0, strlen($like) - 4) . ')';
209
+			$like = substr($like, 0, strlen($like) - 4).')';
210 210
 
211 211
 			$or[] = $like;
212 212
 			$big_or .= "$like OR ";
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 		}
215 215
 
216 216
 		if (sizeof($or) > 1) {
217
-			$big_or = substr($big_or, 0, strlen($big_or) - 4) . ')';
217
+			$big_or = substr($big_or, 0, strlen($big_or) - 4).')';
218 218
 
219 219
 			$query = array_merge([$big_or], $big_or_args);
220 220
 
@@ -245,9 +245,9 @@  discard block
 block discarded – undo
245 245
 
246 246
 			foreach ($values as $value) {
247 247
 				if ($i === $length) {
248
-					$or .= $filter->getColumn() . ' = ?)';
248
+					$or .= $filter->getColumn().' = ?)';
249 249
 				} else {
250
-					$or .= $filter->getColumn() . ' = ? OR ';
250
+					$or .= $filter->getColumn().' = ? OR ';
251 251
 				}
252 252
 
253 253
 				$i++;
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 
258 258
 			call_user_func_array([$this->data_source, 'where'], $values);
259 259
 		} else {
260
-			$this->data_source->where($filter->getColumn() . ' = ?', reset($values));
260
+			$this->data_source->where($filter->getColumn().' = ?', reset($values));
261 261
 		}
262 262
 	}
263 263
 
Please login to merge, or discard this patch.
src/AggregationFunction/FunctionSum.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 		if ($dataSource instanceof QueryBuilder) {
67 67
 			$column = Strings::contains($this->column, '.')
68 68
 				? $this->column
69
-				: current($dataSource->getRootAliases()) . '.' . $this->column;
69
+				: current($dataSource->getRootAliases()).'.'.$this->column;
70 70
 
71 71
 			$this->result = $dataSource
72 72
 				->select(sprintf('SUM(%s)', $column))
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 		}
76 76
 
77 77
 		if ($dataSource instanceof Collection) {
78
-			$dataSource->forAll(function ($key, $value) {
78
+			$dataSource->forAll(function($key, $value) {
79 79
 				$this->result += PropertyAccessHelper::getValue($value, $this->column);
80 80
 			});
81 81
 		}
Please login to merge, or discard this patch.
src/AggregationFunction/TDataGridAggregationFunction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 		}
43 43
 
44 44
 		if (isset($this->aggregationFunctions[$key])) {
45
-			throw new DataGridException('There is already a AggregationFunction defined on column ' . $key);
45
+			throw new DataGridException('There is already a AggregationFunction defined on column '.$key);
46 46
 		}
47 47
 
48 48
 		if ($this->multipleAggregationFunction instanceof IMultipleAggregationFunction) {
Please login to merge, or discard this patch.