Skip to content

Commit f800432

Browse files
Return int in fucntion
1 parent 103f212 commit f800432

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

ProcessMaker/AssignmentRules/ProcessManagerAssigned.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class ProcessManagerAssigned implements AssignmentRuleInterface
2626
* @param TokenInterface $token
2727
* @param Process $process
2828
* @param ProcessRequest $request
29-
* @return User
29+
* @return int|null
3030
* @throws ThereIsNoProcessManagerAssignedException
3131
*/
3232
public function getNextUser(ActivityInterface $task, TokenInterface $token, Process $process, ProcessRequest $request)
@@ -38,7 +38,7 @@ public function getNextUser(ActivityInterface $task, TokenInterface $token, Proc
3838
throw new ThereIsNoProcessManagerAssignedException($task);
3939
}
4040

41-
return User::find($user_id);
41+
return $user_id;
4242
}
4343

4444
/**

ProcessMaker/Models/Process.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,7 @@ private function checkAssignment(ProcessRequest $request, ActivityInterface $act
702702
if (!$user) {
703703
throw new ThereIsNoProcessManagerAssignedException($activity);
704704
}
705+
$user = User::find($user);
705706
}
706707

707708
return $user;

0 commit comments

Comments
 (0)