StubEmail::send()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
class StubEmail extends Email implements TestOnly
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
4
{
5
    /**
6
     * Overrides email sending
7
     *
8
     * @param string $messageID Optional message ID so the message can be identified in bounces etc.
0 ignored issues
show
Documentation introduced by
Should the type for parameter $messageID not be string|null?

This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.

It makes a suggestion as to what type it considers more descriptive.

Most often this is a case of a parameter that can be null in addition to its declared types.

Loading history...
9
     *
10
     * @return array
11
     */
12
    public function send($messageID = null)
13
    {
14
        return array(
15
            'to'      => $this->to,
16
            'subject' => $this->subject,
17
            'from'    => $this->from,
18
        );
19
    }
20
}
21