File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -35,9 +35,9 @@ class CommandHelper
3535 */
3636 public function __construct ($ conn = null )
3737 {
38- $ instance = "Tamedevelopers\Database\DB " ;
39- if (class_exists ( $ instance ) && is_null ( $ conn) ){
40- $ conn = $ instance ::connection ();
38+ $ dbInstance = "\ Tamedevelopers\Database\DB " ;
39+ if (! is_null ( $ conn ) && $ conn instanceof $ dbInstance ){
40+ $ conn = $ dbInstance ::connection ();
4141 }
4242
4343 $ this ->conn = $ conn ;
Original file line number Diff line number Diff line change 88use Traversable ;
99use JsonSerializable ;
1010use Tamedevelopers \Support \Str ;
11- use Tamedevelopers \Database \Schema \Builder ;
12- use Tamedevelopers \Database \Schema \Pagination \Paginator ;
1311use Tamedevelopers \Support \Collections \CollectionMapper ;
1412
1513
@@ -85,13 +83,16 @@ protected function isProxies()
8583 */
8684 protected function isBuilderOrPaginator ($ expression = null )
8785 {
86+ $ paginatorInstance = '\Tamedevelopers\Database\Schema\Pagination\Paginator ' ;
87+ $ builderInstance = '\Tamedevelopers\Database\Schema\Builder ' ;
88+
8889 $ this ->builder = $ expression ;
89- if ($ expression instanceof \Builder ){
90+ if ($ expression instanceof $ builderInstance ){
9091 self ::$ isBuilder = true ;
9192 } else {
9293 self ::$ isBuilder = false ;
9394 }
94- if ($ expression instanceof \Paginator ){
95+ if ($ expression instanceof $ paginatorInstance ){
9596 $ this ->isPaginate = true ;
9697 }
9798 }
You can’t perform that action at this time.
0 commit comments