for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Trait Container
*
* @filesource Container.php
* @created 09.07.2017
* @package chillerlan\QRCode
* @author Smiley <[email protected]>
* @copyright 2017 Smiley
* @license MIT
*/
namespace chillerlan\QRCode;
* a generic container with getter and setter
* @codeCoverageIgnore
trait Container{
* Boa constructor.
* @param array $properties
public function __construct(array $properties = []){
foreach($properties as $key => $value){
$this->__set($key, $value);
}
* David Getter
* @param string $property
* @return mixed
public function __get(string $property){
if(property_exists($this, $property)){
return $this->{$property};
return false;
* Jet-setter
* @param mixed $value
* @return void
public function __set(string $property, $value){
$this->{$property} = $value;