Code Duplication    Length = 3-4 lines in 2 locations

src/base/Router.php 2 locations

@@ 498-501 (lines=4) @@
495
        if(method_exists($class, $preAction)) {
496
            Logger::log(_('Pre action invoked'));
497
            try {
498
                if(false === call_user_func_array([$class, $preAction])) {
499
                    Logger::log(_('Pre action failed'), LOG_ERR, [error_get_last()]);
500
                    error_clear_last();
501
                }
502
            } catch (\Exception $e) {
503
                Logger::log($e->getMessage(), LOG_ERR, [$class, $method]);
504
            }
@@ 535-537 (lines=3) @@
532
        if ($execute) {
533
            Logger::log(_('Start executing action'));
534
            $this->checkPreActions($class, $action['method']);
535
            if (false === call_user_func_array([$class, $action['method']], $params)) {
536
                Logger::log(_('An error occurred trying to execute the action'), LOG_ERR, [error_get_last()]);
537
            }
538
        }
539
    }
540