Skip to content

Commit 83f7679

Browse files
committed
PhpNamespace: name can be NULL
1 parent 5dddff9 commit 83f7679

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/PhpGenerator/PhpNamespace.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ class PhpNamespace extends Object
3737

3838
public function __construct($name = NULL)
3939
{
40-
$this->setName((string) $name);
40+
$this->setName($name);
4141
}
4242

4343

4444
/**
45-
* @param string
45+
* @param string|NULL
4646
* @return self
4747
*/
4848
public function setName($name)
@@ -53,11 +53,11 @@ public function setName($name)
5353

5454

5555
/**
56-
* @return string
56+
* @return string|NULL
5757
*/
5858
public function getName()
5959
{
60-
return $this->name;
60+
return $this->name ?: NULL;
6161
}
6262

6363

0 commit comments

Comments
 (0)