for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Magium\Introspection;
class ComponentClass
{
protected $class;
protected $baseType;
protected $functionalType;
protected $hierarchy;
public function __construct($class, $baseType, $functionalType, array $hierarchy)
$this->class = $class;
$this->baseType = $baseType;
$this->functionalType = $functionalType;
$this->heirarchy = $hierarchy;
heirarchy
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
class MyClass { } $x = new MyClass(); $x->foo = true;
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:
class MyClass { public $foo; } $x = new MyClass(); $x->foo = true;
}
/**
* @return mixed
*/
public function getClass()
return $this->class;
public function getBaseType()
return $this->baseType;
public function getFunctionalType()
return $this->functionalType;
* @return array
public function getHierarchy()
return $this->hierarchy;
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: