Skip to content

Commit

Permalink
Fixing psalm
Browse files Browse the repository at this point in the history
  • Loading branch information
nuradiyana committed Feb 7, 2024
1 parent 8943eb5 commit 55e15bd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
8 changes: 6 additions & 2 deletions psalm.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<?xml version="1.0"?>
<psalm errorLevel="3" resolveFromConfigFile="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<psalm errorLevel="3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd">
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
findUnusedBaselineEntry="true"
findUnusedCode="false"
>
<projectFiles>
<directory name="src"/>
<ignoreFiles>
Expand Down
12 changes: 10 additions & 2 deletions src/LaravelMoota.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

final class LaravelMoota
{
/**
* @var class-string<ProcessWebhookJob>|null
*/
private static ?string $jobClass = null;

public static function getWebhookCallTableName(?string $default = null): string
Expand All @@ -28,6 +31,9 @@ public static function getWebhookCallModelClass(?string $default = null): string
return \config('moota.webhook_call.model', $default);
}

/**
* @param class-string<ProcessWebhookJob> $className
*/
public static function registerWebhookCallJob(string $className): void
{
Assert::classExists($className);
Expand All @@ -40,9 +46,11 @@ public static function registerWebhookCallJob(string $className): void
*/
public static function getProcessWebhookCallJobClass(): string
{
Assert::notNull(self::$jobClass);
$jobClass = self::$jobClass;

Assert::notNull($jobClass);

return self::$jobClass;
return $jobClass;
}

public static function dispatchProcessWebhookJob(WebhookCall $webhookCall): void
Expand Down

0 comments on commit 55e15bd

Please sign in to comment.