Verified Commit 7b665e5a authored by Jess's avatar Jess
Browse files

Issue #3530276 by mstrelan, smustgrave, xjm: Add return types to CookieResourceTestTrait

parent 3d929061
Loading
Loading
Loading
Loading
Loading
+0 −1746

File changed.

Preview size limit exceeded, changes collapsed.

+3 −3
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ trait CookieResourceTestTrait {
  /**
   * {@inheritdoc}
   */
  protected function initAuthentication() {
  protected function initAuthentication(): void {
    $user_login_url = Url::fromRoute('user.login.http')
      ->setRouteParameter('_format', static::$format);

@@ -93,7 +93,7 @@ protected function getAuthenticationRequestOptions($method) {
  /**
   * {@inheritdoc}
   */
  protected function assertResponseWhenMissingAuthentication($method, ResponseInterface $response) {
  protected function assertResponseWhenMissingAuthentication($method, ResponseInterface $response): void {
    // Requests needing cookie authentication but missing it results in a 403
    // response. The cookie authentication mechanism sets no response message.
    // Hence, effectively, this is just the 403 response that one gets as the
@@ -121,7 +121,7 @@ protected function assertResponseWhenMissingAuthentication($method, ResponseInte
  /**
   * {@inheritdoc}
   */
  protected function assertAuthenticationEdgeCases($method, Url $url, array $request_options) {
  protected function assertAuthenticationEdgeCases($method, Url $url, array $request_options): void {
    // X-CSRF-Token request header is unnecessary for safe and side effect-free
    // HTTP methods. No need for additional assertions.
    // @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html