Showing 45 of 181 total issues
Method markdown
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function markdown(\SwaggerValidator\Common\Context $context, $generalItems)
{
$method = __FUNCTION__;
$generalItems = $this->getMethodGeneric($context, $method, $generalItems);
$tplResources = array();
Method autoload
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
final public static function autoload($className)
{
if (\Phar::running() && defined('PHAR_SWG2MD_ROOT_PATH')) {
$baseDir = PHAR_SWG2MD_ROOT_PATH;
}
Method getSummary
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getSummary(\SwaggerValidator\Common\Context $context)
{
$method = __FUNCTION__;
$summary = array();
Method markdown
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function markdown(\SwaggerValidator\Common\Context $context, $generalItems)
{
$method = __FUNCTION__;
$context->setType(\SwaggerValidator\Common\Context::TYPE_REQUEST);
Method markdown
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function markdown(\SwaggerValidator\Common\Context $context, $generalItems)
{
$method = __FUNCTION__;
$generalItems = $this->getMethodGeneric($context, $method, $generalItems);
$tplOperation = array();
Function autoload
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
final public static function autoload($className)
{
if (\Phar::running() && defined('PHAR_SWG2MD_ROOT_PATH')) {
$baseDir = PHAR_SWG2MD_ROOT_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 renderTable
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function renderTable($name, $anchor, $listKey, $colonsFile, $template, $vars, $store = null)
Function apache_request_headers
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function apache_request_headers()
{
$arh = array();
foreach ($_SERVER as $key => $val) {
- 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 checkTemplates
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function checkTemplates($path = null)
{
if (defined('PHAR_SWG2MD_ROOT_PATH')) {
$baseDir = PHAR_SWG2MD_ROOT_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
Function getSummary
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getSummary(\SwaggerValidator\Common\Context $context)
{
$method = __FUNCTION__;
$summary = array();
- 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 renderTable
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function renderTable($name, $anchor, $listKey, $colonsFile, $template, $vars, $store = null)
{
if ($store !== false) {
$file = $this->checkAndMakeObjectFolder();
}
- 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 markdown
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function markdown(\SwaggerValidator\Common\Context $context, $generalItems)
{
$method = __FUNCTION__;
$generalItems = $this->getMethodGeneric($context, $method, $generalItems);
$tplResources = array();
- 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
Avoid too many return
statements within this method. Open
return;
Avoid too many return
statements within this method. Open
return $this->twigTpl->render($template, $vars);
Avoid too many return
statements within this method. Open
return $val;
Avoid too many return
statements within this method. Open
return $val;
Avoid too many return
statements within this method. Open
return $this->tempFolder . DIRECTORY_SEPARATOR;
Avoid too many return
statements within this method. Open
return $val['enabled'];
Avoid too many return
statements within this method. Open
return array_filter($colParamsTitle);
Function markdown
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function markdown(\SwaggerValidator\Common\Context $context)
{
$method = __FUNCTION__;
$templateVars = array();
- 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"