- Issue created by @urvashi_vora
- Status changed to Needs work
over 1 year ago 8:16pm 16 May 2023 - ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
requirements: + # Access Admin Page Permission _permission: 'access administration pages'
The warning is the following.
The administration page callback should probably use "administer site configuration" - which implies the user can change something - rather than "access administration pages" which is about viewing but not changing configurations.
Adding a comment before the
_permission
line does not change the required permission for those routes. - ๐ฎ๐ณIndia Rajan Kumar
Rajan Kumar โ made their first commit to this issueโs fork.
- @rajan-kumar opened merge request.
- Status changed to Needs review
over 1 year ago 10:21am 18 May 2023 - Status changed to Needs work
over 1 year ago 6:10pm 18 May 2023 - ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
- ->fields('sub', ['uid', 'subscription_id', 'plan_id', 'status', 'current_term_start', 'current_term_end']) + ->fields('sub', [ + 'uid', + 'subscription_id', + 'plan_id', + 'status', + 'current_term_start', + 'current_term_end', + ])
Code lines are allowed to exceed 80 characters, if they are more readable. The existing code is more readable than the changed code.
_controller: '\Drupal\integration_chargebee\Controller\PaymentController::success' _title: 'Thank you' requirements: - _access: 'TRUE' + _permission: 'access content'
The report does not say that
_access: 'TRUE'
must be removed from that route definition, but that a comment explaining why_access: 'TRUE'
is used must be added._controller: '\Drupal\integration_chargebee\Controller\CheckoutController::plan' _title: 'Subscribe Plan' requirements: - _access: 'TRUE' - + _permission: 'access content'
The same holds true for this route definition.
+ * The ConfigFactory. + * * @var \Drupal\Core\Config\ConfigFactory
ConfigFactory is misspelled.
+ * @param \Drupal\Core\Config\ConfigFactory $configFactory + * The renderer.
The description is wrong.
+ /** * Construct a new AuthController object. * + * @param \Drupal\Core\Config\ConfigFactory $configFactory
Since that comment is change, also the method description must be changed: The description for a constructor must start with
Constructs a new
followed by the class name (including its namespace), and end withobject.
/** - * integration_chargebee Service. + * Integration_chargebee Service.
integration_chargebee is the module machine name and it does not describe this service's purpose.
Service is misspelled, since it must be spelled using lowercase letters.+ /** * Drupal config. * * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory;
Since that documentation comment is changed, also the property description must be changed, as property descriptions must not start with Drupal.
+ /** + * The RequestStack service. + * + * @var Symfony\Component\HttpFoundation\RequestStack + */ + protected $requestStack;
The request stack. is a better description.
* The config factory for the form. + * @param Symfony\Component\HttpFoundation\RequestStack $requestStack + * The request service.
The request stack. is a better description.
- /** + /** * Entity manager. * * @var \Drupal\Core\Entity\EntityTypeManagerInterface */ protected $entityTypeManager; - /** + /** * Database connection. *
Since those comments have been changed, a definite article must be added to both the descriptions.
+ /** + * Class Constructor. * * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory for the form. */ + public function __construct(ConfigFactoryInterface $config_factory) {
The description for a constructor must start with
Constructs a new
followed by the class name (including its namespace), and end withobject.
- Status changed to Needs review
over 1 year ago 7:10am 19 May 2023 - Status changed to Needs work
over 1 year ago 9:07am 19 May 2023 - ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
+ # Access granted in all circumstances. _access: 'TRUE'
That does not explain why.
/** + * The Config Factory. + * * @var \Drupal\Core\Config\ConfigFactory
Only the first word in the description must be capitalized.
+ /** + * Construct a new CheckoutController object.
The class namespace is missing.
/** - * An example controller. + * An User controller. */
The indefinite article to use with user is the other one.
* Connection. * @param \Drupal\Core\Messenger\Messenger $messenger * Messenger.
Since that documentation comment is changed, the definite article needs to be added to both those descriptions.
/** - * Class ChargebeePlanForm. + * Class Chargebee Plan Form.
That is still repeating the class name. Adding spaces does not change that.
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory for the form.
Since that documentation comment is changed, that description must be changed too: The config factory. is sufficient.
+ /** + * Create tableselect for plans list. + */ + public function integrationChargebeeCreatePlansSelectTable($plans) {
The verb must be declined to the third person singular.
- Status changed to Needs review
over 1 year ago 11:08am 19 May 2023 - Status changed to Needs work
over 1 year ago 3:51pm 19 May 2023 - Status changed to Needs review
over 1 year ago 11:39am 23 May 2023 - ๐ฎ๐ณIndia shashank5563 New Delhi
@apaderno, For the permission issue, I will create another issue. Now, I merging this issue.
- Status changed to Fixed
over 1 year ago 6:00am 26 May 2023 - ๐ฎ๐ณIndia shashank5563 New Delhi
@apaderno, I am marking fixed this issue. I will create another issue for the permission.
Automatically closed - issue fixed for 2 weeks with no activity.