Skip to content

Commit

Permalink
[Common] Create Experimental Action
Browse files Browse the repository at this point in the history
  • Loading branch information
onairmarc committed Jan 12, 2025
1 parent 9a4e076 commit 80f3988
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/Common/src/Actions/Action.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace PHPGenesis\Common\Actions;

/** @experimental */
abstract class Action
{
abstract public function __construct(...$params);

Check failure on line 8 in src/Common/src/Actions/Action.php

View workflow job for this annotation

GitHub Actions / StaticAnalysis / StaticAnalysis

Method PHPGenesis\Common\Actions\Action::__construct() has parameter $params with no type specified.

abstract public function handle();

Check failure on line 10 in src/Common/src/Actions/Action.php

View workflow job for this annotation

GitHub Actions / StaticAnalysis / StaticAnalysis

Method PHPGenesis\Common\Actions\Action::dispatch() has no return type specified.

Check failure on line 10 in src/Common/src/Actions/Action.php

View workflow job for this annotation

GitHub Actions / StaticAnalysis / StaticAnalysis

Method PHPGenesis\Common\Actions\Action::dispatch() has parameter $params with no type specified.

public static function dispatch(...$params)
{
return static::make(...$params)->handle();
}

Check failure on line 15 in src/Common/src/Actions/Action.php

View workflow job for this annotation

GitHub Actions / StaticAnalysis / StaticAnalysis

Method PHPGenesis\Common\Actions\Action::make() has parameter $params with no type specified.

public static function make(...$params): static
{
return new static(...$params);
}

Check failure on line 20 in src/Common/src/Actions/Action.php

View workflow job for this annotation

GitHub Actions / StaticAnalysis / StaticAnalysis

Method PHPGenesis\Common\Actions\Action::handle() has no return type specified.
}

0 comments on commit 80f3988

Please sign in to comment.