- Issue created by @keshav patel
- Status changed to Needs review
about 1 year ago 10:20am 22 November 2023 - ๐ฎ๐ณIndia keshav patel
The provided patch file "fix_coding_standards-3403330-2.patch" fixes the phpcs reported issues.
- Status changed to RTBC
about 1 year ago 11:01am 21 December 2023 - ๐ท๐บRussia zniki.ru
Thanks, looks good.
Patch applied, all issues fixed.Dear maintainer can you please release a dev version from the development branch 2.0.x?
- Status changed to Needs work
about 1 year ago 11:24am 21 December 2023 - ๐ท๐บRussia zniki.ru
Looks like command I used, doesn't use phpcs.dist.xml provided by module.
I used:phpcs -s modules/custom/date_time_day/ --report-full --report-summary --standard=modules/custom/date_time_day/phpcs.xml.dist
And have some more issues to fix:
FILE: /var/www/html/modules/custom/date_time_day/tests/src/Functional/DateTimeDayFieldTest.php ---------------------------------------------- FOUND 5 ERRORS AFFECTING 5 LINES ---------------------------------------------- 28 | ERROR | [ ] @var annotation of property \Drupal\Tests\date_time_day\Functional\DateTimeDayFieldTest::$modules does not specify type hint for its items. | | (SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingTraversableTypeHintSpecification) 30 | ERROR | [x] Property \Drupal\Tests\date_time_day\Functional\DateTimeDayFieldTest::$modules does not have native type hint for its value but it should be possible to add it based on @var annotation "array". | | (SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint) 37 | ERROR | [x] Property \Drupal\Tests\date_time_day\Functional\DateTimeDayFieldTest::$timezones does not have native type hint for its value but it should be possible to add it based on @var annotation "string[]". | | (SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint) 45 | ERROR | [ ] @var annotation of property \Drupal\Tests\date_time_day\Functional\DateTimeDayFieldTest::$defaultSettings does not specify type hint for its items. | | (SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingTraversableTypeHintSpecification) 47 | ERROR | [x] Property \Drupal\Tests\date_time_day\Functional\DateTimeDayFieldTest::$defaultSettings does not have native type hint for its value but it should be possible to add it based on @var annotation "array". | | (SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint) ---------------------------------------------- PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------- FILE: /var/www/html/modules/custom/date_time_day/tests/src/Kernel/DateTimeDayItemTest.php ---------------------------------------------- FOUND 2 ERRORS AFFECTING 2 LINES ---------------------------------------------- 27 | ERROR | [x] Property \Drupal\Tests\date_time_day\Kernel\DateTimeDayItemTest::$fieldStorage does not have native type hint for its value but it should be possible to add it based on @var annotation | | "\Drupal\field\Entity\FieldStorageConfig". (SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint) 34 | ERROR | [x] Property \Drupal\Tests\date_time_day\Kernel\DateTimeDayItemTest::$field does not have native type hint for its value but it should be possible to add it based on @var annotation | | "\Drupal\field\Entity\FieldConfig". (SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint) ---------------------------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------- FILE: /var/www/html/modules/custom/date_time_day/tests/src/Kernel/SeparatorsTranslationTest.php ---------------------------------------------- FOUND 2 ERRORS AFFECTING 2 LINES ---------------------------------------------- 29 | ERROR | [x] Property \Drupal\Tests\date_time_day\Kernel\SeparatorsTranslationTest::$fieldStorage does not have native type hint for its value but it should be possible to add it based on @var annotation | | "\Drupal\field\Entity\FieldStorageConfig". (SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint) 36 | ERROR | [x] Property \Drupal\Tests\date_time_day\Kernel\SeparatorsTranslationTest::$field does not have native type hint for its value but it should be possible to add it based on @var annotation | | "\Drupal\field\Entity\FieldConfig". (SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint) ---------------------------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------- FILE: /var/www/html/modules/custom/date_time_day/src/Plugin/Field/FieldWidget/DateTimeDayWidgetBase.php ---------------------------------------------- FOUND 2 ERRORS AFFECTING 2 LINES ---------------------------------------------- 145 | ERROR | @param annotation of method \Drupal\date_time_day\Plugin\Field\FieldWidget\DateTimeDayWidgetBase::validateStartEnd() does not specify type hint for items of its traversable parameter $element. | | (SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification) 150 | ERROR | @param annotation of method \Drupal\date_time_day\Plugin\Field\FieldWidget\DateTimeDayWidgetBase::validateStartEnd() does not specify type hint for items of its traversable parameter $complete_form. | | (SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification) ---------------------------------------------- FILE: /var/www/html/modules/custom/date_time_day/src/Plugin/Field/FieldFormatter/DateTimeDayDefaultFormatter.php ---------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------- 123 | ERROR | @return annotation of method \Drupal\date_time_day\Plugin\Field\FieldFormatter\DateTimeDayDefaultFormatter::buildTimeWithAttribute() does not specify type hint for items of its traversable return value. | | (SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification) ---------------------------------------------- FILE: /var/www/html/modules/custom/date_time_day/src/DateTimeDayComputed.php -------------------------- FOUND 2 ERRORS AFFECTING 2 LINES -------------------------- 27 | ERROR | [x] Property \Drupal\date_time_day\DateTimeDayComputed::$date does not have native type hint for its value but it should be possible to add it based on @var annotation | | "\Drupal\Core\Datetime\DrupalDateTime|null". (SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint) 42 | ERROR | [x] Parameter $langcode has null default value, but is not marked as nullable. (SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue.NullabilityTypeMissing) -------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------- FILE: /var/www/html/modules/custom/date_time_day/src/DateDayComputed.php -------------------------- FOUND 2 ERRORS AFFECTING 2 LINES -------------------------- 26 | ERROR | [x] Property \Drupal\date_time_day\DateDayComputed::$date does not have native type hint for its value but it should be possible to add it based on @var annotation | | "\Drupal\Core\Datetime\DrupalDateTime|null". (SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint) 41 | ERROR | [x] Parameter $langcode has null default value, but is not marked as nullable. (SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue.NullabilityTypeMissing) -------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------- Time: 1.3 secs; Memory: 6MB PHP CODE SNIFFER REPORT SUMMARY ------------------------------------------------------------------------------------------------------------------------------- FILE ERRORS WARNINGS ------------------------------------------------------------------------------------------------------------------------------- /var/www/html/modules/custom/date_time_day/src/DateDayComputed.php 2 0 /var/www/html/modules/custom/date_time_day/src/DateTimeDayComputed.php 2 0 /var/www/html/modules/custom/date_time_day/src/Plugin/Field/FieldFormatter/DateTimeDayDefaultFormatter.php 1 0 /var/www/html/modules/custom/date_time_day/src/Plugin/Field/FieldWidget/DateTimeDayWidgetBase.php 2 0 /var/www/html/modules/custom/date_time_day/tests/src/Functional/DateTimeDayFieldTest.php 5 0 /var/www/html/modules/custom/date_time_day/tests/src/Kernel/DateTimeDayItemTest.php 2 0 /var/www/html/modules/custom/date_time_day/tests/src/Kernel/SeparatorsTranslationTest.php 2 0 ------------------------------------------------------------------------------------------------------------------------------- A TOTAL OF 16 ERRORS AND 0 WARNINGS WERE FOUND IN 7 FILES ------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX 11 OF THESE SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------------------------------------------------------
Or phpcs.dist.xml needs to be updated.
- ๐ฎ๐ณIndia Anjali Mehta
Anjali Mehta โ made their first commit to this issueโs fork.
- Assigned to Anjali Mehta
-
Andriy Khomych โ
committed 747aede7 on 2.0.x authored by
Keshav Patel โ
Issue #3403330 by Keshav Patel, Andriy Khomych: Fix the issues reported...
-
Andriy Khomych โ
committed 747aede7 on 2.0.x authored by
Keshav Patel โ
- ๐บ๐ฆUkraine andriy khomych
Fixed in the dev, however, I don't have time to check GitLab integration.
Nikolay, could you check if it works in the Gitlab integration issue https://www.drupal.org/project/date_time_day/issues/3410244 ๐ Adopt GitlabCi Needs review ? - Status changed to Fixed
about 1 year ago 1:10pm 21 December 2023 - Issue was unassigned.
- ๐ท๐บRussia zniki.ru
Andriy thanks a lot for your time, I will fix few phpcs violation in the issue ๐ Adopt GitlabCi Needs review .
- Status changed to Fixed
12 months ago 2:14pm 4 January 2024 Automatically closed - issue fixed for 2 weeks with no activity.