Conditions | 3 |
Paths | 2 |
Total Lines | 6 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
26 | 100 | protected function getPartForToken(string $token, bool $isLiteral) : ?IHeaderPart |
|
27 | { |
||
28 | 100 | if (!$isLiteral && \preg_match('/' . MimeToken::MIME_PART_PATTERN . '/', $token)) { |
|
29 | 5 | return $this->partFactory->newMimeToken($token); |
|
30 | } |
||
31 | 99 | return $this->partFactory->newToken($token, $isLiteral); |
|
32 | } |
||
34 |