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 = '';
- 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 Blog.php
has 522 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace BootPress\Admin\Pages;
use BootPress\Admin\Files;
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 = '';
Method page
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function page()
{
extract(Admin::params('bp', 'blog', 'auth', 'page', 'admin', 'path', 'method'));
if ($method) {
switch ($method) {
Method restore
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function restore()
{
extract(Admin::params('bp', 'page', 'blog', 'website'));
$page->title = 'Restore Blog at '.$website;
$html = '';
Function restore
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
private static function restore()
{
extract(Admin::params('bp', 'page', 'blog', 'website'));
$page->title = 'Restore Blog at '.$website;
$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
Function setup
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public static function setup($auth, $path)
{
if (!$auth->isAdmin(2)) {
return false;
}
- 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 setup
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function setup($auth, $path)
{
if (!$auth->isAdmin(2)) {
return false;
}
Method ids
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function ids(array $ids, array $snippets = array())
{
$html = '';
extract(Admin::params(array('bp', 'blog', 'page')));
foreach ($blog->info($ids) as $id => $row) {
Function page
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public static function page()
{
extract(Admin::params('bp', 'blog', 'auth', 'page', 'admin', 'path', 'method'));
if ($method) {
switch ($method) {
- 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 ids
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private static function ids(array $ids, array $snippets = array())
{
$html = '';
extract(Admin::params(array('bp', 'blog', 'page')));
foreach ($blog->info($ids) as $id => $row) {
- 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
There must be one blank line after the last USE statement; 0 found; Open
use ZipStream; // maennchen/zipstream-php
- Exclude checks
Blank line found at start of control structure Open
} else {
- Exclude checks
Blank line found at start of control structure Open
if ($edit) {
- Exclude checks