Loading src/AgreementHandler.php +3 −3 Original line number Diff line number Diff line Loading @@ -151,7 +151,7 @@ class AgreementHandler implements AgreementHandlerInterface { ]; // Get a list of pages to never display agreements on. $exceptions = array_reduce($agreement_types, function (&$result, Agreement $item) { $exceptions = array_reduce($agreement_types, function ($result, Agreement $item) { $result[] = $item->get('path'); return $result; }, $default_exceptions); Loading @@ -162,7 +162,7 @@ class AgreementHandler implements AgreementHandlerInterface { } // Reduce the agreement types based on the user role. $agreements_with_roles = array_reduce($agreement_types, function (&$result, Agreement $item) use ($account) { $agreements_with_roles = array_reduce($agreement_types, function ($result, Agreement $item) use ($account) { if ($item->accountHasAgreementRole($account)) { $result[] = $item; } Loading @@ -172,7 +172,7 @@ class AgreementHandler implements AgreementHandlerInterface { // Try to find an agreement type that matches the path. $pathMatcher = $this->pathMatcher; $self = $this; $info = array_reduce($agreements_with_roles, function (&$result, Agreement $item) use ($account, $path, $pathMatcher, $self) { $info = array_reduce($agreements_with_roles, function ($result, Agreement $item) use ($account, $path, $pathMatcher, $self) { if ($result) { // Always returns the first matched agreement. return $result; Loading Loading
src/AgreementHandler.php +3 −3 Original line number Diff line number Diff line Loading @@ -151,7 +151,7 @@ class AgreementHandler implements AgreementHandlerInterface { ]; // Get a list of pages to never display agreements on. $exceptions = array_reduce($agreement_types, function (&$result, Agreement $item) { $exceptions = array_reduce($agreement_types, function ($result, Agreement $item) { $result[] = $item->get('path'); return $result; }, $default_exceptions); Loading @@ -162,7 +162,7 @@ class AgreementHandler implements AgreementHandlerInterface { } // Reduce the agreement types based on the user role. $agreements_with_roles = array_reduce($agreement_types, function (&$result, Agreement $item) use ($account) { $agreements_with_roles = array_reduce($agreement_types, function ($result, Agreement $item) use ($account) { if ($item->accountHasAgreementRole($account)) { $result[] = $item; } Loading @@ -172,7 +172,7 @@ class AgreementHandler implements AgreementHandlerInterface { // Try to find an agreement type that matches the path. $pathMatcher = $this->pathMatcher; $self = $this; $info = array_reduce($agreements_with_roles, function (&$result, Agreement $item) use ($account, $path, $pathMatcher, $self) { $info = array_reduce($agreements_with_roles, function ($result, Agreement $item) use ($account, $path, $pathMatcher, $self) { if ($result) { // Always returns the first matched agreement. return $result; Loading