Kylob/BootPress

View on GitHub

Showing 144 of 16,700 total issues

File Analytics.php has 947 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace BootPress\Admin\Pages;

use BootPress\Admin\Component as Admin;
Severity: Major
Found in src/Admin/Pages/Analytics.php - About 2 days to fix

    Function view has a Cognitive Complexity of 107 (exceeds 5 allowed). Consider refactoring.
    Open

        public static function view($dir, array $extensions = array(), $recursive = false)
        {
            extract(Admin::params(array('bp', 'blog', 'auth', 'page', 'website')));
            $dir = rtrim($dir, '/').'/';
    
    
    Severity: Minor
    Found in src/Admin/Files.php - About 2 days 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 users has a Cognitive Complexity of 90 (exceeds 5 allowed). Consider refactoring.
    Open

        private function users($data = null)
        {
            extract(Admin::params('bp', 'blog', 'website', 'page'));
            $page->title = 'User Analytics at '.$website;
            $html = '';
    Severity: Minor
    Found in src/Admin/Pages/Analytics.php - About 1 day 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 form has a Cognitive Complexity of 77 (exceeds 5 allowed). Consider refactoring.
    Open

        private static function form()
        {
            extract(Admin::params(array('bp', 'blog', 'page', 'plugin', 'website')));
            $html = '';
            $media = '';
    Severity: Minor
    Found in src/Admin/Pages/Blog.php - About 1 day 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 page has a Cognitive Complexity of 74 (exceeds 5 allowed). Consider refactoring.
    Open

        public static function page()
        {
            extract(Admin::params('bp', 'page'));
            $html = '';
            $media = '';
    Severity: Minor
    Found in src/Admin/Pages/Folders.php - About 1 day 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

    File Component.php has 626 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    namespace BootPress\Analytics;
    
    use BootPress\Page\Component as Page;
    Severity: Major
    Found in src/Analytics/Component.php - About 1 day to fix

      Method view has 272 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static function view($dir, array $extensions = array(), $recursive = false)
          {
              extract(Admin::params(array('bp', 'blog', 'auth', 'page', 'website')));
              $dir = rtrim($dir, '/').'/';
      
      
      Severity: Major
      Found in src/Admin/Files.php - About 1 day to fix

        File Files.php has 584 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        
        namespace BootPress\Admin;
        
        use BootPress\Blog\Twig\Parser;
        Severity: Major
        Found in src/Admin/Files.php - About 1 day to fix

          Method users has 216 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              private function users($data = null)
              {
                  extract(Admin::params('bp', 'blog', 'website', 'page'));
                  $page->title = 'User Analytics at '.$website;
                  $html = '';
          Severity: Major
          Found in src/Admin/Pages/Analytics.php - About 1 day to fix

            File Blog.php has 522 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            
            namespace BootPress\Admin\Pages;
            
            use BootPress\Admin\Files;
            Severity: Major
            Found in src/Admin/Pages/Blog.php - About 1 day to fix

              Method form has 192 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private static function form()
                  {
                      extract(Admin::params(array('bp', 'blog', 'page', 'plugin', 'website')));
                      $html = '';
                      $media = '';
              Severity: Major
              Found in src/Admin/Pages/Blog.php - About 7 hrs to fix

                Function display has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring.
                Open

                    public static function display($content)
                    {
                        extract(self::params('auth', 'website', 'page', 'admin', 'plugin'));
                        $page->meta('http-equiv="X-UA-Compatible" content="IE=edge"');
                        $page->meta('content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"');
                Severity: Minor
                Found in src/Admin/Component.php - About 7 hrs 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 __construct has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function __construct(array $options = array())
                    {
                        extract(array_merge(array(
                            'db' => null,
                            'basic' => null,
                Severity: Minor
                Found in src/Auth/Component.php - About 6 hrs 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

                File Component.php has 432 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                <?php
                
                namespace BootPress\Admin;
                
                use BootPress\Auth\Component as Auth;
                Severity: Minor
                Found in src/Admin/Component.php - About 6 hrs to fix

                  Function page has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public static function page()
                      {
                          $page = Page::html();
                          $get = $page->request->query->all();
                          if ($page->get('adminer') == 'css') {
                  Severity: Minor
                  Found in src/Admin/Pages/Databases.php - About 6 hrs 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 page has 151 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public static function page()
                      {
                          extract(Admin::params('bp', 'page'));
                          $html = '';
                          $media = '';
                  Severity: Major
                  Found in src/Admin/Pages/Folders.php - About 6 hrs to fix

                    Function setup has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public static function setup(Auth $auth, Blog $blog, array $map)
                        {
                            $html = '';
                            if (!isset(static::$version['bootstrap'])) {
                                return $html;
                    Severity: Minor
                    Found in src/Admin/Component.php - About 5 hrs 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 log has 146 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public static function log()
                        {
                            // Get initial values
                            $page = Page::html();
                            $log = array(); // csv lines
                    Severity: Major
                    Found in src/Analytics/Component.php - About 5 hrs to fix

                      Function theme has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
                      Open

                          private static function theme($folder)
                          {
                              extract(Admin::params('bp', 'page', 'blog'));
                              if ($page->get('delete') == 'theme') {
                                  list($dirs, $files) = Files::iterate($folder, 'recursive');
                      Severity: Minor
                      Found in src/Admin/Pages/Themes.php - About 5 hrs 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 display has 139 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public static function display($content)
                          {
                              extract(self::params('auth', 'website', 'page', 'admin', 'plugin'));
                              $page->meta('http-equiv="X-UA-Compatible" content="IE=edge"');
                              $page->meta('content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"');
                      Severity: Major
                      Found in src/Admin/Component.php - About 5 hrs to fix
                        Severity
                        Category
                        Status
                        Source
                        Language