| Conditions | 2 |
| Paths | 1 |
| Total Lines | 21 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | public function boot() |
||
| 13 | { |
||
| 14 | \Illuminate\Database\Eloquent\Builder::macro("toSqlWithBindings", function () { |
||
| 15 | $query = $this; |
||
| 16 | try { |
||
| 17 | $query->addSelect(\Illuminate\Support\Facades\DB::raw('{sql::::::::sql}'))->first(); |
||
|
|
|||
| 18 | } catch (\Exception $Exception) { |
||
| 19 | $string = $Exception->getMessage(); |
||
| 20 | $string = explode('SQL: ', $string)[1]; |
||
| 21 | $string = str_replace(' , {sql::::::::sql}', '', $string); |
||
| 22 | $string = str_replace(', {sql::::::::sql}', '', $string); |
||
| 23 | $string = str_replace(' {sql::::::::sql}', '', $string); |
||
| 24 | $string = substr_replace($string, "", -1); |
||
| 25 | return $string; |
||
| 26 | } |
||
| 27 | }); |
||
| 28 | |||
| 29 | \Illuminate\Database\Eloquent\Builder::macro("paginateToDatatable", function () { |
||
| 30 | return app('datatables')->eloquent($this)->toJson(); |
||
| 31 | }); |
||
| 32 | } |
||
| 33 | } |
||
| 34 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.