for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace SubjectivePHP\Spl\Traits;
use BadMethodCallException;
trait MagicPropertyDisabledTrait
{
/**
* Access an internal array element as a property
*
* @param string $name The name of class the property.
* @return void
* @throws BadMethodCallException Always thrown
*/
public function __get(string $name)
throw new BadMethodCallException('dynamic properties are disabled in this class');
}
* Set an internal array element as a property
* @param mixed $value The class property value.
public function __set(string $name, $value)