Skip to content

Commit 7cbbb41

Browse files
authored
Feature/minor improvements (#37)
* Install ext-json * Minor improvements * Typo * Change this back
1 parent c8f2e56 commit 7cbbb41

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

composer.json

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
],
2121
"require": {
2222
"php": ">=7.2",
23+
"ext-json": "*",
2324
"illuminate/cache": "~5.5|~6|~7",
2425
"illuminate/routing": "~5.5|~6|~7",
2526
"illuminate/support": "~5.5|~6|~7",

src/Stack/Filter.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ public function parseFilterString($filter_string)
4444
/**
4545
* Set the filter type.
4646
*
47-
* @param $type
47+
* @param string $type
4848
*
4949
* @return void
5050
*
5151
* @throws InvalidFilterTypeException
5252
*/
53-
protected function setFilterType($type)
53+
protected function setFilterType(string $type)
5454
{
5555
if ('allow' === $type) {
5656
$this->block_filter = false;

tests/FilterTest.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -1315,7 +1315,7 @@ public function it_raises_exception_when_browsers_are_misconfigured_in_the_rules
13151315

13161316
$rules = [
13171317
'Device' => [
1318-
'Broswer',
1318+
'Browser',
13191319
],
13201320
];
13211321

@@ -1351,7 +1351,7 @@ public function it_raises_exception_when_versions_are_misconfigured_in_the_rules
13511351

13521352
$rules = [
13531353
'Device' => [
1354-
'Broswer' => [
1354+
'Browser' => [
13551355
'2',
13561356
],
13571357
],
@@ -1371,7 +1371,7 @@ public function it_raises_exception_when_versions_operators_are_misconfigured_in
13711371

13721372
$rules = [
13731373
'Device' => [
1374-
'Broswer' => [
1374+
'Browser' => [
13751375
'~' => '2',
13761376
],
13771377
],
@@ -1391,7 +1391,7 @@ public function it_raises_exception_when_versions_are_not_a_string()
13911391

13921392
$rules = [
13931393
'Device' => [
1394-
'Broswer' => [
1394+
'Browser' => [
13951395
'=' => 2,
13961396
],
13971397
],

0 commit comments

Comments
 (0)