SitemapItems   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 18
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A add() 0 3 1
A getAll() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
namespace JeroenDesloovere\SitemapBundle\Item;
4
5
class SitemapItems
6
{
7
    /** @var SitemapItem[] */
8
    private $items;
9
10
    public function __construct()
11
    {
12
        $this->items = [];
13
    }
14
15
    public function add(SitemapItem $item): void
16
    {
17
        $this->items[] = $item;
18
    }
19
20
    public function getAll(): array
21
    {
22
        return $this->items;
23
    }
24
}
25