Skip to content

Commit 9b32154

Browse files
authored
Merge pull request #2 from nophaa/scrutinizer-patch-1
Scrutinizer Auto-Fixes
2 parents 81ef53a + 7812301 commit 9b32154

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/Sipwise/Api/AbstractApi.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,12 @@ protected function createOptionsResolver(array $parameters = [])
195195

196196
$resolver->setDefined('page')
197197
->setAllowedTypes('page', 'int')
198-
->setAllowedValues('page', function ($value) {
198+
->setAllowedValues('page', function($value) {
199199
return $value > 0;
200200
});
201201
$resolver->setDefined('rows')
202202
->setAllowedTypes('rows', 'int')
203-
->setAllowedValues('rows', function ($value) {
203+
->setAllowedValues('rows', function($value) {
204204
return $value > 0 && $value <= 100;
205205
});
206206

lib/Sipwise/HttpClient/Message/QueryStringBuilder.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ public static function build($query)
1717
if (!is_array($query)) {
1818
return static::rawurlencode($query);
1919
}
20-
$query = array_filter($query, function ($value) {
20+
$query = array_filter($query, function($value) {
2121
return null !== $value;
2222
});
2323

24-
return implode('&', array_map(function ($value, $key) {
24+
return implode('&', array_map(function($value, $key) {
2525
return static::encode($value, $key);
2626
}, $query, array_keys($query)));
2727
}
@@ -42,7 +42,7 @@ private static function encode($query, $prefix)
4242

4343
$isIndexedArray = static::isIndexedArray($query);
4444

45-
return implode('&', array_map(function ($value, $key) use ($prefix, $isIndexedArray) {
45+
return implode('&', array_map(function($value, $key) use ($prefix, $isIndexedArray) {
4646
$prefix = $isIndexedArray ? $prefix.'[]' : $prefix.'['.$key.']';
4747

4848
return static::encode($value, $prefix);

0 commit comments

Comments
 (0)