for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of riesenia/pohoda package.
*
* Licensed under the MIT License
* (c) RIESENIA.com
*/
declare(strict_types=1);
namespace Riesenia\Pohoda\Common;
use Riesenia\Pohoda\Type\ActionType;
* @property array<string, mixed> $data
trait AddActionTypeTrait
{
* Add action type.
* @param string $type
* @param mixed|null $filter
* @param string|null $agenda
* @return self
public function addActionType(string $type, mixed $filter = null, ?string $agenda = null): self
if (isset($this->data['actionType'])) {
throw new \LogicException('Duplicate action type.');
}
$actionType = new ActionType(
$this->namespacesPaths,
$this->sanitizeEncoding,
$this->companyRegistrationNumber,
$this->resolveOptions,
$this->normalizerFactory,
);
$this->data['actionType'] = $actionType->setDirectionalVariable($this->useOneDirectionalVariables)->setData([
'type' => $type,
'filter' => $filter,
'agenda' => $agenda,
]);
return $this;