fucongcong/framework

View on GitHub

Showing 66 of 1,150 total issues

Method handleError has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

public function handleError($level, $message, $file = '', $line = 0, $context = [])
Severity: Minor
Found in core/Group/Handlers/ExceptionsHandler.php - About 35 mins to fix

    Method put has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    public function put($tube, $data, $priority = null, $delaytime = null, $lifetime = null)
    Severity: Minor
    Found in core/Group/Queue/QueueService.php - About 35 mins to fix

      Function doAction has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

      public function doAction($class, $action, array $parameters, \Request $request)
      {
      $reflector = $this->buildMoudle($class);
       
      if (!$reflector->hasMethod($action)) {
      Severity: Minor
      Found in core/Group/Container/Container.php - About 35 mins to fix

      Function _parse_cron_number has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

      static protected function _parse_cron_number($s, $min, $max)
      {
      $result = array();
      $v1 = explode(",", $s);
      foreach ($v1 as $v2) {
      Severity: Minor
      Found in core/Group/Cron/ParseCrontab.php - About 35 mins to fix

      Function handleShutdown has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

      public function handleShutdown()
      {
      if ($e = error_get_last()) {
      if ($this->isFatal($e['type'])) {
      $this->record($e);
      Severity: Minor
      Found in core/Group/Handlers/ExceptionsHandler.php - About 35 mins to fix

      Function execution has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

      private function execution($addr, $method, $parameters)
      {
      $aopConfig = Config::get("app::aop");
      if (isset($aopConfig[$this->name][$addr][$method])) {
      if (is_string($aopConfig[$this->name][$addr][$method])) {
      Severity: Minor
      Found in core/Group/App/Bean.php - About 35 mins to fix

      Function smarttimeFilter has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

      public function smarttimeFilter($time) {
      $diff = time() - $time;
      if ($diff < 0) {
      return '未来';
      }
      Severity: Minor
      Found in core/Group/Controller/WebExtension.php - About 35 mins to fix

      Function getConnectionLocator has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

      private function getConnectionLocator()
      {
      $config = $this->config;
      $connections = new ConnectionLocator;
       
       
      Severity: Minor
      Found in core/Group/Dao/Dao.php - About 35 mins to fix

      Function init has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

      public function init()
      {
      $input = $this->getArgv();
       
      if (!isset($input[0])) {
      Severity: Minor
      Found in core/Group/Console/Command/GenerateControllerCommand.php - About 35 mins to fix

      Function handleError has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

      public function handleError($level, $message, $file = '', $line = 0, $context = [])
      {
      if (error_reporting() & $level) {
      $error = [
      'message' => $message,
      Severity: Minor
      Found in core/Group/Handlers/ExceptionsHandler.php - About 35 mins to fix

      Avoid too many return statements within this method.
      Open

      return 'other';
      Severity: Major
      Found in core/Group/Common/FileToolkit.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

        return round($diff / 86400) . '天前';
        Severity: Major
        Found in core/Group/Controller/WebExtension.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

          return date('m-d', $time);
          Severity: Major
          Found in core/Group/Controller/WebExtension.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

            return date('Y-m-d', $time);
            Severity: Major
            Found in core/Group/Controller/WebExtension.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

              return 'document';
              Severity: Major
              Found in core/Group/Common/FileToolkit.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                return 'flash';
                Severity: Major
                Found in core/Group/Common/FileToolkit.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                  return 'ppt';
                  Severity: Major
                  Found in core/Group/Common/FileToolkit.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                    return 'other';
                    Severity: Major
                    Found in core/Group/Common/FileToolkit.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                      return round($diff / 3600) . '小时前';
                      Severity: Major
                      Found in core/Group/Controller/WebExtension.php - About 30 mins to fix

                        Function getFileTypeByExtension has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                        public static function getFileTypeByExtension($extension)
                        {
                        $extension = strtolower($extension);
                         
                        if (in_array($extension, array('mp4', 'avi', 'wmv', 'flv', 'mov'))) {
                        Severity: Minor
                        Found in core/Group/Common/FileToolkit.php - About 25 mins to fix
                        Severity
                        Category
                        Status
                        Source
                        Language