Failed Conditions
Push — metadata ( 0bd67c...d681cf )
by Michael
05:43
created

MetadataCollection::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\Annotations\Metadata;
6
7
use Countable;
8
use Doctrine\Annotations\Metadata\Exception\MetadataAlreadyExists;
9
use Doctrine\Annotations\Metadata\Exception\MetadataDoesNotExist;
10
use IteratorAggregate;
11
use Traversable;
12
13
interface MetadataCollection extends IteratorAggregate, Countable
14
{
15
    /**
16
     * @throws MetadataAlreadyExists
17
     */
18
    public function add(AnnotationMetadata ...$metadatas) : void;
19
20
    public function include(self $other) : void;
21
22
    /**
23
     * @throws MetadataDoesNotExist
24
     */
25
    public function get(string $name) : AnnotationMetadata;
26
27
    public function has(string $name) : bool;
28
29
    /**
30
     * @return Traversable<AnnotationMetadata>
31
     */
32
    public function getIterator() : Traversable;
33
34
    public function count() : int;
35
}
36