Pattern: Use of multiple type attribute
Issue: -
Parameters should not have more than one type specifier. Multiple type specifiers on parameters can cause runtime errors.
Ensure each parameter has only 1 type specifier.
Example of incorrect code:
function Test-Script
{
[CmdletBinding()]
Param
(
[switch]
[int]
$Switch
)
}
Example of correct code:
function Test-Script
{
[CmdletBinding()]
Param
(
[switch]
$Switch
)
}