Passed
Pull Request — master (#46)
by Teye
04:41
created
src/Extractions/StringFormatExtraction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     protected NullHandling $nullHandling;
19 19
 
20
-    public function __construct(string $sprintfExpression, string|NullHandling $nullHandling = NullHandling::NULL_STRING)
20
+    public function __construct(string $sprintfExpression, string | NullHandling $nullHandling = NullHandling::NULL_STRING)
21 21
     {
22 22
         $this->sprintfExpression = $sprintfExpression;
23 23
         $this->nullHandling      = is_string($nullHandling) ? NullHandling::from($nullHandling) : $nullHandling;
Please login to merge, or discard this patch.
src/Extractions/TimeFormatExtraction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
      */
50 50
     public function __construct(
51 51
         ?string $format = null,
52
-        string|Granularity $granularity = null,
52
+        string | Granularity $granularity = null,
53 53
         ?string $locale = null,
54 54
         ?string $timeZone = null,
55 55
         ?bool $asMilliseconds = null
Please login to merge, or discard this patch.
src/Extractions/RegexExtraction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
     public function __construct(
28 28
         string $regexp,
29 29
         int $groupToExtract = 1,
30
-        bool|string $keepMissingValue = false
30
+        bool | string $keepMissingValue = false
31 31
     ) {
32 32
         $this->regexp                  = $regexp;
33 33
         $this->groupToExtract          = $groupToExtract;
Please login to merge, or discard this patch.
src/Extractions/InlineLookupExtraction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
      *                                               whether it is injective. If left unspecified, Druid will
35 35
      *                                               use the registered cluster-wide lookup configuration.
36 36
      */
37
-    public function __construct(array $map, bool|string $keepMissingValue = false, bool $optimize = true, bool $injective = null)
37
+    public function __construct(array $map, bool | string $keepMissingValue = false, bool $optimize = true, bool $injective = null)
38 38
     {
39 39
         $this->map       = $map;
40 40
         $this->optimize  = $optimize;
Please login to merge, or discard this patch.
src/Extractions/LookupExtraction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
      */
35 35
     public function __construct(
36 36
         string $lookupName,
37
-        bool|string $replaceMissingValue = true,
37
+        bool | string $replaceMissingValue = true,
38 38
         bool $optimize = true,
39 39
         ?bool $injective = null
40 40
 
Please login to merge, or discard this patch.
src/Dimensions/Dimension.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,13 +28,13 @@
 block discarded – undo
28 28
     public function __construct(
29 29
         string $dimension,
30 30
         string $outputName = null,
31
-        string|DataType $outputType = DataType::STRING,
31
+        string | DataType $outputType = DataType::STRING,
32 32
         ExtractionInterface $extractionFunction = null
33 33
     ) {
34 34
         $this->dimension  = $dimension;
35 35
         $this->outputName = $outputName ?: $dimension;
36 36
 
37
-        if( empty($outputType)) {
37
+        if (empty($outputType)) {
38 38
             $outputType = DataType::STRING;
39 39
         } else {
40 40
             $outputType = is_string($outputType) ? DataType::from(strtolower($outputType)) : $outputType;
Please login to merge, or discard this patch.
src/Dimensions/LookupDimension.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,12 +12,12 @@  discard block
 block discarded – undo
12 12
     /**
13 13
      * @var string|array<int|string,string>
14 14
      */
15
-    protected string|array $registeredLookupFunctionOrMap;
15
+    protected string | array $registeredLookupFunctionOrMap;
16 16
 
17 17
     /**
18 18
      * @var bool|string
19 19
      */
20
-    protected string|bool $keepMissingValue;
20
+    protected string | bool $keepMissingValue;
21 21
 
22 22
     protected bool $isOneToOne;
23 23
 
@@ -39,9 +39,9 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function __construct(
41 41
         string $dimension,
42
-        array|string $registeredLookupFunctionOrMap,
42
+        array | string $registeredLookupFunctionOrMap,
43 43
         string $outputName = '',
44
-        bool|string $keepMissingValue = false,
44
+        bool | string $keepMissingValue = false,
45 45
         bool $isOneToOne = false
46 46
     ) {
47 47
         $this->dimension                     = $dimension;
Please login to merge, or discard this patch.
src/DruidClient.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
      *
93 93
      * @return \Level23\Druid\Queries\QueryBuilder
94 94
      */
95
-    public function query(string $dataSource = '', string|Granularity $granularity = Granularity::ALL): QueryBuilder
95
+    public function query(string $dataSource = '', string | Granularity $granularity = Granularity::ALL): QueryBuilder
96 96
     {
97 97
         return new QueryBuilder($this, $dataSource, $granularity);
98 98
     }
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
         /** @var array<string,array<mixed>|int|string> $payload */
149 149
         $payload = $task->toArray();
150 150
 
151
-        $this->log('Executing druid task: '. var_export($payload, true));
151
+        $this->log('Executing druid task: ' . var_export($payload, true));
152 152
 
153 153
         /** @var string[] $result */
154 154
         $result = $this->executeRawRequest(
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
             if (!is_array($row)) {
328 328
                 throw new InvalidArgumentException('We failed to parse response!');
329 329
             }
330
-        } catch (InvalidArgumentException|JsonException $exception ) {
330
+        } catch (InvalidArgumentException | JsonException $exception) {
331 331
             $this->log('We failed to decode druid response. ');
332 332
             $this->log('Status code: ' . $response->getStatusCode());
333 333
             $this->log('Response body: ' . $contents);
Please login to merge, or discard this patch.
src/PostAggregations/MethodPostAggregator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,9 +22,9 @@
 block discarded – undo
22 22
      * @param PostAggregationCollection $fields
23 23
      * @param string|DataType                    $type
24 24
      */
25
-    public function __construct(string $outputName, PostAggregationCollection $fields, string|DataType $type = DataType::LONG)
25
+    public function __construct(string $outputName, PostAggregationCollection $fields, string | DataType $type = DataType::LONG)
26 26
     {
27
-        $type = is_string($type)? DataType::from(strtolower($type)) : $type;
27
+        $type = is_string($type) ? DataType::from(strtolower($type)) : $type;
28 28
         if (!in_array($type, [DataType::LONG, DataType::DOUBLE])) {
29 29
             throw new InvalidArgumentException(
30 30
                 'Supported types are "long" and "double". Value given: ' . $type->value
Please login to merge, or discard this patch.