File WindowsCommon.php
has 357 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
* *****************************************************************************
* Contributions to this work were made on behalf of the GÉANT project, a
Method writeNsisDefines
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function writeNsisDefines($attr)
{
$fcontents = '';
if ($attr['internal:profile_count'][0] > 1) {
$fcontents .= "\n" . '!define USER_GROUP "' . $this->translateString(str_replace('"', '$\\"', $attr['profile:name'][0])) . '"
Function msInfoFile
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
protected function msInfoFile($attr)
{
$out = '';
if (isset($attr['support:info_file'])) {
$out .= '!define EXTERNAL_INFO "';
- 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 combineLogo
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function combineLogo($logos = NULL, $fedLogo = NULL)
{
// maximum size to which we want to resize the logos
$maxSize = 120;
Method writeDeviceInfo
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function writeDeviceInfo()
{
\core\common\Entity::intoThePotatoes();
$networkList = [];
foreach (array_keys($this->getAttribute('internal:networks')) as $networkName) {
Function combineLogo
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function combineLogo($logos = NULL, $fedLogo = NULL)
{
// maximum size to which we want to resize the logos
$maxSize = 120;
- 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 scaleLogo
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function scaleLogo($imagePath, $maxSize)
{
if (class_exists('\\Gmagick')) {
$imageObject = new \Gmagick($imagePath);
} else {
- 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 writeNsisDefines
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function writeNsisDefines($attr)
{
$fcontents = '';
if ($attr['internal:profile_count'][0] > 1) {
$fcontents .= "\n" . '!define USER_GROUP "' . $this->translateString(str_replace('"', '$\\"', $attr['profile:name'][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"