EXPERIMENTAL: Takes @param
annotations of non-mixed types and adjusts accordingly the function signature. Requires PHP >= 7.0.
Warning
Using this rule is risky.
This rule is EXPERIMENTAL and [1] is not covered with backward compatibility promise. [2] @param
annotation is mandatory for the fixer to make changes, signatures of methods without it (no docblock, inheritdocs) will not be fixed. [3] Manual actions are required if inherited signatures are not properly documented.
--- Original
+++ New
<?php
/** @param string $bar */
-function my_foo($bar)
+function my_foo(string $bar)
{}
--- Original
+++ New
<?php
/** @param string|null $bar */
-function my_foo($bar)
+function my_foo(?string $bar)
{}