fix gitlab tests
This commit is contained in:
@@ -14,16 +14,15 @@ class PolicyContentService
|
||||
public function getPolicy(string $type): array
|
||||
{
|
||||
$type = strtolower(trim($type));
|
||||
if (! isset(self::TYPES[$type])) {
|
||||
if (!isset(self::TYPES[$type])) {
|
||||
throw new \InvalidArgumentException('Unsupported policy type.');
|
||||
}
|
||||
|
||||
$filename = self::TYPES[$type];
|
||||
$path = resource_path('policies/'.$filename);
|
||||
$path = resource_path('policies/' . $filename);
|
||||
|
||||
if (! is_file($path)) {
|
||||
if (!is_file($path)) {
|
||||
Log::warning('Policy file missing.', ['type' => $type, 'path' => $path]);
|
||||
|
||||
return [
|
||||
'type' => $type,
|
||||
'title' => $this->titleFor($type),
|
||||
|
||||
Reference in New Issue
Block a user