Closed DaveLiddament closed 3 months ago
This limits the use of a Trait to only be used by a specified class of a child of that class.
E.g. this trait is limited to classes that are or extend Controller
Controller
#[RestrictTraitTo(Controller::class)] trait ControllerHelpers {}
This would be allowed:
class LoginController extends Controller { use ControllerHelpers; }
But this would NOT be allowed:
class Repository { use ControllerHelpers; }
Actioned #33
This limits the use of a Trait to only be used by a specified class of a child of that class.
E.g. this trait is limited to classes that are or extend
Controller
This would be allowed:
But this would NOT be allowed: