Problem/Motivation

Interface raises a warning in higher phpstan levels. Json::decode would return mixed.

GoogleApiServiceClientInterface

  /**
   * Function returns Json file of the account.
   *
   * @return string
   *   Returns the JSON.
   */
  public function getAuthConfig();

GoogleApiServiceClient

  /**
   * {@inheritdoc}
   */
  public function getAuthConfig() {
    return Json::decode($this->auth_config);
  }

Proposed resolution

Update interface return and docblock to mixed.

  /**
   * Function returns Json of auth_config.
   *
   * @return mixed
   *   Returns the auth config.
   */
  public function getAuthConfig();

  /**
   * Function returns Json of access_token.
   *
   * @return mixed
   *   Returns the access token.
   */
  public function getAccessToken();

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

almunnings created an issue. See original summary.

almunnings’s picture

Issue summary: View changes

almunnings’s picture

Status: Active » Needs review
almunnings’s picture

Title: GoogleApiServiceClientInterface getAuthConfig » GoogleApiServiceClientInterface getAuthConfig & getAccessToken return type mixed