Skip to content

Commit c018737

Browse files
committed
refactor
1 parent d34cbe3 commit c018737

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

src/DataTables.php

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use Illuminate\Contracts\Database\Query\Builder as QueryBuilder;
77
use Illuminate\Support\Traits\Macroable;
88
use Yajra\DataTables\Exceptions\Exception;
9-
use Yajra\DataTables\Html\Builder;
109
use Yajra\DataTables\Utilities\Config;
1110
use Yajra\DataTables\Utilities\Request;
1211

@@ -94,7 +93,7 @@ public function getConfig(): Config
9493
}
9594

9695
/**
97-
* DataTables using Query.
96+
* DataTables using query builder.
9897
*
9998
* @throws \Yajra\DataTables\Exceptions\Exception
10099
*/
@@ -157,15 +156,7 @@ public function resource($resource)
157156
public function validateDataTable(string $engine, string $parent): void
158157
{
159158
if (! ($engine == $parent || is_subclass_of($engine, $parent))) {
160-
$this->throwInvalidEngineException($engine, $parent);
159+
throw new Exception("The given datatable engine `$engine` is not compatible with `$parent`.");
161160
}
162161
}
163-
164-
/**
165-
* @throws \Yajra\DataTables\Exceptions\Exception
166-
*/
167-
public function throwInvalidEngineException(string $engine, string $parent): void
168-
{
169-
throw new Exception("The given datatable engine `{$engine}` is not compatible with `{$parent}`.");
170-
}
171162
}

0 commit comments

Comments
 (0)