PartInterface
last analyzed

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 42
c 0
b 0
f 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
getHeaders() 0 1 ?
hasHeader() 0 1 ?
getHeader() 0 1 ?
withHeader() 0 1 ?
withoutHeader() 0 1 ?
getBody() 0 1 ?
withBody() 0 1 ?
1
<?php
2
declare(strict_types=1);
3
4
namespace Genkgo\Mail\Mime;
5
6
use Genkgo\Mail\HeaderInterface;
7
use Genkgo\Mail\StreamInterface;
8
9
interface PartInterface
10
{
11
    /**
12
     * @return iterable<HeaderInterface>
0 ignored issues
show
Documentation introduced by
The doc-type iterable<HeaderInterface> could not be parsed: Expected "|" or "end of type", but got "<" at position 8. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
13
     */
14
    public function getHeaders(): iterable;
15
16
    /**
17
     * @param string $name
18
     * @return bool
19
     */
20
    public function hasHeader(string $name): bool;
21
22
    /**
23
     * @param string $name
24
     * @return HeaderInterface
25
     */
26
    public function getHeader(string $name): HeaderInterface;
27
28
    /**
29
     * @param HeaderInterface $header
30
     * @return PartInterface
31
     */
32
    public function withHeader(HeaderInterface $header): PartInterface;
33
34
    /**
35
     * @param string $name
36
     * @return PartInterface
37
     */
38
    public function withoutHeader(string $name): PartInterface;
39
40
    /**
41
     * @return StreamInterface
42
     */
43
    public function getBody(): StreamInterface ;
44
45
    /**
46
     * @param StreamInterface $body
47
     * @return PartInterface
48
     */
49
    public function withBody(StreamInterface $body): PartInterface;
50
}
51