Passed
Pull Request — master (#1401)
by Timo
18:55
created
Classes/Domain/Search/ResultSet/Facets/RequirementsService.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -39,11 +39,11 @@  discard block
 block discarded – undo
39 39
             return true;
40 40
         }
41 41
 
42
-        foreach($requirements as $requirement) {
42
+        foreach ($requirements as $requirement) {
43 43
             $requirementMet = $this->getRequirementMet($facet, $requirement);
44 44
             $requirementMet = $this->getNegationWhenConfigured($requirementMet, $requirement);
45 45
 
46
-            if($requirementMet) {
46
+            if ($requirementMet) {
47 47
                 // early return
48 48
                 return true;
49 49
             }
@@ -86,11 +86,11 @@  discard block
 block discarded – undo
86 86
     protected function getActiveItemValues(AbstractFacet $facet, $facetNameToCheckRequirementsOn)
87 87
     {
88 88
         $facetToCheckRequirements = $facet->getResultSet()->getFacets()->getByName($facetNameToCheckRequirementsOn)->getByPosition(0);
89
-        if(!$facetToCheckRequirements instanceof AbstractFacet) {
89
+        if (!$facetToCheckRequirements instanceof AbstractFacet) {
90 90
             throw new \InvalidArgumentException('Requirement for unexisting facet configured');
91 91
         }
92 92
 
93
-        if(!$facetToCheckRequirements->getIsUsed()) {
93
+        if (!$facetToCheckRequirements->getIsUsed()) {
94 94
             // unused facets do not have active values.
95 95
             return [];
96 96
         }
@@ -114,10 +114,10 @@  discard block
 block discarded – undo
114 114
      */
115 115
     protected function getNegationWhenConfigured($value, $configuration)
116 116
     {
117
-        if(!is_array($configuration) || empty($configuration['negate']) || (bool)$configuration['negate'] === false) {
117
+        if (!is_array($configuration) || empty($configuration['negate']) || (bool)$configuration['negate'] === false) {
118 118
             return $value;
119 119
         }
120 120
 
121
-        return ! ((bool) $value);
121
+        return !((bool)$value);
122 122
     }
123 123
 }
124 124
\ No newline at end of file
Please login to merge, or discard this patch.