Skip to content

Commit 132d7f3

Browse files
committed
clean
1 parent 98d33b1 commit 132d7f3

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

core/Base/Enum.class.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ abstract class Enum extends NamedObject
2929
*/
3030
public static function create($id)
3131
{
32-
$className = get_called_class();
33-
return new $className($id);
32+
return new static($id);
3433
}
3534

3635
public function __construct($id)
@@ -45,11 +44,9 @@ public function __construct($id)
4544
*/
4645
protected function setInternalId($id)
4746
{
48-
$names = static::$names;
49-
50-
if (isset($names[$id])) {
47+
if (isset(static::$names[$id])) {
5148
$this->id = $id;
52-
$this->name = $names[$id];
49+
$this->name = static::$names[$id];
5350
} else
5451
throw new MissingElementException(
5552
'knows nothing about such id == '.$id

0 commit comments

Comments
 (0)