77declare (strict_types=1 );
88
99use Nette \PhpGenerator \ClassType ;
10- use Nette \PhpGenerator \PhpLiteral ;
10+ use Nette \PhpGenerator \Literal ;
1111use Nette \PhpGenerator \Type ;
1212use Tester \Assert ;
1313
@@ -46,7 +46,7 @@ Assert::same(['ObjectTrait' => [], 'AnotherTrait' => ['sayHello as protected']],
4646Assert::count (2 , $ class ->getConstants ());
4747Assert::type (Nette \PhpGenerator \Constant::class, $ class ->getConstants ()['ROLE ' ]);
4848
49- $ class ->addConstant ('FORCE_ARRAY ' , new PhpLiteral ('Nette\Utils\Json::FORCE_ARRAY ' ))
49+ $ class ->addConstant ('FORCE_ARRAY ' , new Literal ('Nette\Utils\Json::FORCE_ARRAY ' ))
5050 ->setVisibility ('private ' )
5151 ->addComment ('Commented ' );
5252
@@ -55,7 +55,7 @@ $class->addProperty('handle')
5555 ->addComment ('@var resource orignal file handle ' );
5656
5757$ class ->addProperty ('order ' )
58- ->setValue (new PhpLiteral ('RecursiveIteratorIterator::SELF_FIRST ' ));
58+ ->setValue (new Literal ('RecursiveIteratorIterator::SELF_FIRST ' ));
5959
6060$ class ->addProperty ('typed1 ' )
6161 ->setType (Type::ARRAY );
@@ -103,7 +103,7 @@ $m = $class->addMethod('getSections')
103103 ->setReturnReference (true )
104104 ->addBody ('$mode = ?; ' , [123 ])
105105 ->addBody ('return self::$sections; ' );
106- $ m ->addParameter ('mode ' , new PhpLiteral ('self::ORDER ' ));
106+ $ m ->addParameter ('mode ' , new Literal ('self::ORDER ' ));
107107
108108Assert::false ($ m ->isFinal ());
109109Assert::true ($ m ->isStatic ());
0 commit comments