Skip to content

Instantly share code, notes, and snippets.

@anyt
Last active May 20, 2022 09:05
Show Gist options
  • Save anyt/d9e4aa185e91310d3910084c2b7c6d18 to your computer and use it in GitHub Desktop.
Save anyt/d9e4aa185e91310d3910084c2b7c6d18 to your computer and use it in GitHub Desktop.

Run on changed files:

php bin/phpcs {} -p --encoding=utf-8 --extensions=php --standard=vendor/oro/platform/build/Oro/phpcs.xml

php bin/php-cs-fixer fix {} --verbose --dry-run --config=vendor/oro/platform/build/.php-cs-fixer.php

php bin/phpmd {} text vendor/oro/platform/build/phpmd.xml --suffixes php 

where {} is the changed file

Run on the whole project:

PHPCPD_REGEXPS_EXCLUDE=$(paste -sd, ./phpcpd_exludes.csv | sed '$ s/,$//g')

php bin/phpcpd --min-lines 25 -vv --regexps-exclude="$PHPCPD_REGEXPS_EXCLUDE" vendor/oro 

phpcpd_exludes.csv file included in a gist

We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
Migrations/Schema/
Entity/
Tests/
ApiBundle/
EwsBundle/
MagentoBundle/
PricingBundle/ORM/Walker/PriceShardWalker.php
Component/DoctrineUtils/ORM/SqlWalker.php
platform-enterprise/src/Oro/Bundle/ImapProBundle/Sync/ImapEmailSynchronizer.php
platform/src/Oro/Bundle/ImapBundle/Sync/ImapEmailSynchronizer.php
demo-data/Migrations/Data/B2B/ORM/B2B/Activity/LoadEmailActivityData.php
demo-data/Migrations/Data/B2C/ORM/Activity/LoadEmailActivityData.php
infinitepay/Service/InfinitePay/ResponseActivation.php
infinitepay/Service/InfinitePay/ResponseCancel.php
infinitepay/Service/InfinitePay/ResponseCapture.php
infinitepay/Service/InfinitePay/ResponseCheckStatus.php
platform/src/Oro/Component/DoctrineUtils/ORM/Walker/AbstractOutputAstWalker.php
platform/src/Oro/Component/DoctrineUtils/ORM/Walker/AbstractOutputResultModifier.php
platform/src/Oro/Bundle/ActionBundle/Model/Attribute.php
platform/src/Oro/Bundle/WorkflowBundle/Model/Variable.php
platform/src/Oro/Bundle/EmailBundle/Form/Model/Email.php
platform/src/Oro/Bundle/EmailBundle/Form/Model/EmailApi.php
platform/src/Oro/Bundle/ImportExportBundle/Context/Context.php
platform/src/Oro/Bundle/ImportExportBundle/Context/StepExecutionProxyContext.php
customer-portal/src/Oro/Bundle/CustomerBundle/Datagrid/Extension/MassAction/CustomersEnableSwitchActionHandler.php
platform/src/Oro/Bundle/UserBundle/Datagrid/Extension/MassAction/UsersEnableSwitchActionHandler.php
commerce-enterprise/src/Oro/Bundle/WarehouseBundle/Form/Handler/InventoryLevelHandler.php
commerce/src/Oro/Bundle/InventoryBundle/Form/Handler/InventoryLevelHandler.php
commerce-enterprise/src/Oro/Bundle/CommerceOrganizationMenuBundle/Controller/OrganizationMenuController.php
platform-enterprise/src/Oro/Bundle/OrganizationMenuBundle/Controller/OrganizationMenuController.php
customer-portal/src/Oro/Bundle/FrontendBundle/Migration/UpdateExtendRelationQuery.php
platform/src/Oro/Bundle/InstallerBundle/Migration/UpdateExtendRelationQuery.php
commerce-enterprise/src/Oro/Bundle/WarehouseBundle/Controller/InventoryLevelController.php
commerce/src/Oro/Bundle/InventoryBundle/Controller/InventoryLevelController.php
crm/src/Oro/Bundle/ContactBundle/Handler/ContactEmailApiHandler.php
crm/src/Oro/Bundle/ContactBundle/Handler/ContactPhoneApiHandler.php
crm/src/Oro/Bundle/SalesBundle/Handler/B2bCustomerEmailApiHandler.php
crm/src/Oro/Bundle/SalesBundle/Handler/B2bCustomerPhoneApiHandler.php
platform/src/Oro/Bundle/QueryDesignerBundle/QueryDesigner/Configuration.php
platform/src/Oro/Bundle/QueryDesignerBundle/QueryDesigner/Configuration.php
commerce-enterprise/src/Oro/Bundle/ProductProBundle/Validator/Constraints/EmptyVariantFieldInSimpleProductForVariantLinksValidator.php
commerce/src/Oro/Bundle/ProductBundle/Validator/Constraints/EmptyVariantFieldInSimpleProductForVariantLinksValidator.php
commerce-paypal-express/EventListener/PayPalExpressRedirectListener.php
commerce/src/Oro/Bundle/PayPalBundle/EventListener/Callback/PayflowExpressCheckoutListener.php
crm/src/Oro/Bundle/CaseBundle/Migrations/Data/Demo/ORM/LoadCaseEntityData.php
demo-data/Migrations/Data/B2C/ORM/Cases/LoadCaseEntityData.php
demo-data/Migrations/Data/B2C/ORM/Zendesk/LoadTicketEntityData.php
zendesk/Migrations/Data/Demo/ORM/LoadTicketEntityData.php
dotmailer/Model/FieldHelper.php
mailchimp/Model/FieldHelper.php
commerce-enterprise/src/Oro/Bundle/CustomerProBundle/Migrations/Data/Demo/ORM/LoadAcmeCustomerUserRoles.php
customer-portal/src/Oro/Bundle/CustomerBundle/Migrations/Data/ORM/LoadCustomerUserRoles.php
platform/src/Oro/Bundle/OrganizationBundle/Dashboard/Converters/WidgetBusinessUnitSelectConverter.php
platform/src/Oro/Bundle/UserBundle/Dashboard/Converters/WidgetUserSelectConverter.php
demo-data/Migrations/Data/B2B/ORM/B2B/Activity/LoadCallActivityData.php
demo-data/Migrations/Data/B2C/ORM/Activity/LoadCallActivityData.php
crm/src/Oro/Bundle/ContactBundle/ImportExport/TemplateFixture/ContactFixture.php
crm/src/Oro/Bundle/SalesBundle/ImportExport/TemplateFixture/LeadFixture.php
platform/src/Oro/Bundle/EntityExtendBundle/Migration/Extension/ExtendExtension.php
platform/src/Oro/Bundle/EntityExtendBundle/Migration/Extension/ExtendExtension.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment