| Total Complexity | 6 |
| Total Lines | 64 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | class GeoAnalysisResultItem |
||
| 22 | { |
||
| 23 | private GeoAnalysisPlace $place; |
||
| 24 | private int $count; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Constructor for GeoAnalysisResultItem |
||
| 28 | * |
||
| 29 | * @param GeoAnalysisPlace $place |
||
| 30 | * @param int $count |
||
| 31 | */ |
||
| 32 | public function __construct(GeoAnalysisPlace $place, int $count = 0) |
||
| 33 | { |
||
| 34 | $this->place = $place; |
||
| 35 | $this->count = $count; |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Get the item key. |
||
| 40 | * |
||
| 41 | * @return string |
||
| 42 | */ |
||
| 43 | public function key(): string |
||
| 44 | { |
||
| 45 | return $this->place->key(); |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Get the referenced GeoAnalysis Place |
||
| 50 | * |
||
| 51 | * @return GeoAnalysisPlace |
||
| 52 | */ |
||
| 53 | public function place(): GeoAnalysisPlace |
||
| 54 | { |
||
| 55 | return $this->place; |
||
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | * Get the count of occurrences of the GeoAnalysis Place in the analysis |
||
| 60 | * |
||
| 61 | * @return int |
||
| 62 | */ |
||
| 63 | public function count(): int |
||
| 66 | } |
||
| 67 | |||
| 68 | /** |
||
| 69 | * Increment the count of occurrences of the GeoAnalysis Place in the analysis |
||
| 70 | * |
||
| 71 | * @return $this |
||
| 72 | */ |
||
| 73 | public function increment(): self |
||
| 74 | { |
||
| 75 | $this->count++; |
||
| 76 | return $this; |
||
| 77 | } |
||
| 78 | |||
| 79 | /** |
||
| 80 | * Clone the item object |
||
| 81 | */ |
||
| 82 | public function __clone() |
||
| 85 | } |
||
| 86 | } |
||
| 87 |