Skip to content

Commit 9f1c0de

Browse files
authored
[CLEANUP] Autoformat the code (#1579)
This avoids unrelated changes when someone changes the code and then autoformats it with PhpStorm.
1 parent 5c5b2b0 commit 9f1c0de

6 files changed

Lines changed: 35 additions & 28 deletions

File tree

Build/phpcs/config.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<ruleset name="MyIntervals coding standard">
3-
<arg name="colors"/>
4-
<arg name="extensions" value="php"/>
3+
<arg name="colors"/>
4+
<arg name="extensions" value="php"/>
55

6-
<rule ref="Generic.Files.LineLength">
7-
<properties>
8-
<property name="lineLimit" value="120"/>
9-
<property name="absoluteLineLimit" value="120"/>
10-
</properties>
11-
</rule>
12-
<rule ref="Squiz.PHP.Heredoc"/>
6+
<rule ref="Generic.Files.LineLength">
7+
<properties>
8+
<property name="lineLimit" value="120"/>
9+
<property name="absoluteLineLimit" value="120"/>
10+
</properties>
11+
</rule>
12+
<rule ref="Squiz.PHP.Heredoc"/>
1313
</ruleset>

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Please also have a look at our
1414

1515
### Deprecated
1616

17-
- Deprecate support for PHP 7.2 and 7.3 (#1565)
17+
- Deprecate support for PHP 7.2 and 7.3 (#1565)
1818

1919
### Removed
2020

@@ -26,7 +26,8 @@ Please also have a look at our
2626

2727
### Added
2828

29-
- Add support for modern CSS at-rules: `@layer`, `@scope`, and `@starting-style` (#1549)
29+
- Add support for modern CSS at-rules: `@layer`, `@scope`, and
30+
`@starting-style` (#1549)
3031

3132
### Fixed
3233

CODE_OF_CONDUCT.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ community.
114114

115115
## Attribution
116116

117-
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/),
117+
This Code of Conduct is adapted from the
118+
[Contributor Covenant](https://www.contributor-covenant.org/),
118119
version 2.1, available at
119120
https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.

src/Property/Selector.php

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -211,22 +211,27 @@ public function setSelector(string $selector): void
211211
*/
212212
public function getSpecificity(): int
213213
{
214-
return \array_sum(\array_map(
215-
static function (Component $component): int {
216-
return $component->getSpecificity();
217-
},
218-
$this->components
219-
));
214+
return \array_sum(
215+
\array_map(
216+
static function (Component $component): int {
217+
return $component->getSpecificity();
218+
},
219+
$this->components
220+
)
221+
);
220222
}
221223

222224
public function render(OutputFormat $outputFormat): string
223225
{
224-
return \implode('', \array_map(
225-
static function (Component $component) use ($outputFormat): string {
226-
return $component->render($outputFormat);
227-
},
228-
$this->components
229-
));
226+
return \implode(
227+
'',
228+
\array_map(
229+
static function (Component $component) use ($outputFormat): string {
230+
return $component->render($outputFormat);
231+
},
232+
$this->components
233+
)
234+
);
230235
}
231236

232237
/**

tests/Unit/Property/Selector/CompoundSelectorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ public static function provideCompoundSelectorWithEscapedQuotes(): array
9797
'escaped backslash before escaped quote' => ['a[data-test="test\\\\\\"value"]'],
9898
'triple backslash before quote' => ['a[data-test="test\\\\\\""]'],
9999
'escaped single quotes in selector itself, with other escaped characters'
100-
=> [".before\\:content-\\[\\'\\'\\]:before"],
100+
=> [".before\\:content-\\[\\'\\'\\]:before"],
101101
'escaped double quotes in selector itself, with other escaped characters'
102-
=> ['.before\\:content-\\[\\"\\"\\]:before'],
102+
=> ['.before\\:content-\\[\\"\\"\\]:before'],
103103
];
104104
}
105105

tests/Unit/Property/SelectorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ public static function provideSelectorsWithEscapedQuotes(): array
9797
'escaped backslash before escaped quote' => ['a[data-test="test\\\\\\"value"]'],
9898
'triple backslash before quote' => ['a[data-test="test\\\\\\""]'],
9999
'escaped single quotes in selector itself, with other escaped characters'
100-
=> ['.before\\:content-\\[\\\'\\\'\\]:before'],
100+
=> ['.before\\:content-\\[\\\'\\\'\\]:before'],
101101
'escaped double quotes in selector itself, with other escaped characters'
102-
=> ['.before\\:content-\\[\\"\\"\\]:before'],
102+
=> ['.before\\:content-\\[\\"\\"\\]:before'],
103103
];
104104
}
105105

0 commit comments

Comments
 (0)