sahat/satellizer

View on GitHub

Showing 300 of 562 total issues

Avoid too many return statements within this function.
Open

      return 206;
Severity: Major
Found in examples/ionic/www/lib/ionic/js/ionic.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

          return transition;
    Severity: Major
    Found in examples/ionic/www/lib/ionic/js/angular-ui/angular-ui-router.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

          return jsonify(token=token)
      Severity: Major
      Found in examples/server/python/app.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

            return jsonify(token=token)
        Severity: Major
        Found in examples/server/python/app.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

            return 275;
          Severity: Major
          Found in examples/ionic/www/lib/ionic/js/ionic.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                      return false;
            Severity: Major
            Found in examples/ionic/www/lib/satellizer/satellizer.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                    return 216;
              Severity: Major
              Found in examples/ionic/www/lib/ionic/js/ionic.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                    return jsonify(token=token)
                Severity: Major
                Found in examples/server/python/app.py - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                      return 260;
                  Severity: Major
                  Found in examples/ionic/www/lib/ionic/js/ionic.js - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                    return response()->json(['token' => $this->createToken($user)]);
                    Severity: Major
                    Found in examples/server/php/app/Http/Controllers/AuthController.php - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                          return jsonify(token=token)
                      Severity: Major
                      Found in examples/server/python/app.py - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                            return jsonify(token=token)
                        Severity: Major
                        Found in examples/server/python/app.py - About 30 mins to fix

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

                              public function facebook(Request $request)
                              {
                                  $client = new GuzzleHttp\Client();
                          
                                  $params = [
                          Severity: Minor
                          Found in examples/server/php/app/Http/Controllers/AuthController.php - About 25 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

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

                              public function foursquare(Request $request)
                              {
                                  $client = new GuzzleHttp\Client();
                          
                                  $params = [
                          Severity: Minor
                          Found in examples/server/php/app/Http/Controllers/AuthController.php - About 25 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

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

                          def twitter():
                              request_token_url = 'https://api.twitter.com/oauth/request_token'
                              access_token_url = 'https://api.twitter.com/oauth/access_token'
                          
                              if request.json.get('oauth_token') and request.json.get('oauth_verifier'):
                          Severity: Minor
                          Found in examples/server/python/app.py - About 25 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

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

                              public function google(Request $request)
                              {
                                  $client = new GuzzleHttp\Client();
                          
                                  $params = [
                          Severity: Minor
                          Found in examples/server/php/app/Http/Controllers/AuthController.php - About 25 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

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

                              public function github(Request $request)
                              {
                                  $client = new GuzzleHttp\Client();
                          
                                  $params = [
                          Severity: Minor
                          Found in examples/server/php/app/Http/Controllers/AuthController.php - About 25 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

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

                              public function linkedin(Request $request)
                              {
                                  $client = new GuzzleHttp\Client();
                          
                                  $params = [
                          Severity: Minor
                          Found in examples/server/php/app/Http/Controllers/AuthController.php - About 25 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

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

                              public function instagram(Request $request)
                              {
                                  $client = new GuzzleHttp\Client();
                          
                                  $params = [
                          Severity: Minor
                          Found in examples/server/php/app/Http/Controllers/AuthController.php - About 25 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

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

                          def login_required(f):
                              @wraps(f)
                              def decorated_function(*args, **kwargs):
                                  if not request.headers.get('Authorization'):
                                      response = jsonify(message='Missing authorization header')
                          Severity: Minor
                          Found in examples/server/python/app.py - About 25 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Severity
                          Category
                          Status
                          Source
                          Language