Skip to content

Commit 8b4a5be

Browse files
committed
[#2151] Enforced "No Spaces Around Union Types" using Slevomat standard.
1 parent 327934d commit 8b4a5be

21 files changed

Lines changed: 41 additions & 21 deletions

File tree

.vortex/installer/phpcs.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
</rule>
1010
<rule ref="Generic.PHP.RequireStrictTypes" />
1111
<rule ref="DrevOps"/>
12+
<rule ref="SlevomatCodingStandard.TypeHints.DNFTypeHintFormat">
13+
<properties>
14+
<property name="withSpacesAroundOperators" value="no"/>
15+
</properties>
16+
</rule>
1217

1318
<!-- Show sniff codes in all reports -->
1419
<arg value="s"/>

.vortex/installer/src/Command/InstallCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
175175

176176
Task::action(
177177
label: 'Preparing demo content',
178-
action: fn(): string | array => $this->prepareDemo(),
178+
action: fn(): string|array => $this->prepareDemo(),
179179
success: 'Demo content prepared',
180180
);
181181
}
@@ -395,7 +395,7 @@ protected function copyFiles(): void {
395395
* @return array|string
396396
* Array of messages or a single message.
397397
*/
398-
protected function prepareDemo(): array | string {
398+
protected function prepareDemo(): array|string {
399399
if (empty($this->config->get(Config::IS_DEMO))) {
400400
return 'Not a demo mode.';
401401
}

.vortex/installer/src/Runner/AbstractRunner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ public function getExitCode(): int {
185185
/**
186186
* {@inheritdoc}
187187
*/
188-
public function getOutput(bool $as_array = FALSE, ?int $lines = NULL): string | array {
188+
public function getOutput(bool $as_array = FALSE, ?int $lines = NULL): string|array {
189189
$output_lines = explode(PHP_EOL, $this->output);
190190

191191
if ($lines !== NULL) {

.vortex/installer/src/Runner/CommandRunner.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function __construct(
106106
* @param int $options
107107
* Write options.
108108
*/
109-
public function write(string | iterable $messages, bool $newline = FALSE, int $options = 0): void {
109+
public function write(string|iterable $messages, bool $newline = FALSE, int $options = 0): void {
110110
$this->bufferedOutput->write($messages, $newline, $options);
111111

112112
if ($this->shouldStream) {
@@ -125,7 +125,7 @@ public function write(string | iterable $messages, bool $newline = FALSE, int $o
125125
* @param int $options
126126
* Write options.
127127
*/
128-
public function writeln(string | iterable $messages, int $options = 0): void {
128+
public function writeln(string|iterable $messages, int $options = 0): void {
129129
$this->bufferedOutput->writeln($messages, $options);
130130
if ($this->shouldStream) {
131131
$this->output->writeln($messages, $options);

.vortex/installer/src/Runner/RunnerInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function getExitCode(): int;
6464
* @return string|array<int, string>
6565
* Output as string or array of lines.
6666
*/
67-
public function getOutput(bool $as_array = FALSE, ?int $lines = NULL): string | array;
67+
public function getOutput(bool $as_array = FALSE, ?int $lines = NULL): string|array;
6868

6969
/**
7070
* Set the working directory.

.vortex/installer/src/Task/TaskOutput.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function __construct(
2828
* @param int $options
2929
* Write options.
3030
*/
31-
public function write(string | iterable $messages, bool $newline = FALSE, int $options = 0): void {
31+
public function write(string|iterable $messages, bool $newline = FALSE, int $options = 0): void {
3232
$dimmed = is_iterable($messages)
3333
? array_map(fn(string $m): string => Tui::dim($m), (array) $messages)
3434
: Tui::dim($messages);
@@ -43,7 +43,7 @@ public function write(string | iterable $messages, bool $newline = FALSE, int $o
4343
* @param int $options
4444
* Write options.
4545
*/
46-
public function writeln(string | iterable $messages, int $options = 0): void {
46+
public function writeln(string|iterable $messages, int $options = 0): void {
4747
$dimmed = is_iterable($messages)
4848
? array_map(fn(string $m): string => Tui::dim($m), (array) $messages)
4949
: Tui::dim($messages);

.vortex/installer/tests/Fixtures/handler_process/_baseline/phpcs.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
<rule ref="Generic.PHP.RequireStrictTypes" />
1414
<rule ref="PHPCompatibility"/>
1515
<rule ref="DrevOps"/>
16+
<rule ref="SlevomatCodingStandard.TypeHints.DNFTypeHintFormat">
17+
<properties>
18+
<property name="withSpacesAroundOperators" value="no"/>
19+
</properties>
20+
</rule>
1621

1722
<arg name="extensions" value="inc,info,install,module,php,profile,test,theme"/>
1823
<arg name="colors"/>

.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/phpcs.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<file>tests</file>
1414

1515
<rule ref="Drupal"/>
16-
@@ -25,10 +25,10 @@
16+
@@ -30,10 +30,10 @@
1717
<config name="testVersion" value="8.3"/>
1818

1919
<!-- Exclude theme assets. -->

.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/phpcs.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<file>tests</file>
1414

1515
<rule ref="Drupal"/>
16-
@@ -25,10 +25,10 @@
16+
@@ -30,10 +30,10 @@
1717
<config name="testVersion" value="8.3"/>
1818

1919
<!-- Exclude theme assets. -->

.vortex/installer/tests/Fixtures/handler_process/theme_claro/phpcs.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<file>web/sites/default/settings.php</file>
77
<file>web/sites/default/includes</file>
88
<file>tests</file>
9-
@@ -25,10 +24,6 @@
9+
@@ -30,10 +29,6 @@
1010
<config name="testVersion" value="8.3"/>
1111

1212
<!-- Exclude theme assets. -->

0 commit comments

Comments
 (0)