Hi,
i have a question about the constructor for the GadgetFeatureRegistryEntry:
class GadgetFeatureRegistryEntry {
public $name;
public $deps = array();
public $feature;
public function __construct($name, $deps, $feature, $registry)
{
$this->name = $name;
if ($deps != null) {
foreach ($deps as $dep) {
$entry = $registry->getEntry($dep);
$this->deps[$entry->name] = $entry->name;
}
}
$this->feature = $feature;
}
...
As far as i can see, we create an object to get the name by which we found
the object in the first place. So are there any valid reasons to not change
it to:
public function __construct($name, $deps, $feature, $registry)
{
$this->name = $name;
$this->deps = $deps == null ? array() : $deps;
$this->feature = $feature;
}
(aside from checking if the dependency is in the registry, which however now
anyway will result in a PHP error...)
Best Regards
Karsten Beyer