File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -51,12 +51,12 @@ public static function from($method)
5151 /**
5252 * @param string
5353 */
54- public function __construct ($ name = NULL )
54+ public function __construct ($ name )
5555 {
5656 if ($ name === NULL ) {
5757 throw new Nette \DeprecatedException ('For closures use Nette\PhpGenerator\Closure instead of Nette\PhpGenerator\Method. ' );
5858 }
59- $ this ->setName ( $ name) ;
59+ $ this ->name = ( string ) $ name ;
6060 }
6161
6262
Original file line number Diff line number Diff line change @@ -42,14 +42,14 @@ class PhpNamespace
4242 */
4343 public function __construct ($ name = NULL )
4444 {
45- $ this ->setName ( $ name) ;
45+ $ this ->name = ( string ) $ name ;
4646 }
4747
4848
4949 /** @deprecated */
5050 public function setName ($ name )
5151 {
52- $ this ->name = ( string ) $ name ;
52+ $ this ->__construct ( $ name) ;
5353 return $ this ;
5454 }
5555
Original file line number Diff line number Diff line change @@ -20,16 +20,16 @@ trait NameAware
2020 /**
2121 * @param string
2222 */
23- public function __construct ($ name = '' )
23+ public function __construct ($ name )
2424 {
25- $ this ->setName ( $ name) ;
25+ $ this ->name = ( string ) $ name ;
2626 }
2727
2828
2929 /** @deprecated */
3030 public function setName ($ name )
3131 {
32- $ this ->name = ( string ) $ name ;
32+ $ this ->__construct ( $ name) ;
3333 return $ this ;
3434 }
3535
You can’t perform that action at this time.
0 commit comments