Showing 65 of 88 total issues
Method getCode
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getCode()
{
$FuncArgs = func_get_args();
if (empty( $FuncArgs )) {
Method getDelimiterType
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getDelimiterType()
{
$Delimiter = array(
',',
Function read
has a Cognitive Complexity of 11 (exceeds 5 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.");
- 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 11 (exceeds 5 allowed). Consider refactoring. Open
function __construct(Tokenizer $Tokenizer)
{
/** @var Token $Token */
foreach ((array)$Tokenizer->getResult() as $Token) {
- 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 getStream
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function getStream($stream)
{
if ($stream === null) {
return null;
}
- 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 buildConnectionParameter
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function buildConnectionParameter(
UsernameParameter $Username,
PasswordParameter $Password,
DatabaseParameter $Database,
DriverParameter $Driver,
Method __construct
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function __construct(Tokenizer $Tokenizer)
{
/** @var Token $Token */
foreach ((array)$Tokenizer->getResult() as $Token) {
Method getStream
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getStream($stream)
{
if ($stream === null) {
return null;
}
Method getWriterType
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getWriterType(\SplFileInfo $Info)
{
$WriterList = array(
'Excel2007' => array(
Function __construct
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function __construct()
{
if (null === self::$Instance) {
if (!isset($_GET)) {
- 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 extractFiles
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function extractFiles()
{
if ($this->getFileParameter()->getFileInfo()->isFile()) {
$TmpDirectory = sys_get_temp_dir();
$SubDirectory = uniqid(sha1(__METHOD__), 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
Function loadClass
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function loadClass($ClassName)
{
if ($this->checkExists($ClassName)) {
return 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
Method registerConnection
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
UsernameParameter $Username,
PasswordParameter $Password,
DatabaseParameter $Database,
DriverParameter $Driver,
HostParameter $Host,
Method registerConnection
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
UsernameParameter $Username,
PasswordParameter $Password,
DatabaseParameter $Database,
DriverParameter $Driver,
HostParameter $Host,
Method buildConnectionParameter
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
UsernameParameter $Username,
PasswordParameter $Password,
DatabaseParameter $Database,
DriverParameter $Driver,
HostParameter $Host,
Method getDoctrineDatabase
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
$Username,
$Password,
$Database,
$Driver,
$Host,
Method getDatabase
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function getDatabase($Username, $Password, $Database, $Driver, $Host, $Port = null, $Timeout = 5)
Method getChild
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$Name,
$AttributeList = null,
$Index = null,
$Recursive = true,
$NameIsRegExp = false,
Method connectServer
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function connectServer($Host, $Username, $Password, $Port = null, $useSSL = false, $useTLS = false)
Method connectServer
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function connectServer($Host, $Username, $Password, $Port = null, $useSSL = false, $useTLS = false);