Completed
Pull Request — master (#68)
by Daniel
02:22
created
lib/Column/DateTimeColumn.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Psi\Component\Grid\Cell;
6 6
 
Please login to merge, or discard this patch.
lib/Column/MoneyColumn.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Psi\Component\Grid\Cell;
6 6
 
Please login to merge, or discard this patch.
lib/View/FilterBar.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Psi\Component\Grid\View;
6 6
 
@@ -25,14 +25,14 @@  discard block
 block discarded – undo
25 25
 
26 26
     public function getUrlParametersForFilter()
27 27
     {
28
-        return array_filter($this->options->getUrlParameters(), function ($key) {
28
+        return array_filter($this->options->getUrlParameters(), function($key) {
29 29
             return $key !== 'filter';
30 30
         }, ARRAY_FILTER_USE_KEY);
31 31
     }
32 32
 
33 33
     public function getFilterUrlParameters()
34 34
     {
35
-        return array_filter($this->options->getUrlParameters(), function ($key) {
35
+        return array_filter($this->options->getUrlParameters(), function($key) {
36 36
             return $key === 'filter';
37 37
         }, ARRAY_FILTER_USE_KEY);
38 38
     }
Please login to merge, or discard this patch.
lib/Column/PropertyColumn.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Psi\Component\Grid\Column;
6 6
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
         $cell->template = 'Property';
29 29
 
30 30
         if (false === is_object($cell->context)) {
31
-            $property = '[' . $property . ']';
31
+            $property = '['.$property.']';
32 32
         }
33 33
 
34 34
         $cell->value = $this->accessor->getValue($cell->context, $property);
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     {
39 39
         $options->setDefault('property', null);
40 40
         $options->setAllowedTypes('property', ['string', 'null']);
41
-        $options->setNormalizer('property', function (OptionsResolver $options, $value) {
41
+        $options->setNormalizer('property', function(OptionsResolver $options, $value) {
42 42
             if (null !== $value) {
43 43
                 return $value;
44 44
             }
Please login to merge, or discard this patch.
lib/Filter/DateFilter.php 2 patches
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@  discard block
 block discarded – undo
5 5
 namespace Psi\Component\Grid\Filter;
6 6
 
7 7
 use Psi\Component\Grid\FilterDataInterface;
8
-use Psi\Component\Grid\FilterInterface;
9 8
 use Psi\Component\ObjectAgent\Query\Comparison;
10 9
 use Psi\Component\ObjectAgent\Query\Expression;
11 10
 use Psi\Component\ObjectAgent\Query\Query;
@@ -13,8 +12,6 @@  discard block
 block discarded – undo
13 12
 use Symfony\Component\Form\FormBuilderInterface;
14 13
 use Symfony\Component\Form\FormInterface;
15 14
 use Symfony\Component\OptionsResolver\OptionsResolver;
16
-use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
17
-use Psi\Component\Grid\Filter\BooleanFilterData;
18 15
 use Symfony\Component\Form\Extension\Core\Type\DateType;
19 16
 use Psi\Component\Grid\Filter\DateFilterData;
20 17
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Psi\Component\Grid\Filter;
6 6
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     public function configureOptions(OptionsResolver $options)
50 50
     {
51 51
         $options->setDefault('data_class', StringFilterData::class);
52
-        $options->setDefault('empty_data', function (FormInterface $form) {
52
+        $options->setDefault('empty_data', function(FormInterface $form) {
53 53
             return new BooleanFilterData(
54 54
                 $form->get('value')->getData()
55 55
             );
Please login to merge, or discard this patch.
lib/Filter/StringFilter.php 2 patches
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -5,13 +5,9 @@
 block discarded – undo
5 5
 namespace Psi\Component\Grid\Filter;
6 6
 
7 7
 use Psi\Component\Grid\FilterDataInterface;
8
-use Psi\Component\Grid\FilterInterface;
9
-use Psi\Component\ObjectAgent\Capabilities;
10 8
 use Psi\Component\ObjectAgent\Query\Comparison;
11 9
 use Psi\Component\ObjectAgent\Query\Expression;
12 10
 use Psi\Component\ObjectAgent\Query\Query;
13
-use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
14
-use Symfony\Component\Form\Extension\Core\Type\HiddenType;
15 11
 use Symfony\Component\Form\Extension\Core\Type\TextType;
16 12
 use Symfony\Component\Form\FormBuilderInterface;
17 13
 use Symfony\Component\Form\FormInterface;
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Psi\Component\Grid\Filter;
6 6
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     {
75 75
         $options->setDefault('comparators', array_keys(self::$comparatorMap));
76 76
         $options->setDefault('data_class', StringFilterData::class);
77
-        $options->setDefault('empty_data', function (FormInterface $form) {
77
+        $options->setDefault('empty_data', function(FormInterface $form) {
78 78
             return new StringFilterData(
79 79
                 $form->get('comparator')->getData(),
80 80
                 $form->get('value')->getData()
@@ -97,13 +97,13 @@  discard block
 block discarded – undo
97 97
             case self::TYPE_NOT_EMPTY:
98 98
                 return;
99 99
             case self::TYPE_CONTAINS:
100
-                return '%' . $value . '%';
100
+                return '%'.$value.'%';
101 101
             case self::TYPE_NOT_CONTAINS:
102
-                return '%' . $value . '%';
102
+                return '%'.$value.'%';
103 103
             case self::TYPE_STARTS_WITH:
104
-                return $value . '%';
104
+                return $value.'%';
105 105
             case self::TYPE_ENDS_WITH:
106
-                return '%' . $value;
106
+                return '%'.$value;
107 107
             case self::TYPE_IN:
108 108
                 return array_map('trim', explode(',', $value));
109 109
             case self::TYPE_NOT_IN:
Please login to merge, or discard this patch.
lib/Filter/AbstractComparatorFilter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,11 +31,11 @@
 block discarded – undo
31 31
 
32 32
     private function getChoices(array $supportedComparators, array $enabledComparators)
33 33
     {
34
-        $supported = array_keys(array_filter($this->getComparatorMap(), function ($comparator) use ($supportedComparators) {
34
+        $supported = array_keys(array_filter($this->getComparatorMap(), function($comparator) use ($supportedComparators) {
35 35
             return in_array($comparator, $supportedComparators);
36 36
         }));
37 37
 
38
-        $supported = array_filter($supported, function ($comparator) use ($enabledComparators) {
38
+        $supported = array_filter($supported, function($comparator) use ($enabledComparators) {
39 39
             return in_array($comparator, $enabledComparators);
40 40
         });
41 41
 
Please login to merge, or discard this patch.
lib/Filter/NumberFilter.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Psi\Component\Grid\Filter;
6 6
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     public function configureOptions(OptionsResolver $options)
50 50
     {
51 51
         $options->setDefault('data_class', StringFilterData::class);
52
-        $options->setDefault('empty_data', function (FormInterface $form) {
52
+        $options->setDefault('empty_data', function(FormInterface $form) {
53 53
             return new BooleanFilterData(
54 54
                 $form->get('value')->getData()
55 55
             );
Please login to merge, or discard this patch.
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -5,13 +5,9 @@
 block discarded – undo
5 5
 namespace Psi\Component\Grid\Filter;
6 6
 
7 7
 use Psi\Component\Grid\FilterDataInterface;
8
-use Psi\Component\Grid\FilterInterface;
9
-use Psi\Component\ObjectAgent\Capabilities;
10 8
 use Psi\Component\ObjectAgent\Query\Comparison;
11 9
 use Psi\Component\ObjectAgent\Query\Expression;
12 10
 use Psi\Component\ObjectAgent\Query\Query;
13
-use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
14
-use Symfony\Component\Form\Extension\Core\Type\HiddenType;
15 11
 use Symfony\Component\Form\Extension\Core\Type\TextType;
16 12
 use Symfony\Component\Form\FormBuilderInterface;
17 13
 use Symfony\Component\Form\FormInterface;
Please login to merge, or discard this patch.
lib/Filter/DateFilterData.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Psi\Component\Grid\Cell;
6 6
 
Please login to merge, or discard this patch.