We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 3 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 17 | public static function getAll(): array { |
||
| 18 | if (empty(self::$CACHE_HARDWARE_TYPES)) { |
||
| 19 | $db = Database::getInstance(); |
||
| 20 | $dbResult = $db->read('SELECT * FROM hardware_type'); |
||
| 21 | foreach ($dbResult->records() as $dbRecord) { |
||
| 22 | $typeID = $dbRecord->getInt('hardware_type_id'); |
||
| 23 | self::$CACHE_HARDWARE_TYPES[$typeID] = new self( |
||
| 24 | typeID: $typeID, |
||
| 25 | name: $dbRecord->getString('hardware_name'), |
||
| 26 | cost: $dbRecord->getInt('cost'), |
||
| 27 | ); |
||
| 28 | } |
||
| 29 | } |
||
| 30 | return self::$CACHE_HARDWARE_TYPES; |
||
| 31 | } |
||
| 44 |