Skip to content

Commit d26175c

Browse files
authored
Merge pull request #4 from Ayoub-Mabrouk/InvalidConfigToSelf
fix: replace `new static()` with `new self()` in InvalidConfig
2 parents de9f480 + 8521153 commit d26175c

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

src/Exceptions/InvalidConfig.php

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,58 +6,58 @@
66

77
class InvalidConfig extends Exception
88
{
9-
public static function actionKeyNotFound(string $actionName): static
9+
public static function actionKeyNotFound(string $actionName): self
1010
{
11-
return new static("There is no action with name `{$actionName}` configured in the `actions` key of the config file.");
11+
return new self("There is no action with name `{$actionName}` configured in the `actions` key of the config file.");
1212
}
1313

14-
public static function actionClassDoesNotExist(string $actionClass): static
14+
public static function actionClassDoesNotExist(string $actionClass): self
1515
{
16-
return new static("Action class '{$actionClass}' does not exist.");
16+
return new self("Action class '{$actionClass}' does not exist.");
1717
}
1818

19-
public static function modelClassNotConfigured(): static
19+
public static function modelClassNotConfigured(): self
2020
{
21-
return new static('Model class not configured. Please set the `model` key in the config file to the fully qualified class name of your model.');
21+
return new self('Model class not configured. Please set the `model` key in the config file to the fully qualified class name of your model.');
2222
}
2323

24-
public static function modelClassDoesNotExist(string $modelClass): static
24+
public static function modelClassDoesNotExist(string $modelClass): self
2525
{
26-
return new static("Model class '{$modelClass}' does not exist");
26+
return new self("Model class '{$modelClass}' does not exist");
2727
}
2828

29-
public static function aiProviderNotConfigured(string $configName): static
29+
public static function aiProviderNotConfigured(string $configName): self
3030
{
31-
return new static("AI provider not configured for '{$configName}'");
31+
return new self("AI provider not configured for '{$configName}'");
3232
}
3333

34-
public static function invalidAiProvider(string $configName): static
34+
public static function invalidAiProvider(string $configName): self
3535
{
36-
return new static("Invalid AI provider configured for '{$configName}'");
36+
return new self("Invalid AI provider configured for '{$configName}'");
3737
}
3838

39-
public static function aiModelNotConfigured(string $configName): static
39+
public static function aiModelNotConfigured(string $configName): self
4040
{
41-
return new static("AI model not configured for '{$configName}'");
41+
return new self("AI model not configured for '{$configName}'");
4242
}
4343

44-
public static function actionClassDoesNotExtend(string $actionClass, string $mustBeOrExtend): static
44+
public static function actionClassDoesNotExtend(string $actionClass, string $mustBeOrExtend): self
4545
{
46-
return new static("Action class '{$actionClass}' must be or extend '{$mustBeOrExtend}'");
46+
return new self("Action class '{$actionClass}' must be or extend '{$mustBeOrExtend}'");
4747
}
4848

49-
public static function jobKeyNotFound(string $jobName): static
49+
public static function jobKeyNotFound(string $jobName): self
5050
{
51-
return new static("There is no job with name `{$jobName}` configured in the `jobs` key of the config file.");
51+
return new self("There is no job with name `{$jobName}` configured in the `jobs` key of the config file.");
5252
}
5353

54-
public static function jobClassDoesNotExist(string $jobClass): static
54+
public static function jobClassDoesNotExist(string $jobClass): self
5555
{
56-
return new static("Job class '{$jobClass}' does not exist.");
56+
return new self("Job class '{$jobClass}' does not exist.");
5757
}
5858

59-
public static function jobClassDoesNotExtend(string $jobClass, string $mustBeOrExtend): static
59+
public static function jobClassDoesNotExtend(string $jobClass, string $mustBeOrExtend): self
6060
{
61-
return new static("Job class '{$jobClass}' must be or extend '{$mustBeOrExtend}'");
61+
return new self("Job class '{$jobClass}' must be or extend '{$mustBeOrExtend}'");
6262
}
6363
}

0 commit comments

Comments
 (0)