for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace PHPDaemon\Traits;
use PHPDaemon\Core\Daemon;
use PHPDaemon\Core\Debug;
/**
* Watchdog of __set in static objects
* @package PHPDaemon\Traits
* @author Zorin Vasily <[email protected]>
*/
trait StrictStaticObjectWatchdog {
* @param string $prop
* @param mixed $value
* @throws UndefinedPropertySetting if trying to set undefined property
* @return void
public function __set($prop, $value) {
$value
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
throw new UndefinedPropertySetting('Trying to set undefined property ' . json_encode($prop) . ' in object of class ' . get_class($this));
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.
}
* @throws UnsettingProperty if trying to unset property
public function __unset($prop) {
throw new UnsettingProperty('Trying to unset property ' . json_encode($prop) . ' in object of class ' . get_class($this));
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.