Skip to content

Commit e92b272

Browse files
authored
Verify Vapor Manifest Options (#203)
1 parent 370ec07 commit e92b272

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Manifest.php

+8
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ class Manifest
1313
*/
1414
public static function id()
1515
{
16+
if (! array_key_exists('id', static::current() ?? [])) {
17+
Helpers::abort(sprintf('Invalid project ID. Please verify your Vapor manifest at [%s].', Path::manifest()));
18+
}
19+
1620
return static::current()['id'];
1721
}
1822

@@ -23,6 +27,10 @@ public static function id()
2327
*/
2428
public static function name()
2529
{
30+
if (! array_key_exists('name', static::current() ?? [])) {
31+
Helpers::abort(sprintf('Invalid project name. Please verify your Vapor manifest at [%s].', Path::manifest()));
32+
}
33+
2634
return static::current()['name'];
2735
}
2836

0 commit comments

Comments
 (0)