This PR updates the left over methods and property in the RuntimeDefinition::class by changing it correctly to class-string.
Assuming correct use of the RuntimeDefinition::class, the RuntimeDefinition::getClassDefinition() method would call RuntimeDefinition::loadClass() which in turn would call RuntimeDefinition::ensureClassExists(). This last method will ensure that $this->definition[$class] is set with $class being an existent class and hence a class-string. As a result, this means that RuntimeDefinition::$definition's type would be array<class-string, ClassDefinition> instead of the current type ClassDefinition[].
This also means that RuntimeDefinitioin::ensureClassExists() is now only called with values of type class-string, hence this is updated as well.
Finally, since both RuntimeDefinition::$definition and RuntimeDefinition::$explicitClasses have keys of type class-string, the return type of RuntimeDefinition::getClasses() must also, hence updated in this PR.
Description
This PR updates the left over methods and property in the
RuntimeDefinition::class
by changing it correctly toclass-string
.Assuming correct use of the
RuntimeDefinition::class
, the RuntimeDefinition::getClassDefinition() method would call RuntimeDefinition::loadClass() which in turn would call RuntimeDefinition::ensureClassExists(). This last method will ensure that$this->definition[$class]
is set with$class
being an existent class and hence aclass-string
. As a result, this means thatRuntimeDefinition::$definition
's type would bearray<class-string, ClassDefinition>
instead of the current typeClassDefinition[]
.This also means that
RuntimeDefinitioin::ensureClassExists()
is now only called with values of typeclass-string
, hence this is updated as well.Finally, since both
RuntimeDefinition::$definition
andRuntimeDefinition::$explicitClasses
have keys of typeclass-string
, the return type of RuntimeDefinition::getClasses() must also, hence updated in this PR.