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
------------------------------------------------------------------------------------------------------------------------------------------
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | standard-drupal-practice-3331911-01.patch | 1.92 KB | akshay.kelotra |
Issue fork chatgpt_plugin-3331911
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:
- 3331911-standarddrupalpractice-issue
changes, plain diff MR !1
Comments
Comment #2
akshay.kelotra commentedI have fixed this issue and providing a patch.
Comment #5
Sonal Gyanani commentedThanks akshay.kelotra, patch is working fine but still there was a problem of use dependency injection in
chatgpt\src\Form\ChatGPTForm.phpthat I fixed please reviewComment #6
atul_ghate commentedI will review this MR.
Comment #7
anup.sinha commentedHi 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
Comment #9
anup.sinha commentedHi,
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
Comment #10
anup.sinha commented