coding-standard
coding-standard copied to clipboard
Sniff to check that only exceptions from specific (app) namespaces are thrown
Having an app within My\App namespace, I'd like to only allow throwing exceptions from My\App or any sub-namespace - no SPL, no global Exception/Error.
This should be really straightforward, but I can see a potential use case for extended behavior: specifying boundaries and their allowed exceptions. Example:
My\App\FooContextcan only throwMy\App\FooContext\*My\App\BarContextcan only throwMy\App\BarContext\*
cc @simPod