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"');
- Read upRead up
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;
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;
- Read upRead up
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"');
Method setup
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function setup(Auth $auth, Blog $blog, array $map)
{
$html = '';
if (!isset(static::$version['bootstrap'])) {
return $html;
Method wyciwyg
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function wyciwyg()
{
extract(self::params('bp', 'page', 'plugin'));
$html = "\n\n".<<<EOT
<div id="wyciwyg" style="display:none; width:100%; padding:0 10px;">
Function box
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public static function box($style, array $contents)
{
$box = '';
$classes = 'box box-'.implode(' box-', explode(' ', $style)); // solid, default, primary, info, warning, success, danger
foreach ($contents as $section => $value) {
- Read upRead up
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 sidebar
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public static function sidebar($links, $prepend = false)
{
if (is_array($links)) {
$page = Page::html();
foreach ($links as $name => $path) {
- Read upRead up
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 box
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function box($style, array $contents)
{
$box = '';
$classes = 'box box-'.implode(' box-', explode(' ', $style)); // solid, default, primary, info, warning, success, danger
foreach ($contents as $section => $value) {