Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 2.024 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
66 | 1 | public function __invoke() |
|
67 | { |
||
68 | $article = [ |
||
69 | 1 | 'From: '.$this->from, |
|
70 | 1 | 'Newsgroups: '.$this->groups, |
|
71 | 1 | 'Subject: '.$this->subject, |
|
72 | 1 | 'X-poster: php-nntp', |
|
73 | 1 | ]; |
|
74 | |||
75 | 1 | if (null !== $this->headers) { |
|
76 | $article[] = $this->headers; |
||
77 | } |
||
78 | |||
79 | 1 | $article[] = "\r\n".$this->body; |
|
80 | |||
81 | 1 | return implode("\r\n", $article); |
|
82 | } |
||
83 | |||
94 |