Added allowExceptIn, disallowIn
You can now disallow methods, functions, constants, namespaces, classes, superglobals only in specified paths (#134)
Done with allowExceptIn
, disallowIn
(which is just an alias of allowExceptIn
), this allows to create an inverse of allowIn
setup:
parameters:
allowInRootDir: %rootDir%/../../..
disallowedMethodCalls:
-
method: 'PotentiallyDangerous\Logger::log()'
allowExceptIn:
- path/to/some/dir/*.php
This will disallow PotentiallyDangerous\Logger::log()
calls in %rootDir%/../../../path/to/some/dir/*.php
.
You don't need to use allowInRootDir
, it's here just to show that the path specified by the option is also used in this case too