@@ -59,38 +59,38 @@ |
||
59 | 59 | $property = new Property('foo'); |
60 | 60 | self::assertNull($property->getVisibility()); |
61 | 61 | |
62 | - $property->setVisibility(Visibility::PUBLIC); |
|
63 | - self::assertSame(Visibility::PUBLIC, $property->getVisibility()); |
|
62 | + $property->setVisibility(Visibility::public); |
|
63 | + self::assertSame(Visibility::public, $property->getVisibility()); |
|
64 | 64 | self::assertTrue($property->isPublic()); |
65 | 65 | self::assertFalse($property->isProtected()); |
66 | 66 | self::assertFalse($property->isPrivate()); |
67 | 67 | |
68 | - $property->setVisibility(Visibility::PROTECTED); |
|
69 | - self::assertSame(Visibility::PROTECTED, $property->getVisibility()); |
|
68 | + $property->setVisibility(Visibility::protected); |
|
69 | + self::assertSame(Visibility::protected, $property->getVisibility()); |
|
70 | 70 | self::assertFalse($property->isPublic()); |
71 | 71 | self::assertTrue($property->isProtected()); |
72 | 72 | self::assertFalse($property->isPrivate()); |
73 | 73 | |
74 | - $property->setVisibility(Visibility::PRIVATE); |
|
75 | - self::assertSame(Visibility::PRIVATE, $property->getVisibility()); |
|
74 | + $property->setVisibility(Visibility::private); |
|
75 | + self::assertSame(Visibility::private, $property->getVisibility()); |
|
76 | 76 | self::assertFalse($property->isPublic()); |
77 | 77 | self::assertFalse($property->isProtected()); |
78 | 78 | self::assertTrue($property->isPrivate()); |
79 | 79 | |
80 | 80 | $property->setPublic(); |
81 | - self::assertSame(Visibility::PUBLIC, $property->getVisibility()); |
|
81 | + self::assertSame(Visibility::public, $property->getVisibility()); |
|
82 | 82 | self::assertTrue($property->isPublic()); |
83 | 83 | self::assertFalse($property->isProtected()); |
84 | 84 | self::assertFalse($property->isPrivate()); |
85 | 85 | |
86 | 86 | $property->setProtected(); |
87 | - self::assertSame(Visibility::PROTECTED, $property->getVisibility()); |
|
87 | + self::assertSame(Visibility::protected, $property->getVisibility()); |
|
88 | 88 | self::assertFalse($property->isPublic()); |
89 | 89 | self::assertTrue($property->isProtected()); |
90 | 90 | self::assertFalse($property->isPrivate()); |
91 | 91 | |
92 | 92 | $property->setPrivate(); |
93 | - self::assertSame(Visibility::PRIVATE, $property->getVisibility()); |
|
93 | + self::assertSame(Visibility::private, $property->getVisibility()); |
|
94 | 94 | self::assertFalse($property->isPublic()); |
95 | 95 | self::assertFalse($property->isProtected()); |
96 | 96 | self::assertTrue($property->isPrivate()); |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | return self::First->value; |
43 | 43 | } |
44 | 44 | } |
45 | - '), preg_replace('/\s+/', '', (string) $enum)); |
|
45 | + '), preg_replace('/\s+/', '', (string)$enum)); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | public function testName(): void |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | $enum = new EnumDeclaration('MyEnum'); |
154 | 154 | $enum->addImplement(\Countable::class)->addComment("Description of enum.\nSecond line\n"); |
155 | 155 | $enum->addCase('First', 'first'); |
156 | - $enum->addCase('Second', 'second');; |
|
156 | + $enum->addCase('Second', 'second'); ; |
|
157 | 157 | |
158 | 158 | self::assertSame($expect, preg_replace('/\s+/', '', $enum->render())); |
159 | 159 | self::assertSame($expect, preg_replace('/\s+/', '', $enum->__toString())); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | */ |
29 | 29 | final class MyClass extends Spiral\Tests\Reactor\ClassDeclarationTest implements Countable |
30 | 30 | { |
31 | - }'), preg_replace('/\s+/', '', (string) $declaration)); |
|
31 | + }'), preg_replace('/\s+/', '', (string)$declaration)); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | public function testClassDeclarationWithConstants(): void |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | |
76 | 76 | #[Foo\Cached(mode: true)] |
77 | 77 | public const WITH_ATTRIBUTE = \'attr\'; |
78 | - }'), preg_replace('/\s+/', '', (string) $declaration)); |
|
78 | + }'), preg_replace('/\s+/', '', (string)$declaration)); |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | public function testClassDeclarationWithMethods(): void |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | { |
107 | 107 | return count($items ?: $this->items); |
108 | 108 | } |
109 | - }'), preg_replace('/\s+/', '', (string) $declaration)); |
|
109 | + }'), preg_replace('/\s+/', '', (string)$declaration)); |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | public function testName(): void |