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 StaticObjectWatchdog {
* @param string $prop
* @param mixed $value
* @return void
public function __set($prop, $value) {
Daemon::log('[CODE WARN] Setting undefined property ' . json_encode($prop) . ' in object of class ' . get_class($this) . PHP_EOL . Debug::backtrace());
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.
$this->{$prop} = $value;
}
public function __unset($prop) {
Daemon::log('[CODE WARN] Unsetting property ' . json_encode($prop) . ' in object of class ' . get_class($this) . PHP_EOL . Debug::backtrace());
unset($this->{$prop});
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.