Fix the issues reported by phpcs

Created on 9 May 2023, over 1 year ago
Updated 16 July 2024, 4 months ago
📌 Task
Status

Needs work

Version

1.0

Component

Code

Created by

🇮🇳India Shanu Chouhan

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @Shanu Chouhan
  • First commit to issue fork.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India _pratik_ Banglore

    Pushed with commit id 985ef95b

  • Merge request !1PHPCS fix in MoOktaSupport → (Open) created by apaderno
  • Issue was unassigned.
  • Status changed to Needs work over 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
    +  /**
    +   * Query description.
    +   */
    +  public string $queryDescription;

    The documentation comments for class properties need to also contain a @var line.

    +  /**
    +   * Construct instance of Okta support class.
    +   */
    +  public function __construct($email, $query, $queryDescription, $queryType) {

    The description for a constructor must start with Constructs a new followed by the class name (including its namespace), and ends with object.
    The documentation comment for methods must also document the parameters; that is also true for constructors.

    +  /**
    +   * Method to send support query.
    +   */
    +  public function sendSupportQuery(): bool {

    The short description is too generic.
    The parameters must be described; the return value must be described.

  • Assigned to nitin_lama
  • Issue was unassigned.
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
    -  public string $query_description;
    -  public string $query_type;
    -  public function __construct($email, $query, $query_description, $query_type){
    +
    +  /**
    +   * Query description.
    +   *
    +   * @var string
    +   */
    +  public string $queryDescription;
    +
    +  /**
    +   * Query type property.
    +   *
    +   * @var string
    +   */
    +  public string $queryType;

    Those are public properties. They cannot be renamed without breaking back compatibility. While it is true that class properties should follow the low camel case naming convention, changing a property name should be done in a new branch.

    +  /**
    +   * Contructs a new MoOktaSupport object.
    +   *
    +   * @param string $email
    +   *   The email variable.
    +   * @param string $query
    +   *   The query variable.
    +   * @param string $queryDescription
    +   *   The queryDescription variable.
    +   * @param string $queryType
    +   *   The queryType variable.
    +   */
    +  public function __construct($email, $query, $queryDescription, $queryType) {

    The short description is still not correct.

    +  /**
    +   * Method to send support query.
    +   *
    +   * @return bool
    +   *   TRUE if successful, FALSE if not.
    +   */
    +  public function sendSupportQuery(): bool {

    Method descriptions must not start with Method.

  • Assigned to nitin_lama
  • 🇮🇳India nitin_lama India

    8.1 still needs to be addressed. I tried to resolve the other pointers. Please review.

  • Issue was unassigned.
  • Status changed to Needs review 9 months ago
  • Status changed to Needs work 4 months ago
  • Hi @nitin_lama,

    Latest changes in MR!1 failed to apply, please see below:

    okta_user_sync git:(main) ✗ curl https://git.drupalcode.org/project/okta_user_sync/-/merge_requests/1.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  8101    0  8101    0     0  14579      0 --:--:-- --:--:-- --:--:-- 14755
    patching file src/MoOktaSupport.php
    Hunk #1 FAILED at 2.
    Hunk #2 FAILED at 91.
    2 out of 2 hunks FAILED -- saving rejects to file src/MoOktaSupport.php.rej

    Kindly check

    Thanks,
    Jake

  • Pipeline finished with Success
    4 months ago
    Total: 142s
    #225411
  • Pipeline finished with Success
    4 months ago
    Total: 192s
    #225413
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    apaderno changed the visibility of the branch 3359119-fix-phpcs-issues to hidden.

  • Pipeline finished with Success
    4 months ago
    #225439
  • Pipeline finished with Success
    4 months ago
    Total: 141s
    #225447
Production build 0.71.5 2024