| Total Complexity | 4 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | class Calendar_RepeatEvents_View extends \App\Controller\Modal |
||
| 16 | { |
||
| 17 | /** {@inheritdoc} */ |
||
| 18 | public $successBtnIcon = 'far fa-save'; |
||
| 19 | |||
| 20 | /** {@inheritdoc} */ |
||
| 21 | public $modalIcon = 'fas fa-save mr-2'; |
||
| 22 | |||
| 23 | /** {@inheritdoc} */ |
||
| 24 | protected $pageTitle = 'LBL_TITLE_TYPE_SAVING'; |
||
| 25 | |||
| 26 | public $showFooter = false; |
||
| 27 | |||
| 28 | /** {@inheritdoc} */ |
||
| 29 | public function checkPermission(App\Request $request) |
||
| 30 | { |
||
| 31 | return true; |
||
| 32 | //TODO |
||
| 33 | if (!(\App\Process::hasEvent('showVisitPurpose')) && !(\App\Process::hasEvent('showSuperUserVisitPurpose'))) { |
||
|
|
|||
| 34 | throw new \App\Exceptions\NoPermitted('ERR_PERMISSION_DENIED', 406); |
||
| 35 | } |
||
| 36 | } |
||
| 37 | |||
| 38 | /** {@inheritdoc} */ |
||
| 39 | public function process(App\Request $request) |
||
| 43 | } |
||
| 44 | } |
||
| 45 |
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.