Categories   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 4
c 1
b 0
f 0
dl 0
loc 14
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 2 1
A getIterator() 0 2 1
1
<?php declare(strict_types = 1);
0 ignored issues
show
introduced by
Expected 1 line before declare statement, found 0.
Loading history...
2
3
namespace App\Entities;
4
5
class Categories implements \IteratorAggregate {
6
7
	/** @var array<\App\Entities\Category> */
8
	private array $categories;
9
10 2
	public function __construct( Category ...$categories ) {
11 2
		$this->categories = $categories;
12 2
	}
13
14
	/**
15
	 * {@inheritDoc}
16
	 */
17 1
	public function getIterator() {
18 1
		return new \ArrayIterator( $this->categories );
19
	}
20
21
}
22