<?php namespace Lc\CaracoleBundle\Repository; trait StoreTrait { public function resetContext(): self { if(method_exists($this, 'setMerchant')) { $this->setMerchant(null); } if(method_exists($this, 'setSection')) { $this->setSection(null); } return $this; } }