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)
51
51
/**
52
52
* @param string
53
53
*/
54
- public function __construct ($ name = NULL )
54
+ public function __construct ($ name )
55
55
{
56
56
if ($ name === NULL ) {
57
57
throw new Nette \DeprecatedException ('For closures use Nette\PhpGenerator\Closure instead of Nette\PhpGenerator\Method. ' );
58
58
}
59
- $ this ->setName ( $ name) ;
59
+ $ this ->name = ( string ) $ name ;
60
60
}
61
61
62
62
Original file line number Diff line number Diff line change @@ -42,14 +42,14 @@ class PhpNamespace
42
42
*/
43
43
public function __construct ($ name = NULL )
44
44
{
45
- $ this ->setName ( $ name) ;
45
+ $ this ->name = ( string ) $ name ;
46
46
}
47
47
48
48
49
49
/** @deprecated */
50
50
public function setName ($ name )
51
51
{
52
- $ this ->name = ( string ) $ name ;
52
+ $ this ->__construct ( $ name) ;
53
53
return $ this ;
54
54
}
55
55
Original file line number Diff line number Diff line change @@ -20,16 +20,16 @@ trait NameAware
20
20
/**
21
21
* @param string
22
22
*/
23
- public function __construct ($ name = '' )
23
+ public function __construct ($ name )
24
24
{
25
- $ this ->setName ( $ name) ;
25
+ $ this ->name = ( string ) $ name ;
26
26
}
27
27
28
28
29
29
/** @deprecated */
30
30
public function setName ($ name )
31
31
{
32
- $ this ->name = ( string ) $ name ;
32
+ $ this ->__construct ( $ name) ;
33
33
return $ this ;
34
34
}
35
35
You can’t perform that action at this time.
0 commit comments