@@ -26,7 +26,7 @@ abstract class Builder implements TypeBuilderInterface
26
26
*
27
27
* @throws TemplateArgumentsNotSupportedException
28
28
*/
29
- protected function expectNoTemplateArguments (NamedTypeNode $ stmt ): void
29
+ protected static function expectNoTemplateArguments (NamedTypeNode $ stmt ): void
30
30
{
31
31
if ($ stmt ->arguments === null ) {
32
32
return ;
@@ -42,7 +42,7 @@ protected function expectNoTemplateArguments(NamedTypeNode $stmt): void
42
42
*
43
43
* @throws ShapeFieldsNotSupportedException
44
44
*/
45
- protected function expectNoShapeFields (NamedTypeNode $ stmt ): void
45
+ protected static function expectNoShapeFields (NamedTypeNode $ stmt ): void
46
46
{
47
47
if ($ stmt ->fields === null ) {
48
48
return ;
@@ -59,10 +59,10 @@ protected function expectNoShapeFields(NamedTypeNode $stmt): void
59
59
* @throws MissingTemplateArgumentsException
60
60
* @throws TooManyTemplateArgumentsException
61
61
*/
62
- protected function expectTemplateArgumentsCount (NamedTypeNode $ stmt , int $ count ): void
62
+ protected static function expectTemplateArgumentsCount (NamedTypeNode $ stmt , int $ count ): void
63
63
{
64
- $ this -> expectTemplateArgumentsLessOrEqualThan ($ stmt , $ count , $ count );
65
- $ this -> expectTemplateArgumentsGreaterOrEqualThan ($ stmt , $ count , $ count );
64
+ static :: expectTemplateArgumentsLessOrEqualThan ($ stmt , $ count , $ count );
65
+ static :: expectTemplateArgumentsGreaterOrEqualThan ($ stmt , $ count , $ count );
66
66
}
67
67
68
68
/**
@@ -73,9 +73,9 @@ protected function expectTemplateArgumentsCount(NamedTypeNode $stmt, int $count)
73
73
*
74
74
* @throws TooManyTemplateArgumentsException
75
75
*/
76
- protected function expectTemplateArgumentsLessThan (NamedTypeNode $ stmt , int $ max , int $ min = 0 ): void
76
+ protected static function expectTemplateArgumentsLessThan (NamedTypeNode $ stmt , int $ max , int $ min = 0 ): void
77
77
{
78
- $ this -> expectTemplateArgumentsLessOrEqualThan ($ stmt , $ max + 1 , $ min );
78
+ static :: expectTemplateArgumentsLessOrEqualThan ($ stmt , $ max + 1 , $ min );
79
79
}
80
80
81
81
/**
@@ -86,7 +86,7 @@ protected function expectTemplateArgumentsLessThan(NamedTypeNode $stmt, int $max
86
86
*
87
87
* @throws TooManyTemplateArgumentsException
88
88
*/
89
- protected function expectTemplateArgumentsLessOrEqualThan (NamedTypeNode $ stmt , int $ max , int $ min = 0 ): void
89
+ protected static function expectTemplateArgumentsLessOrEqualThan (NamedTypeNode $ stmt , int $ max , int $ min = 0 ): void
90
90
{
91
91
if ($ stmt ->arguments === null || $ stmt ->arguments ->count () <= $ max ) {
92
92
return ;
@@ -107,9 +107,9 @@ protected function expectTemplateArgumentsLessOrEqualThan(NamedTypeNode $stmt, i
107
107
*
108
108
* @throws MissingTemplateArgumentsException
109
109
*/
110
- protected function expectTemplateArgumentsGreaterThan (NamedTypeNode $ stmt , int $ min , ?int $ max = null ): void
110
+ protected static function expectTemplateArgumentsGreaterThan (NamedTypeNode $ stmt , int $ min , ?int $ max = null ): void
111
111
{
112
- $ this -> expectTemplateArgumentsGreaterOrEqualThan ($ stmt , $ min + 1 , $ max );
112
+ static :: expectTemplateArgumentsGreaterOrEqualThan ($ stmt , $ min + 1 , $ max );
113
113
}
114
114
115
115
/**
@@ -120,7 +120,7 @@ protected function expectTemplateArgumentsGreaterThan(NamedTypeNode $stmt, int $
120
120
*
121
121
* @throws MissingTemplateArgumentsException
122
122
*/
123
- protected function expectTemplateArgumentsGreaterOrEqualThan (NamedTypeNode $ stmt , int $ min , ?int $ max = null ): void
123
+ protected static function expectTemplateArgumentsGreaterOrEqualThan (NamedTypeNode $ stmt , int $ min , ?int $ max = null ): void
124
124
{
125
125
$ actualArgumentsCount = $ stmt ->arguments ?->count() ?? 0 ;
126
126
@@ -140,7 +140,7 @@ protected function expectTemplateArgumentsGreaterOrEqualThan(NamedTypeNode $stmt
140
140
*
141
141
* @throws TemplateArgumentHintsNotSupportedException
142
142
*/
143
- protected function expectNoTemplateArgumentHint (TypeStatement $ stmt , TemplateArgumentNode $ argument ): void
143
+ protected static function expectNoTemplateArgumentHint (TypeStatement $ stmt , TemplateArgumentNode $ argument ): void
144
144
{
145
145
if ($ argument ->hint === null ) {
146
146
return ;
0 commit comments