Showing 65 of 88 total issues
Function getChild
has a Cognitive Complexity of 85 (exceeds 5 allowed). Consider refactoring. Open
public function getChild(
$Name,
$AttributeList = null,
$Index = null,
$Recursive = true,
- 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
Style
has 29 functions (exceeds 20 allowed). Consider refactoring. Open
class Style implements IStyleInterface
{
/** @var null|\PHPExcel_Worksheet $Worksheet */
private $Worksheet = null;
Function getCode
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function getCode()
{
$FuncArgs = func_get_args();
if (empty( $FuncArgs )) {
- 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 determineType
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
protected function determineType($Content)
{
if (preg_match($this->PatternTagCDATA, $Content)) {
$this->Type = self::TYPE_CDATA;
- 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 getChild
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getChild(
$Name,
$AttributeList = null,
$Index = null,
$Recursive = true,
Method read
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function read($sFileName)
{
// Check if file exists and is readable
if (!is_readable($sFileName)) {
throw new \Exception("Could not open " . $sFileName . " for reading! File does not exist, or it is not readable.");
Function compactFile
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function compactFile(FileParameter $Location, $RewriteBase = null)
{
if ($this->getFileParameter()->getFileInfo()->isFile()) {
if ($RewriteBase === null) {
$this->Instance->add($Location->getFile(), PCLZIP_OPT_TEMP_FILE_OFF);
- 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 utf8ToUnicode
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public static function utf8ToUnicode($text)
{
$unicode = array();
$values = array();
$lookingFor = 1;
- 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 readPropertySets
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function readPropertySets()
{
$offset = 0;
// loop through entires, each entry is 128 bytes
Function chr
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public static function chr($dec)
{
if ($dec<=0x7F) {
return chr($dec);
}
- 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 realpath
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public static function realpath($pFilename)
{
// Try using realpath()
$returnValue = realpath($pFilename);
- 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 getReaderType
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getReaderType(\SplFileInfo $Info)
{
$ReaderList = array(
'Excel2007' => array(
Function __toString
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function __toString()
{
if ($this->getRealPath()) {
if (function_exists('mime_content_type')) {
- 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 __toString
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function __toString()
{
if ($this->getRealPath()) {
if (function_exists('mime_content_type')) {
- 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 findSource
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
private function findSource($ClassName)
{
$LoadNamespace = $this->getClassNamespace($ClassName);
/**
- 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 parseSimpleXml
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
private function parseSimpleXml(\SimpleXMLElement $Xml)
{
$Node = new Node();
$Node->setName($Xml->getName());
- 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 readPropertySets
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
private function readPropertySets()
{
$offset = 0;
// loop through entires, each entry is 128 bytes
- 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 getConfig
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getConfig()
{
$Default = array(
// Source file or directory to parse
Method __toString
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __toString()
{
if ($this->getRealPath()) {
if (function_exists('mime_content_type')) {
Method __toString
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __toString()
{
if ($this->getRealPath()) {
if (function_exists('mime_content_type')) {