protected/commands/Reindex_DocumentCommand.php
The method run() contains an exit expression. Open
Open
if (!isset($args[0]) || $args[0] <= 1) die("./yiic reindex_document [dokument-ID]\n");
- Read upRead up
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}