Skip to content

Commit db56c8b

Browse files
wip
1 parent 7b4ec71 commit db56c8b

File tree

1 file changed

+43
-36
lines changed

1 file changed

+43
-36
lines changed

tests/Unit/Analyzer/ClassDescriptionBuilderTest.php

+43-36
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,11 @@ public function test_it_should_create_builder_with_dependency_and_interface(): v
1616
{
1717
$FQCN = 'HappyIsland';
1818
$classDescriptionBuilder = new ClassDescriptionBuilder();
19-
$classDescriptionBuilder->setFilePath('src/Foo.php')
20-
->setClassName($FQCN);
21-
22-
$classDependency = new ClassDependency('DepClass', 10);
23-
24-
$classDescriptionBuilder->addDependency($classDependency);
25-
$classDescriptionBuilder->addInterface('InterfaceClass', 10);
19+
$classDescriptionBuilder
20+
->setFilePath('src/Foo.php')
21+
->setClassName($FQCN)
22+
->addDependency(new ClassDependency('DepClass', 10))
23+
->addInterface('InterfaceClass', 10);
2624

2725
$classDescription = $classDescriptionBuilder->build();
2826

@@ -36,9 +34,10 @@ public function test_it_should_create_final_class(): void
3634
{
3735
$FQCN = 'HappyIsland';
3836
$classDescriptionBuilder = new ClassDescriptionBuilder();
39-
$classDescriptionBuilder->setFilePath('src/Foo.php')
40-
->setClassName($FQCN);
41-
$classDescriptionBuilder->setFinal(true);
37+
$classDescriptionBuilder
38+
->setFilePath('src/Foo.php')
39+
->setClassName($FQCN)
40+
->setFinal(true);
4241

4342
$classDescription = $classDescriptionBuilder->build();
4443

@@ -51,9 +50,10 @@ public function test_it_should_create_not_final_class(): void
5150
{
5251
$FQCN = 'HappyIsland';
5352
$classDescriptionBuilder = new ClassDescriptionBuilder();
54-
$classDescriptionBuilder->setFilePath('src/Foo.php')
55-
->setClassName($FQCN);
56-
$classDescriptionBuilder->setFinal(false);
53+
$classDescriptionBuilder
54+
->setFilePath('src/Foo.php')
55+
->setClassName($FQCN)
56+
->setFinal(false);
5757

5858
$classDescription = $classDescriptionBuilder->build();
5959

@@ -66,9 +66,10 @@ public function test_it_should_create_abstract_class(): void
6666
{
6767
$FQCN = 'HappyIsland';
6868
$classDescriptionBuilder = new ClassDescriptionBuilder();
69-
$classDescriptionBuilder->setFilePath('src/Foo.php')
70-
->setClassName($FQCN);
71-
$classDescriptionBuilder->setAbstract(true);
69+
$classDescriptionBuilder
70+
->setFilePath('src/Foo.php')
71+
->setClassName($FQCN)
72+
->setAbstract(true);
7273

7374
$classDescription = $classDescriptionBuilder->build();
7475

@@ -81,9 +82,10 @@ public function test_it_should_create_not_abstract_class(): void
8182
{
8283
$FQCN = 'HappyIsland';
8384
$classDescriptionBuilder = new ClassDescriptionBuilder();
84-
$classDescriptionBuilder->setFilePath('src/Foo.php')
85-
->setClassName($FQCN);
86-
$classDescriptionBuilder->setAbstract(false);
85+
$classDescriptionBuilder
86+
->setFilePath('src/Foo.php')
87+
->setClassName($FQCN)
88+
->setAbstract(false);
8789

8890
$classDescription = $classDescriptionBuilder->build();
8991

@@ -96,9 +98,10 @@ public function test_it_should_create_annotated_class(): void
9698
{
9799
$FQCN = 'HappyIsland';
98100
$classDescriptionBuilder = new ClassDescriptionBuilder();
99-
$classDescriptionBuilder->setFilePath('src/Foo.php')
100-
->setClassName($FQCN);
101-
$classDescriptionBuilder->addDocBlock('/**
101+
$classDescriptionBuilder
102+
->setFilePath('src/Foo.php')
103+
->setClassName($FQCN)
104+
->addDocBlock('/**
102105
* @psalm-immutable
103106
*/');
104107

@@ -118,9 +121,10 @@ public function test_it_should_add_attributes(): void
118121
{
119122
$FQCN = 'HappyIsland';
120123
$classDescriptionBuilder = new ClassDescriptionBuilder();
121-
$classDescriptionBuilder->setFilePath('src/Foo.php')
122-
->setClassName($FQCN);
123-
$classDescriptionBuilder->addAttribute('AttrClass', 27);
124+
$classDescriptionBuilder
125+
->setFilePath('src/Foo.php')
126+
->setClassName($FQCN)
127+
->addAttribute('AttrClass', 27);
124128

125129
$classDescription = $classDescriptionBuilder->build();
126130

@@ -134,9 +138,10 @@ public function test_it_should_create_interface(): void
134138
{
135139
$FQCN = 'HappyIsland';
136140
$classDescriptionBuilder = new ClassDescriptionBuilder();
137-
$classDescriptionBuilder->setFilePath('src/Foo.php')
138-
->setClassName($FQCN);
139-
$classDescriptionBuilder->setInterface(true);
141+
$classDescriptionBuilder
142+
->setFilePath('src/Foo.php')
143+
->setClassName($FQCN)
144+
->setInterface(true);
140145

141146
$classDescription = $classDescriptionBuilder->build();
142147

@@ -149,9 +154,10 @@ public function test_it_should_create_not_interface(): void
149154
{
150155
$FQCN = 'HappyIsland';
151156
$classDescriptionBuilder = new ClassDescriptionBuilder();
152-
$classDescriptionBuilder->setFilePath('src/Foo.php')
153-
->setClassName($FQCN);
154-
$classDescriptionBuilder->setInterface(false);
157+
$classDescriptionBuilder
158+
->setFilePath('src/Foo.php')
159+
->setClassName($FQCN)
160+
->setInterface(false);
155161

156162
$classDescription = $classDescriptionBuilder->build();
157163

@@ -164,9 +170,10 @@ public function test_it_should_create_trait(): void
164170
{
165171
$FQCN = 'HappyIsland';
166172
$classDescriptionBuilder = new ClassDescriptionBuilder();
167-
$classDescriptionBuilder->setFilePath('src/Foo.php')
168-
->setClassName($FQCN);
169-
$classDescriptionBuilder->setTrait(true);
173+
$classDescriptionBuilder
174+
->setFilePath('src/Foo.php')
175+
->setClassName($FQCN)
176+
->setTrait(true);
170177

171178
$classDescription = $classDescriptionBuilder->build();
172179

@@ -180,8 +187,8 @@ public function test_it_should_create_not_trait(): void
180187
$FQCN = 'HappyIsland';
181188
$classDescriptionBuilder = new ClassDescriptionBuilder();
182189
$classDescriptionBuilder->setFilePath('src/Foo.php')
183-
->setClassName($FQCN);
184-
$classDescriptionBuilder->setTrait(false);
190+
->setClassName($FQCN)
191+
->setTrait(false);
185192

186193
$classDescription = $classDescriptionBuilder->build();
187194

0 commit comments

Comments
 (0)