@@ -37,13 +37,13 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | public function addResultSet(SearchResultType $type, array $matches, array $exactMatches = null) { |
| 39 | 39 | $type = $type->getLabel(); |
| 40 | - if(!isset($this->result[$type])) { |
|
| 40 | + if (!isset($this->result[$type])) { |
|
| 41 | 41 | $this->result[$type] = []; |
| 42 | 42 | $this->result['exact'][$type] = []; |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | $this->result[$type] = array_merge($this->result[$type], $matches); |
| 46 | - if(is_array($exactMatches)) { |
|
| 46 | + if (is_array($exactMatches)) { |
|
| 47 | 47 | $this->result['exact'][$type] = array_merge($this->result['exact'][$type], $exactMatches); |
| 48 | 48 | } |
| 49 | 49 | } |
@@ -58,12 +58,12 @@ discard block |
||
| 58 | 58 | |
| 59 | 59 | public function hasResult(SearchResultType $type, $collaboratorId) { |
| 60 | 60 | $type = $type->getLabel(); |
| 61 | - if(!isset($this->result[$type])) { |
|
| 61 | + if (!isset($this->result[$type])) { |
|
| 62 | 62 | return false; |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | $resultArrays = [$this->result['exact'][$type], $this->result[$type]]; |
| 66 | - foreach($resultArrays as $resultArray) { |
|
| 66 | + foreach ($resultArrays as $resultArray) { |
|
| 67 | 67 | foreach ($resultArray as $result) { |
| 68 | 68 | if ($result['value']['shareWith'] === $collaboratorId) { |
| 69 | 69 | return true; |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | public function unsetResult(SearchResultType $type) { |
| 82 | 82 | $type = $type->getLabel(); |
| 83 | 83 | $this->result[$type] = []; |
| 84 | - if(isset($this->result['exact'][$type])) { |
|
| 84 | + if (isset($this->result['exact'][$type])) { |
|
| 85 | 85 | $this->result['exact'][$type] = []; |
| 86 | 86 | } |
| 87 | 87 | } |