File tree Expand file tree Collapse file tree 1 file changed +17
-7
lines changed Expand file tree Collapse file tree 1 file changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -94,15 +94,11 @@ protected function getWhereClauses(array $wheres = []) : string
9494 }
9595
9696 $ value = array_get ($ where , 'value ' );
97- $ value .= in_array ($ where ['type ' ], ['In ' , 'Null ' , 'NotNull ' ])
98- ? strtolower ($ where ['type ' ])
99- : '' ;
100- $ value .= is_array (array_get ($ where , 'values ' ))
101- ? '_ ' . implode ('_ ' , $ where ['values ' ])
102- : '' ;
97+ $ value .= $ this ->getTypeClause ($ where );
98+ $ value .= $ this ->getValuesClause ($ where );
10399
104100 return "{$ carry }- {$ where ['column ' ]}_ {$ value }" ;
105- }) ?: '' ;
101+ }) . '' ;
106102 }
107103
108104 protected function getWithModels () : string
@@ -246,4 +242,18 @@ public function sum($column)
246242 return parent ::sum ($ column );
247243 });
248244 }
245+
246+ protected function getTypeClause ($ where )
247+ {
248+ return in_array ($ where ['type ' ], ['In ' , 'Null ' , 'NotNull ' ])
249+ ? strtolower ($ where ['type ' ])
250+ : '' ;
251+ }
252+
253+ protected function getValuesClause ($ where )
254+ {
255+ return is_array (array_get ($ where , 'values ' ))
256+ ? '_ ' . implode ('_ ' , $ where ['values ' ])
257+ : '' ;
258+ }
249259}
You can’t perform that action at this time.
0 commit comments