Completed
Pull Request — master (#242)
by Dalibor
07:43 queued 02:23
created
src/Column/Action.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,6 @@
 block discarded – undo
10 10
 
11 11
 use Nette\Utils\Html;
12 12
 use Ublaboo\DataGrid\DataGrid;
13
-use Ublaboo\DataGrid\Exception\DataGridHasToBeAttachedToPresenterComponentException;
14 13
 use Ublaboo\DataGrid\Exception\DataGridException;
15 14
 use Ublaboo\DataGrid\Row;
16 15
 
Please login to merge, or discard this patch.
Doc Comments   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 	/**
186 186
 	 * Set icon
187 187
 	 * @param string|callable $icon
188
-	 * @return static|callable
188
+	 * @return Action
189 189
 	 * @throws DataGridException
190 190
 	 */
191 191
 	public function setIcon($icon)
@@ -270,7 +270,8 @@  discard block
 block discarded – undo
270 270
 
271 271
 	/**
272 272
 	 * Check whether given property is string or callable
273
-	 * @param  mixed $property
273
+	 * @param  callable $property
274
+	 * @param string $name
274 275
 	 * @return void
275 276
 	 * @throws DataGridException
276 277
 	 */
Please login to merge, or discard this patch.
src/Column/ColumnLink.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,6 @@
 block discarded – undo
10 10
 
11 11
 use Nette\Utils\Html;
12 12
 use Ublaboo\DataGrid\DataGrid;
13
-use Ublaboo\DataGrid\Exception\DataGridHasToBeAttachedToPresenterComponentException;
14 13
 use Ublaboo\DataGrid\Exception\DataGridException;
15 14
 use Ublaboo\DataGrid\Row;
16 15
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
 		$element = $a;
109 109
 
110 110
 		if ($this->icon) {
111
-			$a->addHtml(Html::el('span')->class(DataGrid::$icon_prefix . $this->icon));
111
+			$a->addHtml(Html::el('span')->class(DataGrid::$icon_prefix.$this->icon));
112 112
 
113 113
 			if (strlen($value)) {
114 114
 				$a->addHtml(' ');
Please login to merge, or discard this patch.
src/DataSource/DibiFluentDataSource.php 3 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,6 @@
 block discarded – undo
9 9
 namespace Ublaboo\DataGrid\DataSource;
10 10
 
11 11
 use DibiFluent;
12
-use Nette\Utils\Callback;
13 12
 use Nette\Utils\Strings;
14 13
 use Ublaboo\DataGrid\Filter;
15 14
 
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 		$value_from = $conditions[$filter->getColumn()]['from'];
138 138
 		$value_to   = $conditions[$filter->getColumn()]['to'];
139 139
 
140
-        if ($value_from || $value_from != '') {
140
+		if ($value_from || $value_from != '') {
141 141
 			$this->data_source->where('%n >= ?', $filter->getColumn(), $value_from);
142 142
 		}
143 143
 
@@ -164,11 +164,11 @@  discard block
 block discarded – undo
164 164
 				continue;
165 165
 			}
166 166
 
167
-            if ($filter->hasSplitWordsSearch() === FALSE) {
168
-                $words = [$value];
169
-            } else {
170
-                $words = explode(' ', $value);
171
-            }
167
+			if ($filter->hasSplitWordsSearch() === FALSE) {
168
+				$words = [$value];
169
+			} else {
170
+				$words = explode(' ', $value);
171
+			}
172 172
 
173 173
 			foreach ($words as $word) {
174 174
 				$escaped = $this->data_source->getConnection()->getDriver()->escapeLike($word, 0);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@
 block discarded – undo
122 122
 		$or = [];
123 123
 
124 124
 		foreach ($condition as $column => $value) {
125
-			if($filter->isExactSearch()){
125
+			if ($filter->isExactSearch()) {
126 126
 				$this->data_source->where("$column = %s", $value);
127 127
 				continue;
128 128
 			}
Please login to merge, or discard this patch.
src/DataSource/FilterableDataSource.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -8,9 +8,7 @@
 block discarded – undo
8 8
 
9 9
 namespace Ublaboo\DataGrid\DataSource;
10 10
 
11
-use DibiFluent;
12 11
 use Nette\Utils\Callback;
13
-use Nette\Utils\Strings;
14 12
 use Ublaboo\DataGrid\Filter;
15 13
 
16 14
 abstract class FilterableDataSource
Please login to merge, or discard this patch.
src/Column/ColumnStatus.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 
49 49
 		$this->key = $key;
50 50
 
51
-		$this->setTemplate(__DIR__ . '/../templates/column_status.latte');
51
+		$this->setTemplate(__DIR__.'/../templates/column_status.latte');
52 52
 	}
53 53
 
54 54
 
Please login to merge, or discard this patch.
src/Row.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -219,7 +219,7 @@
 block discarded – undo
219 219
 	/**
220 220
 	 * @param  string        $key
221 221
 	 * @param  Column\Column $column
222
-	 * @return void
222
+	 * @return Column\Column
223 223
 	 */
224 224
 	public function applyColumnCallback($key, Column\Column $column)
225 225
 	{
Please login to merge, or discard this patch.
src/GroupAction/GroupSelectAction.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,6 @@
 block discarded – undo
8 8
 
9 9
 namespace Ublaboo\DataGrid\GroupAction;
10 10
 
11
-use Nette;
12
-
13 11
 /**
14 12
  * @method void onSelect()
15 13
  */
Please login to merge, or discard this patch.
src/Filter/FilterMultiSelect.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
 	{
40 40
 		parent::__construct($key, $name, $options, $column);
41 41
 
42
-		$this->addAttribute('data-selected-icon-check', DataGrid::$icon_prefix . 'check');
42
+		$this->addAttribute('data-selected-icon-check', DataGrid::$icon_prefix.'check');
43 43
 	}
44 44
 
45 45
 
Please login to merge, or discard this patch.
src/DataSource/ApiDataSource.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -192,7 +192,7 @@
 block discarded – undo
192 192
 		 */
193 193
 		foreach ($sorting->getSort() as $column => $order) {
194 194
 			$this->sort_column = $column;
195
-			$this->order_column  = $order;
195
+			$this->order_column = $order;
196 196
 		}
197 197
 
198 198
 		return $this;
Please login to merge, or discard this patch.