Skip to content

Commit

Permalink
Add enums to cache
Browse files Browse the repository at this point in the history
  • Loading branch information
lekoala authored Jan 7, 2025
1 parent f40b1a4 commit 3a5e373
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Core/Manifest/ClassManifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ public function handleFile($basename, $pathname, $includeTests)
$classes = $data['classes'];
$interfaces = $data['interfaces'];
$traits = $data['traits'];
$enums = $data['enums'] ?? [];
$enums = $data['enums'];
} else {
$changed = true;
// Build from php file parser
Expand Down Expand Up @@ -696,6 +696,7 @@ public function handleFile($basename, $pathname, $includeTests)
'classes' => $classes,
'interfaces' => $interfaces,
'traits' => $traits,
'enums' => $enums,
];
$this->cache->set($key, $cache);
}
Expand Down Expand Up @@ -774,7 +775,7 @@ protected function validateItemCache($data)
if (!$data || !is_array($data)) {
return false;
}
foreach (['classes', 'interfaces', 'traits'] as $key) {
foreach (['classes', 'interfaces', 'traits', 'enums'] as $key) {
// Must be set
if (!isset($data[$key])) {
return false;
Expand Down

0 comments on commit 3a5e373

Please sign in to comment.