Skip to content

Commit

Permalink
rule helper implemented (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuba9392 authored Jul 4, 2018
1 parent d5bd70a commit 51d5a63
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/SAREhub/EasyECA/Rule/RuleHelper.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace SAREhub\EasyECA\Rule;

class RuleHelper
{
public static function createRuleData(string $condition, array $onPass = null, array $onFail = null): array
{
return [
"condition" => $condition,
"onPass" => $onPass,
"onFail" => $onFail
];
}

public static function createActionData(string $action, array $parameters): array
{
return [
"action" => $action,
"parameters" => $parameters,
];
}
}

0 comments on commit 51d5a63

Please sign in to comment.