@@ -112,6 +112,7 @@ public function getConfig()
112112 */
113113 public function query (QueryBuilder $ builder ): QueryDataTable
114114 {
115+ /** @var string */
115116 $ dataTable = config ('datatables.engines.query ' );
116117
117118 $ this ->validateDataTable ($ dataTable , QueryDataTable::class);
@@ -127,6 +128,7 @@ public function query(QueryBuilder $builder): QueryDataTable
127128 */
128129 public function eloquent (EloquentBuilder $ builder ): EloquentDataTable
129130 {
131+ /** @var string */
130132 $ dataTable = config ('datatables.engines.eloquent ' );
131133
132134 $ this ->validateDataTable ($ dataTable , EloquentDataTable::class);
@@ -142,6 +144,7 @@ public function eloquent(EloquentBuilder $builder): EloquentDataTable
142144 */
143145 public function collection ($ collection ): CollectionDataTable
144146 {
147+ /** @var string */
145148 $ dataTable = config ('datatables.engines.collection ' );
146149
147150 $ this ->validateDataTable ($ dataTable , CollectionDataTable::class);
@@ -173,7 +176,7 @@ public function getHtmlBuilder()
173176 *
174177 * @throws \Yajra\DataTables\Exceptions\Exception
175178 */
176- public function validateDataTable (string $ engine , string $ parent )
179+ public function validateDataTable (string $ engine , string $ parent ): void
177180 {
178181 if (! ($ engine == $ parent || is_subclass_of ($ engine , $ parent ))) {
179182 $ this ->throwInvalidEngineException ($ engine , $ parent );
@@ -184,9 +187,11 @@ public function validateDataTable(string $engine, string $parent)
184187 * @param string $engine
185188 * @param string $parent
186189 *
190+ * @return void
191+ *
187192 * @throws \Yajra\DataTables\Exceptions\Exception
188193 */
189- public function throwInvalidEngineException (string $ engine , string $ parent )
194+ public function throwInvalidEngineException (string $ engine , string $ parent ): void
190195 {
191196 throw new Exception ("The given datatable engine ` {$ engine }` is not compatible with ` {$ parent }`. " );
192197 }
0 commit comments