Showing 56 of 58 total issues
File Worksheet.php
has 617 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Xls;
class Worksheet extends BIFFwriter
Worksheet
has 70 functions (exceeds 20 allowed). Consider refactoring. Open
class Worksheet extends BIFFwriter
{
const BOF_TYPE = 0x0010;
const STATE_VISIBLE = 0x00;
File FormulaParser.php
has 437 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Xls;
class FormulaParser
FormulaParser
has 40 functions (exceeds 20 allowed). Consider refactoring. Open
class FormulaParser
{
/**
* The index of the character we are currently looking at
* @var integer
File Workbook.php
has 388 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Xls;
use Xls\OLE\PpsFile;
use Xls\OLE\PpsRoot;
Function getBlocksSizesOrDataToWrite
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
public function getBlocksSizesOrDataToWrite($tmpBlockSizes = null, $returnDataToWrite = false)
{
$continueLimit = Biff8::CONTINUE_LIMIT;
$blockLength = 0;
$written = 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
Workbook
has 39 functions (exceeds 20 allowed). Consider refactoring. Open
class Workbook extends BIFFwriter
{
const COUNTRY_NONE = -1;
const COUNTRY_USA = 1;
PrintSetup
has 36 functions (exceeds 20 allowed). Consider refactoring. Open
class PrintSetup
{
const ORIENTATION_PORTRAIT = 1;
const ORIENTATION_LANDSCAPE = 0;
File Functions.php
has 328 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Xls;
class Functions
Method getAll
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getAll()
{
return array(
'ptgExp' => 0x01,
'ptgTbl' => 0x02,
Format
has 29 functions (exceeds 20 allowed). Consider refactoring. Open
class Format
{
const BORDER_NONE = 0;
const BORDER_THIN = 1;
const BORDER_THICK = 2;
File PpsRoot.php
has 284 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Xls\OLE;
class PpsRoot extends PPS
Font
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
class Font
{
const FONT_NORMAL = 400;
const FONT_BOLD = 700;
Method getBlocksSizesOrDataToWrite
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getBlocksSizesOrDataToWrite($tmpBlockSizes = null, $returnDataToWrite = false)
{
$continueLimit = Biff8::CONTINUE_LIMIT;
$blockLength = 0;
$written = 0;
Method saveBigBlockChain
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function saveBigBlockChain($numSbBlocks, $numBbBlocks, $numPpsBlocks)
{
$info = $this->calcBigBlockChain($numSbBlocks, $numBbBlocks, $numPpsBlocks);
$headerEntriesCount = $info["header_list_entries"];
$entriesCount = $info["list_entries"];
Function saveBigBlockChain
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
protected function saveBigBlockChain($numSbBlocks, $numBbBlocks, $numPpsBlocks)
{
$info = $this->calcBigBlockChain($numSbBlocks, $numBbBlocks, $numPpsBlocks);
$headerEntriesCount = $info["header_list_entries"];
$entriesCount = $info["list_entries"];
- 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 getStatisticalFunctions
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected static function getStatisticalFunctions()
{
return array(
// function ptg args class vol
'AVERAGE' => array(5, -1, 0, 0),
Method positionImage
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function positionImage($colStart, $rowStart, $x1, $y1, $width, $height)
{
// Initialise end cell to the same as the start cell
$colEnd = $colStart; // Col containing lower right corner of object
$rowEnd = $rowStart; // Row containing bottom right corner of object
Function saveSmallData
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
protected function saveSmallData(&$list)
{
$result = '';
$iSmBlk = 0;
foreach ($list as $item) {
- 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 getMathFunctions
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected static function getMathFunctions()
{
return array(
// function ptg args class vol
'SUM' => array(4, -1, 0, 0),