Skip to content

Commit 9a048f1

Browse files
committed
Fix StyleCI issues
1 parent 7788f50 commit 9a048f1

6 files changed

Lines changed: 14 additions & 14 deletions

File tree

.styleci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
preset: psr12
33
risky: true
4-
version: 8.4
4+
version: 8.5
55
finder:
66
name:
77
- "*.php"

tests/integration/ObjectTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ final class ObjectTest extends AbstractTestBase
1919
#[Test]
2020
public function givenAnObjectHasMethodsWhenPublicTheyShouldBeAccessible(): void
2121
{
22-
$myObj = new class {
22+
$myObj = new class () {
2323
public function test()
2424
{
2525
return 'test one two';
2626
}
2727

2828
public function test2()
2929
{
30-
return new class {
30+
return new class () {
3131
public function cat()
3232
{
3333
return 'meow';
@@ -47,7 +47,7 @@ public function cat()
4747
#[Test]
4848
public function givenAnObjectHasPropertiesWhenPublicTheyShouldBeAccessible(): void
4949
{
50-
$myObj = new class {
50+
$myObj = new class () {
5151
public string $test = 'my string';
5252
};
5353

@@ -61,7 +61,7 @@ public function givenAnObjectHasPropertiesWhenPublicTheyShouldBeAccessible(): vo
6161
#[Test]
6262
public function publicMethodsShouldBeAccessibleMagicallyViaGet(): void
6363
{
64-
$myObj = new class {
64+
$myObj = new class () {
6565
public function getString()
6666
{
6767
return 'some string';
@@ -78,7 +78,7 @@ public function getString()
7878
#[Test]
7979
public function publicMethodsShouldBeAccessibleMagicallyViaIs(): void
8080
{
81-
$myObj = new class {
81+
$myObj = new class () {
8282
public function isString($string)
8383
{
8484
return $string;
@@ -100,7 +100,7 @@ public function yes()
100100
#[Test]
101101
public function givenAnObjectWhenMagicMethodCallIsAvailableItShouldBeAccessible(): void
102102
{
103-
$myObj = new class {
103+
$myObj = new class () {
104104
public function __call(string $name, array $args): array
105105
{
106106
return [$name, $args[0], $args[1]];
@@ -152,7 +152,7 @@ public function undefinedMethodsShouldThrowAnError(): void
152152
#[Test]
153153
public function givenAnObjectWithMagicMethodGetWhenPropertyDoesNotExistItShouldNotBeCalled(): void
154154
{
155-
$myObj = new class {
155+
$myObj = new class () {
156156
public function __get(string $name)
157157
{
158158
return 'I should not be called';

tests/integration/RuleTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function basicInRule(): void
8888
#[Test]
8989
public function basicNotInRule(): void
9090
{
91-
$ruleStr = '5 not
91+
$ruleStr = '5 not
9292
in [4, 6, 7]';
9393

9494
$rule = new Rule\Rule($ruleStr);

tests/unit/Grammar/GrammarTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ final class GrammarTest extends TestCase
1717
{
1818
public function testDefaultValues()
1919
{
20-
$grammar = new class extends Grammar {
20+
$grammar = new class () extends Grammar {
2121
public function getInternalFunctions(): array
2222
{
2323
return [];

tests/unit/Lexer/LexerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function itProducesSameTokensForNotInOperator(): void
6363
public function itProducesSameTokensForNotInWithNewlines(): void
6464
{
6565
// The lexer produces a cleaner "not in" value even with newlines between "not" and "in".
66-
$rule = '5 not
66+
$rule = '5 not
6767
in [4, 6, 7]';
6868

6969
$lexer = new DefaultLexer(new JavaScript(), new TokenFactory());

tests/unit/TokenStream/ObjectMethodCallerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function givenAnObjectWithAPublicPropertyItShouldBeAccessible(): void
3333
#[Test]
3434
public function givenAnObjectWithAPublicWhenMethodMatchingItShouldBeUsed(): void
3535
{
36-
$object = new class {
36+
$object = new class () {
3737
// phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps
3838
public function my_test()
3939
{
@@ -47,7 +47,7 @@ public function my_test()
4747
#[Test]
4848
public function givenAnObjectWithAPublicWhenMethodNameWithIsPrefixMatchesItShouldBeUsed(): void
4949
{
50-
$object = new class {
50+
$object = new class () {
5151
// phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps
5252
public function is_my_test()
5353
{
@@ -67,7 +67,7 @@ public function isMyTest()
6767
#[Test]
6868
public function givenAnObjectWithAPublicWhenMethodNameWithGetPrefixMatchesItShouldBeUsed(): void
6969
{
70-
$object = new class {
70+
$object = new class () {
7171
// phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps
7272
public function get_my_test()
7373
{

0 commit comments

Comments
 (0)