GrafiteInc/Html

View on GitHub

Showing 40 of 50 total issues

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

    public static function styles()
    {
        return <<<CSS
            @keyframes snow {
            0% {
Severity: Major
Found in src/Tags/Animations/Spaceman.php - About 1 day to fix

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

        public static function styles()
        {
            return <<<CSS
                .wheel-and-hamster {
                    --dur: 1s;
    Severity: Major
    Found in src/Tags/Animations/Hamster.php - About 1 day to fix

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

          public static function styles()
          {
              return <<<CSS
                  .typewriter {
                  --blue: #5C86FF;
      Severity: Major
      Found in src/Tags/Animations/Typewriter.php - About 7 hrs to fix

        File Spaceman.php has 347 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        
        namespace Grafite\Html\Tags\Animations;
        
        use Grafite\Html\Tags\HtmlComponent;
        Severity: Minor
        Found in src/Tags/Animations/Spaceman.php - About 4 hrs to fix

          Method js has 100 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public static function js()
              {
                  $id = self::$id;
                  $effect = self::$effect;
          
          
          Severity: Major
          Found in src/Tags/Text.php - About 4 hrs to fix

            Method boot has 84 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function boot()
                {
                    $this->publishes([
                        __DIR__ . '/../config/html.php' => base_path('config/html.php'),
                    ]);
            Severity: Major
            Found in src/HtmlProvider.php - About 3 hrs to fix

              File Hamster.php has 266 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              
              namespace Grafite\Html\Tags\Animations;
              
              use Grafite\Html\Tags\HtmlComponent;
              Severity: Minor
              Found in src/Tags/Animations/Hamster.php - About 2 hrs to fix

                Method process has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public static function process()
                    {
                        $collection = self::$collection;
                        $keys = self::$keys;
                        $sortable = self::$sortable;
                Severity: Major
                Found in src/Tags/Table.php - About 2 hrs to fix

                  Method js has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public static function js()
                      {
                          $id = self::$id;
                  
                          return <<<JS
                  Severity: Major
                  Found in src/Tags/ImageCompare.php - About 2 hrs to fix

                    Method process has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public static function process()
                        {
                            self::$html = <<<HTML
                                <div class="box-of-star1">
                                    <div class="star star-position1"></div>
                    Severity: Minor
                    Found in src/Tags/Animations/Spaceman.php - About 1 hr to fix

                      Method js has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public static function js()
                          {
                              $id = self::$id;
                              $items = json_encode(self::$items);
                      
                      
                      Severity: Minor
                      Found in src/Tags/Calendar.php - About 1 hr to fix

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

                            public static function styles()
                            {
                                $borderColor = self::$borderColor ?? '#FFF';
                        
                                return <<<styles
                        Severity: Minor
                        Found in src/Tags/Feed.php - About 1 hr to fix

                          Method process has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public static function process()
                              {
                                  $header = '';
                                  $footerContent = '';
                                  $close = '';
                          Severity: Minor
                          Found in src/Tags/Modal.php - About 1 hr to fix

                            Method process has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public static function process()
                                {
                                    $class = '';
                            
                                    if (self::$css) {
                            Severity: Minor
                            Found in src/Tags/NavBar.php - About 1 hr to fix

                              Function process has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  public static function process()
                                  {
                                      $collection = self::$collection;
                                      $keys = self::$keys;
                                      $sortable = self::$sortable;
                              Severity: Minor
                              Found in src/Tags/Table.php - About 1 hr 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

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

                                  public static function styles()
                                  {
                                      return <<<styles
                              .html-component-avatar {
                                  width: 200px;
                              Severity: Minor
                              Found in src/Tags/Avatar.php - About 1 hr to fix

                                Method process has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public static function process()
                                    {
                                        self::$id = static::$attributes['id'] ?? 'html_' . Str::uuid();
                                
                                        $id = self::$id;
                                Severity: Minor
                                Found in src/Tags/Video.php - About 1 hr to fix

                                  Method process has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public static function process()
                                      {
                                          $id = self::$id ?? 'html_carousel_' . Str::uuid() . '_';
                                  
                                          if (! Str::of(get_class(self::$items))->contains('Collection')) {
                                  Severity: Minor
                                  Found in src/Tags/Carousel.php - About 1 hr to fix

                                    Method processLinks has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public static function processLinks($items, $id, $show)
                                        {
                                            $index = 1;
                                            $steps = '';
                                    
                                    
                                    Severity: Minor
                                    Found in src/Tags/Accordion.php - About 1 hr to fix

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

                                          public static function styles()
                                          {
                                              $width = self::$width;
                                              $height = self::$height;
                                              $color = self::$color;
                                      Severity: Minor
                                      Found in src/Tags/ImageCompare.php - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language