FILE: C:\xampp\htdocs\contribution\web\modules\contrib\chatgpt_plugin\chatgpt\src\Form\ChatGPTForm.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 5 LINES
------------------------------------------------------------------------------------------------------------------------------------------
23 | WARNING | Unused variable $path.
23 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
26 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
39 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
46 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
103 | WARNING | There must be no blank line following an inline comment
------------------------------------------------------------------------------------------------------------------------------------------

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

akshay.kelotra created an issue. See original summary.

akshay.kelotra’s picture

Assigned: akshay.kelotra » Unassigned
Category: Task » Bug report
Status: Active » Needs review
StatusFileSize
new1.92 KB

I have fixed this issue and providing a patch.

Sonal Gyanani made their first commit to this issue’s fork.

Sonal Gyanani’s picture

Thanks akshay.kelotra, patch is working fine but still there was a problem of use dependency injection in
chatgpt\src\Form\ChatGPTForm.php that I fixed please review

atul_ghate’s picture

Assigned: Unassigned » atul_ghate

I will review this MR.

anup.sinha’s picture

Hi All,

Thanks for checking the module. This is just a dev version I have created so that people can see how ChatGPT can help in CMS offerings. I will soon publish a release version for this module with everything updated as per the Drupal standard.

Thanks & Regards,
Anup

anup.sinha’s picture

Status: Needs review » Fixed

Hi,

Added a new commit by doing improvement on the code quality, code standard, security and better error handling of ChatGPT API call. Hence closing this ticket. Please check again and still if you find any issue, please log a new ticket.

Thanks & Regards,
Anup

anup.sinha’s picture

Status: Fixed » Closed (fixed)