wordPress = $wordPress; } public function initialize(): void { $this->wordPress->addAction(Hooks::WORKFLOW_STEP, [$this, 'run']); } /** @param mixed $args */ public function run($args): void { // TODO: args validation if (!is_array($args)) { throw new InvalidStateException(); } // TODO: process step } }