Commit e64dd9e8 authored by João Ventura's avatar João Ventura Committed by João Ventura
Browse files

Issue #3315263 by jcnventura: Coding standards

parent 546d5ec3
Loading
Loading
Loading
Loading
+1 −2
Changes for composer.json: 1 added line, 2 removed lines.
Original line number Diff line number Diff line
@@ -12,7 +12,6 @@
  },
  "require": {
    "php": ">=7.1.0",
    "ext-json": "*",
    "drupal/externalauth": "^2"
    "ext-json": "*"
  }
}
+2 −12
Changes for openid_connect.module: 2 added lines, 12 removed lines.
Original line number Diff line number Diff line
@@ -88,12 +88,7 @@ function openid_connect_form_user_form_alter(&$form, &$form_state) {
    return;
  }

  if (isset($form['account'])) {
    $account_form = &$form['account'];
  }
  else {
    $account_form = &$form;
  }
  $account_form = isset($form['account']) ? (&$form['account']) : (&$form);

  $account_form['current_pass']['#access'] = FALSE;
  $account_form['current_pass_required_values']['#value'] = [];
@@ -105,12 +100,7 @@ function openid_connect_form_user_form_alter(&$form, &$form_state) {
 * Implements hook_form_FORM_ID_alter() for user_profile_form.
 */
function openid_connect_form_user_profile_form_alter(&$form, &$form_state) {
  if (isset($form['account'])) {
    $account_form = &$form['account'];
  }
  else {
    $account_form = &$form;
  }
  $account_form = isset($form['account']) ? (&$form['account']) : (&$form);

  $account = \Drupal::currentUser();
  if (!empty($account_form['pass']['#access']) && !\Drupal::service('openid_connect.openid_connect')->hasSetPasswordAccess($account)) {
+1 −1
Changes for src/Entity/OpenIDConnectClientEntity.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -129,7 +129,7 @@ class OpenIDConnectClientEntity extends ConfigEntityBase implements OpenIDConnec
   * Encapsulates creation of the OpenID Connect client's LazyPluginCollection.
   *
   * @return \Drupal\openid_connect\Plugin\OpenIDConnectClientCollection
   *   The OpenID Connect cqlient plugin collection.
   *   The OpenID Connect client plugin collection.
   */
  protected function getPluginCollection(): OpenIDConnectClientCollection {
    if (!$this->pluginCollection) {
+1 −1
Changes for src/Form/OpenIDConnectAccountsForm.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@ class OpenIDConnectAccountsForm extends FormBase {
      return;
    }

    list($op, $client_name) = explode('__', $form_state->getTriggeringElement()['#name'], 2);
    [$op, $client_name] = explode('__', $form_state->getTriggeringElement()['#name'], 2);
    /** @var \Drupal\openid_connect\OpenIDConnectClientEntityInterface $client */
    $client = $this->entityTypeManager->getStorage('openid_connect_client')->loadByProperties(['id' => $client_name])[$client_name];

+0 −1
Changes for src/OpenIDConnect.php: 0 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -657,7 +657,6 @@ class OpenIDConnect {
                  $data,
                  "public://user-picture-{$account->id()}-{$basename}",
                  FileSystemInterface::EXISTS_RENAME

                );

                // Cleanup the old file.
Loading