Running phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml ./ shows the following warnings/errors which should be fixed.
FILE: ./facets.install
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
10 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is Drupal\block\Entity\Block.
96 | ERROR | [ ] unserialize() is insecure unless allowed classes
| | are limited. Use a safe format like JSON or use the
| | allowed_classes option.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./facets.module
----------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
20 | ERROR | [x] Use statements should be sorted alphabetically.
| | The first wrong one is
| | Drupal\Core\Entity\EntityInterface.
207 | ERROR | [x] Data types in @var tags need to be fully
| | namespaced
207 | ERROR | [x] Data types in @var tags need to be fully
| | namespaced
----------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./facets.routing.yml
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
57 | WARNING | Open page callback found, please add a comment before
| | the line why there is no access restriction
----------------------------------------------------------------------
FILE: ./modules/facets_range_widget/tests/src/Unit/Plugin/processor/RangeProcessorTest.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\Component\Utility\UrlHelper.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./modules/facets_range_widget/tests/src/Unit/Plugin/processor/SliderProcessorTest.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\Core\DependencyInjection\ContainerBuilder.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./modules/facets_range_widget/tests/src/Unit/Plugin/widget/SearchboxLinksWidgetTest.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
9 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\Core\Entity\EntityStorageInterface.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./modules/facets_summary/facets_summary.module
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
11 | WARNING | [x] Unused use statement
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./modules/facets_summary/src/FacetsSummaryManager/DefaultFacetsSummaryManager.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
13 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\facets_summary\FacetsSummaryInterface.
48 | ERROR | [ ] Missing short description in doc comment
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./modules/facets_summary/src/Form/FacetsSummaryForm.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
10 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\Core\Form\FormStateInterface.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./modules/facets_summary/src/Form/FacetsSummarySettingsForm.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
9 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\Core\Form\FormStateInterface.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./modules/facets_summary/src/Plugin/Block/FacetsSummaryBlock.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
167 | ERROR | Missing short description in doc comment
----------------------------------------------------------------------
FILE: ./facets_summary/src/Plugin/Block/FacetsSummaryBlockDeriver.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
8 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is Drupal\Core\Plugin\PluginBase.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./modules/facets_summary/src/Plugin/facets_summary/processor/ShowCountProcessor.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
34 | ERROR | [x] Use null coalesce operator instead of ternary
| | operator.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./modules/facets_summary/src/Processor/ProcessorInterface.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
9 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\Component\Plugin\PluginInspectionInterface.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./modules/facets_summary/tests/src/Functional/HierarchicalFacetIntegrationTest.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
9 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\Tests\facets\Functional\FacetsTestBase.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./modules/facets_summary/tests/src/Functional/IntegrationTest.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\facets_summary\Entity\FacetsSummary.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./modules/facets_summary/tests/src/Unit/Plugin/Processor/ResetFacetsProcessorTest.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\Core\DependencyInjection\ContainerBuilder.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./modules/facets_summary/tests/src/Unit/Plugin/Processor/ShowTextWhenEmptyProcessorTest.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\Core\DependencyInjection\ContainerBuilder.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./src/Controller/FacetBlockAjaxController.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
16 | WARNING | [x] Unused use statement
140 | WARNING | [ ] \Drupal calls should be avoided in classes, use
| | dependency injection instead
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./src/Entity/Facet.php
----------------------------------------------------------------------
FOUND 8 ERRORS AFFECTING 8 LINES
----------------------------------------------------------------------
318 | ERROR | [ ] Missing member variable doc comment
778 | ERROR | [x] Line indented incorrectly; expected 6 spaces,
| | found 8
779 | ERROR | [x] Line indented incorrectly; expected 6 spaces,
| | found 8
780 | ERROR | [x] Line indented incorrectly; expected 6 spaces,
| | found 8
781 | ERROR | [x] Line indented incorrectly; expected 8 spaces,
| | found 12
782 | ERROR | [x] Line indented incorrectly; expected 8 spaces,
| | found 12
783 | ERROR | [x] Line indented incorrectly; expected 6 spaces,
| | found 8
1196 | ERROR | [x] Missing function doc comment
----------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./src/Event/GetFacetCacheContexts.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\Component\EventDispatcher\Event.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./src/Event/GetFacetCacheMaxAge.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\Component\EventDispatcher\Event.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./src/Event/GetFacetCacheTags.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\Component\EventDispatcher\Event.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./src/Event/PostBuildFacet.php
----------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
----------------------------------------------------------------------
5 | WARNING | [x] Unused use statement
7 | ERROR | [x] Use statements should be sorted alphabetically.
| | The first wrong one is
| | Drupal\Component\EventDispatcher\Event.
50 | ERROR | [ ] Description for the @return value is missing
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./src/Event/QueryStringCreated.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
7 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\Component\EventDispatcher\Event.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./src/Event/UrlCreated.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
8 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\Component\EventDispatcher\Event.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./src/FacetListBuilder.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
9 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is Drupal\Component\Utility\Html.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./src/FacetManager/DefaultFacetManager.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
355 | WARNING | \Drupal calls should be avoided in classes, use
| | dependency injection instead
----------------------------------------------------------------------
FILE: ./src/FacetSource/FacetSourcePluginBase.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
7 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\Core\Plugin\ContainerFactoryPluginInterface.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./src/Form/FacetForm.php
----------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
----------------------------------------------------------------------
13 | ERROR | [x] Use statements should be sorted alphabetically.
| | The first wrong one is
| | Drupal\facets\FacetSource\SearchApiFacetSourceInterface.
149 | WARNING | [ ] \Drupal calls should be avoided in classes, use
| | dependency injection instead
811 | ERROR | [x] Whitespace found at end of line
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./src/Plugin/Block/FacetBlock.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
11 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\Core\Form\FormStateInterface.
41 | ERROR | [ ] Missing short description in doc comment
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./src/Plugin/facets/facet_source/SearchApiBaseFacetSource.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
10 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\facets\FacetSource\FacetSourcePluginBase.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./src/Plugin/facets/facet_source/SearchApiDisplay.php
----------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------
92 | ERROR | Class property $display_edit_in_progress should use
| | lowerCamel naming without underscores
564 | ERROR | Description for the @return value is missing
573 | ERROR | Missing parameter comment
----------------------------------------------------------------------
FILE: ./src/Plugin/facets/processor/ActiveWidgetOrderProcessor.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
7 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\facets\Processor\SortProcessorInterface.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./src/Plugin/facets/processor/BooleanItemProcessor.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
8 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\Core\Form\FormStateInterface.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./src/Plugin/facets/processor/CombineFacetProcessor.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
10 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\facets\FacetManager\DefaultFacetManager.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./src/Plugin/facets/processor/CountWidgetOrderProcessor.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
7 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\facets\Processor\SortProcessorInterface.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./src/Plugin/facets/processor/DateItemProcessor.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
7 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\Core\Form\FormStateInterface.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./src/Plugin/facets/processor/DependentFacetProcessor.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
10 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\facets\FacetManager\DefaultFacetManager.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./src/Plugin/facets/processor/RawValueWidgetOrderProcessor.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
7 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\facets\Processor\SortProcessorInterface.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./src/Plugin/facets/processor/TranslateEntityAggregatedFieldProcessor.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
7 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\Core\Entity\EntityTypeManagerInterface.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./src/Processor/ProcessorInterface.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
9 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\Component\Plugin\PluginInspectionInterface.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./src/Processor/ProcessorPluginBase.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
8 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\Core\Entity\DependencyTrait.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./src/Utility/FacetsUrlGenerator.php
----------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
----------------------------------------------------------------------
142 | ERROR | [x] Expected newline after closing brace
148 | WARNING | [ ] \Drupal calls should be avoided in classes, use
| | dependency injection instead
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./tests/src/Functional/Rest/FacetResourceTestBase.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
123 | ERROR | Description for the @return value is missing
----------------------------------------------------------------------
FILE: ./tests/src/Functional/UrlIntegrationTest.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
8 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is Drupal\facets\Entity\Facet.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./tests/src/Functional/WidgetIntegrationTest.php
----------------------------------------------------------------------
FOUND 7 ERRORS AND 1 WARNING AFFECTING 7 LINES
----------------------------------------------------------------------
253 | WARNING | [ ] Line exceeds 80 characters; contains 143
| | characters
254 | ERROR | [ ] Doc comment short description must end with a
| | full stop
254 | ERROR | [ ] Doc comment short description must be on a
| | single line, further text should be a separate
| | paragraph
273 | ERROR | [x] Inline control structures are not allowed
278 | ERROR | [x] Inline control structures are not allowed
279 | ERROR | [x] A unary operator statement must not be followed
| | by a space
283 | ERROR | [x] Inline control structures are not allowed
284 | ERROR | [x] A unary operator statement must not be followed
| | by a space
----------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./tests/src/Kernel/Entity/FacetFacetSourceTest.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
11 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\facets\Exception\Exception.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./tests/src/Kernel/Plugin/query_type/SearchApiDateTest.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is Drupal\facets\FacetInterface.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./tests/src/Unit/Plugin/processor/DependentFacetProcessorTest.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\Core\Config\Entity\ConfigEntityType.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./tests/src/Unit/Plugin/processor/ListItemProcessorTest.php
----------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
19 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\Core\Config\ConfigManager.
45 | ERROR | [ ] Missing member variable doc comment
45 | ERROR | [ ] Class property $processor_plugin_manager should use
| | lowerCamel naming without underscores
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./tests/src/Unit/Plugin/processor/ReplaceProcessorTest.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is Drupal\facets\Entity\Facet.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./tests/src/Unit/Plugin/processor/UidToUserNameCallbackProcessorTest.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
7 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\Core\Entity\EntityStorageInterface.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./tests/src/Unit/Plugin/query_type/SearchApiGranularTest.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\Core\DependencyInjection\ContainerBuilder.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./tests/src/Unit/Plugin/widget/LinksWidgetTest.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
9 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\Core\Entity\EntityStorageInterface.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./tests/src/Unit/Plugin/widget/WidgetTestBase.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is Drupal\facets\Entity\Facet.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./tests/src/Unit/UrlProcessor/UrlProcessorPluginManagerTest.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
9 | WARNING | [x] Unused use statement
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./tests/src/Unit/Utility/FacetsUrlGeneratorTest.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The
| | first wrong one is
| | Drupal\Core\Entity\EntityStorageInterface.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ./tests/src/Unit/Widget/WidgetPluginManagerTest.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
9 | WARNING | [x] Unused use statement
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
Time: 2.54 secs; Memory: 16MB
Comments
Comment #2
shivam-kumar commentedOn executing phpcbf -
PHPCBF RESULT SUMMARY
----------------------------------------------------------------------
FILE FIXED REMAINING
----------------------------------------------------------------------
/app/modules/contrib/facets/facets.module 2 0
...cets/modules/facets_summary/facets_summary.module 1 0
...n/facets_summary/processor/ShowCountProcessor.php 1 0
...acets/src/Controller/FacetBlockAjaxController.php 1 1
/app/modules/contrib/facets/src/Entity/Facet.php 7 2
...dules/contrib/facets/src/Event/PostBuildFacet.php 1 2
/app/modules/contrib/facets/src/Form/FacetForm.php 1 1
...contrib/facets/src/Utility/FacetsUrlGenerator.php 1 1
...ts/tests/src/Functional/WidgetIntegrationTest.php 5 5
...it/UrlProcessor/UrlProcessorPluginManagerTest.php 1 0
...tests/src/Unit/Widget/WidgetPluginManagerTest.php 1 0
----------------------------------------------------------------------
A TOTAL OF 22 ERRORS WERE FIXED IN 11 FILES
----------------------------------------------------------------------
Time: 15.37 secs; Memory: 24MB
Comment #3
sahil.goyal commentedwork on this.
Comment #4
sahil.goyal commentedFixing all PHP coding standard issues attaching patch along with the comment.
Comment #5
hardikpandya commentedThe patch isn't getting applied. Please work on making it compatible.
Also, @sahil.goyal it is a good practice to provide an interdiff from the previous patch submitted by a contributor to easily identify the changes done by you. See: https://www.drupal.org/node/1488712
Comment #7
vishaljd commentedComment #9
vishaljd commentedComment #10
avpadernoComment #11
imustakim commentedWorking on this.
Comment #12
imustakim commentedAdded a patch for fixes.
Please review.
Comment #13
avpadernoComment #14
pray_12 commentedComment #15
nitin_lamaPatch #12 fixes all the phpcs related issues for branch 2.0.x.
Comment #16
nitin_lamaThere are still issues in patch #14. @preethy_ray can you share an interdiff file or share what did you do in the patch ?
Comment #17
nitin_lamaI believe MR is ready for review. Please review.
Comment #18
nitin_lamaComment #19
paraderojether commentedHi nitin_lama,
I reviewed MR!130, applied against Facets 2.0.x-dev with Drupal core version 10.1.7 and there are still remaining phpcs errors/warnings shown below:
Moving this to Needs work.
Kindly check and advise, please.
Thank you.
Comment #20
avpadernoI got 59 warnings/errors from PHP_CodeSniffer, not 30-something the issue summary shows.
Comment #21
pray_12 commentedFixed all the phpcs and phpcbf errors.
Please review.
Thank you!!!
Comment #22
avpadernoIn JavaScript,
true,false, andnullare used.TRUE,FALSE, andNULLare used in PHP.JavaScript files have been removed from the report exactly for that reason: to avoid false positives PHP_CodeSniffer would report when it tries to apply PHP rules to JavaScript code.
Comment #23
smustgrave commentedHandled by gitlab ticket.