Showing 40 of 40 total issues
Method getMinified
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function getMinified() {
$this->pinpie->times[] = [microtime(true), 'getMinified'];
if (!isset($this->c['getMinified'])) {
$this->c['getMinified'] = [];
}
Function draw
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function draw() {
$content = '';
$this->filetime = filemtime($this->filename);
if (!$this->cachetime OR $this->cachebleParents) {
//стоит запрет кеширования или не нужно кешировать, если один из родителей будет закеширован
- 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 getMinified
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function getMinified() {
$this->pinpie->times[] = [microtime(true), 'getMinified'];
if (!isset($this->c['getMinified'])) {
$this->c['getMinified'] = [];
}
- 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 parseUrl
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function parseUrl() {
$this->parsed = parse_url($this->url);
if (isset($this->parsed['scheme']))
$this->scheme = $this->parsed['scheme'];
if (isset($this->parsed['host']))
- 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 getContent
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getContent() {
$this->pinpie->times[] = [microtime(true), 'getContent'];
if (!empty($this->settings['draw function'])) {
$this->content = $this->settings['draw function']($this);
$this->pinpie->times[] = [microtime(true), 'drawn by func'];
- 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 __construct
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function __construct(PP $pinpie, $settings, $fulltag, $type, $placeholder, $template, $cachetime, $fullname, Tag $parentTag = null, $priority = 10000, $depth = 0) {
$this->time = [
'start' => microtime(true),
'end' => (float)0,
'total' => (float)0,
- 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 report
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function report() {
if (!$this->conf->debug) {
return false;
}
ob_start();
- 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 getStaticPathReal
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function getStaticPathReal() {
$path = rtrim($this->settings['folder'], '/\\') . DIRECTORY_SEPARATOR . ltrim($this->staticPath, '/\\');
$this->pinpie->times[] = [microtime(true), 'processing static path ' . $path];
if ($this->settings['realpath check']) {
$this->pinpie->times[] = [microtime(true), 'realpath check required'];
- 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 __construct
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($settings = []) {
if (empty($settings['root'])) {
$this->root = rtrim(str_replace('\\', '/', dirname($_SERVER["SCRIPT_FILENAME"])), DIRECTORY_SEPARATOR);
} else {
$this->root = $settings['root'];
- 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 doChecks
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function doChecks() {
if (empty($this->filename)) {
$this->error('Can\'t create a filename');
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
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return $this->findFile($url);
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return $pathRealpath;
Avoid too many return
statements within this method. Open
return '';
Avoid too many return
statements within this method. Open
return $this->checkMTime($this->filename, $this->minifiedPath);
Avoid too many return
statements within this method. Open
return true;
Function getStaticUrl
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getStaticUrl() {
if ($this->staticPath === '' OR $this->staticPath === false OR $this->staticPath === null) {
return false;
}
if (!isset($this->c['getStaticUrl'])) {
- 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 varsInjectMerge
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function varsInjectMerge(&$vars, &$storage) {
foreach ($vars as $varname => $var) {
foreach ($var as $priority => $value) {
if (!isset($storage[$varname][$priority])) {
$storage[$varname][$priority] = [];
- 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"