Passed
Pull Request — master (#63)
by Teye
14:30 queued 09:12
created
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.
src/PostAggregations/ArithmeticPostAggregator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
      */
39 39
     public function __construct(
40 40
         string $outputName,
41
-        string|ArithmeticFunction $function,
41
+        string | ArithmeticFunction $function,
42 42
         PostAggregationCollection $fields,
43 43
         bool $floatingPointOrdering = true
44 44
     ) {
Please login to merge, or discard this patch.
src/Interval/Interval.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      *
24 24
      * @throws \Exception
25 25
      */
26
-    public function __construct(DateTimeInterface|int|string $start, DateTimeInterface|int|string $stop = null)
26
+    public function __construct(DateTimeInterface | int | string $start, DateTimeInterface | int | string $stop = null)
27 27
     {
28 28
         // Check if we received a "raw" interval string, like 2019-04-15T08:00:00.000Z/2019-04-15T09:00:00.000Z
29 29
         if (is_string($start) && $stop === null) {
Please login to merge, or discard this patch.
src/Tasks/IndexTaskBuilder.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      *
101 101
      * @return $this
102 102
      */
103
-    public function dimension(string $name, string|DataType $type = DataType::STRING): IndexTaskBuilder
103
+    public function dimension(string $name, string | DataType $type = DataType::STRING): IndexTaskBuilder
104 104
     {
105 105
         $this->dimensions[] = [
106 106
             'name' => $name,
@@ -122,8 +122,8 @@  discard block
 block discarded – undo
122 122
      */
123 123
     public function multiValueDimension(
124 124
         string $name,
125
-        string|DataType $type = DataType::STRING,
126
-        string|MultiValueHandling $multiValueHandling = MultiValueHandling::SORTED_ARRAY,
125
+        string | DataType $type = DataType::STRING,
126
+        string | MultiValueHandling $multiValueHandling = MultiValueHandling::SORTED_ARRAY,
127 127
         bool $createBitmapIndex = true
128 128
     ): IndexTaskBuilder {
129 129
         $this->dimensions[] = [
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
      *
185 185
      * @return \Level23\Druid\Tasks\TaskInterface
186 186
      */
187
-    protected function buildTask(array|TaskContext $context): TaskInterface
187
+    protected function buildTask(array | TaskContext $context): TaskInterface
188 188
     {
189 189
         if (is_array($context)) {
190 190
             $context = new TaskContext($context);
Please login to merge, or discard this patch.
src/Tasks/TaskBuilder.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      * @return string
75 75
      * @throws \Level23\Druid\Exceptions\QueryResponseException|\GuzzleHttp\Exception\GuzzleException
76 76
      */
77
-    public function execute(array|TaskContext $context = []): string
77
+    public function execute(array | TaskContext $context = []): string
78 78
     {
79 79
         $task = $this->buildTask($context);
80 80
 
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      * @throws \Level23\Druid\Exceptions\QueryResponseException
91 91
      * @throws \JsonException
92 92
      */
93
-    public function toJson(array|TaskContext $context = []): string
93
+    public function toJson(array | TaskContext $context = []): string
94 94
     {
95 95
         $task = $this->buildTask($context);
96 96
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
      * @return array<string,mixed>
108 108
      * @throws \Level23\Druid\Exceptions\QueryResponseException
109 109
      */
110
-    public function toArray(array|TaskContext $context = []): array
110
+    public function toArray(array | TaskContext $context = []): array
111 111
     {
112 112
         $task = $this->buildTask($context);
113 113
 
@@ -135,5 +135,5 @@  discard block
 block discarded – undo
135 135
      * @return \Level23\Druid\Tasks\TaskInterface
136 136
      * @throws \Level23\Druid\Exceptions\QueryResponseException
137 137
      */
138
-    abstract protected function buildTask(array|TaskContext $context): TaskInterface;
138
+    abstract protected function buildTask(array | TaskContext $context): TaskInterface;
139 139
 }
140 140
\ No newline at end of file
Please login to merge, or discard this patch.
src/Tasks/CompactTask.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
     public function __construct(
53 53
         string $dataSource,
54 54
         IntervalInterface $interval,
55
-        string|Granularity $segmentGranularity = null,
55
+        string | Granularity $segmentGranularity = null,
56 56
         ?TuningConfig $tuningConfig = null,
57 57
         ?TaskContext $context = null,
58 58
         ?int $targetCompactionSizeBytes = null,
Please login to merge, or discard this patch.
src/Tasks/CompactTaskBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
      * @throws \Level23\Druid\Exceptions\QueryResponseException
46 46
      * @throws \GuzzleHttp\Exception\GuzzleException
47 47
      */
48
-    protected function buildTask(array|TaskContext $context): TaskInterface
48
+    protected function buildTask(array | TaskContext $context): TaskInterface
49 49
     {
50 50
         if (is_array($context)) {
51 51
             $context = new TaskContext($context);
Please login to merge, or discard this patch.
src/Tasks/KillTaskBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
     /**
67 67
      * @inheritDoc
68 68
      */
69
-    protected function buildTask(array|TaskContext $context): TaskInterface
69
+    protected function buildTask(array | TaskContext $context): TaskInterface
70 70
     {
71 71
         if ($this->interval === null) {
72 72
             throw new InvalidArgumentException('You have to specify an interval!');
Please login to merge, or discard this patch.
src/VirtualColumns/VirtualColumn.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
      *
23 23
      * @see https://druid.apache.org/docs/latest/misc/math-expr.html
24 24
      */
25
-    public function __construct(string $expression, string $as, string|DataType $outputType = DataType::FLOAT)
25
+    public function __construct(string $expression, string $as, string | DataType $outputType = DataType::FLOAT)
26 26
     {
27 27
         $this->name       = $as;
28 28
         $this->expression = $expression;
Please login to merge, or discard this patch.