for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* WebHemi.
*
* PHP version 7.1
* @copyright 2012 - 2017 Gixx-web (http://www.gixx-web.com)
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
* @link http://www.gixx-web.com
*/
declare(strict_types = 1);
namespace WebHemi\Middleware\Action\Admin\About;
use RuntimeException;
use WebHemi\Middleware\Action\AbstractMiddlewareAction;
* Class IndexAction
class IndexAction extends AbstractMiddlewareAction
{
* Gets template map name or template file path.
* @return string
public function getTemplateName() : string
return '';
}
* Gets template data.
* @return array
public function getTemplateData() : array
throw new RuntimeException('Not Implemented', 501);
return [];
return array();
This check looks for unreachable code. It uses sophisticated control flow analysis techniques to find statements which will never be executed.
Unreachable code is most often the result of return, die or exit statements that have been added for debug purposes.
return
die
exit
function fx() { try { doSomething(); return true; } catch (\Exception $e) { return false; } return false; }
In the above example, the last return false will never be executed, because a return statement has already been met in every possible execution path.
return false
This check looks for unreachable code. It uses sophisticated control flow analysis techniques to find statements which will never be executed.
Unreachable code is most often the result of
return,dieorexitstatements that have been added for debug purposes.In the above example, the last
return falsewill never be executed, because a return statement has already been met in every possible execution path.