+ unused variables:
I have removed they.
+ Some report is not issues:
1. ERROR | [x] TRUE, FALSE and NULL must be uppercase
in javascript ,the boolean value accept only true or false values (not TRUE, FALSE) and not value NULL exists instead we use null
2.options values usually have to run through t() for translation
These values are on us to be fixed, no need to translate
These values are on us to be fixed, no need to translate
Hello,
This project needn't update because logic in code handle all drupal version >=8 . And request issues only handle for drupal version >= 10.
Please see my attached image.
@apaderno
I fixed all your report issues following your suggestion.
Please help review it.
I appreciate your soon feedback, so I have time to fix it any remaining issues as today is my deadline on this task
Thanks and Best Regards.
Luan
@apaderno,
I fixed issues in your report except below one:
src/Form/OrderConfirmForm.php
/**
* Messenger.
*
* @var \Drupal\Core\Messenger\Messenger
*/
protected $messenger;
That property is already defined from the parent class.
Because $messenger variable is used in multiple functions (buildForm, confirmOrder, setCancel), but confirmOrder and setCancel functions only receive variable from buildForm function through FormStateInterface.
I don't have any solution to fix this now.
Do you have any suggestion to help me on this?
Thanks
Luan
@apaderno,@Rassoni
Yes, I check and see PHPStan gives false positives and the phpstan report is not trustable.
We already passed PHP_CodeSniffer validated by vishal.kadam reviewer. He confirmed on
#16 →
Can we skip(don't fix) phpstan report by Rassoni?
We will fix issues reported in Apaderno on
#19 →
, then request review again?
Thanks,
Luan
@Rassoni,
I checked your attached file but It's not same
#23 →
. Are you latest report file incorrect?
Hello Rassoni,
I checked your validation result file. Then I noticed that there are some reported errors related to tmgmt seem incorrect.
Access to constant STATE_ACTIVE on an unknown class Drupal\tmgmt\JobInterface.
Access to constant STATE_CONTINUOUS on an unknown class Drupal\tmgmt\JobInterface.
You can check JobInterface file on git.
https://git.drupalcode.org/project/tmgmt/-/blob/8.x-1.x/src/JobInterface...
Call to static method load() on an unknown class Drupal\tmgmt\Entity\Job.
Static method load is exists on class Drupal\tmgmt\Entity\Job because it is inherited from class ContentEntityInterface through interface JobInterface.
Parameter $job of method
Drupal\tmgmt_wordsonline\Controller\OrderController::importTranslation() has invalid type Drupal\tmgmt\JobInterface.
Because Drupal\tmgmt\Entity\Job is inherited from Drupal\tmgmt\JobInterface , this should not be an error.
\Drupal calls should be avoided in classes, use dependency injection
instead
Line 651,681,704,715,726
I can't find these error.
https://git.drupalcode.org/project/wordsonline_connector/-/blob/1.0.x/sr...
Please check and feedback me on this.
Thanks and Best Regards.
Luan
Hi Rassoni,
I setup phpstan by follow steps in https://www.drupal.org/docs/develop/development-tools/phpstan/getting-st... → with the phpstan.neon file config:
parameters:
level: 0
paths:
- wordsonline_connector/src
But the validation result is not same your report. I attached my report here.
Can you please help check it or tell me how to config phpstan to get same your report?
Thanks and Best Regard,
Luan
Thanks for your feedback, Vishal.kadam.
Do you know how long we need to wait?
Thanks.
the reported has been fixed
The reported has been fixed.
Do I need to fix the warning?
the reported has been fixed
Thanks . I will fix it.