@@ -45,12 +45,13 @@ protected function appendQuery(): void
4545 /**
4646 * Making query from input parameters with recursive calls if needed for top level logical operators (check readme).
4747 *
48- * @param Builder $builder
49- * @param array $arguments
50- * @param string $boolOperator
48+ * @param Builder $builder
49+ * @param array $arguments
50+ * @param string $boolOperator
51+ *
5152 * @throws JsonQueryBuilderException
5253 */
53- protected function makeQuery (Builder $ builder , array $ arguments , string $ boolOperator = self :: AND ): void
54+ protected function makeQuery (Builder $ builder , array $ arguments , string $ boolOperator = self ::AND ): void
5455 {
5556 foreach ($ arguments as $ key => $ value ) {
5657 if ($ this ->isTopLevelBoolOperator ($ key )) {
@@ -83,19 +84,20 @@ protected function makeQuery(Builder $builder, array $arguments, string $boolOpe
8384
8485 protected function isTopLevelBoolOperator ($ key ): bool
8586 {
86- return in_array ($ key , [self :: OR , self :: AND ], true );
87+ return in_array ($ key , [self ::OR , self ::AND ], true );
8788 }
8889
8990 /**
90- * @param string $boolOperator
91+ * @param string $boolOperator
9192 * @return string
93+ *
9294 * @throws JsonQueryBuilderException
9395 */
9496 protected function getQueryFunctionName (string $ boolOperator ): string
9597 {
96- if ($ boolOperator === self :: AND ) {
98+ if ($ boolOperator === self ::AND ) {
9799 return self ::LARAVEL_WHERE ;
98- } elseif ($ boolOperator === self :: OR ) {
100+ } elseif ($ boolOperator === self ::OR ) {
99101 return self ::LARAVEL_OR_WHERE ;
100102 }
101103
@@ -115,10 +117,11 @@ protected function hasSubSearch($key, $value): bool
115117 }
116118
117119 /**
118- * @param string $functionName
119- * @param Builder $builder
120+ * @param string $functionName
121+ * @param Builder $builder
120122 * @param $key
121123 * @param $value
124+ *
122125 * @throws JsonQueryBuilderException
123126 */
124127 protected function makeSingleQuery (string $ functionName , Builder $ builder , $ key , $ value ): void
@@ -129,10 +132,11 @@ protected function makeSingleQuery(string $functionName, Builder $builder, $key,
129132 }
130133
131134 /**
132- * @param Builder $builder
133- * @param OperatorsConfig $operatorsConfig
134- * @param string $column
135- * @param string $argument
135+ * @param Builder $builder
136+ * @param OperatorsConfig $operatorsConfig
137+ * @param string $column
138+ * @param string $argument
139+ *
136140 * @throws JsonQueryBuilderException
137141 */
138142 protected function applyArguments (Builder $ builder , OperatorsConfig $ operatorsConfig , string $ column , string $ argument ): void
@@ -153,11 +157,12 @@ protected function applyArguments(Builder $builder, OperatorsConfig $operatorsCo
153157 /**
154158 * @param $argument
155159 * @return array
160+ *
156161 * @throws JsonQueryBuilderException
157162 */
158163 protected function splitByBoolOperators ($ argument ): array
159164 {
160- $ splitByOr = explode (self :: OR , $ argument );
165+ $ splitByOr = explode (self ::OR , $ argument );
161166
162167 if (empty ($ splitByOr )) {
163168 throw new JsonQueryBuilderException ('Something went wrong. Did you forget to add arguments? ' );
@@ -166,7 +171,7 @@ protected function splitByBoolOperators($argument): array
166171 $ splitByAnd = [];
167172
168173 foreach ($ splitByOr as $ item ) {
169- $ splitByAnd [] = explode (self :: AND , $ item );
174+ $ splitByAnd [] = explode (self ::AND , $ item );
170175 }
171176
172177 return $ splitByAnd ;
@@ -175,9 +180,10 @@ protected function splitByBoolOperators($argument): array
175180 /**
176181 * Append the query based on the given argument.
177182 *
178- * @param Builder $builder
179- * @param OperatorsConfig $operatorsConfig
180- * @param SearchParser $searchParser
183+ * @param Builder $builder
184+ * @param OperatorsConfig $operatorsConfig
185+ * @param SearchParser $searchParser
186+ *
181187 * @throws JsonQueryBuilderException
182188 */
183189 protected function appendSingle (Builder $ builder , OperatorsConfig $ operatorsConfig , SearchParser $ searchParser ): void
0 commit comments