@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | |
| 210 | 210 | $segments = \array_filter( |
| 211 | 211 | $matches, |
| 212 | - function ($match) { |
|
| 212 | + function($match) { |
|
| 213 | 213 | return (\mb_strlen($match, 'UTF-8') > 0); |
| 214 | 214 | } |
| 215 | 215 | ); |
@@ -623,84 +623,84 @@ discard block |
||
| 623 | 623 | $filters = [ |
| 624 | 624 | [ |
| 625 | 625 | 'tokens' => ['=', '=='], |
| 626 | - 'closure' => function ($item, $property, $value) { |
|
| 626 | + 'closure' => function($item, $property, $value) { |
|
| 627 | 627 | return $item[$property] == $value[0]; |
| 628 | 628 | }, |
| 629 | 629 | ], |
| 630 | 630 | |
| 631 | 631 | [ |
| 632 | 632 | 'tokens' => ['===', 'eq'], |
| 633 | - 'closure' => function ($item, $property, $value) { |
|
| 633 | + 'closure' => function($item, $property, $value) { |
|
| 634 | 634 | return $item[$property] === $value[0]; |
| 635 | 635 | }, |
| 636 | 636 | ], |
| 637 | 637 | |
| 638 | 638 | [ |
| 639 | 639 | 'tokens' => ['!='], |
| 640 | - 'closure' => function ($item, $property, $value) { |
|
| 640 | + 'closure' => function($item, $property, $value) { |
|
| 641 | 641 | return $item[$property] != $value[0]; |
| 642 | 642 | }, |
| 643 | 643 | ], |
| 644 | 644 | |
| 645 | 645 | [ |
| 646 | 646 | 'tokens' => ['!==', 'ne'], |
| 647 | - 'closure' => function ($item, $property, $value) { |
|
| 647 | + 'closure' => function($item, $property, $value) { |
|
| 648 | 648 | return $item[$property] !== $value[0]; |
| 649 | 649 | }, |
| 650 | 650 | ], |
| 651 | 651 | |
| 652 | 652 | [ |
| 653 | 653 | 'tokens' => ['<', 'lt'], |
| 654 | - 'closure' => function ($item, $property, $value) { |
|
| 654 | + 'closure' => function($item, $property, $value) { |
|
| 655 | 655 | return $item[$property] < $value[0]; |
| 656 | 656 | }, |
| 657 | 657 | ], |
| 658 | 658 | |
| 659 | 659 | [ |
| 660 | 660 | 'tokens' => ['>', 'gt'], |
| 661 | - 'closure' => function ($item, $property, $value) { |
|
| 661 | + 'closure' => function($item, $property, $value) { |
|
| 662 | 662 | return $item[$property] > $value[0]; |
| 663 | 663 | }, |
| 664 | 664 | ], |
| 665 | 665 | |
| 666 | 666 | [ |
| 667 | 667 | 'tokens' => ['<=', 'lte'], |
| 668 | - 'closure' => function ($item, $property, $value) { |
|
| 668 | + 'closure' => function($item, $property, $value) { |
|
| 669 | 669 | return $item[$property] <= $value[0]; |
| 670 | 670 | }, |
| 671 | 671 | ], |
| 672 | 672 | |
| 673 | 673 | [ |
| 674 | 674 | 'tokens' => ['>=', 'gte'], |
| 675 | - 'closure' => function ($item, $property, $value) { |
|
| 675 | + 'closure' => function($item, $property, $value) { |
|
| 676 | 676 | return $item[$property] >= $value[0]; |
| 677 | 677 | }, |
| 678 | 678 | ], |
| 679 | 679 | |
| 680 | 680 | [ |
| 681 | 681 | 'tokens' => ['in', 'contains'], |
| 682 | - 'closure' => function ($item, $property, $value) { |
|
| 682 | + 'closure' => function($item, $property, $value) { |
|
| 683 | 683 | return \in_array($item[$property], (array) $value, true); |
| 684 | 684 | }, |
| 685 | 685 | ], |
| 686 | 686 | |
| 687 | 687 | [ |
| 688 | 688 | 'tokens' => ['not-in', 'not-contains'], |
| 689 | - 'closure' => function ($item, $property, $value) { |
|
| 689 | + 'closure' => function($item, $property, $value) { |
|
| 690 | 690 | return !\in_array($item[$property], (array) $value, true); |
| 691 | 691 | }, |
| 692 | 692 | ], |
| 693 | 693 | |
| 694 | 694 | [ |
| 695 | 695 | 'tokens' => ['between'], |
| 696 | - 'closure' => function ($item, $property, $value) { |
|
| 696 | + 'closure' => function($item, $property, $value) { |
|
| 697 | 697 | return ($item[$property] >= $value[0] && $item[$property] <= $value[1]); |
| 698 | 698 | }, |
| 699 | 699 | ], |
| 700 | 700 | |
| 701 | 701 | [ |
| 702 | 702 | 'tokens' => ['not-between'], |
| 703 | - 'closure' => function ($item, $property, $value) { |
|
| 703 | + 'closure' => function($item, $property, $value) { |
|
| 704 | 704 | return ($item[$property] < $value[0] || $item[$property] > $value[1]); |
| 705 | 705 | }, |
| 706 | 706 | ], |
@@ -710,7 +710,7 @@ discard block |
||
| 710 | 710 | // Search for operation. |
| 711 | 711 | if (\in_array($operation, $filter['tokens'])) { |
| 712 | 712 | $closure = \Closure::fromCallable( |
| 713 | - function ($item) use ($filter, $property, $value) { |
|
| 713 | + function($item) use ($filter, $property, $value) { |
|
| 714 | 714 | $item = (array) $item; |
| 715 | 715 | |
| 716 | 716 | if (!array_key_exists($property, $item)) { |
@@ -730,7 +730,7 @@ discard block |
||
| 730 | 730 | // Dummy closure if nothing is provided. |
| 731 | 731 | if (empty($closure)) { |
| 732 | 732 | $closure = \Closure::fromCallable( |
| 733 | - function () { |
|
| 733 | + function() { |
|
| 734 | 734 | return true; |
| 735 | 735 | } |
| 736 | 736 | ); |