TaggableStub   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 5
eloc 4
dl 0
loc 23
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A removeTag() 0 2 1
A getTagNames() 0 3 1
A hasTag() 0 3 1
A addTag() 0 2 1
A getTags() 0 3 1
1
<?php
2
3
namespace Beelab\TagBundle\Tests;
4
5
use Beelab\TagBundle\Tag\TaggableInterface;
6
use Beelab\TagBundle\Tag\TagInterface;
7
8
/**
9
 * A stub of a Taggable class.
10
 */
11
class TaggableStub implements TaggableInterface
12
{
13
    public function addTag(TagInterface $tag): void
14
    {
15
    }
16
17
    public function getTagNames(): array
18
    {
19
        return ['foo', 'bar'];
20
    }
21
22
    public function getTags(): iterable
23
    {
24
        return [new TagStub()];
25
    }
26
27
    public function hasTag(TagInterface $tag): bool
28
    {
29
        return true;
30
    }
31
32
    public function removeTag(TagInterface $tag): void
33
    {
34
    }
35
}
36