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
94
94
}
95
95
96
96
$ 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 );
103
99
104
100
return "{$ carry }- {$ where ['column ' ]}_ {$ value }" ;
105
- }) ?: '' ;
101
+ }) . '' ;
106
102
}
107
103
108
104
protected function getWithModels () : string
@@ -246,4 +242,18 @@ public function sum($column)
246
242
return parent ::sum ($ column );
247
243
});
248
244
}
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
+ }
249
259
}
You can’t perform that action at this time.
0 commit comments