Completed
Push — master ( b09ecd...ff3168 )
by Jakub
02:47
created

CategoriesCollection::appendToXml()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 2
c 1
b 0
f 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
declare(strict_types=1);
3
4
namespace Nexendrie\Rss;
5
6
use Nexendrie\Utils\Collection as BaseCollection;
7
8
/**
9
 * CategoriesCollection
10
 *
11
 * @author Jakub Konečný
12
 * @internal
13
 */
14 1
final class CategoriesCollection extends BaseCollection implements IXmlConvertible {
15
  /** @var string */
16
  protected $class = Category::class;
17
18
  public function appendToXml(\SimpleXMLElement &$parent): void {
19 1
    array_walk($this->items, function(Category $value) use($parent) {
20 1
      $value->appendToXml($parent);
21 1
    });
22 1
  }
23
}
24
?>