for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Igorsgm\TibiaDataApi\Traits;
use Igorsgm\TibiaDataApi\Exceptions\ImmutableException;
/**
* Trait ImmutableTrait
* @package Igorsgm\TibiaDataApi\Models
*/
trait ImmutableTrait
{
* @var bool
protected $mutable = true;
* @throws ImmutableException
public function handleImmutableConstructor()
if (!$this->mutable) {
throw new ImmutableException();
}
$this->mutable = false;
* @param $key
* @param $value
public function __set($key, $value)