Lines 100.00% 5 / 5
Functions and Methods 100.00% 1 / 1
Classes and Traits 100.00% 1 / 1
Name Lines Functions and Methods CRAP Classes and Traits
TicketprinterList 100.00% 5 / 5 100.00% 1 / 1 3 100.00% 1 / 1
 getEntityByHash 100.00% 5 / 5 100.00% 1 / 1 3
1<?php
2
3namespace BO\Zmsentities\Collection;
4
5/**
6 * @extends Base<\BO\Zmsentities\Ticketprinter>
7 */
8class TicketprinterList extends Base
9{
10    public const string ENTITY_CLASS = '\BO\Zmsentities\Ticketprinter';
11
12    public function getEntityByHash(mixed $hash): \BO\Zmsentities\Ticketprinter|null
13    {
14        $result = null;
15        foreach ($this as $entity) {
16            if ($entity->hash == $hash) {
17                $result = $entity;
18            }
19        }
20        return $result;
21    }
22}