Showing 284 of 325 total issues
Method writeSlideTransition
has 235 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function writeSlideTransition(XMLWriter $objWriter, ?Slide\Transition $transition): void
{
if (!$transition) {
return;
}
Method loadStyle
has 230 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function loadStyle(DOMElement $nodeStyle): bool
{
$keyStyle = $nodeStyle->getAttribute('style:name');
$nodeDrawingPageProps = $this->oXMLReader->getElement('style:drawing-page-properties', $nodeStyle);
Function writeStyleSlide
has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring. Open
protected function writeStyleSlide(XMLWriter $objWriter, Slide $slide, int $incPage): void
{
// style:style
$objWriter->startElement('style:style');
$objWriter->writeAttribute('style:family', 'drawing-page');
- 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 readRecordDocumentContainer
has 223 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function readRecordDocumentContainer(string $stream, int $pos): void
{
$documentAtom = $this->loadRecordHeader($stream, $pos);
$pos += 8;
if (0x1 != $documentAtom['recVer'] || 0x000 != $documentAtom['recInstance'] || self::RT_DOCUMENTATOM != $documentAtom['recType']) {
PowerPoint97
has 61 functions (exceeds 20 allowed). Consider refactoring. Open
class PowerPoint97 implements ReaderInterface
{
public const OFFICEARTBLIPEMF = 0xF01A;
public const OFFICEARTBLIPWMF = 0xF01B;
public const OFFICEARTBLIPPICT = 0xF01C;
Function writeShapeTable
has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring. Open
protected function writeShapeTable(XMLWriter $objWriter, Table $shape): void
{
// draw:frame
$objWriter->startElement('draw:frame');
$objWriter->writeAttribute('svg:x', Text::numberFormat(CommonDrawing::pixelsToCentimeters((int) $shape->getOffsetX()), 3) . 'cm');
- 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 readRecordOfficeArtSpContainer
has 199 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function readRecordOfficeArtSpContainer(string $stream, int $pos)
{
$arrayReturn = [
'length' => 0,
'shape' => null,
Function writeSlideTransition
has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring. Open
protected function writeSlideTransition(XMLWriter $objWriter, ?Slide\Transition $transition): void
{
if (!$transition) {
return;
}
- 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 writeAxis
has 187 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function writeAxis(XMLWriter $objWriter, Chart\Axis $oAxis, string $typeAxis, Chart\Type\AbstractType $typeChart): void
{
if (Chart\Axis::AXIS_X != $typeAxis && Chart\Axis::AXIS_Y != $typeAxis) {
return;
}
Method writeSlideRelationships
has 182 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function writeSlideRelationships(Slide $pSlide): string
{
//@todo Group all getShapeCollection()->getIterator
// Create XML writer
Method writeStyleSlide
has 179 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function writeStyleSlide(XMLWriter $objWriter, Slide $slide, int $incPage): void
{
// style:style
$objWriter->startElement('style:style');
$objWriter->writeAttribute('style:family', 'drawing-page');
Function displayShapeInfo
has a Cognitive Complexity of 46 (exceeds 5 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>');
- 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
File Sample_Header.php
has 449 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Header file.
*/
use PhpOffice\PhpPresentation\AbstractShape;
Function loadShapeDrawing
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
protected function loadShapeDrawing(XMLReader $document, DOMElement $node, AbstractSlide $oSlide): void
{
// Core
$document->registerNamespace('asvg', 'http://schemas.microsoft.com/office/drawing/2016/SVG/main');
if ($document->getElement('p:blipFill/a:blip/a:extLst/a:ext/asvg:svgBlip', $node)) {
- 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 readRecordOfficeArtFOPT
has 168 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function readRecordOfficeArtFOPT(string $stream, int $pos): array
{
$arrayReturn = [
'length' => 0,
];
File PptSlides.php
has 445 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.
*
RichText
has 48 functions (exceeds 20 allowed). Consider refactoring. Open
class RichText extends AbstractShape implements ComparableInterface
{
/** Wrapping */
public const WRAP_NONE = 'none';
public const WRAP_SQUARE = 'square';
Method loadParagraph
has 166 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function loadParagraph(XMLReader $document, DOMElement $oElement, $oShape): void
{
// Core
$oParagraph = $oShape->createParagraph();
$oParagraph->setRichTextElements([]);
File PptTheme.php
has 441 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.
*
Function writeShapeText
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
protected function writeShapeText(XMLWriter $objWriter, RichText $shape, int $shapeId): void
{
// p:sp
$objWriter->startElement('p:sp');
// p:sp\p:nvSpPr
- 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"