The method send() has an NPath complexity of 5648. The configured NPath complexity threshold is 200. Open
public function send(
string $recipientName,
string $recipientEmail,
string $subject,
string $body,
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method send has 11 parameters. Consider reducing the number of parameters to less than 10. Open
public function send(
string $recipientName,
string $recipientEmail,
string $subject,
string $body,
- Exclude checks
Avoid unused parameters such as '$embeddedImage'. Open
bool $embeddedImage = false,
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
The parameter $extra_headers is not named in camelCase. Open
public function send(
string $recipientName,
string $recipientEmail,
string $subject,
string $body,
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $data_file is not named in camelCase. Open
public function send(
string $recipientName,
string $recipientEmail,
string $subject,
string $body,
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
Variable "data_file" is not in valid camel caps format Open
if (!empty($data_file)) {
- Exclude checks
Variable "file_attach" is not in valid camel caps format Open
foreach ($data_file as $file_attach) {
- Exclude checks
Variable "file_attach" is not in valid camel caps format Open
$templatedEmail->attachFromPath($file_attach['path'], $file_attach['filename']);
- Exclude checks
Variable "extra_headers" is not in valid camel caps format Open
$replyToName = $extra_headers['reply_to']['name'];
- Exclude checks
Variable "extra_headers" is not in valid camel caps format Open
!empty($extra_headers['reply_to']) ? $extra_headers['reply_to'] : []
- Exclude checks
Variable "extra_headers" is not in valid camel caps format Open
if (isset($extra_headers['reply_to'])) {
- Exclude checks
Variable "file_attach" is not in valid camel caps format Open
$templatedEmail->addPart(new DataPart($file_attach['stream'], $file_attach['filename']));
- Exclude checks
Add a single space around assignment operators Open
declare(strict_types=1);
- Exclude checks
Missing function doc comment Open
public function __construct(
- Exclude checks
Variable "data_file" is not in valid camel caps format Open
foreach ($data_file as $file_attach) {
- Exclude checks
Variable "extra_headers" is not in valid camel caps format Open
$replyToEmail = $extra_headers['reply_to']['mail'];
- Exclude checks
Variable "file_attach" is not in valid camel caps format Open
if (!empty($file_attach['stream']) && !empty($file_attach['filename'])) {
- Exclude checks
Variable "file_attach" is not in valid camel caps format Open
$templatedEmail->addPart(new DataPart($file_attach['stream'], $file_attach['filename']));
- Exclude checks
Missing class doc comment Open
final class MailHelper
- Exclude checks
Missing function doc comment Open
public function send(
- Exclude checks
Variable "data_file" is not in valid camel caps format Open
array $data_file = [],
- Exclude checks
Closing brace must be on a line by itself Open
) {}
- Exclude checks
Variable "file_attach" is not in valid camel caps format Open
if (!empty($file_attach['path']) && !empty($file_attach['filename'])) {
- Exclude checks
Variable "file_attach" is not in valid camel caps format Open
if (!empty($file_attach['stream']) && !empty($file_attach['filename'])) {
- Exclude checks
Variable "file_attach" is not in valid camel caps format Open
if (!empty($file_attach['path']) && !empty($file_attach['filename'])) {
- Exclude checks
Variable "extra_headers" is not in valid camel caps format Open
array $extra_headers = [],
- Exclude checks
Variable "file_attach" is not in valid camel caps format Open
$templatedEmail->attachFromPath($file_attach['path'], $file_attach['filename']);
- Exclude checks
Variable "extra_headers" is not in valid camel caps format Open
!empty($extra_headers['reply_to']) ? $extra_headers['reply_to'] : []
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
private readonly MailerInterface $mailer,
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
private readonly ThemeHelper $themeHelper,
- Exclude checks
Closing brace must be on a line by itself Open
) {}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
private readonly BodyRendererInterface $bodyRenderer,
- Exclude checks
The variable $extra_headers is not named in camelCase. Open
public function send(
string $recipientName,
string $recipientEmail,
string $subject,
string $body,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $data_file is not named in camelCase. Open
public function send(
string $recipientName,
string $recipientEmail,
string $subject,
string $body,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $file_attach is not named in camelCase. Open
public function send(
string $recipientName,
string $recipientEmail,
string $subject,
string $body,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $file_attach is not named in camelCase. Open
public function send(
string $recipientName,
string $recipientEmail,
string $subject,
string $body,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $data_file is not named in camelCase. Open
public function send(
string $recipientName,
string $recipientEmail,
string $subject,
string $body,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $extra_headers is not named in camelCase. Open
public function send(
string $recipientName,
string $recipientEmail,
string $subject,
string $body,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $extra_headers is not named in camelCase. Open
public function send(
string $recipientName,
string $recipientEmail,
string $subject,
string $body,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $file_attach is not named in camelCase. Open
public function send(
string $recipientName,
string $recipientEmail,
string $subject,
string $body,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $extra_headers is not named in camelCase. Open
public function send(
string $recipientName,
string $recipientEmail,
string $subject,
string $body,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $file_attach is not named in camelCase. Open
public function send(
string $recipientName,
string $recipientEmail,
string $subject,
string $body,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $file_attach is not named in camelCase. Open
public function send(
string $recipientName,
string $recipientEmail,
string $subject,
string $body,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $file_attach is not named in camelCase. Open
public function send(
string $recipientName,
string $recipientEmail,
string $subject,
string $body,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $file_attach is not named in camelCase. Open
public function send(
string $recipientName,
string $recipientEmail,
string $subject,
string $body,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $file_attach is not named in camelCase. Open
public function send(
string $recipientName,
string $recipientEmail,
string $subject,
string $body,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $file_attach is not named in camelCase. Open
public function send(
string $recipientName,
string $recipientEmail,
string $subject,
string $body,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $extra_headers is not named in camelCase. Open
public function send(
string $recipientName,
string $recipientEmail,
string $subject,
string $body,
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}