Showing 284 of 325 total issues
Method displayShapeInfo
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function displayShapeInfo(AbstractShape $oShape): void
{
$this->append('<div class="infoBlk" id="div' . $oShape->getHashCode() . 'Info">');
$this->append('<dl>');
$this->append('<dt>HashCode</dt><dd>' . $oShape->getHashCode() . '</dd>');
Method writeTypeBar
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function writeTypeBar(XMLWriter $objWriter, Bar $subject, bool $includeSheet = false): void
{
// c:barChart
$objWriter->startElement('c:barChart');
Method writeSeriesStyle
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function writeSeriesStyle(Chart $chart, Chart\Series $series): void
{
$chartType = $chart->getPlotArea()->getType();
// style:style
Method writeSlideMaster
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function writeSlideMaster(SlideMaster $pSlide): string
{
// Create XML writer
$objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);
// XML header
Function displayPhpPresentationInfo
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
protected function displayPhpPresentationInfo(PhpPresentation $oPHPPpt): void
{
$this->append('<div class="infoBlk" id="divPhpPresentationInfo">');
$this->append('<dl>');
$this->append('<dt>Number of slides</dt><dd>' . $oPHPPpt->getSlideCount() . '</dd>');
- 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 writeTxtStyle
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
protected function writeTxtStyle(XMLWriter $objWriter, RichText $shape): void
{
// style:style
$objWriter->startElement('style:style');
$objWriter->writeAttribute('style:name', 'gr' . $this->shapeId);
- 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 readStructureTextPFRun
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
private function readStructureTextPFRun(string $stream, int $pos, int $strLenRT): array
{
$arrayReturn = [
'length' => 0,
'strLenRT' => $strLenRT,
- 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 writeContentPart
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function writeContentPart(Chart $chart): string
{
$this->xmlContent = new XMLWriter(XMLWriter::STORAGE_MEMORY);
$chartType = $chart->getPlotArea()->getType();
Function readRecordOfficeArtSpgrContainer
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
private function readRecordOfficeArtSpgrContainer($stream, $pos, $bInGroup = false)
{
$arrayReturn = [
'length' => 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
Method writeTypeBar3D
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function writeTypeBar3D(XMLWriter $objWriter, Bar3D $subject, bool $includeSheet = false): void
{
// c:bar3DChart
$objWriter->startElement('c:bar3DChart');
AbstractShape
has 31 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class AbstractShape implements ComparableInterface
{
/**
* Container.
*
Method writeShapePic
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function writeShapePic(XMLWriter $objWriter, AbstractGraphic $shape, int $shapeId): void
{
// p:pic
$objWriter->startElement('p:pic');
File RichText.php
has 323 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This file is part of PHPPresentation - A pure PHP library for reading and writing
* presentations documents.
*
Method writePart
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function writePart(): string
{
// Create XML writer
$objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY);
$objWriter->startDocument('1.0', 'UTF-8');
Method readStructureTextCFRun
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function readStructureTextCFRun(string $stream, int $pos, int $strLenRT): array
{
$arrayReturn = [
'length' => 0,
'strLenRT' => $strLenRT,
DocumentProperties
has 30 functions (exceeds 20 allowed). Consider refactoring. Open
class DocumentProperties
{
public const PROPERTY_TYPE_BOOLEAN = 'b';
public const PROPERTY_TYPE_INTEGER = 'i';
public const PROPERTY_TYPE_FLOAT = 'f';
Method writeTypeDoughnut
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function writeTypeDoughnut(XMLWriter $objWriter, Doughnut $subject, bool $includeSheet = false): void
{
// c:pieChart
$objWriter->startElement('c:doughnutChart');
Function loadSlides
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
protected function loadSlides(string $sPart): void
{
$xmlReader = new XMLReader();
// @phpstan-ignore-next-line
if ($xmlReader->getDomFromString($sPart)) {
- 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 writeTypeScatter
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function writeTypeScatter(XMLWriter $objWriter, Scatter $subject, bool $includeSheet = false): void
{
// c:scatterChart
$objWriter->startElement('c:scatterChart');
PowerPoint2007
has 29 functions (exceeds 20 allowed). Consider refactoring. Open
class PowerPoint2007 implements ReaderInterface
{
/**
* Output Object.
*