src/Phan/Debug/DebugUnionType.php
The method DebugUnionType::withType() calls the typical debug function debug_print_backtrace() which is mostly only used during development. Open
Open
\debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
- Read upRead up
- Exclude checks
DevelopmentCodeFragment
Since: 2.3.0
Functions like vardump(), printr() etc. are normally only used during development and therefore such calls in production code are a good indicator that they were just forgotten.
Example
class SuspectCode {
public function doSomething(array $items)
{
foreach ($items as $i => $item) {
// …
if ('qafoo' == $item) var_dump($i);
// …
}
}
}
Source https://phpmd.org/rules/design.html#developmentcodefragment
The method DebugUnionType::withUnionType() calls the typical debug function debug_print_backtrace() which is mostly only used during development. Open
Open
\debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
- Read upRead up
- Exclude checks
DevelopmentCodeFragment
Since: 2.3.0
Functions like vardump(), printr() etc. are normally only used during development and therefore such calls in production code are a good indicator that they were just forgotten.
Example
class SuspectCode {
public function doSomething(array $items)
{
foreach ($items as $i => $item) {
// …
if ('qafoo' == $item) var_dump($i);
// …
}
}
}