Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,15 @@ public static function getResourceMetadata(string $resourceType, string $resourc
return $data[$resourceCode];
}

public static function metadataExists(string $resourceType, string $resourceCode): bool
public static function metadataExists(string $resourceType, string $resourceCode, string $type): bool
{
$data = self::loadData($resourceType);

return array_key_exists($resourceCode, $data);
if(array_key_exists($resourceCode, $data)){
return array_key_exists($type, $data[$resourceCode]);
}

return false;
}

private static function loadData(string $resourceType): array
Expand Down