@@ -26,7 +26,7 @@ abstract class Builder implements TypeBuilderInterface
2626 *
2727 * @throws TemplateArgumentsNotSupportedException
2828 */
29- protected function expectNoTemplateArguments (NamedTypeNode $ stmt ): void
29+ protected static function expectNoTemplateArguments (NamedTypeNode $ stmt ): void
3030 {
3131 if ($ stmt ->arguments === null ) {
3232 return ;
@@ -42,7 +42,7 @@ protected function expectNoTemplateArguments(NamedTypeNode $stmt): void
4242 *
4343 * @throws ShapeFieldsNotSupportedException
4444 */
45- protected function expectNoShapeFields (NamedTypeNode $ stmt ): void
45+ protected static function expectNoShapeFields (NamedTypeNode $ stmt ): void
4646 {
4747 if ($ stmt ->fields === null ) {
4848 return ;
@@ -59,10 +59,10 @@ protected function expectNoShapeFields(NamedTypeNode $stmt): void
5959 * @throws MissingTemplateArgumentsException
6060 * @throws TooManyTemplateArgumentsException
6161 */
62- protected function expectTemplateArgumentsCount (NamedTypeNode $ stmt , int $ count ): void
62+ protected static function expectTemplateArgumentsCount (NamedTypeNode $ stmt , int $ count ): void
6363 {
64- $ this -> expectTemplateArgumentsLessOrEqualThan ($ stmt , $ count , $ count );
65- $ this -> expectTemplateArgumentsGreaterOrEqualThan ($ stmt , $ count , $ count );
64+ static :: expectTemplateArgumentsLessOrEqualThan ($ stmt , $ count , $ count );
65+ static :: expectTemplateArgumentsGreaterOrEqualThan ($ stmt , $ count , $ count );
6666 }
6767
6868 /**
@@ -73,9 +73,9 @@ protected function expectTemplateArgumentsCount(NamedTypeNode $stmt, int $count)
7373 *
7474 * @throws TooManyTemplateArgumentsException
7575 */
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
7777 {
78- $ this -> expectTemplateArgumentsLessOrEqualThan ($ stmt , $ max + 1 , $ min );
78+ static :: expectTemplateArgumentsLessOrEqualThan ($ stmt , $ max + 1 , $ min );
7979 }
8080
8181 /**
@@ -86,7 +86,7 @@ protected function expectTemplateArgumentsLessThan(NamedTypeNode $stmt, int $max
8686 *
8787 * @throws TooManyTemplateArgumentsException
8888 */
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
9090 {
9191 if ($ stmt ->arguments === null || $ stmt ->arguments ->count () <= $ max ) {
9292 return ;
@@ -107,9 +107,9 @@ protected function expectTemplateArgumentsLessOrEqualThan(NamedTypeNode $stmt, i
107107 *
108108 * @throws MissingTemplateArgumentsException
109109 */
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
111111 {
112- $ this -> expectTemplateArgumentsGreaterOrEqualThan ($ stmt , $ min + 1 , $ max );
112+ static :: expectTemplateArgumentsGreaterOrEqualThan ($ stmt , $ min + 1 , $ max );
113113 }
114114
115115 /**
@@ -120,7 +120,7 @@ protected function expectTemplateArgumentsGreaterThan(NamedTypeNode $stmt, int $
120120 *
121121 * @throws MissingTemplateArgumentsException
122122 */
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
124124 {
125125 $ actualArgumentsCount = $ stmt ->arguments ?->count() ?? 0 ;
126126
@@ -140,7 +140,7 @@ protected function expectTemplateArgumentsGreaterOrEqualThan(NamedTypeNode $stmt
140140 *
141141 * @throws TemplateArgumentHintsNotSupportedException
142142 */
143- protected function expectNoTemplateArgumentHint (TypeStatement $ stmt , TemplateArgumentNode $ argument ): void
143+ protected static function expectNoTemplateArgumentHint (TypeStatement $ stmt , TemplateArgumentNode $ argument ): void
144144 {
145145 if ($ argument ->hint === null ) {
146146 return ;
0 commit comments