Skip to content

Multiple calls can be specified as arrays/lists

Choose a tag to compare

@spaze spaze released this 30 May 13:30
90fa943

If you want to disallow multiple calls, constants, class constants (same-class only), namespaces or variables that share the same message and other config keys, you can use a list or an array to specify them all:

parameters:
    disallowedFunctionCalls:
        -
            function:
                - 'var_dump()'
                - 'print_r()'
            message: 'use logger instead'

    disallowedConstants:
        -
            class: 'DateTimeInterface'
            constant: ['ISO8601', 'RFC3339', 'W3C']
            message: 'use DateTimeInterface::ATOM instead'

(#111)