GrafiteInc/Html

View on GitHub

Showing 40 of 50 total issues

Method setDefaultProperties has 9 arguments (exceeds 4 allowed). Consider refactoring.
Open

        $id,
        $css,
        $url,
        $text,
        $html,
Severity: Major
Found in src/Components/HtmlComponent.php - About 1 hr to fix

    Method __contruct has 9 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            $id = null,
            $css = null,
            $url = null,
            $text = null,
            $html = null,
    Severity: Major
    Found in src/Components/HtmlComponent.php - About 1 hr to fix

      Method styles has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static function styles()
          {
              return <<<CSS
                  .pulse-loading svg polyline {
                      fill: none;
      Severity: Minor
      Found in src/Tags/Animations/Pulse.php - About 1 hr to fix

        Method styles has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public static function styles()
            {
                return <<<CSS
                    @media (prefers-color-scheme: light) {
                        :root {
        Severity: Minor
        Found in src/Tags/Calendar.php - About 1 hr to fix

          Method __construct has 8 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                  $id = null,
                  $title = null,
                  $content = null,
                  $text = 'Modal Button',
                  $cssClass = null,
          Severity: Major
          Found in src/Components/Modal.php - About 1 hr to fix

            Method __construct has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    $thumbnail = false,
                    $lazy = false,
                    $fluid = false,
                    $placeholder = false,
                    $css = '',
            Severity: Major
            Found in src/Components/Image.php - About 50 mins to fix

              Method __construct has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      $body = null,
                      $title = null,
                      $header = null,
                      $footer = null,
                      $imageSrc = null,
              Severity: Major
              Found in src/Components/Card.php - About 50 mins to fix

                Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        $title = null,
                        $cssClass = null,
                        $id = null,
                        $width = null,
                        $backdrop = 'true',
                Severity: Minor
                Found in src/Components/Offcanvas.php - About 45 mins to fix

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

                          $imageA = null,
                          $imageB = null,
                          $width = null,
                          $height = null,
                          $color = null,
                  Severity: Minor
                  Found in src/Components/ImageCompare.php - About 35 mins to fix

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

                            $class = null,
                            $collection = [],
                            $keys = [],
                            $sortable = null,
                            $headers = []
                    Severity: Minor
                    Found in src/Components/Table.php - About 35 mins to fix

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

                              $image = null,
                              $css = null,
                              $scale = null,
                              $delay = null,
                              $orientation = null,
                      Severity: Minor
                      Found in src/Components/Parallax.php - About 35 mins to fix

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

                                $text = null,
                                $background = 'info',
                                $heading = null,
                                $dismiss = false,
                                $timeout = 5000
                        Severity: Minor
                        Found in src/Components/Announcement.php - About 35 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                      return "<?php echo \Illuminate\Support\Str::of($expression)->replace('_', ' ')->plural(); ?>";
                          Severity: Major
                          Found in src/HtmlProvider.php - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                        return "<?php echo \Illuminate\Support\Str::of($expression)->replace('_', ' ')->title(); ?>";
                            Severity: Major
                            Found in src/HtmlProvider.php - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                          return "<?php echo \Illuminate\Support\Str::of($expression)->replace('_', ' ')->headline(); ?>";
                              Severity: Major
                              Found in src/HtmlProvider.php - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                            return "<?php echo ($params[0]) ? $params[1] : ''; ?>";
                                Severity: Major
                                Found in src/HtmlProvider.php - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                              return "<?php echo \Illuminate\Support\Str::of($expression)->replace('_', ' ')->limit(40); ?>";
                                  Severity: Major
                                  Found in src/HtmlProvider.php - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                                return "<?php echo \Illuminate\Support\Str::of($expression)->replace('_', ' ')->singular(); ?>";
                                    Severity: Major
                                    Found in src/HtmlProvider.php - About 30 mins to fix

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

                                          public static function attributeElement($key, $value)
                                          {
                                              if (is_numeric($key)) {
                                                  return $value;
                                              }
                                      Severity: Minor
                                      Found in src/Tags/HtmlComponent.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 process has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                          public static function process()
                                          {
                                              $header = '';
                                              $footerContent = '';
                                              $close = '';
                                      Severity: Minor
                                      Found in src/Tags/Modal.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

                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language