update after stop build
All checks were successful
All checks were successful
This commit is contained in:
27
vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromCamelDir.php
vendored
Normal file
27
vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromCamelDir.php
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Knuckles\Scribe\GroupedEndpoints;
|
||||
|
||||
use Knuckles\Camel\Camel;
|
||||
use Knuckles\Scribe\Tools\PathConfig;
|
||||
|
||||
class GroupedEndpointsFromCamelDir implements GroupedEndpointsContract
|
||||
{
|
||||
public function __construct(protected PathConfig $paths) {}
|
||||
|
||||
public function get(): array
|
||||
{
|
||||
if (! is_dir(Camel::camelDir($this->paths))) {
|
||||
throw new \InvalidArgumentException(
|
||||
"Can't use --no-extraction because there are no endpoints in the ".Camel::camelDir($this->paths).' directory.'
|
||||
);
|
||||
}
|
||||
|
||||
return Camel::loadEndpointsIntoGroups(Camel::camelDir($this->paths));
|
||||
}
|
||||
|
||||
public function hasEncounteredErrors(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user