Skip to content

Commit 3436139

Browse files
Bump guzzlehttp/psr7 from 1.8.1 to 1.8.5 (#35)
* Bump guzzlehttp/psr7 from 1.8.1 to 1.8.5 Bumps [guzzlehttp/psr7](https://github.com/guzzle/psr7) from 1.8.1 to 1.8.5. - [Release notes](https://github.com/guzzle/psr7/releases) - [Changelog](https://github.com/guzzle/psr7/blob/1.8.5/CHANGELOG.md) - [Commits](guzzle/psr7@1.8.1...1.8.5) --- updated-dependencies: - dependency-name: guzzlehttp/psr7 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * Apply fixes from StyleCI Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: StyleCI Bot <bot@styleci.io>
1 parent 6c505db commit 3436139

15 files changed

+133
-66
lines changed

composer.lock

Lines changed: 46 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/CategorizedValues.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ class CategorizedValues
3030

3131
/**
3232
* CategorizedValues constructor.
33-
* @param SearchParser $searchParser
33+
*
34+
* @param SearchParser $searchParser
35+
*
3436
* @throws Exceptions\JsonQueryBuilderException
3537
*/
3638
public function __construct(SearchParser $searchParser)

src/Config/ModelConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function getOrderBy(): array
6969
/**
7070
* Union of Eloquent exclusion (guarded/fillable) and forbidden columns.
7171
*
72-
* @param array $forbiddenKeys
72+
* @param array $forbiddenKeys
7373
* @return array
7474
*/
7575
public function getForbidden(array $forbiddenKeys)

src/Config/OperatorsConfig.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ protected function operatorCallbackMapping(): array
2424

2525
/**
2626
* Extract operators from registered 'operator' classes.
27+
*
2728
* @return array
2829
*/
2930
public function getOperators(): array
@@ -35,8 +36,9 @@ public function getOperators(): array
3536
}
3637

3738
/**
38-
* @param string $operator
39+
* @param string $operator
3940
* @return string
41+
*
4042
* @throws JsonQueryBuilderException
4143
*/
4244
public function getCallbackClassFromOperator(string $operator): string

src/Config/SearchConfig.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ abstract class SearchConfig
1313

1414
/**
1515
* SearchConfig constructor.
16+
*
1617
* @throws JsonQueryBuilderException
1718
*/
1819
public function __construct()

src/Config/TypesConfig.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ protected function configKey(): string
1515
}
1616

1717
/**
18-
* @param string $typeName
18+
* @param string $typeName
1919
* @return mixed
20+
*
2021
* @throws JsonQueryBuilderException
2122
*/
2223
public function getTypeClassFromTypeName(string $typeName): AbstractType

src/JsonQuery.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ class JsonQuery
2020

2121
/**
2222
* JsonQuery constructor.
23-
* @param Builder $builder
24-
* @param array $input
23+
*
24+
* @param Builder $builder
25+
* @param array $input
26+
*
2527
* @throws JsonQueryBuilderException
2628
*/
2729
public function __construct(Builder $builder, array $input)
@@ -83,7 +85,7 @@ protected function appendConfigQueries(): void
8385
}
8486

8587
/**
86-
* @param string $requestParameter
88+
* @param string $requestParameter
8789
* @return bool
8890
*/
8991
protected function parameterExists(string $requestParameter): bool
@@ -97,6 +99,7 @@ protected function parameterExists(string $requestParameter): bool
9799
/**
98100
* @param $requestParameter
99101
* @return AbstractParameter
102+
*
100103
* @throws JsonQueryBuilderException
101104
*/
102105
protected function instantiateRequestParameter(string $requestParameter): AbstractParameter
@@ -113,7 +116,7 @@ protected function instantiateRequestParameter(string $requestParameter): Abstra
113116
/**
114117
* Get input for given parameter name and wrap it as an array if it's not already an array.
115118
*
116-
* @param string $parameterName
119+
* @param string $parameterName
117120
* @return array
118121
*/
119122
protected function wrapInput(string $parameterName): array

src/RequestParameters/AbstractParameter.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ abstract class AbstractParameter
1616

1717
/**
1818
* AbstractParameter constructor.
19-
* @param array $arguments
20-
* @param Builder $builder
21-
* @param ModelConfig $modelConfig
19+
*
20+
* @param array $arguments
21+
* @param Builder $builder
22+
* @param ModelConfig $modelConfig
2223
*/
2324
public function __construct(array $arguments, Builder $builder, ModelConfig $modelConfig)
2425
{
@@ -29,12 +30,14 @@ public function __construct(array $arguments, Builder $builder, ModelConfig $mod
2930

3031
/**
3132
* JSON key by which the parameter will be recognized.
33+
*
3234
* @return string
3335
*/
3436
abstract public static function getParameterName(): string;
3537

3638
/**
3739
* Append the query to Eloquent builder.
40+
*
3841
* @throws JsonQueryBuilderException
3942
*/
4043
abstract protected function appendQuery(): void;
@@ -50,6 +53,7 @@ public function run(): void
5053

5154
/**
5255
* Check validity of fetched arguments and throw exception if it fails.
56+
*
5357
* @throws JsonQueryBuilderException
5458
*/
5559
protected function areArgumentsValid(): void

src/RequestParameters/OrderByParameter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ protected function appendQuery(): void
2424
* If argument is provided as a simple string without direction, we will
2525
* assume that direction is 'asc'.
2626
*
27-
* @param string|int $column
28-
* @param string $direction
27+
* @param string|int $column
28+
* @param string $direction
2929
* @return array
3030
*/
3131
protected function fallBackToDefaultDirection($column, string $direction): array

src/RequestParameters/SearchParameter.php

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)