protected function checkTraitDependencies($traitName)
    {
        if(isset($this->traitsDependencies[$traitName])) {
            $reflection = new \ReflectionClass($this);
            foreach($this->traitsDependencies[$traitName] as $requiredTrait) {
                $propertyName = 'has' . $requiredTrait;
                if(!$reflection->hasProperty($propertyName) || !$this->$propertyName) {
                    throw new \Exception(sprintf('Class %s uses %s trait but %s required trait is not used', $this->buildClassName($this->name), $traitName, $requiredTrait));
                }
            }
        }
    }