barbushin/php-imap

View on GitHub
src/PhpImap/IncomingMail.php

Summary

Maintainability
B
4 hrs
Test Coverage

Showing 3 of 3 total issues

Function embedImageAttachments has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

public function embedImageAttachments(): void
{
$fetchedHtml = $this->__get('textHtml');
 
\preg_match_all("/\bcid:[^'\"\s]{1,256}/mi", $fetchedHtml, $matches);
Severity: Minor
Found in src/PhpImap/IncomingMail.php - About 2 hrs to fix

Function replaceInternalLinks has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

public function replaceInternalLinks(string $baseUri): string
{
$baseUri = \rtrim($baseUri, '\\/').'/';
$fetchedHtml = $this->textHtml;
$search = [];
Severity: Minor
Found in src/PhpImap/IncomingMail.php - About 1 hr to fix

Function __get has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

public function __get(string $name): string
{
$type = false;
if ('textPlain' == $name) {
$type = DataPartInfo::TEXT_PLAIN;
Severity: Minor
Found in src/PhpImap/IncomingMail.php - About 45 mins to fix
Category
Status