Skip to content

Commit eb2dbc9

Browse files
committed
ClassType: removed some blank lines
1 parent 31155b8 commit eb2dbc9

11 files changed

+3
-28
lines changed

src/PhpGenerator/ClassType.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ public function __toString(): string
122122
. Strings::indent(
123123
($this->traits ? implode("\n", $traits) . "\n\n" : '')
124124
. ($this->consts ? implode("\n", $consts) . "\n\n" : '')
125-
. ($this->properties ? implode("\n\n", $properties) . "\n\n" : '')
126-
. ($this->methods ? "\n" . implode("\n\n\n", $this->methods) . "\n\n" : ''), 1)
125+
. ($this->properties ? implode("\n\n", $properties) . "\n\n\n" : '')
126+
. ($this->methods ? implode("\n\n\n", $this->methods) . "\n" : ''), 1)
127127
. '}'
128128
) . ($this->name ? "\n" : '');
129129
}

tests/PhpGenerator/ClassType.expect

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,4 @@ abstract final class Example extends ParentClass implements IExample, IOne
4242

4343

4444
abstract public function show($item, array &$res = null);
45-
4645
}

tests/PhpGenerator/ClassType.from.anonymous.expect

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,9 @@
1212
private function b()
1313
{
1414
}
15-
1615
}
1716
extends Class1 {
18-
1917
public function a()
2018
{
2119
}
22-
2320
}

tests/PhpGenerator/ClassType.from.expect

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
*/
55
interface Interface1
66
{
7-
87
function func1();
9-
108
}
119

1210
interface Interface2
@@ -15,7 +13,6 @@ interface Interface2
1513

1614
abstract class Class1 implements Interface1
1715
{
18-
1916
/**
2017
* @return Class1
2118
*/
@@ -25,7 +22,6 @@ abstract class Class1 implements Interface1
2522

2623

2724
abstract protected function func2();
28-
2925
}
3026

3127
class Class2 extends Class1 implements Interface2
@@ -56,13 +52,13 @@ class Class2 extends Class1 implements Interface2
5652
final public function func2()
5753
{
5854
}
59-
6055
}
6156

6257
class Class3
6358
{
6459
public $prop1;
6560

61+
6662
}
6763

6864
class Class4

tests/PhpGenerator/ClassType.from.php71.expect

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
class ClassA
22
{
3-
43
public function func1(A $a, ?B $b, C $c = null, D $d = null, E $e, ?int $i = 1, ?array $arr = [])
54
{
65
}
@@ -14,7 +13,6 @@ class ClassA
1413
public function func3(): void
1514
{
1615
}
17-
1816
}
1917

2018
class ClassB

tests/PhpGenerator/ClassType.from.trait.expect

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,20 @@
33
*/
44
trait Trait1
55
{
6-
76
public function func1()
87
{
98
}
10-
119
}
1210

1311
trait Trait2
1412
{
15-
1613
protected function func2()
1714
{
1815
}
19-
2016
}
2117

2218
abstract class Class1
2319
{
24-
2520
public function func1()
2621
{
2722
}
@@ -30,7 +25,6 @@ abstract class Class1
3025
protected function func2()
3126
{
3227
}
33-
3428
}
3529

3630
class Class2 extends Class1

tests/PhpGenerator/ClassType.inheritance.expect

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,4 @@ class B extends A
1010
public function bar()
1111
{
1212
}
13-
1413
}

tests/PhpGenerator/ClassType.interface.expect

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,5 @@
33
*/
44
interface IExample extends IOne, ITwo
55
{
6-
76
function getForm();
8-
97
}

tests/PhpGenerator/PhpNamespace.expect

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ class A implements A, C
66
{
77
use \Bar\D;
88

9-
109
public function test(C $a, self $b, parent $c, array $d, callable $e)
1110
{
1211
}
13-
1412
}
1513

1614
interface B

tests/PhpGenerator/PhpNamespace.fqn1.expect

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ class Example extends \ParentClass implements One, \Two
33
use Three;
44
use \Four;
55

6-
76
public function one(): One
87
{
98
}
@@ -12,5 +11,4 @@ class Example extends \ParentClass implements One, \Two
1211
public function two(One $one, \Two $two): \Two
1312
{
1413
}
15-
1614
}

0 commit comments

Comments
 (0)