From b574a5c56f43378e01ea150956a91948dd06d0bb Mon Sep 17 00:00:00 2001 From: Gustavs Date: Mon, 7 Mar 2022 15:37:25 +0200 Subject: [PATCH] refactor: porting controllers to php8 --- .php-cs-fixer.dist.php | 4 +- composer.json | 4 +- composer.lock | 2073 +++++++++++------ .../Context/Request/EditSubmissionContext.php | 2 +- .../Form/Context/Session/SessionContext.php | 12 +- .../Session/StorageTypes/PayloadStorage.php | 2 +- .../Session/StorageTypes/SessionStorage.php | 2 +- .../Form/ElementEdit/ElementEditBundle.php | 2 +- .../EmailNotifications/DynamicRecipients.php | 2 +- .../GoogleTagManagerBundle.php | 18 +- .../Form/HiddenInputs/FreeformActionInput.php | 2 +- .../PayloadForwarding/PayloadForwarding.php | 8 +- .../Bundles/Form/SaveForm/LoadSavedForm.php | 6 +- .../src/Bundles/Form/SaveForm/SaveForm.php | 10 +- .../Bundles/Form/SaveForm/SaveFormsHelper.php | 12 +- .../src/Bundles/Form/Security/FormSecret.php | 2 +- .../Checks/BlacklistedKeywords.php | 2 +- .../Bundles/Form/SpamControl/FormInitTime.php | 2 +- .../Bundles/Form/Submissions/StatusChange.php | 2 +- .../Form/Submissions/SubmissionLimiter.php | 2 +- .../src/Bundles/GraphQL/GqlPermissions.php | 2 +- .../GraphQL/Resolvers/FieldResolver.php | 2 +- .../GraphQL/Resolvers/FormResolver.php | 7 +- .../GraphQL/Resolvers/FreeformResolver.php | 2 +- .../GraphQL/Resolvers/PageResolver.php | 10 +- .../Bundles/GraphQL/Resolvers/RowResolver.php | 10 +- .../GraphQL/Types/AbstractObjectType.php | 7 +- .../src/Bundles/GraphQL/Types/FieldType.php | 4 +- .../Types/SimpleObjects/KeyValueMapType.php | 2 +- .../Types/SimpleObjects/OptionsType.php | 2 +- .../Types/SimpleObjects/ScalesType.php | 2 +- .../plugin/src/Commands/PurgeController.php | 4 +- .../plugin/src/Controllers/ApiController.php | 74 +- .../src/Controllers/CodepackController.php | 21 +- .../plugin/src/Controllers/CrmController.php | 79 +- .../src/Controllers/DiagnosticsController.php | 7 +- .../src/Controllers/FeedsController.php | 7 +- .../src/Controllers/FieldsController.php | 56 +- .../src/Controllers/FileUploadController.php | 21 +- .../src/Controllers/FormsController.php | 13 +- .../Controllers/MailingListsController.php | 45 +- .../Migrations/NotificationsController.php | 2 +- .../Controllers/NotificationsController.php | 39 +- .../Controllers/PaymentGatewaysController.php | 36 +- .../Pro/ExportProfilesController.php | 18 - .../Payments/PaymentWebhooksController.php | 2 +- .../Pro/Payments/SubscriptionsController.php | 2 +- .../Controllers/Pro/QuickExportController.php | 10 - .../Controllers/Pro/WebhooksController.php | 31 +- .../Controllers/REST/FormsRESTController.php | 2 +- .../Controllers/REST/SettingsController.php | 4 +- .../src/Controllers/ResourcesController.php | 2 +- .../src/Controllers/SettingsController.php | 35 +- .../Controllers/SpamSubmissionsController.php | 15 +- .../src/Controllers/StatusesController.php | 21 +- .../src/Controllers/SubmissionsController.php | 45 +- .../src/Controllers/SubmitController.php | 12 +- .../src/Elements/Actions/ExportCSVAction.php | 54 +- .../Actions/SendNotificationAction.php | 36 +- packages/plugin/src/Elements/Submission.php | 25 +- .../src/Events/Forms/RenderTagEvent.php | 4 +- .../plugin/src/Fields/FileUploadField.php | 6 +- packages/plugin/src/Fields/HiddenField.php | 2 +- .../plugin/src/Fields/Pro/DatetimeField.php | 6 +- .../src/Fields/Pro/FileDragAndDropField.php | 6 +- .../Pro/Payments/CreditCardCvcField.php | 2 +- .../Pro/Payments/CreditCardDetailsField.php | 12 +- .../Pro/Payments/CreditCardExpiryField.php | 2 +- .../Pro/Payments/CreditCardNumberField.php | 2 +- .../plugin/src/Fields/Pro/RatingField.php | 4 +- packages/plugin/src/Fields/Pro/SaveField.php | 6 +- .../plugin/src/Fields/Pro/SignatureField.php | 12 +- packages/plugin/src/Fields/Pro/TableField.php | 6 +- packages/plugin/src/Fields/SubmitField.php | 12 +- packages/plugin/src/Fields/TextField.php | 2 +- packages/plugin/src/Freeform.php | 108 +- .../src/Integrations/CRM/ActiveCampaign.php | 24 +- .../plugin/src/Integrations/CRM/Freshdesk.php | 18 +- .../plugin/src/Integrations/CRM/HubSpot.php | 14 +- .../src/Integrations/CRM/Infusionsoft.php | 6 +- .../plugin/src/Integrations/CRM/Insightly.php | 6 +- .../plugin/src/Integrations/CRM/Pardot.php | 10 +- .../plugin/src/Integrations/CRM/PardotV5.php | 8 +- .../AbstractPipedriveIntegration.php | 18 +- .../src/Integrations/CRM/PipedriveDeals.php | 4 +- .../src/Integrations/CRM/PipedriveLeads.php | 4 +- .../src/Integrations/CRM/SalesforceLead.php | 36 +- .../CRM/SalesforceOpportunity.php | 40 +- .../src/Integrations/CRM/SharpSpring.php | 10 +- .../CRM/Zoho/AbstractZohoIntegration.php | 8 +- .../plugin/src/Integrations/CRM/ZohoDeal.php | 20 +- .../plugin/src/Integrations/CRM/ZohoLead.php | 4 +- .../MailingLists/ActiveCampaign.php | 8 +- .../Integrations/MailingLists/Campaign.php | 4 +- .../MailingLists/CampaignMonitor.php | 8 +- .../MailingLists/ConstantContact.php | 4 +- .../MailingLists/ConstantContact3.php | 6 +- .../Integrations/MailingLists/Dotmailer.php | 12 +- .../Integrations/MailingLists/MailChimp.php | 12 +- .../Actions/Stripe/SinglePaymentAction.php | 2 +- .../SubscriptionPaymentIntentAction.php | 2 +- .../Integrations/PaymentGateways/Stripe.php | 32 +- .../src/Jobs/PurgeUnfinalizedAssetsJob.php | 6 +- .../plugin/src/Library/Bags/BagInterface.php | 6 +- .../src/Library/Charts/LinearChartData.php | 4 +- .../src/Library/Charts/RadialChartData.php | 6 +- .../plugin/src/Library/Codepack/CodePack.php | 2 +- .../Composer/Components/FieldInterface.php | 80 +- .../Interfaces/ExternalOptionsInterface.php | 44 +- .../src/Library/Composer/Components/Form.php | 114 +- .../Composer/Components/Properties.php | 16 +- .../Properties/AbstractProperties.php | 14 +- .../Properties/PaymentProperties.php | 52 +- .../Properties/ValidationProperties.php | 8 +- .../Constraints/DateTimeConstraint.php | 2 +- .../Constraints/WebsiteConstraint.php | 2 +- .../plugin/src/Library/Composer/Composer.php | 10 +- .../CraftPluginConfiguration.php | 2 +- .../Connections/AbstractConnection.php | 8 +- .../Diagnostics/DiagnosticItem.php | 6 +- .../src/Library/DataObjects/EmailTemplate.php | 4 +- .../AbstractFormRenderObject.php | 2 +- .../DataObjects/FreeformFeed/Notification.php | 6 +- .../src/Library/DataObjects/SpamReason.php | 18 +- .../Library/Database/FormHandlerInterface.php | 26 +- .../Factories/PredefinedOptionsFactory.php | 8 +- .../plugin/src/Library/Helpers/FileHelper.php | 2 +- .../plugin/src/Library/Helpers/HashHelper.php | 4 +- .../plugin/src/Library/Helpers/IpUtils.php | 4 +- .../Integrations/CRM/CRMOAuthConnector.php | 6 +- .../Integrations/DataObjects/FieldObject.php | 18 +- .../AbstractMailingListIntegration.php | 2 +- .../MailingListOAuthConnector.php | 6 +- .../AbstractPaymentGatewayIntegration.php | 2 +- .../Library/Integrations/SettingBlueprint.php | 12 +- .../src/Library/Logging/FreeformLogger.php | 42 +- .../src/Library/Payments/PaymentInterface.php | 4 +- .../SubmissionHookHandler.php | 10 +- .../plugin/src/Library/Rules/BaseRule.php | 4 +- .../src/Library/Rules/FieldCriteria.php | 4 +- .../src/Library/Rules/RuleProperties.php | 4 +- .../plugin/src/Library/Session/Honeypot.php | 2 +- packages/plugin/src/Models/FieldModel.php | 6 +- .../src/Models/Pro/ExportProfileModel.php | 6 +- packages/plugin/src/Models/Settings.php | 70 +- .../plugin/src/Records/CrmFieldRecord.php | 2 +- .../plugin/src/Records/FeedMessageRecord.php | 2 +- packages/plugin/src/Records/FeedRecord.php | 2 +- packages/plugin/src/Records/FieldRecord.php | 4 +- packages/plugin/src/Records/FormRecord.php | 4 +- .../plugin/src/Records/IntegrationRecord.php | 8 +- .../src/Records/IntegrationsQueueRecord.php | 18 +- packages/plugin/src/Records/LockRecord.php | 2 +- .../src/Records/MailingListFieldRecord.php | 2 +- .../plugin/src/Records/MailingListRecord.php | 2 +- .../src/Records/NotificationLogRecord.php | 6 +- .../plugin/src/Records/NotificationRecord.php | 26 +- .../src/Records/Pro/ExportProfileRecord.php | 2 +- .../src/Records/Pro/ExportSettingRecord.php | 2 +- .../Records/Pro/Payments/PaymentRecord.php | 12 +- .../Pro/Payments/SubscriptionPlanRecord.php | 2 +- .../Pro/Payments/SubscriptionRecord.php | 2 +- .../plugin/src/Records/Pro/WebhookRecord.php | 4 +- .../plugin/src/Records/SavedFormRecord.php | 2 +- .../src/Records/SessionContextRecord.php | 2 +- .../plugin/src/Records/SpamReasonRecord.php | 4 +- packages/plugin/src/Records/StatusRecord.php | 4 +- .../src/Records/SubmissionNoteRecord.php | 4 +- .../src/Records/UnfinalizedFileRecord.php | 2 +- .../Services/AbstractIntegrationService.php | 16 +- packages/plugin/src/Services/CrmService.php | 4 +- .../src/Services/DiagnosticsService.php | 2 +- .../plugin/src/Services/FieldsService.php | 14 +- packages/plugin/src/Services/FilesService.php | 8 +- .../plugin/src/Services/FormTypesService.php | 2 +- .../src/Services/FreeformFeedService.php | 6 +- .../plugin/src/Services/HoneypotService.php | 10 +- .../plugin/src/Services/LoggerService.php | 2 +- .../plugin/src/Services/MailerService.php | 10 +- .../src/Services/NotificationsService.php | 8 +- .../plugin/src/Services/Pro/DigestService.php | 26 +- .../Services/Pro/ExportProfilesService.php | 10 +- .../Services/Pro/PayloadForwardingService.php | 2 +- .../Services/Pro/Payments/StripeService.php | 2 +- .../src/Services/Pro/WebhooksService.php | 10 +- .../src/Services/Pro/WidgetsService.php | 22 +- .../plugin/src/Services/SettingsService.php | 6 +- .../plugin/src/Services/StatusesService.php | 8 +- .../src/Services/SubmissionsService.php | 10 +- .../src/Widgets/Pro/FieldValuesWidget.php | 2 +- .../src/Widgets/Pro/LinearChartsWidget.php | 2 +- .../src/Widgets/Pro/RadialChartsWidget.php | 2 +- .../plugin/src/Widgets/Pro/RecentWidget.php | 2 +- ...47_AddUniqueTokenToSubmissionsAndForms.php | 2 +- .../m200203_180318_AddSpamReasonTable.php | 2 +- .../Unit/Library/Export/ExportCsvTest.php | 52 +- .../Unit/Library/Export/ExportJsonTest.php | 194 +- .../Unit/Library/Export/ExportTextTest.php | 28 +- .../Unit/Library/Export/ExportXmlTest.php | 206 +- 199 files changed, 2519 insertions(+), 2374 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 1ce3af3ba..b5763e07e 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -7,17 +7,17 @@ ->setRules([ '@Symfony' => true, '@Symfony:risky' => true, + '@PHP80Migration' => true, '@PHPUnit75Migration:risky' => true, '@PhpCsFixer' => true, 'array_indentation' => true, 'array_syntax' => ['syntax' => 'short'], 'combine_nested_dirname' => true, 'linebreak_after_opening_tag' => true, - 'list_syntax' => ['syntax' => 'long'], + 'list_syntax' => ['syntax' => 'short'], 'protected_to_private' => false, 'single_trait_insert_per_statement' => true, 'ternary_to_null_coalescing' => true, - 'visibility_required' => ['elements' => ['property', 'method']], ]) ->setRiskyAllowed(true) ->setFinder($finder); diff --git a/composer.json b/composer.json index 03484e045..09c8d56c5 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "solspace/craft-freeform", "description": "The most reliable, intuitive and powerful form builder for Craft.", - "version": "3.13.4", + "version": "4.0.0", "type": "craft-plugin", "authors": [ { @@ -10,8 +10,8 @@ } ], "require": { + "craftcms/cms": "^4.0.0-alpha.1", "composer/composer": "^1.0|^2.0.13", - "craftcms/cms": "^3.4.0", "symfony/property-access": "^2.8|^3.0|^4.0|^5.0", "symfony/finder": "^2.8|^3.0|^4.0|^5.0", "symfony/filesystem": "^2.8|^3.0|^4.0|^5.0", diff --git a/composer.lock b/composer.lock index 922a2b124..a4705a113 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a92b9b328c95181047d76b52f60bde0c", + "content-hash": "34c7f3ed9e593e08c2a66c17adacbc29", "packages": [ { "name": "cebe/markdown", @@ -70,6 +70,69 @@ }, "time": "2018-03-26T11:24:36+00:00" }, + { + "name": "commerceguys/addressing", + "version": "v1.2.2", + "source": { + "type": "git", + "url": "https://github.com/commerceguys/addressing.git", + "reference": "fb98dfc72f8a3d12fac55f69ab2477a0fbfa9860" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/commerceguys/addressing/zipball/fb98dfc72f8a3d12fac55f69ab2477a0fbfa9860", + "reference": "fb98dfc72f8a3d12fac55f69ab2477a0fbfa9860", + "shasum": "" + }, + "require": { + "doctrine/collections": "~1.0", + "php": ">=7.1.3" + }, + "require-dev": { + "mikey179/vfsstream": "1.*", + "phpunit/phpunit": "^7.5", + "squizlabs/php_codesniffer": "3.*", + "symfony/validator": "^4.4" + }, + "suggest": { + "symfony/validator": "to validate addresses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "CommerceGuys\\Addressing\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bojan Zivanovic" + }, + { + "name": "Damien Tournoud" + } + ], + "description": "Addressing library powered by CLDR and Google's address data.", + "keywords": [ + "address", + "internationalization", + "localization", + "postal" + ], + "support": { + "issues": "https://github.com/commerceguys/addressing/issues", + "source": "https://github.com/commerceguys/addressing/tree/v1.2.2" + }, + "time": "2021-10-30T12:33:41+00:00" + }, { "name": "composer/ca-bundle", "version": "1.3.1", @@ -613,77 +676,83 @@ }, { "name": "craftcms/cms", - "version": "3.7.34", + "version": "4.0.0-alpha.1", "source": { "type": "git", "url": "https://github.com/craftcms/cms.git", - "reference": "5176602f4ad33769dcee05ccafc0d4d8b894f80a" + "reference": "ba4088560abc22f4b57704ac4975a70c252122de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/craftcms/cms/zipball/5176602f4ad33769dcee05ccafc0d4d8b894f80a", - "reference": "5176602f4ad33769dcee05ccafc0d4d8b894f80a", + "url": "https://api.github.com/repos/craftcms/cms/zipball/ba4088560abc22f4b57704ac4975a70c252122de", + "reference": "ba4088560abc22f4b57704ac4975a70c252122de", "shasum": "" }, "require": { + "commerceguys/addressing": "^1.2", "composer/composer": "2.1.9", "craftcms/oauth2-craftid": "~1.0.0", "craftcms/plugin-installer": "~1.5.6", - "craftcms/server-check": "~1.2.0", + "craftcms/server-check": "~2.1.2", "creocoder/yii2-nested-sets": "~0.9.0", "elvanto/litemoji": "^3.0.1", - "enshrined/svg-sanitize": "~0.15.2", + "enshrined/svg-sanitize": "~0.15.0", + "ext-bcmath": "*", "ext-curl": "*", "ext-dom": "*", + "ext-intl": "*", "ext-json": "*", "ext-mbstring": "*", "ext-openssl": "*", "ext-pcre": "*", "ext-pdo": "*", "ext-zip": "*", - "guzzlehttp/guzzle": "^6.5.5|^7.2.0", - "laminas/laminas-feed": "~2.12.3|^2.13.1", - "league/flysystem": "^1.1.4", + "guzzlehttp/guzzle": "^7.2.0", + "illuminate/collections": "^9.1.0", "league/oauth2-client": "^2.6.0", "mikehaertl/php-shellcommand": "^1.6.3", - "php": ">=7.2.5", + "moneyphp/money": "^4.0", + "php": "^8.0.2", "pixelandtonic/imagine": "~1.2.4.1", "seld/cli-prompt": "^1.0.4", - "symfony/yaml": "^5.2.1", + "symfony/http-client": "^6.0.3", + "symfony/var-dumper": "^5.0|^6.0", + "symfony/yaml": "^5.2.3", + "theiconic/name-parser": "^1.2", "true/punycode": "^2.1.1", - "twig/twig": "~2.14.3", + "twig/twig": "~3.3.0", "voku/stringy": "^6.4.0", "webonyx/graphql-php": "~14.11.5", "yiisoft/yii2": "~2.0.45.0", "yiisoft/yii2-debug": "^2.1.16", "yiisoft/yii2-queue": "~2.3.2", - "yiisoft/yii2-swiftmailer": "^2.1.2" + "yiisoft/yii2-symfonymailer": "^2.0.0" }, "conflict": { "league/oauth2-client": "2.4.0" }, "provide": { - "bower-asset/inputmask": "~3.2.2 | ~3.3.5", - "bower-asset/jquery": "3.5.*@stable | 3.4.*@stable | 3.3.*@stable | 3.2.*@stable | 3.1.*@stable | 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable", + "bower-asset/inputmask": "~3.2.2|~3.3.5", + "bower-asset/jquery": "3.5.*@stable|3.4.*@stable|3.3.*@stable|3.2.*@stable|3.1.*@stable|2.2.*@stable|2.1.*@stable|1.11.*@stable|1.12.*@stable", "bower-asset/punycode": "1.3.*", "bower-asset/yii2-pjax": "~2.0.1", "yii2tech/ar-softdelete": "1.0.4" }, "require-dev": { - "codeception/codeception": "^4.0.0", - "codeception/module-asserts": "^1.0.0", - "codeception/module-datafactory": "^1.0.0", - "codeception/module-phpbrowser": "^1.0.0", - "codeception/module-rest": "^1.0.0", - "codeception/module-yii2": "^1.0.0", - "fzaninotto/faker": "^1.8", - "league/factory-muffin": "^3.0", - "vlucas/phpdotenv": "^3.0" + "codeception/codeception": "^4.1.29", + "codeception/module-asserts": "^1.3.1", + "codeception/module-datafactory": "^1.1.0", + "codeception/module-phpbrowser": "^1.0.2", + "codeception/module-rest": "^1.4.2", + "codeception/module-yii2": "^1.1.5", + "fakerphp/faker": "^1.19.0", + "league/factory-muffin": "^3.3.0", + "phpstan/phpstan": "^1.4.6", + "vlucas/phpdotenv": "^5.4.1" }, "suggest": { "ext-iconv": "Adds support for more character encodings than PHP’s built-in mb_convert_encoding() function, which Craft will take advantage of when converting strings to UTF-8.", - "ext-imagick": "Adds support for more image processing formats and options.", - "ext-intl": "Adds rich internationalization support." + "ext-imagick": "Adds support for more image processing formats and options." }, "type": "library", "autoload": { @@ -711,14 +780,14 @@ "yii2" ], "support": { - "docs": "https://craftcms.com/docs/3.x/", + "docs": "https://docs.craftcms.com/v3/", "email": "support@craftcms.com", "forum": "https://craftcms.stackexchange.com/", "issues": "https://github.com/craftcms/cms/issues?state=open", "rss": "https://github.com/craftcms/cms/releases.atom", "source": "https://github.com/craftcms/cms" }, - "time": "2022-02-22T18:34:09+00:00" + "time": "2022-03-01T20:40:43+00:00" }, { "name": "craftcms/oauth2-craftid", @@ -830,16 +899,16 @@ }, { "name": "craftcms/server-check", - "version": "1.2.3", + "version": "2.1.3", "source": { "type": "git", "url": "https://github.com/craftcms/server-check.git", - "reference": "9d8345bc7920b6657bd3fac396efee6bf8609ed6" + "reference": "1e052b2a4dc5751b7fe6f96fff5b89e4b1bba9d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/craftcms/server-check/zipball/9d8345bc7920b6657bd3fac396efee6bf8609ed6", - "reference": "9d8345bc7920b6657bd3fac396efee6bf8609ed6", + "url": "https://api.github.com/repos/craftcms/server-check/zipball/1e052b2a4dc5751b7fe6f96fff5b89e4b1bba9d9", + "reference": "1e052b2a4dc5751b7fe6f96fff5b89e4b1bba9d9", "shasum": "" }, "type": "library", @@ -868,7 +937,7 @@ "rss": "https://github.com/craftcms/server-check/releases.atom", "source": "https://github.com/craftcms/server-check" }, - "time": "2021-08-18T14:46:23+00:00" + "time": "2022-02-15T17:25:51+00:00" }, { "name": "creocoder/yii2-nested-sets", @@ -980,18 +1049,87 @@ }, "time": "2021-04-09T23:57:26+00:00" }, + { + "name": "doctrine/collections", + "version": "1.6.8", + "source": { + "type": "git", + "url": "https://github.com/doctrine/collections.git", + "reference": "1958a744696c6bb3bb0d28db2611dc11610e78af" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/collections/zipball/1958a744696c6bb3bb0d28db2611dc11610e78af", + "reference": "1958a744696c6bb3bb0d28db2611dc11610e78af", + "shasum": "" + }, + "require": { + "php": "^7.1.3 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9.0", + "phpstan/phpstan": "^0.12", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.1.5", + "vimeo/psalm": "^4.2.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Collections\\": "lib/Doctrine/Common/Collections" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.", + "homepage": "https://www.doctrine-project.org/projects/collections.html", + "keywords": [ + "array", + "collections", + "iterators", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/collections/issues", + "source": "https://github.com/doctrine/collections/tree/1.6.8" + }, + "time": "2021-08-10T18:51:53+00:00" + }, { "name": "doctrine/lexer", - "version": "1.2.2", + "version": "1.2.3", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "9c50f840f257bbb941e6f4a0e94ccf5db5c3f76c" + "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/9c50f840f257bbb941e6f4a0e94ccf5db5c3f76c", - "reference": "9c50f840f257bbb941e6f4a0e94ccf5db5c3f76c", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229", + "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229", "shasum": "" }, "require": { @@ -999,7 +1137,7 @@ }, "require-dev": { "doctrine/coding-standard": "^9.0", - "phpstan/phpstan": "1.3", + "phpstan/phpstan": "^1.3", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", "vimeo/psalm": "^4.11" }, @@ -1038,7 +1176,7 @@ ], "support": { "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/1.2.2" + "source": "https://github.com/doctrine/lexer/tree/1.2.3" }, "funding": [ { @@ -1054,7 +1192,7 @@ "type": "tidelift" } ], - "time": "2022-01-12T08:27:12+00:00" + "time": "2022-02-28T11:07:21+00:00" }, { "name": "egulias/email-validator", @@ -1656,39 +1794,40 @@ "time": "2020-11-26T19:24:33+00:00" }, { - "name": "justinrainbow/json-schema", - "version": "5.2.11", + "name": "illuminate/collections", + "version": "v9.3.1", "source": { "type": "git", - "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa" + "url": "https://github.com/illuminate/collections.git", + "reference": "3f4db0d7d1583a09b024e66370f30ee8b633f588" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/2ab6744b7296ded80f8cc4f9509abbff393399aa", - "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa", + "url": "https://api.github.com/repos/illuminate/collections/zipball/3f4db0d7d1583a09b024e66370f30ee8b633f588", + "reference": "3f4db0d7d1583a09b024e66370f30ee8b633f588", "shasum": "" }, "require": { - "php": ">=5.3.3" + "illuminate/conditionable": "^9.0", + "illuminate/contracts": "^9.0", + "illuminate/macroable": "^9.0", + "php": "^8.0.2" }, - "require-dev": { - "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1", - "json-schema/json-schema-test-suite": "1.2.0", - "phpunit/phpunit": "^4.8.35" + "suggest": { + "symfony/var-dumper": "Required to use the dump method (^6.0)." }, - "bin": [ - "bin/validate-json" - ], "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0.x-dev" + "dev-master": "9.x-dev" } }, "autoload": { + "files": [ + "helpers.php" + ], "psr-4": { - "JsonSchema\\": "src/JsonSchema/" + "Illuminate\\Support\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -1697,282 +1836,192 @@ ], "authors": [ { - "name": "Bruno Prieto Reis", - "email": "bruno.p.reis@gmail.com" - }, - { - "name": "Justin Rainbow", - "email": "justin.rainbow@gmail.com" - }, - { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch" - }, - { - "name": "Robert Schönthal", - "email": "seroscho@googlemail.com" + "name": "Taylor Otwell", + "email": "taylor@laravel.com" } ], - "description": "A library to validate a json schema.", - "homepage": "https://github.com/justinrainbow/json-schema", - "keywords": [ - "json", - "schema" - ], + "description": "The Illuminate Collections package.", + "homepage": "https://laravel.com", "support": { - "issues": "https://github.com/justinrainbow/json-schema/issues", - "source": "https://github.com/justinrainbow/json-schema/tree/5.2.11" + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" }, - "time": "2021-07-22T09:24:00+00:00" + "time": "2022-02-28T12:33:28+00:00" }, { - "name": "laminas/laminas-escaper", - "version": "2.9.0", + "name": "illuminate/conditionable", + "version": "v9.3.1", "source": { "type": "git", - "url": "https://github.com/laminas/laminas-escaper.git", - "reference": "891ad70986729e20ed2e86355fcf93c9dc238a5f" + "url": "https://github.com/illuminate/conditionable.git", + "reference": "56b4ba1166c264064bf63896f498a2bee320d16a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/891ad70986729e20ed2e86355fcf93c9dc238a5f", - "reference": "891ad70986729e20ed2e86355fcf93c9dc238a5f", + "url": "https://api.github.com/repos/illuminate/conditionable/zipball/56b4ba1166c264064bf63896f498a2bee320d16a", + "reference": "56b4ba1166c264064bf63896f498a2bee320d16a", "shasum": "" }, "require": { - "php": "^7.3 || ~8.0.0 || ~8.1.0" - }, - "conflict": { - "zendframework/zend-escaper": "*" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~2.3.0", - "phpunit/phpunit": "^9.3", - "psalm/plugin-phpunit": "^0.12.2", - "vimeo/psalm": "^3.16" - }, - "suggest": { - "ext-iconv": "*", - "ext-mbstring": "*" + "php": "^8.0.2" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.x-dev" + } + }, "autoload": { "psr-4": { - "Laminas\\Escaper\\": "src/" + "Illuminate\\Support\\": "" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" - ], - "description": "Securely and safely escape HTML, HTML attributes, JavaScript, CSS, and URLs", - "homepage": "https://laminas.dev", - "keywords": [ - "escaper", - "laminas" + "MIT" ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-escaper/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-escaper/issues", - "rss": "https://github.com/laminas/laminas-escaper/releases.atom", - "source": "https://github.com/laminas/laminas-escaper" - }, - "funding": [ + "authors": [ { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" + "name": "Taylor Otwell", + "email": "taylor@laravel.com" } ], - "time": "2021-09-02T17:10:53+00:00" + "description": "The Illuminate Conditionable package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2022-02-28T16:37:46+00:00" }, { - "name": "laminas/laminas-feed", - "version": "2.16.0", + "name": "illuminate/contracts", + "version": "v9.3.1", "source": { "type": "git", - "url": "https://github.com/laminas/laminas-feed.git", - "reference": "cbd0e10c867a1efa6594164d229d8caf4a4ae4c7" + "url": "https://github.com/illuminate/contracts.git", + "reference": "7cf6c0c9fc14a1ea4a9860d6e69b52e513cb505f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-feed/zipball/cbd0e10c867a1efa6594164d229d8caf4a4ae4c7", - "reference": "cbd0e10c867a1efa6594164d229d8caf4a4ae4c7", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/7cf6c0c9fc14a1ea4a9860d6e69b52e513cb505f", + "reference": "7cf6c0c9fc14a1ea4a9860d6e69b52e513cb505f", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-libxml": "*", - "laminas/laminas-escaper": "^2.9", - "laminas/laminas-stdlib": "^3.6", - "php": "^7.3 || ~8.0.0 || ~8.1.0" - }, - "conflict": { - "laminas/laminas-servicemanager": "<3.3", - "zendframework/zend-feed": "*" - }, - "require-dev": { - "laminas/laminas-cache": "^2.7.2", - "laminas/laminas-coding-standard": "~2.2.1", - "laminas/laminas-db": "^2.13.3", - "laminas/laminas-http": "^2.15", - "laminas/laminas-servicemanager": "^3.7", - "laminas/laminas-validator": "^2.15", - "phpunit/phpunit": "^9.5.5", - "psalm/plugin-phpunit": "^0.13.0", - "psr/http-message": "^1.0.1", - "vimeo/psalm": "^4.1" - }, - "suggest": { - "laminas/laminas-cache": "Laminas\\Cache component, for optionally caching feeds between requests", - "laminas/laminas-db": "Laminas\\Db component, for use with PubSubHubbub", - "laminas/laminas-http": "Laminas\\Http for PubSubHubbub, and optionally for use with Laminas\\Feed\\Reader", - "laminas/laminas-servicemanager": "Laminas\\ServiceManager component, for easily extending ExtensionManager implementations", - "laminas/laminas-validator": "Laminas\\Validator component, for validating email addresses used in Atom feeds and entries when using the Writer subcomponent", - "psr/http-message": "PSR-7 ^1.0.1, if you wish to use Laminas\\Feed\\Reader\\Http\\Psr7ResponseDecorator" + "php": "^8.0.2", + "psr/container": "^1.1.1|^2.0.1", + "psr/simple-cache": "^1.0|^2.0|^3.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.x-dev" + } + }, "autoload": { "psr-4": { - "Laminas\\Feed\\": "src/" + "Illuminate\\Contracts\\": "" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" - ], - "description": "provides functionality for consuming RSS and Atom feeds", - "homepage": "https://laminas.dev", - "keywords": [ - "feed", - "laminas" + "MIT" ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-feed/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-feed/issues", - "rss": "https://github.com/laminas/laminas-feed/releases.atom", - "source": "https://github.com/laminas/laminas-feed" - }, - "funding": [ + "authors": [ { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" + "name": "Taylor Otwell", + "email": "taylor@laravel.com" } ], - "time": "2021-12-17T09:12:35+00:00" + "description": "The Illuminate Contracts package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2022-03-03T14:08:19+00:00" }, { - "name": "laminas/laminas-stdlib", - "version": "3.7.1", + "name": "illuminate/macroable", + "version": "v9.3.0", "source": { "type": "git", - "url": "https://github.com/laminas/laminas-stdlib.git", - "reference": "bcd869e2fe88d567800057c1434f2380354fe325" + "url": "https://github.com/illuminate/macroable.git", + "reference": "25a2c6dac2b7541ecbadef952702e84ae15f5354" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/bcd869e2fe88d567800057c1434f2380354fe325", - "reference": "bcd869e2fe88d567800057c1434f2380354fe325", + "url": "https://api.github.com/repos/illuminate/macroable/zipball/25a2c6dac2b7541ecbadef952702e84ae15f5354", + "reference": "25a2c6dac2b7541ecbadef952702e84ae15f5354", "shasum": "" }, "require": { - "php": "^7.3 || ~8.0.0 || ~8.1.0" - }, - "conflict": { - "zendframework/zend-stdlib": "*" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~2.3.0", - "phpbench/phpbench": "^1.0", - "phpunit/phpunit": "^9.3.7", - "psalm/plugin-phpunit": "^0.16.0", - "vimeo/psalm": "^4.7" + "php": "^8.0.2" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.x-dev" + } + }, "autoload": { "psr-4": { - "Laminas\\Stdlib\\": "src/" + "Illuminate\\Support\\": "" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" - ], - "description": "SPL extensions, array utilities, error handlers, and more", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "stdlib" + "MIT" ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-stdlib/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-stdlib/issues", - "rss": "https://github.com/laminas/laminas-stdlib/releases.atom", - "source": "https://github.com/laminas/laminas-stdlib" - }, - "funding": [ + "authors": [ { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" + "name": "Taylor Otwell", + "email": "taylor@laravel.com" } ], - "time": "2022-01-21T15:50:46+00:00" + "description": "The Illuminate Macroable package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2022-02-01T14:44:21+00:00" }, { - "name": "league/flysystem", - "version": "1.1.9", + "name": "justinrainbow/json-schema", + "version": "5.2.11", "source": { "type": "git", - "url": "https://github.com/thephpleague/flysystem.git", - "reference": "094defdb4a7001845300334e7c1ee2335925ef99" + "url": "https://github.com/justinrainbow/json-schema.git", + "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/094defdb4a7001845300334e7c1ee2335925ef99", - "reference": "094defdb4a7001845300334e7c1ee2335925ef99", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/2ab6744b7296ded80f8cc4f9509abbff393399aa", + "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa", "shasum": "" }, "require": { - "ext-fileinfo": "*", - "league/mime-type-detection": "^1.3", - "php": "^7.2.5 || ^8.0" - }, - "conflict": { - "league/flysystem-sftp": "<1.0.6" + "php": ">=5.3.3" }, "require-dev": { - "phpspec/prophecy": "^1.11.1", - "phpunit/phpunit": "^8.5.8" - }, - "suggest": { - "ext-ftp": "Allows you to use FTP server storage", - "ext-openssl": "Allows you to use FTPS server storage", - "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", - "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", - "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", - "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", - "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", - "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", - "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", - "league/flysystem-webdav": "Allows you to use WebDAV storage", - "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", - "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", - "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" + "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1", + "json-schema/json-schema-test-suite": "1.2.0", + "phpunit/phpunit": "^4.8.35" }, + "bin": [ + "bin/validate-json" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "5.0.x-dev" } }, "autoload": { "psr-4": { - "League\\Flysystem\\": "src/" + "JsonSchema\\": "src/JsonSchema/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1981,14 +2030,100 @@ ], "authors": [ { - "name": "Frank de Jonge", - "email": "info@frenky.net" - } - ], - "description": "Filesystem abstraction: Many filesystems, one API.", - "keywords": [ - "Cloud Files", - "WebDAV", + "name": "Bruno Prieto Reis", + "email": "bruno.p.reis@gmail.com" + }, + { + "name": "Justin Rainbow", + "email": "justin.rainbow@gmail.com" + }, + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + }, + { + "name": "Robert Schönthal", + "email": "seroscho@googlemail.com" + } + ], + "description": "A library to validate a json schema.", + "homepage": "https://github.com/justinrainbow/json-schema", + "keywords": [ + "json", + "schema" + ], + "support": { + "issues": "https://github.com/justinrainbow/json-schema/issues", + "source": "https://github.com/justinrainbow/json-schema/tree/5.2.11" + }, + "time": "2021-07-22T09:24:00+00:00" + }, + { + "name": "league/flysystem", + "version": "1.1.9", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem.git", + "reference": "094defdb4a7001845300334e7c1ee2335925ef99" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/094defdb4a7001845300334e7c1ee2335925ef99", + "reference": "094defdb4a7001845300334e7c1ee2335925ef99", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "league/mime-type-detection": "^1.3", + "php": "^7.2.5 || ^8.0" + }, + "conflict": { + "league/flysystem-sftp": "<1.0.6" + }, + "require-dev": { + "phpspec/prophecy": "^1.11.1", + "phpunit/phpunit": "^8.5.8" + }, + "suggest": { + "ext-ftp": "Allows you to use FTP server storage", + "ext-openssl": "Allows you to use FTPS server storage", + "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", + "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", + "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", + "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", + "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", + "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", + "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", + "league/flysystem-webdav": "Allows you to use WebDAV storage", + "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", + "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", + "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Flysystem\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "description": "Filesystem abstraction: Many filesystems, one API.", + "keywords": [ + "Cloud Files", + "WebDAV", "abstraction", "aws", "cloud", @@ -2367,6 +2502,95 @@ }, "time": "2021-03-17T06:54:33+00:00" }, + { + "name": "moneyphp/money", + "version": "v4.0.3", + "source": { + "type": "git", + "url": "https://github.com/moneyphp/money.git", + "reference": "d945f775bd6ab0920d9d205813d8831a899a8844" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/moneyphp/money/zipball/d945f775bd6ab0920d9d205813d8831a899a8844", + "reference": "d945f775bd6ab0920d9d205813d8831a899a8844", + "shasum": "" + }, + "require": { + "ext-bcmath": "*", + "ext-filter": "*", + "ext-json": "*", + "php": "^8.0" + }, + "require-dev": { + "cache/taggable-cache": "^1.1.0", + "doctrine/coding-standard": "^9.0", + "doctrine/instantiator": "^1.4.0", + "ext-gmp": "*", + "ext-intl": "*", + "florianv/exchanger": "^2.6.3", + "florianv/swap": "^4.3.0", + "moneyphp/iso-currencies": "^3.2.1", + "php-http/message": "^1.11.0", + "php-http/mock-client": "^1.4.1", + "phpbench/phpbench": "1.0.0-beta1@BETA", + "phpspec/phpspec": "^7.0.1", + "phpunit/phpunit": "^9.5.4", + "psalm/plugin-phpunit": "^0.15.1", + "psr/cache": "^1.0.1", + "roave/infection-static-analysis-plugin": "^1.7", + "vimeo/psalm": "~4.7.0 || ^4.8.2" + }, + "suggest": { + "ext-gmp": "Calculate without integer limits", + "ext-intl": "Format Money objects with intl", + "florianv/exchanger": "Exchange rates library for PHP", + "florianv/swap": "Exchange rates library for PHP", + "psr/cache-implementation": "Used for Currency caching" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Money\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mathias Verraes", + "email": "mathias@verraes.net", + "homepage": "http://verraes.net" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + }, + { + "name": "Frederik Bosch", + "email": "f.bosch@genkgo.nl" + } + ], + "description": "PHP implementation of Fowler's Money pattern", + "homepage": "http://moneyphp.org", + "keywords": [ + "Value Object", + "money", + "vo" + ], + "support": { + "issues": "https://github.com/moneyphp/money/issues", + "source": "https://github.com/moneyphp/money/tree/v4.0.3" + }, + "time": "2021-12-01T10:39:00+00:00" + }, { "name": "monolog/monolog", "version": "2.3.5", @@ -2650,12 +2874,12 @@ } }, "autoload": { - "psr-4": { - "Opis\\Closure\\": "src/" - }, "files": [ "functions.php" - ] + ], + "psr-4": { + "Opis\\Closure\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3115,6 +3339,56 @@ }, "time": "2021-11-05T16:47:00+00:00" }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, + "time": "2019-01-08T18:20:26+00:00" + }, { "name": "psr/http-client", "version": "1.0.1", @@ -3698,16 +3972,16 @@ }, { "name": "stripe/stripe-php", - "version": "v7.114.0", + "version": "v7.116.0", "source": { "type": "git", "url": "https://github.com/stripe/stripe-php.git", - "reference": "63be231686c6874befb5b3a47fb8effb4c30b78b" + "reference": "7a39f594f213ed3f443a95adf769d1ecbc8393e7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/stripe/stripe-php/zipball/63be231686c6874befb5b3a47fb8effb4c30b78b", - "reference": "63be231686c6874befb5b3a47fb8effb4c30b78b", + "url": "https://api.github.com/repos/stripe/stripe-php/zipball/7a39f594f213ed3f443a95adf769d1ecbc8393e7", + "reference": "7a39f594f213ed3f443a95adf769d1ecbc8393e7", "shasum": "" }, "require": { @@ -3752,47 +4026,428 @@ ], "support": { "issues": "https://github.com/stripe/stripe-php/issues", - "source": "https://github.com/stripe/stripe-php/tree/v7.114.0" + "source": "https://github.com/stripe/stripe-php/tree/v7.116.0" }, - "time": "2022-02-15T22:48:31+00:00" + "time": "2022-03-02T15:51:15+00:00" }, { - "name": "swiftmailer/swiftmailer", - "version": "v6.3.0", + "name": "symfony/console", + "version": "v5.4.5", "source": { "type": "git", - "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "8a5d5072dca8f48460fce2f4131fcc495eec654c" + "url": "https://github.com/symfony/console.git", + "reference": "d8111acc99876953f52fe16d4c50eb60940d49ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/8a5d5072dca8f48460fce2f4131fcc495eec654c", - "reference": "8a5d5072dca8f48460fce2f4131fcc495eec654c", + "url": "https://api.github.com/repos/symfony/console/zipball/d8111acc99876953f52fe16d4c50eb60940d49ad", + "reference": "d8111acc99876953f52fe16d4c50eb60940d49ad", "shasum": "" }, "require": { - "egulias/email-validator": "^2.0|^3.1", - "php": ">=7.0.0", - "symfony/polyfill-iconv": "^1.0", - "symfony/polyfill-intl-idn": "^1.10", - "symfony/polyfill-mbstring": "^1.0" + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.9", + "symfony/polyfill-php80": "^1.16", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/string": "^5.1|^6.0" + }, + "conflict": { + "psr/log": ">=3", + "symfony/dependency-injection": "<4.4", + "symfony/dotenv": "<5.1", + "symfony/event-dispatcher": "<4.4", + "symfony/lock": "<4.4", + "symfony/process": "<4.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0" }, "require-dev": { - "mockery/mockery": "^1.0", - "symfony/phpunit-bridge": "^4.4|^5.4" + "psr/log": "^1|^2", + "symfony/config": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/event-dispatcher": "^4.4|^5.0|^6.0", + "symfony/lock": "^4.4|^5.0|^6.0", + "symfony/process": "^4.4|^5.0|^6.0", + "symfony/var-dumper": "^4.4|^5.0|^6.0" }, "suggest": { - "ext-intl": "Needed to support internationalized email addresses" + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v5.4.5" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-02-24T12:45:35+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "c726b64c1ccfe2896cb7df2e1331c357ad1c8ced" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/c726b64c1ccfe2896cb7df2e1331c357ad1c8ced", + "reference": "c726b64c1ccfe2896cb7df2e1331c357ad1c8ced", + "shasum": "" + }, + "require": { + "php": ">=8.0.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-11-01T23:48:49+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v6.0.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "6472ea2dd415e925b90ca82be64b8bc6157f3934" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/6472ea2dd415e925b90ca82be64b8bc6157f3934", + "reference": "6472ea2dd415e925b90ca82be64b8bc6157f3934", + "shasum": "" + }, + "require": { + "php": ">=8.0.2", + "symfony/event-dispatcher-contracts": "^2|^3" + }, + "conflict": { + "symfony/dependency-injection": "<5.4" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/error-handler": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/stopwatch": "^5.4|^6.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v6.0.3" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-01-02T09:55:41+00:00" + }, + { + "name": "symfony/event-dispatcher-contracts", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "aa5422287b75594b90ee9cd807caf8f0df491385" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/aa5422287b75594b90ee9cd807caf8f0df491385", + "reference": "aa5422287b75594b90ee9cd807caf8f0df491385", + "shasum": "" + }, + "require": { + "php": ">=8.0.2", + "psr/event-dispatcher": "^1" + }, + "suggest": { + "symfony/event-dispatcher-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.0.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-07-15T12:33:35+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v5.4.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "d53a45039974952af7f7ebc461ccdd4295e29440" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/d53a45039974952af7f7ebc461ccdd4295e29440", + "reference": "d53a45039974952af7f7ebc461ccdd4295e29440", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8", + "symfony/polyfill-php80": "^1.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v5.4.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-03-02T12:42:23+00:00" + }, + { + "name": "symfony/finder", + "version": "v5.4.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "231313534dded84c7ecaa79d14bc5da4ccb69b7d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/231313534dded84c7ecaa79d14bc5da4ccb69b7d", + "reference": "231313534dded84c7ecaa79d14bc5da4ccb69b7d", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-php80": "^1.16" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.2-dev" - } - }, "autoload": { - "files": [ - "lib/swift_required.php" + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -3800,91 +4455,80 @@ "MIT" ], "authors": [ - { - "name": "Chris Corbyn" - }, { "name": "Fabien Potencier", "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Swiftmailer, free feature-rich PHP mailer", - "homepage": "https://swiftmailer.symfony.com", - "keywords": [ - "email", - "mail", - "mailer" - ], + "description": "Finds files and directories via an intuitive fluent interface", + "homepage": "https://symfony.com", "support": { - "issues": "https://github.com/swiftmailer/swiftmailer/issues", - "source": "https://github.com/swiftmailer/swiftmailer/tree/v6.3.0" + "source": "https://github.com/symfony/finder/tree/v5.4.3" }, "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, { "url": "https://github.com/fabpot", "type": "github" }, { - "url": "https://tidelift.com/funding/github/packagist/swiftmailer/swiftmailer", + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "abandoned": "symfony/mailer", - "time": "2021-10-18T15:26:12+00:00" + "time": "2022-01-26T16:34:36+00:00" }, { - "name": "symfony/console", - "version": "v5.4.3", + "name": "symfony/http-client", + "version": "v6.0.5", "source": { "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "a2a86ec353d825c75856c6fd14fac416a7bdb6b8" + "url": "https://github.com/symfony/http-client.git", + "reference": "a8f87328930932c455cffd048f965d1223d91915" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/a2a86ec353d825c75856c6fd14fac416a7bdb6b8", - "reference": "a2a86ec353d825c75856c6fd14fac416a7bdb6b8", + "url": "https://api.github.com/repos/symfony/http-client/zipball/a8f87328930932c455cffd048f965d1223d91915", + "reference": "a8f87328930932c455cffd048f965d1223d91915", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.1|^6.0" - }, - "conflict": { - "psr/log": ">=3", - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" + "php": ">=8.0.2", + "psr/log": "^1|^2|^3", + "symfony/http-client-contracts": "^3", + "symfony/service-contracts": "^1.0|^2|^3" }, "provide": { - "psr/log-implementation": "1.0|2.0" + "php-http/async-client-implementation": "*", + "php-http/client-implementation": "*", + "psr/http-client-implementation": "1.0", + "symfony/http-client-implementation": "3.0" }, "require-dev": { - "psr/log": "^1|^2", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/lock": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" + "amphp/amp": "^2.5", + "amphp/http-client": "^4.2.1", + "amphp/http-tunnel": "^1.0", + "amphp/socket": "^1.1", + "guzzlehttp/promises": "^1.4", + "nyholm/psr7": "^1.0", + "php-http/httplug": "^1.0|^2.0", + "psr/http-client": "^1.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/http-kernel": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/stopwatch": "^5.4|^6.0" }, "type": "library", "autoload": { "psr-4": { - "Symfony\\Component\\Console\\": "" + "Symfony\\Component\\HttpClient\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -3896,24 +4540,18 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Eases the creation of beautiful and testable command line interfaces", + "description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously", "homepage": "https://symfony.com", - "keywords": [ - "cli", - "command line", - "console", - "terminal" - ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.3" + "source": "https://github.com/symfony/http-client/tree/v6.0.5" }, "funding": [ { @@ -3929,25 +4567,28 @@ "type": "tidelift" } ], - "time": "2022-01-26T16:28:35+00:00" + "time": "2022-02-27T08:47:28+00:00" }, { - "name": "symfony/deprecation-contracts", + "name": "symfony/http-client-contracts", "version": "v3.0.0", "source": { "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "c726b64c1ccfe2896cb7df2e1331c357ad1c8ced" + "url": "https://github.com/symfony/http-client-contracts.git", + "reference": "265f03fed057044a8e4dc159aa33596d0f48ed3f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/c726b64c1ccfe2896cb7df2e1331c357ad1c8ced", - "reference": "c726b64c1ccfe2896cb7df2e1331c357ad1c8ced", + "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/265f03fed057044a8e4dc159aa33596d0f48ed3f", + "reference": "265f03fed057044a8e4dc159aa33596d0f48ed3f", "shasum": "" }, "require": { "php": ">=8.0.2" }, + "suggest": { + "symfony/http-client-implementation": "" + }, "type": "library", "extra": { "branch-alias": { @@ -3959,9 +4600,9 @@ } }, "autoload": { - "files": [ - "function.php" - ] + "psr-4": { + "Symfony\\Contracts\\HttpClient\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3977,10 +4618,18 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "A generic function and convention to trigger deprecation notices", + "description": "Generic abstractions related to HTTP clients", "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.0" + "source": "https://github.com/symfony/http-client-contracts/tree/v3.0.0" }, "funding": [ { @@ -3996,32 +4645,42 @@ "type": "tidelift" } ], - "time": "2021-11-01T23:48:49+00:00" + "time": "2021-11-03T13:44:55+00:00" }, { - "name": "symfony/filesystem", - "version": "v5.4.3", + "name": "symfony/mailer", + "version": "v6.0.5", "source": { "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "0f0c4bf1840420f4aef3f32044a9dbb24682731b" + "url": "https://github.com/symfony/mailer.git", + "reference": "0f4772db6521a1beb44529aa2c0c1e56f671be8f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/0f0c4bf1840420f4aef3f32044a9dbb24682731b", - "reference": "0f0c4bf1840420f4aef3f32044a9dbb24682731b", + "url": "https://api.github.com/repos/symfony/mailer/zipball/0f4772db6521a1beb44529aa2c0c1e56f671be8f", + "reference": "0f4772db6521a1beb44529aa2c0c1e56f671be8f", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8", - "symfony/polyfill-php80": "^1.16" + "egulias/email-validator": "^2.1.10|^3", + "php": ">=8.0.2", + "psr/event-dispatcher": "^1", + "psr/log": "^1|^2|^3", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/mime": "^5.4|^6.0", + "symfony/service-contracts": "^1.1|^2|^3" + }, + "conflict": { + "symfony/http-kernel": "<5.4" + }, + "require-dev": { + "symfony/http-client-contracts": "^1.1|^2|^3", + "symfony/messenger": "^5.4|^6.0" }, "type": "library", "autoload": { "psr-4": { - "Symfony\\Component\\Filesystem\\": "" + "Symfony\\Component\\Mailer\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -4041,10 +4700,10 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Provides basic utilities for the filesystem", + "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.3" + "source": "https://github.com/symfony/mailer/tree/v6.0.5" }, "funding": [ { @@ -4060,31 +4719,45 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-02-25T10:48:52+00:00" }, { - "name": "symfony/finder", - "version": "v5.4.3", + "name": "symfony/mime", + "version": "v6.0.3", "source": { "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "231313534dded84c7ecaa79d14bc5da4ccb69b7d" + "url": "https://github.com/symfony/mime.git", + "reference": "2cd9601efd040e56f43360daa68f3c6b0534923a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/231313534dded84c7ecaa79d14bc5da4ccb69b7d", - "reference": "231313534dded84c7ecaa79d14bc5da4ccb69b7d", + "url": "https://api.github.com/repos/symfony/mime/zipball/2cd9601efd040e56f43360daa68f3c6b0534923a", + "reference": "2cd9601efd040e56f43360daa68f3c6b0534923a", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.0.2", + "symfony/polyfill-intl-idn": "^1.10", + "symfony/polyfill-mbstring": "^1.0" + }, + "conflict": { + "egulias/email-validator": "~3.0.0", + "phpdocumentor/reflection-docblock": "<3.2.2", + "phpdocumentor/type-resolver": "<1.4.0", + "symfony/mailer": "<5.4" + }, + "require-dev": { + "egulias/email-validator": "^2.1.10|^3.1", + "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/property-access": "^5.4|^6.0", + "symfony/property-info": "^5.4|^6.0", + "symfony/serializer": "^5.4|^6.0" }, "type": "library", "autoload": { "psr-4": { - "Symfony\\Component\\Finder\\": "" + "Symfony\\Component\\Mime\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -4104,10 +4777,14 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Finds files and directories via an intuitive fluent interface", + "description": "Allows manipulating MIME messages", "homepage": "https://symfony.com", + "keywords": [ + "mime", + "mime-type" + ], "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.3" + "source": "https://github.com/symfony/mime/tree/v6.0.3" }, "funding": [ { @@ -4123,11 +4800,11 @@ "type": "tidelift" } ], - "time": "2022-01-26T16:34:36+00:00" + "time": "2022-01-02T09:55:41+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", @@ -4189,7 +4866,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0" }, "funding": [ { @@ -4209,7 +4886,7 @@ }, { "name": "symfony/polyfill-iconv", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", @@ -4272,7 +4949,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-iconv/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-iconv/tree/v1.25.0" }, "funding": [ { @@ -4292,7 +4969,7 @@ }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", @@ -4353,7 +5030,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.25.0" }, "funding": [ { @@ -4373,7 +5050,7 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", @@ -4440,7 +5117,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.25.0" }, "funding": [ { @@ -4460,7 +5137,7 @@ }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", @@ -4524,7 +5201,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.25.0" }, "funding": [ { @@ -4544,7 +5221,7 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", @@ -4607,7 +5284,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0" }, "funding": [ { @@ -4627,7 +5304,7 @@ }, { "name": "symfony/polyfill-php72", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", @@ -4683,7 +5360,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.25.0" }, "funding": [ { @@ -4703,7 +5380,7 @@ }, { "name": "symfony/polyfill-php73", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", @@ -4762,7 +5439,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.25.0" }, "funding": [ { @@ -4782,16 +5459,16 @@ }, { "name": "symfony/polyfill-php80", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9" + "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/57b712b08eddb97c762a8caa32c84e037892d2e9", - "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4407588e0d3f1f52efb65fbe92babe41f37fe50c", + "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c", "shasum": "" }, "require": { @@ -4845,7 +5522,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.25.0" }, "funding": [ { @@ -4861,20 +5538,20 @@ "type": "tidelift" } ], - "time": "2021-09-13T13:58:33+00:00" + "time": "2022-03-04T08:16:47+00:00" }, { "name": "symfony/process", - "version": "v5.4.3", + "version": "v5.4.5", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "553f50487389a977eb31cf6b37faae56da00f753" + "reference": "95440409896f90a5f85db07a32b517ecec17fa4c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/553f50487389a977eb31cf6b37faae56da00f753", - "reference": "553f50487389a977eb31cf6b37faae56da00f753", + "url": "https://api.github.com/repos/symfony/process/zipball/95440409896f90a5f85db07a32b517ecec17fa4c", + "reference": "95440409896f90a5f85db07a32b517ecec17fa4c", "shasum": "" }, "require": { @@ -4907,7 +5584,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.3" + "source": "https://github.com/symfony/process/tree/v5.4.5" }, "funding": [ { @@ -4923,20 +5600,20 @@ "type": "tidelift" } ], - "time": "2022-01-26T16:28:35+00:00" + "time": "2022-01-30T18:16:22+00:00" }, { "name": "symfony/property-access", - "version": "v5.4.3", + "version": "v5.4.5", "source": { "type": "git", "url": "https://github.com/symfony/property-access.git", - "reference": "4bb27fab0c8b0cabdff8cc24ed4019bfbb380e96" + "reference": "95534d912f61117d3bce2d4456419ee2ee548d7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/property-access/zipball/4bb27fab0c8b0cabdff8cc24ed4019bfbb380e96", - "reference": "4bb27fab0c8b0cabdff8cc24ed4019bfbb380e96", + "url": "https://api.github.com/repos/symfony/property-access/zipball/95534d912f61117d3bce2d4456419ee2ee548d7a", + "reference": "95534d912f61117d3bce2d4456419ee2ee548d7a", "shasum": "" }, "require": { @@ -4988,7 +5665,7 @@ "reflection" ], "support": { - "source": "https://github.com/symfony/property-access/tree/v5.4.3" + "source": "https://github.com/symfony/property-access/tree/v5.4.5" }, "funding": [ { @@ -5004,7 +5681,7 @@ "type": "tidelift" } ], - "time": "2022-01-12T18:55:10+00:00" + "time": "2022-02-04T18:39:09+00:00" }, { "name": "symfony/property-info", @@ -5264,16 +5941,16 @@ }, { "name": "symfony/translation", - "version": "v6.0.3", + "version": "v6.0.6", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "71bb15335798f8c4da110911bcf2d2fead7a430d" + "reference": "f6639cb9b5e0c57fe31e3263b900a77eedb0c908" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/71bb15335798f8c4da110911bcf2d2fead7a430d", - "reference": "71bb15335798f8c4da110911bcf2d2fead7a430d", + "url": "https://api.github.com/repos/symfony/translation/zipball/f6639cb9b5e0c57fe31e3263b900a77eedb0c908", + "reference": "f6639cb9b5e0c57fe31e3263b900a77eedb0c908", "shasum": "" }, "require": { @@ -5339,7 +6016,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v6.0.3" + "source": "https://github.com/symfony/translation/tree/v6.0.6" }, "funding": [ { @@ -5355,7 +6032,7 @@ "type": "tidelift" } ], - "time": "2022-01-07T00:29:03+00:00" + "time": "2022-03-02T12:58:14+00:00" }, { "name": "symfony/translation-contracts", @@ -5435,6 +6112,94 @@ ], "time": "2021-09-07T12:43:40+00:00" }, + { + "name": "symfony/var-dumper", + "version": "v6.0.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "38358405ae948963c50a3aae3dfea598223ba15e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/38358405ae948963c50a3aae3dfea598223ba15e", + "reference": "38358405ae948963c50a3aae3dfea598223ba15e", + "shasum": "" + }, + "require": { + "php": ">=8.0.2", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "phpunit/phpunit": "<5.4.3", + "symfony/console": "<5.4" + }, + "require-dev": { + "ext-iconv": "*", + "symfony/console": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/uid": "^5.4|^6.0", + "twig/twig": "^2.13|^3.0.4" + }, + "suggest": { + "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", + "ext-intl": "To show region name in time zone dump", + "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" + }, + "bin": [ + "Resources/bin/var-dump-server" + ], + "type": "library", + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides mechanisms for walking through any arbitrary PHP variable", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "support": { + "source": "https://github.com/symfony/var-dumper/tree/v6.0.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-03-02T12:58:14+00:00" + }, { "name": "symfony/yaml", "version": "v5.4.3", @@ -5510,6 +6275,54 @@ ], "time": "2022-01-26T16:32:32+00:00" }, + { + "name": "theiconic/name-parser", + "version": "v1.2.11", + "source": { + "type": "git", + "url": "https://github.com/theiconic/name-parser.git", + "reference": "9a54a713bf5b2e7fd990828147d42de16bf8a253" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theiconic/name-parser/zipball/9a54a713bf5b2e7fd990828147d42de16bf8a253", + "reference": "9a54a713bf5b2e7fd990828147d42de16bf8a253", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "php-mock/php-mock-phpunit": "^2.1", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "TheIconic\\NameParser\\": [ + "src/", + "tests/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "The Iconic", + "email": "engineering@theiconic.com.au" + } + ], + "description": "PHP library for parsing a string containing a full name into its parts", + "support": { + "issues": "https://github.com/theiconic/name-parser/issues", + "source": "https://github.com/theiconic/name-parser/tree/v1.2.11" + }, + "time": "2019-11-14T14:08:48+00:00" + }, { "name": "true/punycode", "version": "v2.1.1", @@ -5562,23 +6375,22 @@ }, { "name": "twig/twig", - "version": "v2.14.11", + "version": "v3.3.8", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "66baa66f29ee30e487e05f1679903e36eb01d727" + "reference": "972d8604a92b7054828b539f2febb0211dd5945c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/66baa66f29ee30e487e05f1679903e36eb01d727", - "reference": "66baa66f29ee30e487e05f1679903e36eb01d727", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/972d8604a92b7054828b539f2febb0211dd5945c", + "reference": "972d8604a92b7054828b539f2febb0211dd5945c", "shasum": "" }, "require": { - "php": ">=7.1.3", + "php": ">=7.2.5", "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-mbstring": "^1.3", - "symfony/polyfill-php72": "^1.8" + "symfony/polyfill-mbstring": "^1.3" }, "require-dev": { "psr/container": "^1.0", @@ -5587,13 +6399,10 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.14-dev" + "dev-master": "3.3-dev" } }, "autoload": { - "psr-0": { - "Twig_": "lib/" - }, "psr-4": { "Twig\\": "src/" } @@ -5626,7 +6435,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v2.14.11" + "source": "https://github.com/twigphp/Twig/tree/v3.3.8" }, "funding": [ { @@ -5638,20 +6447,20 @@ "type": "tidelift" } ], - "time": "2022-02-04T06:57:25+00:00" + "time": "2022-02-04T06:59:48+00:00" }, { "name": "voku/anti-xss", - "version": "4.1.37", + "version": "4.1.38", "source": { "type": "git", "url": "https://github.com/voku/anti-xss.git", - "reference": "728e158427a263917f33b0a29eb75d866bd18d17" + "reference": "a659a2a502998146b5024cdf9d76a37f0d1b2492" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/voku/anti-xss/zipball/728e158427a263917f33b0a29eb75d866bd18d17", - "reference": "728e158427a263917f33b0a29eb75d866bd18d17", + "url": "https://api.github.com/repos/voku/anti-xss/zipball/a659a2a502998146b5024cdf9d76a37f0d1b2492", + "reference": "a659a2a502998146b5024cdf9d76a37f0d1b2492", "shasum": "" }, "require": { @@ -5697,7 +6506,7 @@ ], "support": { "issues": "https://github.com/voku/anti-xss/issues", - "source": "https://github.com/voku/anti-xss/tree/4.1.37" + "source": "https://github.com/voku/anti-xss/tree/4.1.38" }, "funding": [ { @@ -5721,7 +6530,7 @@ "type": "tidelift" } ], - "time": "2022-02-15T01:57:51+00:00" + "time": "2022-03-07T10:26:59+00:00" }, { "name": "voku/arrayy", @@ -6135,12 +6944,12 @@ }, "type": "library", "autoload": { - "psr-4": { - "Stringy\\": "src/" - }, "files": [ "src/Create.php" - ] + ], + "psr-4": { + "Stringy\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -6741,16 +7550,16 @@ "autoload": { "psr-4": { "yii\\queue\\": "src", - "yii\\queue\\amqp\\": "src/drivers/amqp", - "yii\\queue\\amqp_interop\\": "src/drivers/amqp_interop", - "yii\\queue\\beanstalk\\": "src/drivers/beanstalk", "yii\\queue\\db\\": "src/drivers/db", + "yii\\queue\\sqs\\": "src/drivers/sqs", + "yii\\queue\\amqp\\": "src/drivers/amqp", "yii\\queue\\file\\": "src/drivers/file", - "yii\\queue\\gearman\\": "src/drivers/gearman", - "yii\\queue\\redis\\": "src/drivers/redis", "yii\\queue\\sync\\": "src/drivers/sync", - "yii\\queue\\sqs\\": "src/drivers/sqs", - "yii\\queue\\stomp\\": "src/drivers/stomp" + "yii\\queue\\redis\\": "src/drivers/redis", + "yii\\queue\\stomp\\": "src/drivers/stomp", + "yii\\queue\\gearman\\": "src/drivers/gearman", + "yii\\queue\\beanstalk\\": "src/drivers/beanstalk", + "yii\\queue\\amqp_interop\\": "src/drivers/amqp_interop" } }, "notification-url": "https://packagist.org/downloads/", @@ -6798,46 +7607,36 @@ "time": "2021-12-30T08:42:00+00:00" }, { - "name": "yiisoft/yii2-swiftmailer", - "version": "2.1.3", + "name": "yiisoft/yii2-symfonymailer", + "version": "2.0.3", "source": { "type": "git", - "url": "https://github.com/yiisoft/yii2-swiftmailer.git", - "reference": "7b7ec871b4a63c0abbcd10e1ee3fb5be22f8b340" + "url": "https://github.com/yiisoft/yii2-symfonymailer.git", + "reference": "77baddfd806005604624ec58e6b55b18f31eeaaf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-swiftmailer/zipball/7b7ec871b4a63c0abbcd10e1ee3fb5be22f8b340", - "reference": "7b7ec871b4a63c0abbcd10e1ee3fb5be22f8b340", + "url": "https://api.github.com/repos/yiisoft/yii2-symfonymailer/zipball/77baddfd806005604624ec58e6b55b18f31eeaaf", + "reference": "77baddfd806005604624ec58e6b55b18f31eeaaf", "shasum": "" }, "require": { - "swiftmailer/swiftmailer": "~6.0", + "php": ">=7.4.0", + "symfony/mailer": ">=5.4.0", "yiisoft/yii2": ">=2.0.4" }, "require-dev": { - "cweagans/composer-patches": "^1.7", - "phpunit/phpunit": "4.8.34" + "phpunit/phpunit": "9.5.10" }, "type": "yii2-extension", "extra": { "branch-alias": { - "dev-master": "2.1.x-dev" - }, - "composer-exit-on-patch-failure": true, - "patches": { - "phpunit/phpunit-mock-objects": { - "Fix PHP 7 and 8 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_mock_objects.patch" - }, - "phpunit/phpunit": { - "Fix PHP 7 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_php7.patch", - "Fix PHP 8 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_php8.patch" - } + "dev-master": "2.0.x-dev" } }, "autoload": { "psr-4": { - "yii\\swiftmailer\\": "src" + "yii\\symfonymailer\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -6846,24 +7645,24 @@ ], "authors": [ { - "name": "Paul Klimov", - "email": "klimov.paul@gmail.com" + "name": "Kirill Petrov", + "email": "archibeardrinker@gmail.com" } ], - "description": "The SwiftMailer integration for the Yii framework", + "description": "The SymfonyMailer integration for the Yii framework", "keywords": [ "email", "mail", "mailer", - "swift", - "swiftmailer", + "symfony", + "symfonymailer", "yii2" ], "support": { "forum": "http://www.yiiframework.com/forum/", "irc": "irc://irc.freenode.net/yii", - "issues": "https://github.com/yiisoft/yii2-swiftmailer/issues", - "source": "https://github.com/yiisoft/yii2-swiftmailer", + "issues": "https://github.com/yiisoft/yii2-symfonymailer/issues", + "source": "https://github.com/yiisoft/yii2-symfonymailer", "wiki": "http://www.yiiframework.com/wiki/" }, "funding": [ @@ -6876,11 +7675,11 @@ "type": "open_collective" }, { - "url": "https://tidelift.com/funding/github/packagist/yiisoft/yii2-swiftmailer", + "url": "https://tidelift.com/funding/github/packagist/yiisoft/yii2-symfonymailer", "type": "tidelift" } ], - "time": "2021-12-30T08:48:48+00:00" + "time": "2022-02-10T13:42:46+00:00" } ], "packages-dev": [ @@ -6928,12 +7727,12 @@ } }, "autoload": { - "psr-4": { - "BrainMaestro\\GitHooks\\": "src/" - }, "files": [ "src/helpers.php" - ] + ], + "psr-4": { + "BrainMaestro\\GitHooks\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -7031,29 +7830,30 @@ }, { "name": "doctrine/instantiator", - "version": "1.4.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^8.0", + "doctrine/coding-standard": "^9", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.22" }, "type": "library", "autoload": { @@ -7080,7 +7880,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + "source": "https://github.com/doctrine/instantiator/tree/1.4.1" }, "funding": [ { @@ -7096,7 +7896,7 @@ "type": "tidelift" } ], - "time": "2020-11-10T18:47:58+00:00" + "time": "2022-03-03T08:28:38+00:00" }, { "name": "friendsofphp/php-cs-fixer", @@ -7189,28 +7989,29 @@ }, { "name": "myclabs/deep-copy", - "version": "1.10.2", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, - "replace": { - "myclabs/deep-copy": "self.version" + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" }, "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", "autoload": { @@ -7235,7 +8036,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" }, "funding": [ { @@ -7243,7 +8044,7 @@ "type": "tidelift" } ], - "time": "2020-11-13T09:40:50+00:00" + "time": "2022-03-03T13:19:32+00:00" }, { "name": "nikic/php-parser", @@ -7533,16 +8334,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.13", + "version": "9.2.15", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "deac8540cb7bd40b2b8cfa679b76202834fd04e8" + "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/deac8540cb7bd40b2b8cfa679b76202834fd04e8", - "reference": "deac8540cb7bd40b2b8cfa679b76202834fd04e8", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2e9da11878c4202f97915c1cb4bb1ca318a63f5f", + "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f", "shasum": "" }, "require": { @@ -7598,7 +8399,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.13" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.15" }, "funding": [ { @@ -7606,7 +8407,7 @@ "type": "github" } ], - "time": "2022-02-23T17:02:38+00:00" + "time": "2022-03-07T09:28:20+00:00" }, { "name": "phpunit/php-file-iterator", @@ -7851,16 +8652,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.16", + "version": "9.5.17", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "5ff8c545a50226c569310a35f4fa89d79f1ddfdc" + "reference": "5c5abcfaa2cbd44b2203995d7a339ef910fe0c8f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/5ff8c545a50226c569310a35f4fa89d79f1ddfdc", - "reference": "5ff8c545a50226c569310a35f4fa89d79f1ddfdc", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/5c5abcfaa2cbd44b2203995d7a339ef910fe0c8f", + "reference": "5c5abcfaa2cbd44b2203995d7a339ef910fe0c8f", "shasum": "" }, "require": { @@ -7938,7 +8739,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.16" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.17" }, "funding": [ { @@ -7950,7 +8751,7 @@ "type": "github" } ], - "time": "2022-02-23T17:10:58+00:00" + "time": "2022-03-05T16:54:31+00:00" }, { "name": "psr/cache", @@ -8001,56 +8802,6 @@ }, "time": "2021-02-03T23:26:27+00:00" }, - { - "name": "psr/event-dispatcher", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/event-dispatcher.git", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", - "shasum": "" - }, - "require": { - "php": ">=7.2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\EventDispatcher\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Standard interfaces for event handling.", - "keywords": [ - "events", - "psr", - "psr-14" - ], - "support": { - "issues": "https://github.com/php-fig/event-dispatcher/issues", - "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" - }, - "time": "2019-01-08T18:20:26+00:00" - }, { "name": "sebastian/cli-parser", "version": "1.0.1", @@ -9015,168 +9766,6 @@ ], "time": "2020-09-28T06:39:44+00:00" }, - { - "name": "symfony/event-dispatcher", - "version": "v6.0.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "6472ea2dd415e925b90ca82be64b8bc6157f3934" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/6472ea2dd415e925b90ca82be64b8bc6157f3934", - "reference": "6472ea2dd415e925b90ca82be64b8bc6157f3934", - "shasum": "" - }, - "require": { - "php": ">=8.0.2", - "symfony/event-dispatcher-contracts": "^2|^3" - }, - "conflict": { - "symfony/dependency-injection": "<5.4" - }, - "provide": { - "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0|3.0" - }, - "require-dev": { - "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/error-handler": "^5.4|^6.0", - "symfony/expression-language": "^5.4|^6.0", - "symfony/http-foundation": "^5.4|^6.0", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/stopwatch": "^5.4|^6.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.0.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-01-02T09:55:41+00:00" - }, - { - "name": "symfony/event-dispatcher-contracts", - "version": "v3.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "aa5422287b75594b90ee9cd807caf8f0df491385" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/aa5422287b75594b90ee9cd807caf8f0df491385", - "reference": "aa5422287b75594b90ee9cd807caf8f0df491385", - "shasum": "" - }, - "require": { - "php": ">=8.0.2", - "psr/event-dispatcher": "^1" - }, - "suggest": { - "symfony/event-dispatcher-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.0-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\EventDispatcher\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to dispatching event", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.0.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-07-15T12:33:35+00:00" - }, { "name": "symfony/options-resolver", "version": "v6.0.3", @@ -9246,7 +9835,7 @@ }, { "name": "symfony/polyfill-php81", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", @@ -9305,7 +9894,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.25.0" }, "funding": [ { @@ -9325,16 +9914,16 @@ }, { "name": "symfony/stopwatch", - "version": "v6.0.3", + "version": "v6.0.5", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "6835045bb9f00fa4486ea4f1bcaf623be761556f" + "reference": "f2c1780607ec6502f2121d9729fd8150a655d337" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/6835045bb9f00fa4486ea4f1bcaf623be761556f", - "reference": "6835045bb9f00fa4486ea4f1bcaf623be761556f", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/f2c1780607ec6502f2121d9729fd8150a655d337", + "reference": "f2c1780607ec6502f2121d9729fd8150a655d337", "shasum": "" }, "require": { @@ -9367,7 +9956,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v6.0.3" + "source": "https://github.com/symfony/stopwatch/tree/v6.0.5" }, "funding": [ { @@ -9383,7 +9972,7 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2022-02-21T17:15:17+00:00" }, { "name": "theseer/tokenizer", @@ -9438,7 +10027,9 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "craftcms/cms": 15 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/packages/plugin/src/Bundles/Form/Context/Request/EditSubmissionContext.php b/packages/plugin/src/Bundles/Form/Context/Request/EditSubmissionContext.php index e0f876ea7..ae868b6f5 100644 --- a/packages/plugin/src/Bundles/Form/Context/Request/EditSubmissionContext.php +++ b/packages/plugin/src/Bundles/Form/Context/Request/EditSubmissionContext.php @@ -12,7 +12,7 @@ class EditSubmissionContext { - const TOKEN_KEY = 'submissionToken'; + public const TOKEN_KEY = 'submissionToken'; public function __construct() { diff --git a/packages/plugin/src/Bundles/Form/Context/Session/SessionContext.php b/packages/plugin/src/Bundles/Form/Context/Session/SessionContext.php index 952f6c3c4..3f157b106 100644 --- a/packages/plugin/src/Bundles/Form/Context/Session/SessionContext.php +++ b/packages/plugin/src/Bundles/Form/Context/Session/SessionContext.php @@ -24,7 +24,7 @@ class SessionContext { - const KEY_HASH = 'formHash'; + public const KEY_HASH = 'formHash'; /** @var FormContextStorageInterface */ private $storage; @@ -200,7 +200,7 @@ public static function isFormPosted(Form $form): bool public static function getPostedFormId() { - list($formHash) = self::getPostedHashParts(); + [$formHash] = self::getPostedHashParts(); if (null === $formHash) { return null; } @@ -214,7 +214,7 @@ public static function isPagePosted(Form $form, Page $page): bool return false; } - list($_, $postedPageToken) = self::getPostedHashParts(); + [$_, $postedPageToken] = self::getPostedHashParts(); $postedPageIndex = HashHelper::decode($postedPageToken, $form->getId()); return $postedPageIndex === $page->getIndex(); @@ -224,7 +224,7 @@ public static function getFormSessionToken(Form $form): string { $formHash = self::getFormHash($form); - list($postedFormHash, $_, $postedSessionHash) = self::getPostedHashParts(); + [$postedFormHash, $_, $postedSessionHash] = self::getPostedHashParts(); if ($postedFormHash === $formHash) { return $postedSessionHash; } @@ -241,7 +241,7 @@ private static function getBagKey(Form $form) return null; } - list($formHash, $_, $sessionToken) = $parts; + [$formHash, $_, $sessionToken] = $parts; return $formHash.'-'.$sessionToken; } @@ -257,7 +257,7 @@ private static function getPostedHashParts(): array $parts = explode('-', $hash); if (3 === \count($parts)) { - list($formHash, $pageHash, $sessionToken) = $parts; + [$formHash, $pageHash, $sessionToken] = $parts; return [$formHash, $pageHash, $sessionToken]; } diff --git a/packages/plugin/src/Bundles/Form/Context/Session/StorageTypes/PayloadStorage.php b/packages/plugin/src/Bundles/Form/Context/Session/StorageTypes/PayloadStorage.php index 14335dc2b..e5f4eba4f 100644 --- a/packages/plugin/src/Bundles/Form/Context/Session/StorageTypes/PayloadStorage.php +++ b/packages/plugin/src/Bundles/Form/Context/Session/StorageTypes/PayloadStorage.php @@ -13,7 +13,7 @@ class PayloadStorage implements FormContextStorageInterface { - const INPUT_PREFIX = 'freeform_payload'; + public const INPUT_PREFIX = 'freeform_payload'; private $secret; diff --git a/packages/plugin/src/Bundles/Form/Context/Session/StorageTypes/SessionStorage.php b/packages/plugin/src/Bundles/Form/Context/Session/StorageTypes/SessionStorage.php index ab2447da1..3a99822a1 100644 --- a/packages/plugin/src/Bundles/Form/Context/Session/StorageTypes/SessionStorage.php +++ b/packages/plugin/src/Bundles/Form/Context/Session/StorageTypes/SessionStorage.php @@ -8,7 +8,7 @@ class SessionStorage implements FormContextStorageInterface { - const KEY = 'freeform_session'; + public const KEY = 'freeform_session'; /** @var SessionBag[] */ private $context; diff --git a/packages/plugin/src/Bundles/Form/ElementEdit/ElementEditBundle.php b/packages/plugin/src/Bundles/Form/ElementEdit/ElementEditBundle.php index c2eee5434..864899eec 100644 --- a/packages/plugin/src/Bundles/Form/ElementEdit/ElementEditBundle.php +++ b/packages/plugin/src/Bundles/Form/ElementEdit/ElementEditBundle.php @@ -15,7 +15,7 @@ class ElementEditBundle extends FeatureBundle { - const ELEMENT_KEY = 'elementId'; + public const ELEMENT_KEY = 'elementId'; public function __construct() { diff --git a/packages/plugin/src/Bundles/Form/EmailNotifications/DynamicRecipients.php b/packages/plugin/src/Bundles/Form/EmailNotifications/DynamicRecipients.php index 19f8a8ce5..298590eed 100644 --- a/packages/plugin/src/Bundles/Form/EmailNotifications/DynamicRecipients.php +++ b/packages/plugin/src/Bundles/Form/EmailNotifications/DynamicRecipients.php @@ -9,7 +9,7 @@ class DynamicRecipients extends FeatureBundle { - const BAG_KEY = 'dynamicNotification'; + public const BAG_KEY = 'dynamicNotification'; public function __construct() { diff --git a/packages/plugin/src/Bundles/Form/GoogleTagManager/GoogleTagManagerBundle.php b/packages/plugin/src/Bundles/Form/GoogleTagManager/GoogleTagManagerBundle.php index 96d832429..2d5fc8383 100644 --- a/packages/plugin/src/Bundles/Form/GoogleTagManager/GoogleTagManagerBundle.php +++ b/packages/plugin/src/Bundles/Form/GoogleTagManager/GoogleTagManagerBundle.php @@ -45,19 +45,19 @@ function (FormRenderEvent $event) { } $script = <<appendJsToOutput($script, [], View::POS_HEAD); $noScript = << -NOSCRIPT; + + NOSCRIPT; $event->appendHtmlToOutput($noScript, View::POS_BEGIN); } diff --git a/packages/plugin/src/Bundles/Form/HiddenInputs/FreeformActionInput.php b/packages/plugin/src/Bundles/Form/HiddenInputs/FreeformActionInput.php index f78ffacc1..9d20a6cfb 100644 --- a/packages/plugin/src/Bundles/Form/HiddenInputs/FreeformActionInput.php +++ b/packages/plugin/src/Bundles/Form/HiddenInputs/FreeformActionInput.php @@ -9,7 +9,7 @@ class FreeformActionInput extends FeatureBundle { - const NAME = 'freeform-action'; + public const NAME = 'freeform-action'; public function __construct() { diff --git a/packages/plugin/src/Bundles/Form/PayloadForwarding/PayloadForwarding.php b/packages/plugin/src/Bundles/Form/PayloadForwarding/PayloadForwarding.php index 8516ac09a..4b6896e4d 100644 --- a/packages/plugin/src/Bundles/Form/PayloadForwarding/PayloadForwarding.php +++ b/packages/plugin/src/Bundles/Form/PayloadForwarding/PayloadForwarding.php @@ -17,12 +17,12 @@ class PayloadForwarding extends FeatureBundle { - const BAG_KEY = 'postForwarding'; + public const BAG_KEY = 'postForwarding'; - const KEY_URL = 'url'; - const KEY_TRIGGER_PHRASE = 'triggerPhrase'; + public const KEY_URL = 'url'; + public const KEY_TRIGGER_PHRASE = 'triggerPhrase'; - const EVENT_POST_FORWARDING = 'postForwarding'; + public const EVENT_POST_FORWARDING = 'postForwarding'; public function __construct() { diff --git a/packages/plugin/src/Bundles/Form/SaveForm/LoadSavedForm.php b/packages/plugin/src/Bundles/Form/SaveForm/LoadSavedForm.php index 20d93094a..2e164e437 100644 --- a/packages/plugin/src/Bundles/Form/SaveForm/LoadSavedForm.php +++ b/packages/plugin/src/Bundles/Form/SaveForm/LoadSavedForm.php @@ -12,7 +12,7 @@ class LoadSavedForm extends FeatureBundle { - const EVENT_FORM_LOADED = 'form-loaded'; + public const EVENT_FORM_LOADED = 'form-loaded'; public function __construct() { @@ -33,7 +33,7 @@ public function loadSavedForm(RegisterContextEvent $event) return; } - list($key, $token) = SaveFormsHelper::getTokens($form); + [$key, $token] = SaveFormsHelper::getTokens($form); if (!$key || !$token) { return; } @@ -64,7 +64,7 @@ public function handleFinalizeForm(SubmitEvent $event) { $form = $event->getForm(); - list($key, $token) = SaveFormsHelper::getTokens($form); + [$key, $token] = SaveFormsHelper::getTokens($form); if (!$key || !$token) { return; } diff --git a/packages/plugin/src/Bundles/Form/SaveForm/SaveForm.php b/packages/plugin/src/Bundles/Form/SaveForm/SaveForm.php index 9ce50044a..c4987315e 100644 --- a/packages/plugin/src/Bundles/Form/SaveForm/SaveForm.php +++ b/packages/plugin/src/Bundles/Form/SaveForm/SaveForm.php @@ -22,12 +22,12 @@ class SaveForm extends FeatureBundle { - const SAVE_ACTION = 'save'; + public const SAVE_ACTION = 'save'; - const EVENT_SAVE_FORM = 'save-form'; + public const EVENT_SAVE_FORM = 'save-form'; - const CLEANUP_CACHE_KEY = 'save-and-continue-cleanup'; - const CLEANUP_CACHE_TTL = 60 * 60; // 1 hour + public const CLEANUP_CACHE_KEY = 'save-and-continue-cleanup'; + public const CLEANUP_CACHE_TTL = 60 * 60; // 1 hour public function __construct() { @@ -63,7 +63,7 @@ public function handleSave(HandleRequestEvent $event) } $isLoaded = SaveFormsHelper::isLoaded($form); - list($key, $token) = SaveFormsHelper::getTokens($form); + [$key, $token] = SaveFormsHelper::getTokens($form); $record = null; if ($isLoaded && $token && $key) { diff --git a/packages/plugin/src/Bundles/Form/SaveForm/SaveFormsHelper.php b/packages/plugin/src/Bundles/Form/SaveForm/SaveFormsHelper.php index 7817e6674..49a65dab9 100644 --- a/packages/plugin/src/Bundles/Form/SaveForm/SaveFormsHelper.php +++ b/packages/plugin/src/Bundles/Form/SaveForm/SaveFormsHelper.php @@ -6,13 +6,13 @@ class SaveFormsHelper { - const BAG_KEY_LOADED = 'savedSessionLoaded'; - const BAG_KEY_SAVED_SESSION = 'savedSession'; - const BAG_REDIRECT = 'savedFormRedirect'; + public const BAG_KEY_LOADED = 'savedSessionLoaded'; + public const BAG_KEY_SAVED_SESSION = 'savedSession'; + public const BAG_REDIRECT = 'savedFormRedirect'; - const PROPERTY_KEY = 'key'; - const PROPERTY_TOKEN = 'token'; - const PROPERTY_URL = 'url'; + public const PROPERTY_KEY = 'key'; + public const PROPERTY_TOKEN = 'token'; + public const PROPERTY_URL = 'url'; public static function isLoaded(Form $form): bool { diff --git a/packages/plugin/src/Bundles/Form/Security/FormSecret.php b/packages/plugin/src/Bundles/Form/Security/FormSecret.php index dd18dccc3..d32217d2a 100644 --- a/packages/plugin/src/Bundles/Form/Security/FormSecret.php +++ b/packages/plugin/src/Bundles/Form/Security/FormSecret.php @@ -10,7 +10,7 @@ class FormSecret extends FeatureBundle { - const KEY = 'secret'; + public const KEY = 'secret'; public function __construct() { diff --git a/packages/plugin/src/Bundles/Form/SpamControl/Checks/BlacklistedKeywords.php b/packages/plugin/src/Bundles/Form/SpamControl/Checks/BlacklistedKeywords.php index 20dd45081..ab5e8a11b 100644 --- a/packages/plugin/src/Bundles/Form/SpamControl/Checks/BlacklistedKeywords.php +++ b/packages/plugin/src/Bundles/Form/SpamControl/Checks/BlacklistedKeywords.php @@ -11,7 +11,7 @@ class BlacklistedKeywords extends AbstractCheck implements BundleInterface { - const SPAM_KEYWORD_TYPES = [ + public const SPAM_KEYWORD_TYPES = [ FieldInterface::TYPE_NUMBER, FieldInterface::TYPE_PHONE, FieldInterface::TYPE_REGEX, diff --git a/packages/plugin/src/Bundles/Form/SpamControl/FormInitTime.php b/packages/plugin/src/Bundles/Form/SpamControl/FormInitTime.php index f05159eb5..ae5377dda 100644 --- a/packages/plugin/src/Bundles/Form/SpamControl/FormInitTime.php +++ b/packages/plugin/src/Bundles/Form/SpamControl/FormInitTime.php @@ -12,7 +12,7 @@ class FormInitTime extends FeatureBundle { - const KEY = 'init-time'; + public const KEY = 'init-time'; public function __construct() { diff --git a/packages/plugin/src/Bundles/Form/Submissions/StatusChange.php b/packages/plugin/src/Bundles/Form/Submissions/StatusChange.php index 817bb1982..ab315c859 100644 --- a/packages/plugin/src/Bundles/Form/Submissions/StatusChange.php +++ b/packages/plugin/src/Bundles/Form/Submissions/StatusChange.php @@ -10,7 +10,7 @@ class StatusChange extends FeatureBundle { - const BAG_KEY_STATUS = 'status'; + public const BAG_KEY_STATUS = 'status'; public function __construct() { diff --git a/packages/plugin/src/Bundles/Form/Submissions/SubmissionLimiter.php b/packages/plugin/src/Bundles/Form/Submissions/SubmissionLimiter.php index 453e2c8ce..84799aceb 100644 --- a/packages/plugin/src/Bundles/Form/Submissions/SubmissionLimiter.php +++ b/packages/plugin/src/Bundles/Form/Submissions/SubmissionLimiter.php @@ -10,7 +10,7 @@ class SubmissionLimiter extends FeatureBundle { - const BAG_KEY = 'submissionLimit'; + public const BAG_KEY = 'submissionLimit'; public function __construct() { diff --git a/packages/plugin/src/Bundles/GraphQL/GqlPermissions.php b/packages/plugin/src/Bundles/GraphQL/GqlPermissions.php index fb3f72570..8b6033412 100644 --- a/packages/plugin/src/Bundles/GraphQL/GqlPermissions.php +++ b/packages/plugin/src/Bundles/GraphQL/GqlPermissions.php @@ -6,7 +6,7 @@ class GqlPermissions extends Gql { - const CATEGORY_FORMS = 'freeformForms'; + public const CATEGORY_FORMS = 'freeformForms'; public static function canQueryForms(): bool { diff --git a/packages/plugin/src/Bundles/GraphQL/Resolvers/FieldResolver.php b/packages/plugin/src/Bundles/GraphQL/Resolvers/FieldResolver.php index 672833e96..2fed5baaa 100644 --- a/packages/plugin/src/Bundles/GraphQL/Resolvers/FieldResolver.php +++ b/packages/plugin/src/Bundles/GraphQL/Resolvers/FieldResolver.php @@ -10,7 +10,7 @@ class FieldResolver extends Resolver { - public static function resolve($source, array $arguments, $context, ResolveInfo $resolveInfo) + public static function resolve($source, array $arguments, $context, ResolveInfo $resolveInfo): mixed { // @var AbstractField[] $fields if ($source instanceof Form) { diff --git a/packages/plugin/src/Bundles/GraphQL/Resolvers/FormResolver.php b/packages/plugin/src/Bundles/GraphQL/Resolvers/FormResolver.php index d9cac1c58..51ba333ff 100644 --- a/packages/plugin/src/Bundles/GraphQL/Resolvers/FormResolver.php +++ b/packages/plugin/src/Bundles/GraphQL/Resolvers/FormResolver.php @@ -7,17 +7,18 @@ use GraphQL\Type\Definition\ResolveInfo; use Solspace\Freeform\Bundles\GraphQL\GqlPermissions; use Solspace\Freeform\Freeform; +use Solspace\Freeform\Library\Composer\Components\Form; class FormResolver extends Resolver { - public static function resolve($source, array $arguments, $context, ResolveInfo $resolveInfo) + public static function resolve($source, array $arguments, $context, ResolveInfo $resolveInfo): mixed { $arguments = self::getArguments($arguments); return Freeform::getInstance()->forms->getResolvedForms($arguments); } - public static function resolveOne($source, array $arguments, $context, ResolveInfo $resolveInfo) + public static function resolveOne($source, array $arguments, $context, ResolveInfo $resolveInfo): ?Form { $arguments = self::getArguments($arguments); $arguments['limit'] = 1; @@ -32,7 +33,7 @@ public static function resolveOne($source, array $arguments, $context, ResolveIn return $form ?: null; } - private static function getArguments(array $arguments) + private static function getArguments(array $arguments): array { $formUids = GqlPermissions::allowedFormUids(); if ($formUids) { diff --git a/packages/plugin/src/Bundles/GraphQL/Resolvers/FreeformResolver.php b/packages/plugin/src/Bundles/GraphQL/Resolvers/FreeformResolver.php index 2382b982b..f6e244dd2 100644 --- a/packages/plugin/src/Bundles/GraphQL/Resolvers/FreeformResolver.php +++ b/packages/plugin/src/Bundles/GraphQL/Resolvers/FreeformResolver.php @@ -8,7 +8,7 @@ class FreeformResolver extends Resolver { - public static function resolve($source, array $arguments, $context, ResolveInfo $resolveInfo) + public static function resolve($source, array $arguments, $context, ResolveInfo $resolveInfo): mixed { return (object) [ 'version' => Freeform::getInstance()->getVersion(), diff --git a/packages/plugin/src/Bundles/GraphQL/Resolvers/PageResolver.php b/packages/plugin/src/Bundles/GraphQL/Resolvers/PageResolver.php index 5bf53d5ab..1ea91ff59 100644 --- a/packages/plugin/src/Bundles/GraphQL/Resolvers/PageResolver.php +++ b/packages/plugin/src/Bundles/GraphQL/Resolvers/PageResolver.php @@ -4,18 +4,10 @@ use craft\gql\base\Resolver; use GraphQL\Type\Definition\ResolveInfo; -use Solspace\Freeform\Library\Composer\Components\Form; -use Solspace\Freeform\Library\Composer\Components\Page; class PageResolver extends Resolver { - /** - * @param Form $source - * @param mixed $context - * - * @return Page[] - */ - public static function resolve($source, array $arguments, $context, ResolveInfo $resolveInfo) + public static function resolve($source, array $arguments, $context, ResolveInfo $resolveInfo): mixed { return $source->getLayout()->getPages(); } diff --git a/packages/plugin/src/Bundles/GraphQL/Resolvers/RowResolver.php b/packages/plugin/src/Bundles/GraphQL/Resolvers/RowResolver.php index a60b8c45e..cc2f1c211 100644 --- a/packages/plugin/src/Bundles/GraphQL/Resolvers/RowResolver.php +++ b/packages/plugin/src/Bundles/GraphQL/Resolvers/RowResolver.php @@ -4,18 +4,10 @@ use craft\gql\base\Resolver; use GraphQL\Type\Definition\ResolveInfo; -use Solspace\Freeform\Library\Composer\Components\Page; -use Solspace\Freeform\Library\Composer\Components\Row; class RowResolver extends Resolver { - /** - * @param Page $source - * @param mixed $context - * - * @return Row[] - */ - public static function resolve($source, array $arguments, $context, ResolveInfo $resolveInfo) + public static function resolve($source, array $arguments, $context, ResolveInfo $resolveInfo): mixed { return $source->getRows(); } diff --git a/packages/plugin/src/Bundles/GraphQL/Types/AbstractObjectType.php b/packages/plugin/src/Bundles/GraphQL/Types/AbstractObjectType.php index f2920966a..c9f2c3ce2 100644 --- a/packages/plugin/src/Bundles/GraphQL/Types/AbstractObjectType.php +++ b/packages/plugin/src/Bundles/GraphQL/Types/AbstractObjectType.php @@ -6,10 +6,11 @@ use GraphQL\Type\Definition\ResolveInfo; use GraphQL\Type\Definition\Type; use Symfony\Component\PropertyAccess\PropertyAccess; +use Symfony\Component\PropertyAccess\PropertyAccessor; abstract class AbstractObjectType extends ObjectType { - private static $propertyAccess; + private static PropertyAccessor $propertyAccess; public function __construct(array $config) { @@ -27,12 +28,12 @@ abstract public static function getName(): string; abstract public static function getTypeDefinition(): Type; - protected function resolve($source, $arguments, $context, ResolveInfo $resolveInfo) + protected function resolve($source, $arguments, $context, ResolveInfo $resolveInfo): mixed { return self::getPropertyAccess()->getValue($source, $resolveInfo->fieldName); } - private static function getPropertyAccess() + private static function getPropertyAccess(): PropertyAccessor { if (null === self::$propertyAccess) { self::$propertyAccess = PropertyAccess::createPropertyAccessor(); diff --git a/packages/plugin/src/Bundles/GraphQL/Types/FieldType.php b/packages/plugin/src/Bundles/GraphQL/Types/FieldType.php index 583bdc08b..416ca85bf 100644 --- a/packages/plugin/src/Bundles/GraphQL/Types/FieldType.php +++ b/packages/plugin/src/Bundles/GraphQL/Types/FieldType.php @@ -25,7 +25,7 @@ public static function resolveType($context = null): string return self::getType($context); } - public static function getType(FreeformFieldInterface $field) + public static function getType(FreeformFieldInterface $field): string { return self::getTypeFromString($field->getType()); } @@ -35,7 +35,7 @@ public static function getTypeFromString(string $typeName): string return 'FreeformField_'.StringHelper::toPascalCase($typeName); } - protected function resolve($source, $arguments, $context, ResolveInfo $resolveInfo) + protected function resolve($source, $arguments, $context, ResolveInfo $resolveInfo): mixed { if ('values' === $resolveInfo->fieldName) { $resolveInfo->fieldName = 'value'; diff --git a/packages/plugin/src/Bundles/GraphQL/Types/SimpleObjects/KeyValueMapType.php b/packages/plugin/src/Bundles/GraphQL/Types/SimpleObjects/KeyValueMapType.php index a55d6ec8a..dc1a277f1 100644 --- a/packages/plugin/src/Bundles/GraphQL/Types/SimpleObjects/KeyValueMapType.php +++ b/packages/plugin/src/Bundles/GraphQL/Types/SimpleObjects/KeyValueMapType.php @@ -19,7 +19,7 @@ public static function getTypeDefinition(): Type return KeyValueMapInterface::getType(); } - protected function resolve($source, $arguments, $context, ResolveInfo $resolveInfo) + protected function resolve($source, $arguments, $context, ResolveInfo $resolveInfo): mixed { if ('value' === $resolveInfo->fieldName) { return $source['value'] ?? null; diff --git a/packages/plugin/src/Bundles/GraphQL/Types/SimpleObjects/OptionsType.php b/packages/plugin/src/Bundles/GraphQL/Types/SimpleObjects/OptionsType.php index 06d598667..35047534d 100644 --- a/packages/plugin/src/Bundles/GraphQL/Types/SimpleObjects/OptionsType.php +++ b/packages/plugin/src/Bundles/GraphQL/Types/SimpleObjects/OptionsType.php @@ -25,7 +25,7 @@ public static function getTypeDefinition(): Type * @param mixed $arguments * @param mixed $context */ - protected function resolve($source, $arguments, $context, ResolveInfo $resolveInfo) + protected function resolve($source, $arguments, $context, ResolveInfo $resolveInfo): mixed { if ('value' === $resolveInfo->fieldName) { return $source->getValue() ?? null; diff --git a/packages/plugin/src/Bundles/GraphQL/Types/SimpleObjects/ScalesType.php b/packages/plugin/src/Bundles/GraphQL/Types/SimpleObjects/ScalesType.php index 10868cb28..2f7a8fb49 100644 --- a/packages/plugin/src/Bundles/GraphQL/Types/SimpleObjects/ScalesType.php +++ b/packages/plugin/src/Bundles/GraphQL/Types/SimpleObjects/ScalesType.php @@ -25,7 +25,7 @@ public static function getTypeDefinition(): Type * @param mixed $arguments * @param mixed $context */ - protected function resolve($source, $arguments, $context, ResolveInfo $resolveInfo) + protected function resolve($source, $arguments, $context, ResolveInfo $resolveInfo): mixed { if ('value' === $resolveInfo->fieldName) { return $source['value'] ?? null; diff --git a/packages/plugin/src/Commands/PurgeController.php b/packages/plugin/src/Commands/PurgeController.php index 4979a9678..4a2d67176 100644 --- a/packages/plugin/src/Commands/PurgeController.php +++ b/packages/plugin/src/Commands/PurgeController.php @@ -56,7 +56,7 @@ public function actionSubmissions(): int $string = $this->ansiFormat('days old...', Console::FG_BLUE); $this->stdout("Purging submissions which are at least {$ageYellow} {$string}\n\n", Console::FG_BLUE); - list($submissions, $assets) = Freeform::getInstance()->submissions->purgeSubmissions($age); + [$submissions, $assets] = Freeform::getInstance()->submissions->purgeSubmissions($age); $this->echoSubmissionCount($submissions); $this->echoAssetCount($assets); @@ -78,7 +78,7 @@ public function actionSpam(): int $string = $this->ansiFormat('days old...', Console::FG_BLUE); $this->stdout("Purging spam submissions which are at least {$ageYellow} {$string}\n\n", Console::FG_BLUE); - list($submissions, $assets) = Freeform::getInstance()->spamSubmissions->purgeSubmissions($age); + [$submissions, $assets] = Freeform::getInstance()->spamSubmissions->purgeSubmissions($age); $this->echoSubmissionCount($submissions); $this->echoAssetCount($assets); diff --git a/packages/plugin/src/Controllers/ApiController.php b/packages/plugin/src/Controllers/ApiController.php index c015eefff..b8ddbde84 100644 --- a/packages/plugin/src/Controllers/ApiController.php +++ b/packages/plugin/src/Controllers/ApiController.php @@ -29,8 +29,6 @@ use Solspace\Freeform\Models\FieldModel; use Solspace\Freeform\Records\NotificationRecord; use yii\base\Exception; -use yii\web\BadRequestHttpException; -use yii\web\ForbiddenHttpException; use yii\web\Response; class ApiController extends BaseController @@ -40,11 +38,6 @@ public function actionForm(): Response return \Craft::$app->runAction('freeform/submit'); } - /** - * GET fields. - * - * @throws ForbiddenHttpException - */ public function actionFields(): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_FORMS_ACCESS); @@ -52,11 +45,6 @@ public function actionFields(): Response return $this->asJson($this->getFieldsService()->getAllFields(false)); } - /** - * GET notifications. - * - * @throws ForbiddenHttpException - */ public function actionNotifications(): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_FORMS_ACCESS); @@ -64,11 +52,6 @@ public function actionNotifications(): Response return $this->asJson($this->getNotificationsService()->getAllNotifications(false)); } - /** - * GET mailing lists. - * - * @throws ForbiddenHttpException - */ public function actionMailingLists(): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_FORMS_ACCESS); @@ -81,11 +64,6 @@ public function actionMailingLists(): Response return $this->asJson($mailingLists); } - /** - * GET integrations. - * - * @throws ForbiddenHttpException - */ public function actionCrmIntegrations(): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_FORMS_ACCESS); @@ -97,18 +75,13 @@ public function actionCrmIntegrations(): Response try { $integration->getFields(); } catch (\Exception $e) { - return $this->asErrorJson($e->getMessage()); + return $this->asFailure($e->getMessage()); } } return $this->asJson($crmIntegrations); } - /** - * GET payment gateways. - * - * @throws ForbiddenHttpException - */ public function actionPaymentGateways(): Response { //TODO: add separate function to query single gateway? @@ -122,11 +95,6 @@ public function actionPaymentGateways(): Response return $this->asJson($paymentGateways); } - /** - * POST payment plans. - * - * @throws ForbiddenHttpException - */ public function actionPaymentPlans(): Response { $this->requirePostRequest(); @@ -176,11 +144,6 @@ public function actionPaymentPlans(): Response return $this->asJson(['success' => false, 'errors' => $errors]); } - /** - * GET fields. - * - * @throws ForbiddenHttpException - */ public function actionFormTemplates(): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_FORMS_ACCESS); @@ -188,12 +151,6 @@ public function actionFormTemplates(): Response return $this->asJson($this->getSettingsService()->getCustomFormTemplates()); } - /** - * POST a field, and save it to the database. - * - * @throws \Exception - * @throws BadRequestHttpException - */ public function actionQuickCreateField(): Response { $this->requirePostRequest(); @@ -245,13 +202,6 @@ function ($array) use (&$errors) { return $this->asJson(['success' => false, 'errors' => $errors]); } - /** - * POST a field, and save it to the database. - * - * @throws \yii\base\InvalidParamException - * @throws \yii\base\ErrorException - * @throws BadRequestHttpException - */ public function actionQuickCreateNotification(): Response { $this->requirePostRequest(); @@ -311,12 +261,6 @@ public function actionQuickCreateNotification(): Response return $this->asJson(['success' => false, 'errors' => $errors]); } - /** - * Returns the data needed to display a Submissions chart. - * - * @throws Exception - * @throws ForbiddenHttpException - */ public function actionGetSubmissionData(): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_SUBMISSIONS_ACCESS); @@ -324,7 +268,7 @@ public function actionGetSubmissionData(): Response // Required for Dashboard widget, unnecessary for Entries Index view $source = \Craft::$app->request->post('source'); $formId = null; - if ($source && 0 === strpos($source, 'form:')) { + if ($source && str_starts_with($source, 'form:')) { $formId = (int) substr($source, 5); } elseif ('*' === $source) { $isAdmin = PermissionHelper::isAdmin(); @@ -407,18 +351,11 @@ public function actionGetSubmissionData(): Response ); } - /** - * Mark the tutorial as finished. - */ public function actionFinishTutorial(): Response { return $this->asJson(['success' => $this->getSettingsService()->finishTutorial()]); } - /** - * @throws BadRequestHttpException - * @throws ForbiddenHttpException - */ public function actionOptionsFromSource(): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_FORMS_MANAGE); @@ -438,9 +375,6 @@ public function actionOptionsFromSource(): Response return $this->asJson(['data' => $options]); } - /** - * @throws Exception - */ private function getRunChartDataFromQuery( Query $query, \DateTime $startDate, @@ -459,8 +393,6 @@ private function getRunChartDataFromQuery( $options ); - $isMysql = \Craft::$app->getDb()->getIsMysql(); - if ($options['intervalUnit'] && \in_array($options['intervalUnit'], ['year', 'month', 'day', 'hour'], true)) { $intervalUnit = $options['intervalUnit']; } else { @@ -493,8 +425,6 @@ private function getRunChartDataFromQuery( throw new Exception('Invalid interval unit: '.$intervalUnit); } - $sqlGroup[] = '[[date]]'; - // Assemble the data $rows = []; diff --git a/packages/plugin/src/Controllers/CodepackController.php b/packages/plugin/src/Controllers/CodepackController.php index 6749136f6..17171ccd3 100644 --- a/packages/plugin/src/Controllers/CodepackController.php +++ b/packages/plugin/src/Controllers/CodepackController.php @@ -20,15 +20,14 @@ use Solspace\Freeform\Library\Codepack\Exceptions\Manifest\ManifestNotPresentException; use Solspace\Freeform\Resources\Bundles\CodepackBundle; use yii\base\InvalidParamException; -use yii\web\BadRequestHttpException; use yii\web\ForbiddenHttpException; use yii\web\Response; class CodepackController extends BaseController { - const FLASH_VAR_KEY = 'codepack_prefix'; + public const FLASH_VAR_KEY = 'codepack_prefix'; - public function init() + public function init(): void { PermissionHelper::requirePermission(Freeform::PERMISSION_SETTINGS_ACCESS); @@ -71,14 +70,6 @@ public function actionListContents(): Response ); } - /** - * Perform the install feats. - * - * @throws CodepackException - * @throws ForbiddenHttpException - * @throws BadRequestHttpException - * @throws InvalidParamException - */ public function actionInstall(): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_SETTINGS_ACCESS); @@ -108,13 +99,7 @@ public function actionInstall(): Response return $this->redirectToPostedUrl(); } - /** - * @throws InvalidParamException - * @throws CodepackException - * - * @return CodePack|Response - */ - private function getCodepack() + private function getCodepack(): CodePack|Response { try { $codePack = new CodePack(__DIR__.'/../codepack'); diff --git a/packages/plugin/src/Controllers/CrmController.php b/packages/plugin/src/Controllers/CrmController.php index 6132074b4..209453eec 100644 --- a/packages/plugin/src/Controllers/CrmController.php +++ b/packages/plugin/src/Controllers/CrmController.php @@ -25,18 +25,12 @@ use Solspace\Freeform\Resources\Bundles\CrmBundle; use Solspace\Freeform\Resources\Bundles\IntegrationsBundle; use Solspace\Freeform\Services\CrmService; -use yii\base\InvalidParamException; -use yii\web\BadRequestHttpException; -use yii\web\ForbiddenHttpException; use yii\web\HttpException; use yii\web\Response; class CrmController extends Controller { - /** - * Make sure this controller requires a logged in member. - */ - public function init() + public function init(): void { if (!\Craft::$app->request->getIsConsoleRequest()) { $this->requireLogin(); @@ -45,12 +39,6 @@ public function init() parent::init(); } - /** - * Presents a list of all CRM integrations. - * - * @throws ForbiddenHttpException - * @throws InvalidParamException - */ public function actionIndex(): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_SETTINGS_ACCESS); @@ -68,13 +56,6 @@ public function actionIndex(): Response ); } - /** - * @throws \yii\base\InvalidParamException - * @throws \ReflectionException - * @throws ForbiddenHttpException - * @throws IntegrationException - * @throws \Exception - */ public function actionCreate(): Response { $model = IntegrationModel::create(IntegrationRecord::TYPE_CRM); @@ -83,12 +64,7 @@ public function actionCreate(): Response return $this->renderEditForm($model, $title); } - /** - * @param null|int $id - * - * @throws HttpException - */ - public function actionEdit($id = null, IntegrationModel $model = null): Response + public function actionEdit(int $id = null, IntegrationModel $model = null): Response { if (null === $model) { if (is_numeric($id)) { @@ -107,16 +83,7 @@ public function actionEdit($id = null, IntegrationModel $model = null): Response return $this->renderEditForm($model, $model->name); } - /** - * Saves an integration. - * - * @throws ForbiddenHttpException - * @throws BadRequestHttpException - * @throws \ReflectionException - * @throws IntegrationException - * @throws \Exception - */ - public function actionSave() + public function actionSave(): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_SETTINGS_ACCESS); @@ -197,11 +164,6 @@ public function actionSave() return $this->renderEditForm($model, $model->name); } - /** - * Checks integration connection. - * - * @throws IntegrationException - */ public function actionCheckIntegrationConnection(): Response { $id = \Craft::$app->request->post('id'); @@ -222,12 +184,6 @@ public function actionCheckIntegrationConnection(): Response } } - /** - * Checks integration connection. - * - * @throws IntegrationException - * @throws \Exception - */ public function actionForceAuthorization(string $handle) { $model = $this->getCRMService()->getIntegrationByHandle($handle); @@ -251,13 +207,6 @@ public function actionForceAuthorization(string $handle) $this->redirect(UrlHelper::cpUrl('freeform/settings/crm/'.$model->id)); } - /** - * Deletes a CRM integration. - * - * @throws BadRequestHttpException - * @throws ForbiddenHttpException - * @throws \Exception - */ public function actionDelete(): Response { $this->requirePostRequest(); @@ -269,13 +218,6 @@ public function actionDelete(): Response return $this->asJson(['success' => true]); } - /** - * @throws \ReflectionException - * @throws InvalidParamException - * @throws IntegrationException - * @throws \Exception - * @throws ForbiddenHttpException - */ private function renderEditForm(IntegrationModel $model, string $title): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_SETTINGS_ACCESS); @@ -320,18 +262,13 @@ private function getNewOrExistingIntegration(int $id = null): IntegrationModel return $model; } - /** - * Handle OAuth2 authorization. - * - * @return null|Response - */ - private function handleAuthorization(IntegrationModel $model) + private function handleAuthorization(IntegrationModel $model): void { $integration = $model->getIntegrationObject(); $code = \Craft::$app->request->getParam('code'); if (!$integration instanceof CRMOAuthConnector || empty($code)) { - return null; + return; } $accessToken = $integration->fetchAccessToken(); @@ -344,11 +281,13 @@ private function handleAuthorization(IntegrationModel $model) \Craft::$app->session->setNotice(Freeform::t('CRM Integration saved')); \Craft::$app->session->setFlash('CRM Integration saved'); - return $this->redirect(UrlHelper::cpUrl('freeform/settings/crm/'.$model->id)); + $this->redirect(UrlHelper::cpUrl('freeform/settings/crm/'.$model->id)); + + return; } \Craft::$app->session->setError(Freeform::t('CRM Integration not saved')); - return $this->redirect(UrlHelper::cpUrl('freeform/settings/crm/'.$model->id)); + $this->redirect(UrlHelper::cpUrl('freeform/settings/crm/'.$model->id)); } } diff --git a/packages/plugin/src/Controllers/DiagnosticsController.php b/packages/plugin/src/Controllers/DiagnosticsController.php index 9e377602a..29325a337 100644 --- a/packages/plugin/src/Controllers/DiagnosticsController.php +++ b/packages/plugin/src/Controllers/DiagnosticsController.php @@ -14,10 +14,11 @@ use Solspace\Freeform\Freeform; use Solspace\Freeform\Resources\Bundles\DiagnosticsBundle; +use yii\web\Response; class DiagnosticsController extends BaseController { - public function actionIndex() + public function actionIndex(): Response { \Craft::$app->view->registerAssetBundle(DiagnosticsBundle::class); @@ -28,7 +29,7 @@ public function actionIndex() $checks = $diagnostics->getFreeformChecks(); $combined = array_merge($server, $stats, $checks); - list($warnings, $suggestions) = $this->compileBanners($combined); + [$warnings, $suggestions] = $this->compileBanners($combined); return $this->renderTemplate( 'freeform/settings/_diagnostics', @@ -47,7 +48,7 @@ private function compileBanners($items): array $warnings = $suggestions = []; foreach ($items as $item) { if (\is_array($item)) { - list($subWarnings, $subSuggestions) = $this->compileBanners($item); + [$subWarnings, $subSuggestions] = $this->compileBanners($item); $warnings = array_merge($warnings, $subWarnings); $suggestions = array_merge($suggestions, $subSuggestions); diff --git a/packages/plugin/src/Controllers/FeedsController.php b/packages/plugin/src/Controllers/FeedsController.php index 2785285df..b8dadd527 100644 --- a/packages/plugin/src/Controllers/FeedsController.php +++ b/packages/plugin/src/Controllers/FeedsController.php @@ -3,17 +3,18 @@ namespace Solspace\Freeform\Controllers; use Solspace\Freeform\Freeform; +use yii\web\Response; class FeedsController extends BaseController { - public function actionShowSummary() + public function actionShowSummary(): Response { $this->requireAdmin(false); return $this->asJson(Freeform::getInstance()->summary->getSummary()->statistics); } - public function actionDismissMessage() + public function actionDismissMessage(): Response { $this->requirePostRequest(); @@ -26,7 +27,7 @@ public function actionDismissMessage() return $this->asJson(['success' => false]); } - public function actionDismissType() + public function actionDismissType(): Response { $this->requirePostRequest(); diff --git a/packages/plugin/src/Controllers/FieldsController.php b/packages/plugin/src/Controllers/FieldsController.php index 694718dfb..e8029cbb3 100644 --- a/packages/plugin/src/Controllers/FieldsController.php +++ b/packages/plugin/src/Controllers/FieldsController.php @@ -24,17 +24,10 @@ use Solspace\Freeform\Resources\Bundles\FormIndexBundle; use Solspace\Freeform\Services\FieldsService; use Solspace\Freeform\Services\FilesService; -use yii\base\InvalidParamException; -use yii\web\BadRequestHttpException; -use yii\web\ForbiddenHttpException; use yii\web\Response; class FieldsController extends Controller { - /** - * @throws ForbiddenHttpException - * @throws InvalidParamException - */ public function actionIndex(): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_FIELDS_ACCESS); @@ -56,10 +49,6 @@ public function actionIndex(): Response ); } - /** - * @throws \yii\base\InvalidParamException - * @throws \yii\web\ForbiddenHttpException - */ public function actionCreate(): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_FIELDS_MANAGE); @@ -69,11 +58,6 @@ public function actionCreate(): Response return $this->renderEditForm($model, 'Create new field'); } - /** - * @throws ForbiddenHttpException - * @throws InvalidParamException - * @throws \HttpException - */ public function actionEdit(int $id): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_FIELDS_MANAGE); @@ -87,11 +71,6 @@ public function actionEdit(int $id): Response return $this->renderEditForm($model, $model->label); } - /** - * @throws BadRequestHttpException - * @throws ForbiddenHttpException - * @throws FreeformException - */ public function actionDuplicate(): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_FIELDS_MANAGE); @@ -110,7 +89,7 @@ public function actionDuplicate(): Response $oldHandle = $model->handle; if (preg_match('/^([a-zA-Z0-9]*[a-zA-Z]+)(\d+)$/', $oldHandle, $matches)) { - list($string, $mainPart, $iterator) = $matches; + [$string, $mainPart, $iterator] = $matches; $newHandle = $mainPart.((int) $iterator + 1); } else { @@ -132,13 +111,7 @@ public function actionDuplicate(): Response return $this->redirect('freeform/fields'); } - /** - * @throws ForbiddenHttpException - * @throws FreeformException - * @throws BadRequestHttpException - * @throws \Exception - */ - public function actionSave() + public function actionSave(): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_FIELDS_MANAGE); @@ -202,13 +175,6 @@ public function actionSave() return $this->renderEditForm($field, $field->label); } - /** - * Deletes a field. - * - * @throws BadRequestHttpException - * @throws ForbiddenHttpException - * @throws \Exception - */ public function actionDelete(): Response { $this->requirePostRequest(); @@ -216,16 +182,11 @@ public function actionDelete(): Response $fieldId = \Craft::$app->request->post('id'); - return $this->asJson( - [ - 'success' => $this->getFieldsService()->deleteById((int) $fieldId), - ] - ); + return $this->asJson([ + 'success' => $this->getFieldsService()->deleteById((int) $fieldId), + ]); } - /** - * @throws InvalidParamException - */ private function renderEditForm(FieldModel $model, string $title): Response { $this->view->registerAssetBundle(FieldEditorBundle::class); @@ -261,12 +222,7 @@ private function getFilesService(): FilesService return Freeform::getInstance()->files; } - /** - * @param int $fieldId - * - * @throws FreeformException - */ - private function getNewOrExistingField($fieldId): FieldModel + private function getNewOrExistingField(int $fieldId): FieldModel { if ($fieldId) { $field = $this->getFieldsService()->getFieldById($fieldId); diff --git a/packages/plugin/src/Controllers/FileUploadController.php b/packages/plugin/src/Controllers/FileUploadController.php index c64e51f43..029714f27 100644 --- a/packages/plugin/src/Controllers/FileUploadController.php +++ b/packages/plugin/src/Controllers/FileUploadController.php @@ -9,6 +9,7 @@ use Solspace\Freeform\Bundles\Form\Security\FormSecret; use Solspace\Freeform\Fields\Pro\FileDragAndDropField; use Solspace\Freeform\Freeform; +use Solspace\Freeform\Library\Composer\Components\Form; use Solspace\Freeform\Library\Exceptions\FreeformException; use Solspace\Freeform\Records\UnfinalizedFileRecord; use yii\web\BadRequestHttpException; @@ -17,9 +18,9 @@ class FileUploadController extends BaseController { public $enableCsrfValidation = false; - protected $allowAnonymous = true; + protected array|bool|int $allowAnonymous = true; - public function actionGet() + public function actionGet(): Response { $this->requirePostRequest(); @@ -47,7 +48,7 @@ public function actionGet() return $this->asJson($payload); } - public function actionPost() + public function actionPost(): Response { $this->requirePostRequest(); $request = \Craft::$app->request; @@ -87,7 +88,7 @@ public function actionPost() return $this->asJson(['id' => $asset->uid]); } - public function actionDelete() + public function actionDelete(): Response { $this->requirePostRequest(); @@ -154,7 +155,7 @@ public function actionDelete() return $this->createErrorResponse(['File doesn\'t exist.']); } - private function getVerifiedForm() + private function getVerifiedForm(): Form { $request = \Craft::$app->request; @@ -178,12 +179,10 @@ private function getVerifiedForm() private function createErrorResponse($messages = [], $statusCode = 400): Response { - $response = $this->asJson( - [ - 'type' => 'field-error', - 'messages' => $messages, - ] - ); + $response = $this->asJson([ + 'type' => 'field-error', + 'messages' => $messages, + ]); $response->setStatusCode($statusCode); diff --git a/packages/plugin/src/Controllers/FormsController.php b/packages/plugin/src/Controllers/FormsController.php index ed703ae6a..510f7da56 100644 --- a/packages/plugin/src/Controllers/FormsController.php +++ b/packages/plugin/src/Controllers/FormsController.php @@ -49,7 +49,7 @@ class FormsController extends BaseController { - public function actionIndex() + public function actionIndex(): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_FORMS_ACCESS); @@ -60,7 +60,7 @@ public function actionIndex() $this->view->registerAssetBundle(FormIndexBundle::class); $this->view->registerAssetBundle(CreateFormModalBundle::class); - $this->renderTemplate( + return $this->renderTemplate( 'freeform/forms', [ 'forms' => $forms, @@ -114,7 +114,7 @@ public function actionDuplicate(): Response $oldHandle = $model->handle; if (preg_match('/^([a-zA-Z0-9]*[a-zA-Z]+)(\d+)$/', $oldHandle, $matches)) { - list($string, $mainPart, $iterator) = $matches; + [$string, $mainPart, $iterator] = $matches; $newHandle = $mainPart.((int) $iterator + 1); } else { @@ -172,7 +172,7 @@ public function actionSave(): Response $oldHandle = $composerState['composer']['properties']['form']['handle']; if (preg_match('/^([a-zA-Z0-9]*[a-zA-Z]+)(\d+)$/', $oldHandle, $matches)) { - list($string, $mainPart, $iterator) = $matches; + [$string, $mainPart, $iterator] = $matches; $newHandle = $mainPart.((int) $iterator + 1); } else { @@ -504,10 +504,7 @@ private function getAllCustomFieldList(): array return $fieldList; } - /** - * @return array|\stdClass - */ - private function getGeneratedOptionsList(Form $form) + private function getGeneratedOptionsList(Form $form): array|object { $options = []; foreach ($form->getLayout()->getFields() as $field) { diff --git a/packages/plugin/src/Controllers/MailingListsController.php b/packages/plugin/src/Controllers/MailingListsController.php index ef91e104d..fb6515464 100644 --- a/packages/plugin/src/Controllers/MailingListsController.php +++ b/packages/plugin/src/Controllers/MailingListsController.php @@ -29,7 +29,7 @@ class MailingListsController extends BaseController /** * Make sure this controller requires a logged in member. */ - public function init() + public function init(): void { if (!\Craft::$app->request->getIsConsoleRequest()) { $this->requireLogin(); @@ -67,12 +67,7 @@ public function actionCreate(): Response return $this->renderEditForm($model, 'Create new mailing list'); } - /** - * @param null|int $id - * - * @throws \HttpException - */ - public function actionEdit($id = null, IntegrationModel $model = null): Response + public function actionEdit(int $id = null, IntegrationModel $model = null): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_SETTINGS_ACCESS); @@ -93,10 +88,6 @@ public function actionEdit($id = null, IntegrationModel $model = null): Response return $this->renderEditForm($model, $model->name); } - /** - * @throws \HttpException - * @throws \yii\web\ForbiddenHttpException - */ public function actionHandleOAuthRedirect(string $handle = null): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_SETTINGS_ACCESS); @@ -120,10 +111,7 @@ public function actionHandleOAuthRedirect(string $handle = null): Response return $this->renderEditForm($model, $model->name); } - /** - * Saves an integration. - */ - public function actionSave() + public function actionSave(): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_SETTINGS_ACCESS); @@ -216,10 +204,7 @@ public function actionSave() return $this->renderEditForm($model, $model->name); } - /** - * Checks integration connection. - */ - public function actionCheckIntegrationConnection() + public function actionCheckIntegrationConnection(): Response { $id = \Craft::$app->request->post('id'); @@ -236,11 +221,6 @@ public function actionCheckIntegrationConnection() } } - /** - * Checks integration connection. - * - * @throws IntegrationException - */ public function actionForceAuthorization(string $handle) { $model = $this->getMailingListsService()->getIntegrationByHandle($handle); @@ -256,10 +236,7 @@ public function actionForceAuthorization(string $handle) $integration->initiateAuthentication(); } - /** - * Deletes a mailing integration. - */ - public function actionDelete() + public function actionDelete(): Response { $this->requirePostRequest(); PermissionHelper::requirePermission(Freeform::PERMISSION_SETTINGS_ACCESS); @@ -271,10 +248,7 @@ public function actionDelete() return $this->asJson(['success' => true]); } - /** - * @param string $handle - */ - private function getNewOrExistingMailingListIntegrationModel($handle): IntegrationModel + private function getNewOrExistingMailingListIntegrationModel(string $handle): IntegrationModel { $mailingListIntegration = $this->getMailingListsService()->getIntegrationByHandle($handle); @@ -285,12 +259,7 @@ private function getNewOrExistingMailingListIntegrationModel($handle): Integrati return $mailingListIntegration; } - /** - * Handle OAuth2 authorization. - * - * @return null|Response - */ - private function handleAuthorization(IntegrationModel $model) + private function handleAuthorization(IntegrationModel $model): ?Response { $integration = $model->getIntegrationObject(); $code = \Craft::$app->request->getParam('code'); diff --git a/packages/plugin/src/Controllers/Migrations/NotificationsController.php b/packages/plugin/src/Controllers/Migrations/NotificationsController.php index 5e861e975..23a0770b6 100644 --- a/packages/plugin/src/Controllers/Migrations/NotificationsController.php +++ b/packages/plugin/src/Controllers/Migrations/NotificationsController.php @@ -8,7 +8,7 @@ class NotificationsController extends BaseController { - private $migrator; + private NotificationsMigrator $migrator; public function __construct($id, $module, $config = [], NotificationsMigrator $migrator) { diff --git a/packages/plugin/src/Controllers/NotificationsController.php b/packages/plugin/src/Controllers/NotificationsController.php index ec8a0ee53..64a2e67b3 100644 --- a/packages/plugin/src/Controllers/NotificationsController.php +++ b/packages/plugin/src/Controllers/NotificationsController.php @@ -21,17 +21,11 @@ use Solspace\Freeform\Resources\Bundles\NotificationEditorBundle; use Solspace\Freeform\Resources\Bundles\NotificationIndexBundle; use Solspace\Freeform\Services\NotificationsService; -use yii\base\InvalidParamException; -use yii\web\ForbiddenHttpException; use yii\web\HttpException; use yii\web\Response; class NotificationsController extends BaseController { - /** - * @throws ForbiddenHttpException - * @throws InvalidParamException - */ public function actionIndex(): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_NOTIFICATIONS_ACCESS); @@ -82,14 +76,7 @@ public function actionCreateFile(): Response return $this->renderEditForm($record, $title); } - /** - * @param mixed $id - * - * @throws ForbiddenHttpException - * @throws InvalidParamException - * @throws HttpException - */ - public function actionEdit($id): Response + public function actionEdit(mixed $id): Response { $record = $this->getNotificationService()->getNotificationById($id); @@ -103,12 +90,6 @@ public function actionEdit($id): Response return $this->renderEditForm($record, $record->name); } - /** - * @throws ForbiddenHttpException - * @throws FreeformException - * @throws \Exception - * @throws \yii\web\BadRequestHttpException - */ public function actionSave() { PermissionHelper::requirePermission(Freeform::PERMISSION_NOTIFICATIONS_MANAGE); @@ -211,13 +192,6 @@ public function actionDuplicate(): Response return $this->asJson(['success' => true]); } - /** - * Deletes a notification. - * - * @throws \yii\web\BadRequestHttpException - * @throws ForbiddenHttpException - * @throws \Exception - */ public function actionDelete(): Response { $this->requirePostRequest(); @@ -295,10 +269,6 @@ public function actionSendNotification(): Response return $this->asJson(true); } - /** - * @throws InvalidParamException - * @throws ForbiddenHttpException - */ private function renderEditForm(NotificationRecord $record, string $title): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_NOTIFICATIONS_MANAGE); @@ -319,12 +289,7 @@ private function getNotificationService(): NotificationsService return Freeform::getInstance()->notifications; } - /** - * @param mixed $id - * - * @throws FreeformException - */ - private function getNewOrExistingNotification($id): NotificationRecord + private function getNewOrExistingNotification(mixed $id): NotificationRecord { if ($id) { $notification = $this->getNotificationService()->getNotificationById($id); diff --git a/packages/plugin/src/Controllers/PaymentGatewaysController.php b/packages/plugin/src/Controllers/PaymentGatewaysController.php index e67946fd5..126ce7950 100644 --- a/packages/plugin/src/Controllers/PaymentGatewaysController.php +++ b/packages/plugin/src/Controllers/PaymentGatewaysController.php @@ -4,23 +4,17 @@ use Solspace\Commons\Helpers\PermissionHelper; use Solspace\Freeform\Freeform; -use Solspace\Freeform\Library\Exceptions\Integrations\IntegrationException; use Solspace\Freeform\Library\Integrations\PaymentGateways\AbstractPaymentGatewayIntegration; use Solspace\Freeform\Models\IntegrationModel; use Solspace\Freeform\Records\IntegrationRecord; use Solspace\Freeform\Resources\Bundles\IntegrationsBundle; use Solspace\Freeform\Resources\Bundles\MailingListsBundle; -use yii\web\BadRequestHttpException; -use yii\web\ForbiddenHttpException; use yii\web\HttpException; use yii\web\Response; class PaymentGatewaysController extends BaseController { - /** - * Make sure this controller requires a logged in member. - */ - public function init() + public function init(): void { if (!\Craft::$app->request->getIsConsoleRequest()) { $this->requireLogin(); @@ -29,9 +23,6 @@ public function init() parent::init(); } - /** - * Presents a list of all payment gateway integrations. - */ public function actionIndex(): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_SETTINGS_ACCESS); @@ -59,13 +50,6 @@ public function actionCreate(): Response return $this->renderEditForm($model, 'Create new payment gateway'); } - /** - * Deletes a Payment Gateway integration. - * - * @throws BadRequestHttpException - * @throws ForbiddenHttpException - * @throws \Exception - */ public function actionDelete(): Response { $this->requirePostRequest(); @@ -77,9 +61,6 @@ public function actionDelete(): Response return $this->asJson(['success' => true]); } - /** - * @throws HttpException - */ public function actionEdit(int $id = null, IntegrationModel $model = null): Response { if (null === $model) { @@ -99,10 +80,7 @@ public function actionEdit(int $id = null, IntegrationModel $model = null): Resp return $this->renderEditForm($model, $model->name); } - /** - * Saves an integration. - */ - public function actionSave() + public function actionSave(): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_SETTINGS_ACCESS); @@ -183,11 +161,6 @@ public function actionSave() return $this->renderEditForm($model, $model->name); } - /** - * Checks integration connection. - * - * @throws IntegrationException - */ public function actionCheckIntegrationConnection(): Response { $id = \Craft::$app->request->post('id'); @@ -233,10 +206,7 @@ private function renderEditForm(IntegrationModel $model, string $title): Respons return $this->renderTemplate('freeform/settings/_payment_gateway_edit', $variables); } - /** - * @param string $handle - */ - private function getNewOrExistingPaymentGatewayIntegrationModel($handle): IntegrationModel + private function getNewOrExistingPaymentGatewayIntegrationModel(string $handle): IntegrationModel { $paymentGateway = $this->getPaymentGatewaysService()->getIntegrationByHandle($handle); diff --git a/packages/plugin/src/Controllers/Pro/ExportProfilesController.php b/packages/plugin/src/Controllers/Pro/ExportProfilesController.php index ea3703332..44c554d6f 100644 --- a/packages/plugin/src/Controllers/Pro/ExportProfilesController.php +++ b/packages/plugin/src/Controllers/Pro/ExportProfilesController.php @@ -33,9 +33,6 @@ public function actionIndex(): Response ); } - /** - * @throws HttpException - */ public function actionCreate(string $formHandle): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_EXPORT_PROFILES_MANAGE); @@ -54,9 +51,6 @@ public function actionCreate(string $formHandle): Response return $this->renderEditForm($profile, Freeform::t('Create a new Export Profile')); } - /** - * @throws HttpException - */ public function actionEdit(int $id): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_EXPORT_PROFILES_MANAGE); @@ -74,9 +68,6 @@ public function actionEdit(int $id): Response return $this->renderEditForm($profile, $profile->name); } - /** - * @throws HttpException - */ public function actionSave(): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_EXPORT_PROFILES_MANAGE); @@ -120,9 +111,6 @@ public function actionSave(): Response return $this->renderEditForm($profile, $profile->name); } - /** - * Deletes a notification. - */ public function actionDelete() { $this->requirePostRequest(); @@ -135,9 +123,6 @@ public function actionDelete() return $this->asJson(['success' => true]); } - /** - * @throws HttpException - */ public function actionExport() { PermissionHelper::requirePermission(Freeform::PERMISSION_EXPORT_PROFILES_ACCESS); @@ -186,9 +171,6 @@ private function renderEditForm(ExportProfileModel $model, string $title): Respo ); } - /** - * @param int $id - */ private function getNewOrExistingProfile($id, Form $form): ExportProfileModel { $profile = $this->getExportProfileService()->getProfileById((int) $id); diff --git a/packages/plugin/src/Controllers/Pro/Payments/PaymentWebhooksController.php b/packages/plugin/src/Controllers/Pro/Payments/PaymentWebhooksController.php index 69201ab51..d00e1aee2 100644 --- a/packages/plugin/src/Controllers/Pro/Payments/PaymentWebhooksController.php +++ b/packages/plugin/src/Controllers/Pro/Payments/PaymentWebhooksController.php @@ -14,7 +14,7 @@ class PaymentWebhooksController extends BaseController { public $enableCsrfValidation = false; - protected $allowAnonymous = true; + protected array|bool|int $allowAnonymous = true; public function actionStripe() { diff --git a/packages/plugin/src/Controllers/Pro/Payments/SubscriptionsController.php b/packages/plugin/src/Controllers/Pro/Payments/SubscriptionsController.php index b30fd1bf3..ce372e14f 100644 --- a/packages/plugin/src/Controllers/Pro/Payments/SubscriptionsController.php +++ b/packages/plugin/src/Controllers/Pro/Payments/SubscriptionsController.php @@ -10,7 +10,7 @@ class SubscriptionsController extends BaseController { public $enableCsrfValidation = false; - protected $allowAnonymous = true; + protected array|bool|int $allowAnonymous = true; public function actionCancel(int $id, string $validationKey): string { diff --git a/packages/plugin/src/Controllers/Pro/QuickExportController.php b/packages/plugin/src/Controllers/Pro/QuickExportController.php index ec5676a33..d0c3bc3c4 100644 --- a/packages/plugin/src/Controllers/Pro/QuickExportController.php +++ b/packages/plugin/src/Controllers/Pro/QuickExportController.php @@ -13,18 +13,13 @@ use Solspace\Freeform\Library\Composer\Components\Fields\Interfaces\NoStorageInterface; use Solspace\Freeform\Library\Composer\Components\Form; use Solspace\Freeform\Library\Composer\Components\Properties\PaymentProperties; -use Solspace\Freeform\Library\Exceptions\Composer\ComposerException; use Solspace\Freeform\Library\Exceptions\FreeformException; use Solspace\Freeform\Records\Pro\ExportSettingRecord; -use yii\web\BadRequestHttpException; use yii\web\ForbiddenHttpException; use yii\web\Response; class QuickExportController extends BaseController { - /** - * @throws ComposerException - */ public function actionExportDialogue(): Response { $formId = \Craft::$app->request->getParam('formId'); @@ -185,11 +180,6 @@ public function actionExportDialogue(): Response ); } - /** - * @throws ComposerException - * @throws BadRequestHttpException - * @throws ForbiddenHttpException - */ public function actionIndex() { $this->requirePostRequest(); diff --git a/packages/plugin/src/Controllers/Pro/WebhooksController.php b/packages/plugin/src/Controllers/Pro/WebhooksController.php index 85234ba23..fdbc5ff88 100644 --- a/packages/plugin/src/Controllers/Pro/WebhooksController.php +++ b/packages/plugin/src/Controllers/Pro/WebhooksController.php @@ -10,16 +10,12 @@ use Solspace\Freeform\Resources\Bundles\Pro\WebhooksBundle; use Solspace\Freeform\Services\Pro\WebhooksService; use Solspace\Freeform\Webhooks\Integrations\Generic; -use yii\web\ForbiddenHttpException as ForbiddenHttpExceptionAlias; use yii\web\NotFoundHttpException; use yii\web\Response; class WebhooksController extends BaseController { - /** - * Make sure this controller requires a logged in member. - */ - public function init() + public function init(): void { if (!\Craft::$app->request->getIsConsoleRequest()) { $this->requireLogin(); @@ -28,9 +24,6 @@ public function init() parent::init(); } - /** - * @throws ForbiddenHttpExceptionAlias - */ public function actionIndex(): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_SETTINGS_ACCESS); @@ -47,18 +40,11 @@ public function actionIndex(): Response ); } - /** - * @throws \ReflectionException - */ public function actionCreate(): Response { return $this->renderEditForm(new WebhookModel(), Freeform::t('Create a new Webhook')); } - /** - * @throws ForbiddenHttpExceptionAlias - * @throws NotFoundHttpException - */ public function actionEdit(int $id = null): Response { $webhook = $this->getWebhooksService()->getById($id); @@ -69,10 +55,7 @@ public function actionEdit(int $id = null): Response return $this->renderEditForm($webhook, $webhook->getName()); } - /** - * @return Response - */ - public function actionSave() + public function actionSave(): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_SETTINGS_ACCESS); @@ -121,12 +104,6 @@ public function actionSave() return $this->renderEditForm($model, $model->name ?: 'New Zapier Webhook'); } - /** - * @throws ForbiddenHttpExceptionAlias - * @throws \Throwable - * @throws \yii\db\StaleObjectException - * @throws \yii\web\BadRequestHttpException - */ public function actionDelete(): Response { $this->requirePostRequest(); @@ -138,10 +115,6 @@ public function actionDelete(): Response return $this->asJson(['success' => true]); } - /** - * @throws ForbiddenHttpExceptionAlias - * @throws \yii\base\InvalidConfigException - */ private function renderEditForm(WebhookModel $webhook, string $title): Response { Freeform::getInstance()->requirePro(); diff --git a/packages/plugin/src/Controllers/REST/FormsRESTController.php b/packages/plugin/src/Controllers/REST/FormsRESTController.php index 2e4a688e3..9730dc71e 100644 --- a/packages/plugin/src/Controllers/REST/FormsRESTController.php +++ b/packages/plugin/src/Controllers/REST/FormsRESTController.php @@ -15,7 +15,7 @@ class FormsRESTController extends BaseController { - public function init() + public function init(): void { PermissionHelper::requirePermission(Freeform::PERMISSION_FORMS_MANAGE); diff --git a/packages/plugin/src/Controllers/REST/SettingsController.php b/packages/plugin/src/Controllers/REST/SettingsController.php index 40ca11e28..837d96e18 100644 --- a/packages/plugin/src/Controllers/REST/SettingsController.php +++ b/packages/plugin/src/Controllers/REST/SettingsController.php @@ -11,7 +11,7 @@ class SettingsController extends BaseController { - public function init() + public function init(): void { PermissionHelper::requirePermission(Freeform::PERMISSION_SETTINGS_ACCESS); @@ -71,7 +71,7 @@ public function actionReliability(): Response return $this->returnSuccess(); } - private function saveSettings(array $settings) + private function saveSettings(array $settings): bool { $plugin = Freeform::getInstance(); $plugin->setSettings($settings); diff --git a/packages/plugin/src/Controllers/ResourcesController.php b/packages/plugin/src/Controllers/ResourcesController.php index b04c772b3..c0ffc61ba 100644 --- a/packages/plugin/src/Controllers/ResourcesController.php +++ b/packages/plugin/src/Controllers/ResourcesController.php @@ -9,7 +9,7 @@ class ResourcesController extends BaseController { - protected $allowAnonymous = ['plugin-js', 'plugin-css']; + protected array|bool|int $allowAnonymous = ['plugin-js', 'plugin-css']; public function actionIndex(): Response { diff --git a/packages/plugin/src/Controllers/SettingsController.php b/packages/plugin/src/Controllers/SettingsController.php index fcac6943c..07a76dbf3 100644 --- a/packages/plugin/src/Controllers/SettingsController.php +++ b/packages/plugin/src/Controllers/SettingsController.php @@ -27,10 +27,7 @@ class SettingsController extends BaseController { - /** - * Make sure this controller requires a logged in member. - */ - public function init() + public function init(): void { if (!\Craft::$app->request->getIsConsoleRequest()) { $this->requireLogin(); @@ -39,7 +36,7 @@ public function init() parent::init(); } - public function actionIndex() + public function actionIndex(): Response { if ($this->getSettingsService()->isAllowAdminEdit()) { return $this->actionProvideSetting(); @@ -48,9 +45,6 @@ public function actionIndex() return $this->redirect(UrlHelper::cpUrl('freeform/settings/statuses')); } - /** - * Redirects to the default selected view. - */ public function actionDefaultView(): Response { if ($this->getSettingsService()->isOldFreeformInstalled()) { @@ -113,9 +107,6 @@ public function actionDefaultView(): Response return $this->redirect(UrlHelper::cpUrl("freeform/{$defaultView}")); } - /** - * Attempt cloning a demo template into the user's specified template directory. - */ public function actionAddDemoTemplate(): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_SETTINGS_ACCESS); @@ -158,9 +149,6 @@ public function actionAddDemoTemplate(): Response ); } - /** - * Attempt cloning a demo email template into the user's specified template directory. - */ public function actionAddEmailTemplate(): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_SETTINGS_ACCESS); @@ -195,17 +183,12 @@ public function actionAddEmailTemplate(): Response } } - return $this->asJson( - [ - 'templateName' => $templateName, - 'errors' => $errors, - ] - ); + return $this->asJson([ + 'templateName' => $templateName, + 'errors' => $errors, + ]); } - /** - * Attempt cloning a demo email template into the user's specified template directory. - */ public function actionAddSuccessTemplate(): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_SETTINGS_ACCESS); @@ -248,12 +231,6 @@ public function actionAddSuccessTemplate(): Response ); } - /** - * @throws \yii\web\BadRequestHttpException - * @throws \yii\web\ForbiddenHttpException - * - * @return null|Response - */ public function actionSaveSettings() { PermissionHelper::requirePermission(Freeform::PERMISSION_SETTINGS_ACCESS); diff --git a/packages/plugin/src/Controllers/SpamSubmissionsController.php b/packages/plugin/src/Controllers/SpamSubmissionsController.php index 99a060609..34746054e 100644 --- a/packages/plugin/src/Controllers/SpamSubmissionsController.php +++ b/packages/plugin/src/Controllers/SpamSubmissionsController.php @@ -16,17 +16,18 @@ use Solspace\Freeform\Freeform; use Solspace\Freeform\Library\Exceptions\FreeformException; use Solspace\Freeform\Services\SubmissionsService; +use yii\web\Response; class SpamSubmissionsController extends SubmissionsController { - const SPAM_TEMPLATE_BASE_PATH = 'freeform/spam'; + public const SPAM_TEMPLATE_BASE_PATH = 'freeform/spam'; public function getSubmissionsService(): SubmissionsService { return $this->getSpamSubmissionsService(); } - public function actionDelete() + public function actionDelete(): Response { $this->requirePostRequest(); @@ -40,13 +41,6 @@ public function actionDelete() return $this->asJson(['success' => true]); } - /** - * @throws FreeformException - * @throws \yii\web\BadRequestHttpException - * @throws \yii\web\ForbiddenHttpException - * - * @return \yii\web\Response - */ public function actionAllow() { $post = \Craft::$app->request->post(); @@ -99,9 +93,6 @@ public function actionAllow() ); } - /** - * {@inheritdoc} - */ protected function getTemplateBasePath(): string { return self::SPAM_TEMPLATE_BASE_PATH; diff --git a/packages/plugin/src/Controllers/StatusesController.php b/packages/plugin/src/Controllers/StatusesController.php index 76d284c28..130375839 100644 --- a/packages/plugin/src/Controllers/StatusesController.php +++ b/packages/plugin/src/Controllers/StatusesController.php @@ -42,9 +42,6 @@ public function actionCreate(): Response return $this->renderEditForm($model, 'Create new status'); } - /** - * @throws \HttpException - */ public function actionEdit(int $id): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_SETTINGS_ACCESS); @@ -58,9 +55,6 @@ public function actionEdit(int $id): Response return $this->renderEditForm($model, $model->name); } - /** - * @return Response - */ public function actionSave() { PermissionHelper::requirePermission(Freeform::PERMISSION_SETTINGS_ACCESS); @@ -95,9 +89,6 @@ public function actionSave() \Craft::$app->urlManager->setRouteParams(['status' => $status, 'errors' => $status->getErrors()]); } - /** - * @throws HttpException - */ public function actionReorder(): Response { $this->requirePostRequest(); @@ -131,10 +122,7 @@ public function actionReorder(): Response } } - /** - * Deletes a field. - */ - public function actionDelete() + public function actionDelete(): Response { $this->requirePostRequest(); if (!\Craft::$app->request->isAjax) { @@ -161,12 +149,7 @@ private function renderEditForm(StatusModel $model, string $title): Response return $this->renderTemplate('freeform/statuses/edit', $variables); } - /** - * @param int $statusId - * - * @throws \Exception - */ - private function getNewOrExistingStatus($statusId): StatusModel + private function getNewOrExistingStatus(int $statusId): StatusModel { $statusService = $this->getStatusesService(); diff --git a/packages/plugin/src/Controllers/SubmissionsController.php b/packages/plugin/src/Controllers/SubmissionsController.php index 633e727ab..fe40b2b0c 100644 --- a/packages/plugin/src/Controllers/SubmissionsController.php +++ b/packages/plugin/src/Controllers/SubmissionsController.php @@ -17,34 +17,29 @@ use Solspace\Freeform\Elements\Submission; use Solspace\Freeform\Events\Assets\RegisterEvent; use Solspace\Freeform\Events\Submissions\UpdateEvent; +use Solspace\Freeform\Fields\FileUploadField; use Solspace\Freeform\Freeform; use Solspace\Freeform\Library\Composer\Components\Form; use Solspace\Freeform\Library\DataObjects\SpamReason; -use Solspace\Freeform\Library\Exceptions\Composer\ComposerException; use Solspace\Freeform\Library\Exceptions\FreeformException; use Solspace\Freeform\Library\Export\ExportCsv; use Solspace\Freeform\Records\SubmissionNoteRecord; use Solspace\Freeform\Resources\Bundles\ExportButtonBundle; use Solspace\Freeform\Resources\Bundles\SubmissionEditBundle; use Solspace\Freeform\Resources\Bundles\SubmissionIndexBundle; -use yii\web\BadRequestHttpException; use yii\web\ForbiddenHttpException; use yii\web\HttpException; use yii\web\Response; class SubmissionsController extends BaseController { - const EVENT_BEFORE_UPDATE = 'beforeUpdate'; - const EVENT_AFTER_UPDATE = 'afterUpdate'; + public const EVENT_BEFORE_UPDATE = 'beforeUpdate'; + public const EVENT_AFTER_UPDATE = 'afterUpdate'; - const TEMPLATE_BASE_PATH = 'freeform/submissions'; - const EVENT_REGISTER_INDEX_ASSETS = 'registerIndexAssets'; - const EVENT_REGISTER_EDIT_ASSETS = 'registerEditAssets'; + public const TEMPLATE_BASE_PATH = 'freeform/submissions'; + public const EVENT_REGISTER_INDEX_ASSETS = 'registerIndexAssets'; + public const EVENT_REGISTER_EDIT_ASSETS = 'registerEditAssets'; - /** - * @throws ForbiddenHttpException - * @throws \yii\base\InvalidConfigException - */ public function actionIndex(string $formHandle = null): Response { PermissionHelper::requirePermission(Freeform::PERMISSION_SUBMISSIONS_ACCESS); @@ -73,14 +68,6 @@ public function actionIndex(string $formHandle = null): Response ); } - /** - * Exports submission data as CSV. - * - * @throws BadRequestHttpException - * @throws ForbiddenHttpException - * @throws FreeformException - * @throws ComposerException - */ public function actionExport() { $this->requirePostRequest(); @@ -157,9 +144,6 @@ public function actionExport() $this->getExportProfileService()->outputFile($exporter->export(), $fileName, $exporter->getMimeType()); } - /** - * @throws HttpException - */ public function actionEdit(int $id): Response { $submission = $this->getSubmissionsService()->getSubmissionById($id); @@ -203,7 +187,7 @@ public function actionEdit(int $id): Response 'layout' => $layout, 'title' => $title, 'statuses' => $statuses, - 'note' => $noteRecord ? $noteRecord->note : null, + 'note' => $noteRecord?->note, 'continueEditingUrl' => 'freeform/submissions/{id}', ]; @@ -218,11 +202,6 @@ public function actionEdit(int $id): Response ); } - /** - * @throws \yii\web\ForbiddenHttpException - * @throws \Exception - * @throws BadRequestHttpException - */ public function actionSave() { $post = \Craft::$app->request->post(); @@ -289,15 +268,12 @@ public function actionSave() ); } - /** - * Returns base path for view templates, so it could be overridden. - */ protected function getTemplateBasePath(): string { return self::TEMPLATE_BASE_PATH; } - private function getSubmissionPaymentDetails($submission) + private function getSubmissionPaymentDetails($submission): ?array { $form = $submission->getForm(); $paymentFields = $form->getLayout()->getPaymentFields(); @@ -319,7 +295,8 @@ private function getSubmissionPaymentDetails($submission) private function removeStaleAssets(Submission $submission, array $post = []) { - foreach ($submission->getForm()->getLayout()->getFileUploadFields() as $field) { + $fields = $submission->getForm()->getLayout()->getFields(FileUploadField::class); + foreach ($fields as $field) { $handle = $field->getHandle(); $oldIds = $submission->{$handle}->getValue() ?? []; if (!\is_array($oldIds)) { @@ -344,7 +321,7 @@ private function removeStaleAssets(Submission $submission, array $post = []) private function uploadAndAddFiles(Form $form, array $post = []): array { - $uploadFields = $form->getLayout()->getFileUploadFields(); + $uploadFields = $form->getLayout()->getFields(FileUploadField::class); foreach ($uploadFields as $field) { $response = Freeform::getInstance()->files->uploadFile($field, $form); diff --git a/packages/plugin/src/Controllers/SubmitController.php b/packages/plugin/src/Controllers/SubmitController.php index 37d68cbad..e810d7da7 100644 --- a/packages/plugin/src/Controllers/SubmitController.php +++ b/packages/plugin/src/Controllers/SubmitController.php @@ -27,12 +27,8 @@ class SubmitController extends BaseController { - /** @var bool */ - protected $allowAnonymous = true; + protected array|bool|int $allowAnonymous = true; - /** - * @throws FreeformException - */ public function actionIndex(): ?Response { $this->requirePostRequest(); @@ -82,7 +78,7 @@ public function actionIndex(): ?Response return null; } - public function behaviors() + public function behaviors(): array { $corsHeaders = [ 'Access-Control-Request-Method' => ['POST', 'OPTIONS'], @@ -111,7 +107,7 @@ public function behaviors() ]; } - private function handleSubmission(Form $form, Submission $submission) + private function handleSubmission(Form $form, Submission $submission): void { $formHandler = Freeform::getInstance()->forms; @@ -119,7 +115,7 @@ private function handleSubmission(Form $form, Submission $submission) Event::trigger(Form::class, Form::EVENT_SUBMIT, $event); if (!$event->isValid || !empty($form->getActions()) || !$formHandler->onBeforeSubmit($form)) { - return false; + return; } $storeSubmissionEvent = new StoreSubmissionEvent($form, $submission); diff --git a/packages/plugin/src/Elements/Actions/ExportCSVAction.php b/packages/plugin/src/Elements/Actions/ExportCSVAction.php index 7e8876730..1387d449d 100644 --- a/packages/plugin/src/Elements/Actions/ExportCSVAction.php +++ b/packages/plugin/src/Elements/Actions/ExportCSVAction.php @@ -28,33 +28,33 @@ public function getTriggerHtml() $type = Json::encode(static::class); $js = <<' + - '' + - '' + - '' + - '' + - ''); - - form.appendTo('body'); - form.submit(); - form.remove(); - } - }); -})(); -EOT; + (function() + { + var trigger = new Craft.ElementActionTrigger({ + handle: 'Freeform_ExportCSV', + batch: true, + type: {$type}, + activate: function(\$selectedItems) + { + var ids = []; + \$selectedItems.each(function() { + ids.push($(this).data("id")); + }); + + var form = $('
' + + '' + + '' + + '' + + '' + + '
'); + + form.appendTo('body'); + form.submit(); + form.remove(); + } + }); + })(); + EOT; $js = str_replace( ['{csrfName}', '{csrfValue}'], diff --git a/packages/plugin/src/Elements/Actions/SendNotificationAction.php b/packages/plugin/src/Elements/Actions/SendNotificationAction.php index c1f7537dc..9374f02b0 100644 --- a/packages/plugin/src/Elements/Actions/SendNotificationAction.php +++ b/packages/plugin/src/Elements/Actions/SendNotificationAction.php @@ -19,24 +19,24 @@ public function getTriggerHtml() $type = Json::encode(static::class); $js = <<view->registerJs($js); } diff --git a/packages/plugin/src/Elements/Submission.php b/packages/plugin/src/Elements/Submission.php index ef8f5ced0..3d8f98860 100644 --- a/packages/plugin/src/Elements/Submission.php +++ b/packages/plugin/src/Elements/Submission.php @@ -41,13 +41,13 @@ class Submission extends Element { - const TABLE_STD = 'freeform_submissions'; - const TABLE = '{{%freeform_submissions}}'; - const FIELD_COLUMN_PREFIX = 'field_'; + public const TABLE_STD = 'freeform_submissions'; + public const TABLE = '{{%freeform_submissions}}'; + public const FIELD_COLUMN_PREFIX = 'field_'; - const EVENT_PROCESS_SUBMISSION = 'process-submission'; + public const EVENT_PROCESS_SUBMISSION = 'process-submission'; - const OPT_IN_DATA_TOKEN_LENGTH = 100; + public const OPT_IN_DATA_TOKEN_LENGTH = 100; /** @var int */ public $formId; @@ -210,18 +210,12 @@ public static function find(): ElementQueryInterface return (new SubmissionQuery(self::class))->isSpam(false); } - /** - * {@inheritdoc} - */ public static function displayName(): string { return Freeform::t('Submission'); } - /** - * {@inheritdoc} - */ - public static function refHandle() + public static function refHandle(): ?string { return 'submission'; } @@ -449,10 +443,7 @@ public function getIsEditable(): bool return self::$permissionCache[$this->formId]; } - /** - * {@inheritdoc} - */ - public function getCpEditUrl() + public function getCpEditUrl(): ?string { return $this->getIsEditable() ? UrlHelper::cpUrl('freeform/submissions/'.$this->id) : false; } @@ -484,7 +475,7 @@ public function getEditorHtml(): string return $html; } - public function afterSave(bool $isNew) + public function afterSave(bool $isNew): void { $insertData = [ 'userId' => $this->userId, diff --git a/packages/plugin/src/Events/Forms/RenderTagEvent.php b/packages/plugin/src/Events/Forms/RenderTagEvent.php index 7f726ff3a..205a2b8db 100644 --- a/packages/plugin/src/Events/Forms/RenderTagEvent.php +++ b/packages/plugin/src/Events/Forms/RenderTagEvent.php @@ -9,8 +9,8 @@ class RenderTagEvent extends ArrayableEvent implements FormEventInterface { - const POSITION_BEGINNING = 'beginning'; - const POSITION_END = 'end'; + public const POSITION_BEGINNING = 'beginning'; + public const POSITION_END = 'end'; /** @var Form */ private $form; diff --git a/packages/plugin/src/Fields/FileUploadField.php b/packages/plugin/src/Fields/FileUploadField.php index 3d4f39aa1..6088dd83d 100644 --- a/packages/plugin/src/Fields/FileUploadField.php +++ b/packages/plugin/src/Fields/FileUploadField.php @@ -28,10 +28,10 @@ class FileUploadField extends AbstractField implements MultipleValueInterface, F use FileUploadTrait; use MultipleValueTrait; - const DEFAULT_MAX_FILESIZE_KB = 2048; - const DEFAULT_FILE_COUNT = 1; + public const DEFAULT_MAX_FILESIZE_KB = 2048; + public const DEFAULT_FILE_COUNT = 1; - const FILE_KEYS = [ + public const FILE_KEYS = [ 'name', 'tmp_name', 'error', diff --git a/packages/plugin/src/Fields/HiddenField.php b/packages/plugin/src/Fields/HiddenField.php index df9694c74..84c657476 100644 --- a/packages/plugin/src/Fields/HiddenField.php +++ b/packages/plugin/src/Fields/HiddenField.php @@ -17,7 +17,7 @@ class HiddenField extends TextField implements NoRenderInterface { // Temporary change for those working around field limits until refactoring to field types happens in 3.12.x - const MAXIMUM_FIELD_LENGTH = 5000; + public const MAXIMUM_FIELD_LENGTH = 5000; /** * Return the field TYPE. diff --git a/packages/plugin/src/Fields/Pro/DatetimeField.php b/packages/plugin/src/Fields/Pro/DatetimeField.php index 1120c8b8e..8184acbed 100644 --- a/packages/plugin/src/Fields/Pro/DatetimeField.php +++ b/packages/plugin/src/Fields/Pro/DatetimeField.php @@ -16,9 +16,9 @@ class DatetimeField extends TextField implements InitialValueInterface, DatetimeInterface, ExtraFieldInterface { use InitialValueTrait; - const DATETIME_TYPE_BOTH = 'both'; - const DATETIME_TYPE_DATE = 'date'; - const DATETIME_TYPE_TIME = 'time'; + public const DATETIME_TYPE_BOTH = 'both'; + public const DATETIME_TYPE_DATE = 'date'; + public const DATETIME_TYPE_TIME = 'time'; /** @var string */ protected $dateTimeType; diff --git a/packages/plugin/src/Fields/Pro/FileDragAndDropField.php b/packages/plugin/src/Fields/Pro/FileDragAndDropField.php index 49145a6a8..b936a079e 100644 --- a/packages/plugin/src/Fields/Pro/FileDragAndDropField.php +++ b/packages/plugin/src/Fields/Pro/FileDragAndDropField.php @@ -8,9 +8,9 @@ class FileDragAndDropField extends FileUploadField implements ExtraFieldInterface { - const DEFAULT_ACCENT = '#3a85ee'; - const DEFAULT_THEME = 'light'; - const DEFAULT_PLACEHOLDER = 'Drag and drop files here or click to upload'; + public const DEFAULT_ACCENT = '#3a85ee'; + public const DEFAULT_THEME = 'light'; + public const DEFAULT_PLACEHOLDER = 'Drag and drop files here or click to upload'; /** @var string */ protected $accent; diff --git a/packages/plugin/src/Fields/Pro/Payments/CreditCardCvcField.php b/packages/plugin/src/Fields/Pro/Payments/CreditCardCvcField.php index 2ed134e0e..d98dfe970 100644 --- a/packages/plugin/src/Fields/Pro/Payments/CreditCardCvcField.php +++ b/packages/plugin/src/Fields/Pro/Payments/CreditCardCvcField.php @@ -7,7 +7,7 @@ class CreditCardCvcField extends TextField implements ExtraFieldInterface { - const FIELD_NAME = 'CreditCardCvc'; + public const FIELD_NAME = 'CreditCardCvc'; public function getType(): string { diff --git a/packages/plugin/src/Fields/Pro/Payments/CreditCardDetailsField.php b/packages/plugin/src/Fields/Pro/Payments/CreditCardDetailsField.php index 9a9eca32e..83b772c06 100644 --- a/packages/plugin/src/Fields/Pro/Payments/CreditCardDetailsField.php +++ b/packages/plugin/src/Fields/Pro/Payments/CreditCardDetailsField.php @@ -15,14 +15,14 @@ class CreditCardDetailsField extends AbstractField implements DefaultFieldInterf { use SingleValueTrait; - const LAYOUT_2_ROWS = 'two_rows'; - const LAYOUT_3_ROWS = 'three_rows'; + public const LAYOUT_2_ROWS = 'two_rows'; + public const LAYOUT_3_ROWS = 'three_rows'; - const FIELD_CARD_NUMBER = 'card_number'; - const FIELD_CARD_EXPIRY = 'card_expiry'; - const FIELD_CARD_CVC = 'card_cvc'; + public const FIELD_CARD_NUMBER = 'card_number'; + public const FIELD_CARD_EXPIRY = 'card_expiry'; + public const FIELD_CARD_CVC = 'card_cvc'; - const LAYOUTS = [ + public const LAYOUTS = [ self::LAYOUT_2_ROWS => [ [self::FIELD_CARD_NUMBER], [self::FIELD_CARD_EXPIRY, self::FIELD_CARD_CVC], diff --git a/packages/plugin/src/Fields/Pro/Payments/CreditCardExpiryField.php b/packages/plugin/src/Fields/Pro/Payments/CreditCardExpiryField.php index 1ca008fc9..86c720855 100644 --- a/packages/plugin/src/Fields/Pro/Payments/CreditCardExpiryField.php +++ b/packages/plugin/src/Fields/Pro/Payments/CreditCardExpiryField.php @@ -7,7 +7,7 @@ class CreditCardExpiryField extends TextField implements ExtraFieldInterface { - const FIELD_NAME = 'CreditCardExpDate'; + public const FIELD_NAME = 'CreditCardExpDate'; public function getType(): string { diff --git a/packages/plugin/src/Fields/Pro/Payments/CreditCardNumberField.php b/packages/plugin/src/Fields/Pro/Payments/CreditCardNumberField.php index 488a42f53..11f1cb448 100644 --- a/packages/plugin/src/Fields/Pro/Payments/CreditCardNumberField.php +++ b/packages/plugin/src/Fields/Pro/Payments/CreditCardNumberField.php @@ -7,7 +7,7 @@ class CreditCardNumberField extends TextField implements ExtraFieldInterface { - const FIELD_NAME = 'CreditCardNumber'; + public const FIELD_NAME = 'CreditCardNumber'; public function getType(): string { diff --git a/packages/plugin/src/Fields/Pro/RatingField.php b/packages/plugin/src/Fields/Pro/RatingField.php index 33365006b..8edbb0901 100644 --- a/packages/plugin/src/Fields/Pro/RatingField.php +++ b/packages/plugin/src/Fields/Pro/RatingField.php @@ -14,8 +14,8 @@ class RatingField extends AbstractField implements SingleValueInterface, ExtraFieldInterface, OptionsInterface { use SingleValueTrait; - const MIN_VALUE = 3; - const MAX_VALUE = 10; + public const MIN_VALUE = 3; + public const MAX_VALUE = 10; /** @var int */ protected $maxValue; diff --git a/packages/plugin/src/Fields/Pro/SaveField.php b/packages/plugin/src/Fields/Pro/SaveField.php index bfb7b5542..f4869ab9e 100644 --- a/packages/plugin/src/Fields/Pro/SaveField.php +++ b/packages/plugin/src/Fields/Pro/SaveField.php @@ -14,9 +14,9 @@ class SaveField extends AbstractField implements DefaultFieldInterface, SingleVa { use SingleStaticValueTrait; - const POSITION_LEFT = 'left'; - const POSITION_CENTER = 'center'; - const POSITION_RIGHT = 'right'; + public const POSITION_LEFT = 'left'; + public const POSITION_CENTER = 'center'; + public const POSITION_RIGHT = 'right'; /** @var string */ protected $label; diff --git a/packages/plugin/src/Fields/Pro/SignatureField.php b/packages/plugin/src/Fields/Pro/SignatureField.php index 9688e89d5..85ef34e49 100644 --- a/packages/plugin/src/Fields/Pro/SignatureField.php +++ b/packages/plugin/src/Fields/Pro/SignatureField.php @@ -12,12 +12,12 @@ class SignatureField extends AbstractField implements SingleValueInterface, Extr { use SingleValueTrait; - const DEFAULT_WIDTH = 400; - const DEFAULT_HEIGHT = 100; - const DEFAULT_BORDER_COLOR = '#999999'; - const DEFAULT_BACKGROUND_COLOR = 'rgba(0,0,0,0)'; - const DEFAULT_PEN_COLOR = '#000000'; - const DEFAULT_PEN_DOT_SIZE = 2.5; + public const DEFAULT_WIDTH = 400; + public const DEFAULT_HEIGHT = 100; + public const DEFAULT_BORDER_COLOR = '#999999'; + public const DEFAULT_BACKGROUND_COLOR = 'rgba(0,0,0,0)'; + public const DEFAULT_PEN_COLOR = '#000000'; + public const DEFAULT_PEN_DOT_SIZE = 2.5; /** @var int */ protected $width; diff --git a/packages/plugin/src/Fields/Pro/TableField.php b/packages/plugin/src/Fields/Pro/TableField.php index 8068eb873..2e322d239 100644 --- a/packages/plugin/src/Fields/Pro/TableField.php +++ b/packages/plugin/src/Fields/Pro/TableField.php @@ -12,9 +12,9 @@ class TableField extends AbstractField implements MultipleValueInterface, MultiD { use MultipleValueTrait; - const COLUMN_TYPE_STRING = 'string'; - const COLUMN_TYPE_SELECT = 'select'; - const COLUMN_TYPE_CHECKBOX = 'checkbox'; + public const COLUMN_TYPE_STRING = 'string'; + public const COLUMN_TYPE_SELECT = 'select'; + public const COLUMN_TYPE_CHECKBOX = 'checkbox'; /** @var array */ protected $tableLayout; diff --git a/packages/plugin/src/Fields/SubmitField.php b/packages/plugin/src/Fields/SubmitField.php index b39b058e1..45c08762e 100644 --- a/packages/plugin/src/Fields/SubmitField.php +++ b/packages/plugin/src/Fields/SubmitField.php @@ -22,13 +22,13 @@ class SubmitField extends AbstractField implements DefaultFieldInterface, SingleValueInterface, InputOnlyInterface, NoStorageInterface { use SingleStaticValueTrait; - const PREVIOUS_PAGE_INPUT_NAME = 'form_previous_page_button'; - const SUBMIT_INPUT_NAME = 'form_page_submit'; + public const PREVIOUS_PAGE_INPUT_NAME = 'form_previous_page_button'; + public const SUBMIT_INPUT_NAME = 'form_page_submit'; - const POSITION_LEFT = 'left'; - const POSITION_CENTER = 'center'; - const POSITION_RIGHT = 'right'; - const POSITION_SPREAD = 'spread'; + public const POSITION_LEFT = 'left'; + public const POSITION_CENTER = 'center'; + public const POSITION_RIGHT = 'right'; + public const POSITION_SPREAD = 'spread'; /** @var string */ protected $labelNext; diff --git a/packages/plugin/src/Fields/TextField.php b/packages/plugin/src/Fields/TextField.php index c44d5d036..cc5948fbe 100644 --- a/packages/plugin/src/Fields/TextField.php +++ b/packages/plugin/src/Fields/TextField.php @@ -23,7 +23,7 @@ class TextField extends AbstractField implements SingleValueInterface, Placehold { use PlaceholderTrait; use SingleValueTrait; - const MAXIMUM_FIELD_LENGTH = 100; + public const MAXIMUM_FIELD_LENGTH = 100; /** @var int */ protected $maxLength; diff --git a/packages/plugin/src/Freeform.php b/packages/plugin/src/Freeform.php index 39801a8d3..c1a37d29c 100644 --- a/packages/plugin/src/Freeform.php +++ b/packages/plugin/src/Freeform.php @@ -169,57 +169,56 @@ */ class Freeform extends Plugin { - const TRANSLATION_CATEGORY = 'freeform'; - - const VIEW_DASHBOARD = 'dashboard'; - const VIEW_FORMS = 'forms'; - const VIEW_SUBMISSIONS = 'submissions'; - const VIEW_FIELDS = 'fields'; - const VIEW_NOTIFICATIONS = 'notifications'; - const VIEW_SETTINGS = 'settings'; - const VIEW_RESOURCES = 'resources'; - const VIEW_EXPORT_PROFILES = 'export-profiles'; - - const FIELD_DISPLAY_ORDER_TYPE = 'type'; - const FIELD_DISPLAY_ORDER_NAME = 'name'; - - const EDITION_LITE = 'lite'; - const EDITION_PRO = 'pro'; - - const PERMISSIONS_HELP_LINK = 'https://docs.solspace.com/craft/freeform/v3/setup/demo-templates.html'; - const PERMISSION_NAMESPACE = 'Freeform'; - - const VERSION_CACHE_KEY = 'freeform_version'; - const VERSION_CACHE_TIMESTAMP_KEY = 'freeform_version_timestamp'; - const VERSION_CACHE_TTL = 86400; // 24-hours - - const PERMISSION_FORMS_ACCESS = 'freeform-formsAccess'; - const PERMISSION_FORMS_CREATE = 'freeform-formsCreate'; - const PERMISSION_FORMS_DELETE = 'freeform-formsDelete'; - const PERMISSION_FORMS_MANAGE = 'freeform-formsManage'; - const PERMISSION_FORMS_MANAGE_INDIVIDUAL = 'freeform-formsManageIndividual'; - const PERMISSION_FIELDS_ACCESS = 'freeform-fieldsAccess'; - const PERMISSION_FIELDS_MANAGE = 'freeform-fieldsManage'; - const PERMISSION_SETTINGS_ACCESS = 'freeform-settingsAccess'; - const PERMISSION_SUBMISSIONS_ACCESS = 'freeform-submissionsAccess'; - const PERMISSION_SUBMISSIONS_READ = 'freeform-submissionsRead'; - const PERMISSION_SUBMISSIONS_READ_INDIVIDUAL = 'freeform-submissionsReadIndividual'; - const PERMISSION_SUBMISSIONS_MANAGE = 'freeform-submissionsManage'; - const PERMISSION_SUBMISSIONS_MANAGE_INDIVIDUAL = 'freeform-submissionsManageIndividual'; - const PERMISSION_NOTIFICATIONS_ACCESS = 'freeform-notificationsAccess'; - const PERMISSION_NOTIFICATIONS_MANAGE = 'freeform-notificationsManage'; - const PERMISSION_DASHBOARD_ACCESS = 'freeform-dashboardAccess'; - const PERMISSION_ERROR_LOG_ACCESS = 'freeform-errorLogAccess'; - const PERMISSION_ERROR_LOG_MANAGE = 'freeform-errorLogManage'; - const PERMISSION_RESOURCES = 'freeform-resources'; - const PERMISSION_ACCESS_QUICK_EXPORT = 'freeform-access-quick-export'; - const PERMISSION_EXPORT_PROFILES_ACCESS = 'freeform-pro-exportProfilesAccess'; - const PERMISSION_EXPORT_PROFILES_MANAGE = 'freeform-pro-exportProfilesManage'; - - const EVENT_REGISTER_SUBNAV_ITEMS = 'registerSubnavItems'; - - /** @var bool */ - public $hasCpSettings = true; + public const TRANSLATION_CATEGORY = 'freeform'; + + public const VIEW_DASHBOARD = 'dashboard'; + public const VIEW_FORMS = 'forms'; + public const VIEW_SUBMISSIONS = 'submissions'; + public const VIEW_FIELDS = 'fields'; + public const VIEW_NOTIFICATIONS = 'notifications'; + public const VIEW_SETTINGS = 'settings'; + public const VIEW_RESOURCES = 'resources'; + public const VIEW_EXPORT_PROFILES = 'export-profiles'; + + public const FIELD_DISPLAY_ORDER_TYPE = 'type'; + public const FIELD_DISPLAY_ORDER_NAME = 'name'; + + public const EDITION_LITE = 'lite'; + public const EDITION_PRO = 'pro'; + + public const PERMISSIONS_HELP_LINK = 'https://docs.solspace.com/craft/freeform/v3/setup/demo-templates.html'; + public const PERMISSION_NAMESPACE = 'Freeform'; + + public const VERSION_CACHE_KEY = 'freeform_version'; + public const VERSION_CACHE_TIMESTAMP_KEY = 'freeform_version_timestamp'; + public const VERSION_CACHE_TTL = 86400; // 24-hours + + public const PERMISSION_FORMS_ACCESS = 'freeform-formsAccess'; + public const PERMISSION_FORMS_CREATE = 'freeform-formsCreate'; + public const PERMISSION_FORMS_DELETE = 'freeform-formsDelete'; + public const PERMISSION_FORMS_MANAGE = 'freeform-formsManage'; + public const PERMISSION_FORMS_MANAGE_INDIVIDUAL = 'freeform-formsManageIndividual'; + public const PERMISSION_FIELDS_ACCESS = 'freeform-fieldsAccess'; + public const PERMISSION_FIELDS_MANAGE = 'freeform-fieldsManage'; + public const PERMISSION_SETTINGS_ACCESS = 'freeform-settingsAccess'; + public const PERMISSION_SUBMISSIONS_ACCESS = 'freeform-submissionsAccess'; + public const PERMISSION_SUBMISSIONS_READ = 'freeform-submissionsRead'; + public const PERMISSION_SUBMISSIONS_READ_INDIVIDUAL = 'freeform-submissionsReadIndividual'; + public const PERMISSION_SUBMISSIONS_MANAGE = 'freeform-submissionsManage'; + public const PERMISSION_SUBMISSIONS_MANAGE_INDIVIDUAL = 'freeform-submissionsManageIndividual'; + public const PERMISSION_NOTIFICATIONS_ACCESS = 'freeform-notificationsAccess'; + public const PERMISSION_NOTIFICATIONS_MANAGE = 'freeform-notificationsManage'; + public const PERMISSION_DASHBOARD_ACCESS = 'freeform-dashboardAccess'; + public const PERMISSION_ERROR_LOG_ACCESS = 'freeform-errorLogAccess'; + public const PERMISSION_ERROR_LOG_MANAGE = 'freeform-errorLogManage'; + public const PERMISSION_RESOURCES = 'freeform-resources'; + public const PERMISSION_ACCESS_QUICK_EXPORT = 'freeform-access-quick-export'; + public const PERMISSION_EXPORT_PROFILES_ACCESS = 'freeform-pro-exportProfilesAccess'; + public const PERMISSION_EXPORT_PROFILES_MANAGE = 'freeform-pro-exportProfilesManage'; + + public const EVENT_REGISTER_SUBNAV_ITEMS = 'registerSubnavItems'; + + public bool $hasCpSettings = true; /** * @return Freeform|Plugin @@ -308,10 +307,7 @@ public function init() } } - /** - * @return null|array - */ - public function getCpNavItem() + public function getCpNavItem(): ?array { $navItem = parent::getCpNavItem(); @@ -332,7 +328,7 @@ public function getCpNavItem() /** * On install - insert default statuses. */ - public function afterInstall() + public function afterInstall(): void { $fieldService = self::getInstance()->fields; diff --git a/packages/plugin/src/Integrations/CRM/ActiveCampaign.php b/packages/plugin/src/Integrations/CRM/ActiveCampaign.php index 5678d414c..b8ef0fe46 100644 --- a/packages/plugin/src/Integrations/CRM/ActiveCampaign.php +++ b/packages/plugin/src/Integrations/CRM/ActiveCampaign.php @@ -22,17 +22,17 @@ class ActiveCampaign extends AbstractCRMIntegration { - const SETTING_API_TOKEN = 'api_token'; - const SETTING_API_URL = 'api_url'; - const SETTING_PIPELINE = 'pipeline'; - const SETTING_PIPELINE_ID = 'pipeline_id'; - const SETTING_STAGE = 'stage'; - const SETTING_STAGE_ID = 'stage_id'; - const SETTING_OWNER = 'owner'; - const SETTING_OWNER_ID = 'owner_id'; - - const TITLE = 'Active Campaign'; - const LOG_CATEGORY = 'Active Campaign'; + public const SETTING_API_TOKEN = 'api_token'; + public const SETTING_API_URL = 'api_url'; + public const SETTING_PIPELINE = 'pipeline'; + public const SETTING_PIPELINE_ID = 'pipeline_id'; + public const SETTING_STAGE = 'stage'; + public const SETTING_STAGE_ID = 'stage_id'; + public const SETTING_OWNER = 'owner'; + public const SETTING_OWNER_ID = 'owner_id'; + + public const TITLE = 'Active Campaign'; + public const LOG_CATEGORY = 'Active Campaign'; /** * Returns a list of additional settings for this integration @@ -114,7 +114,7 @@ public function pushObject(array $keyValueList, $formFields = null): bool foreach ($keyValueList as $key => $value) { preg_match('/^(\w+)___(.+)$/', $key, $matches); - list($all, $target, $propName) = $matches; + [$all, $target, $propName] = $matches; if (is_numeric($propName)) { switch ($target) { diff --git a/packages/plugin/src/Integrations/CRM/Freshdesk.php b/packages/plugin/src/Integrations/CRM/Freshdesk.php index 36e68e16d..3e5a13365 100644 --- a/packages/plugin/src/Integrations/CRM/Freshdesk.php +++ b/packages/plugin/src/Integrations/CRM/Freshdesk.php @@ -12,15 +12,15 @@ class Freshdesk extends AbstractCRMIntegration { - const SETTING_API_KEY = 'api_key'; - const SETTING_DOMAIN = 'domain'; - const SETTING_PRIORITY = 'priority'; - const SETTING_STATUS = 'status'; - const SETTING_SOURCE = 'source'; - const SETTING_TYPE = 'type'; - - const TITLE = 'Freshdesk'; - const LOG_CATEGORY = 'Freshdesk'; + public const SETTING_API_KEY = 'api_key'; + public const SETTING_DOMAIN = 'domain'; + public const SETTING_PRIORITY = 'priority'; + public const SETTING_STATUS = 'status'; + public const SETTING_SOURCE = 'source'; + public const SETTING_TYPE = 'type'; + + public const TITLE = 'Freshdesk'; + public const LOG_CATEGORY = 'Freshdesk'; /** * Returns a list of additional settings for this integration diff --git a/packages/plugin/src/Integrations/CRM/HubSpot.php b/packages/plugin/src/Integrations/CRM/HubSpot.php index cd3eac90c..0052ea2af 100644 --- a/packages/plugin/src/Integrations/CRM/HubSpot.php +++ b/packages/plugin/src/Integrations/CRM/HubSpot.php @@ -23,13 +23,13 @@ class HubSpot extends AbstractCRMIntegration { - const SETTING_API_KEY = 'api_key'; - const SETTING_IP_FIELD = 'ip_field'; - const SETTING_APPEND_COMPANY_DATA = 'append_company_data'; - const SETTING_APPEND_CONTACT_DATA = 'append_contact_data'; + public const SETTING_API_KEY = 'api_key'; + public const SETTING_IP_FIELD = 'ip_field'; + public const SETTING_APPEND_COMPANY_DATA = 'append_company_data'; + public const SETTING_APPEND_CONTACT_DATA = 'append_contact_data'; - const TITLE = 'HubSpot'; - const LOG_CATEGORY = 'HubSpot'; + public const TITLE = 'HubSpot'; + public const LOG_CATEGORY = 'HubSpot'; /** * Returns a list of additional settings for this integration @@ -92,7 +92,7 @@ public function pushObject(array $keyValueList, $formFields = null): bool foreach ($keyValueList as $key => $value) { preg_match('/^(\w+)___(.+)$/', $key, $matches); - list($all, $target, $propName) = $matches; + [$all, $target, $propName] = $matches; $value = $this->formatValue($value, $formFields[$key]); diff --git a/packages/plugin/src/Integrations/CRM/Infusionsoft.php b/packages/plugin/src/Integrations/CRM/Infusionsoft.php index bdf4bbb1f..64fc7b0e3 100644 --- a/packages/plugin/src/Integrations/CRM/Infusionsoft.php +++ b/packages/plugin/src/Integrations/CRM/Infusionsoft.php @@ -25,10 +25,10 @@ class Infusionsoft extends CRMOAuthConnector implements RefreshTokenInterface { - const TITLE = 'Infusionsoft'; - const LOG_CATEGORY = 'Infusionsoft'; + public const TITLE = 'Infusionsoft'; + public const LOG_CATEGORY = 'Infusionsoft'; - const SETTING_REFRESH_TOKEN = 'refresh_token'; + public const SETTING_REFRESH_TOKEN = 'refresh_token'; protected static $_REFRESHED_TOKENS = []; diff --git a/packages/plugin/src/Integrations/CRM/Insightly.php b/packages/plugin/src/Integrations/CRM/Insightly.php index 1f406b5cc..c7eea556e 100644 --- a/packages/plugin/src/Integrations/CRM/Insightly.php +++ b/packages/plugin/src/Integrations/CRM/Insightly.php @@ -11,10 +11,10 @@ class Insightly extends AbstractCRMIntegration { - const SETTING_API_KEY = 'api_key'; + public const SETTING_API_KEY = 'api_key'; - const TITLE = 'Insightly'; - const LOG_CATEGORY = 'Insightly'; + public const TITLE = 'Insightly'; + public const LOG_CATEGORY = 'Insightly'; /** * Returns a list of additional settings for this integration diff --git a/packages/plugin/src/Integrations/CRM/Pardot.php b/packages/plugin/src/Integrations/CRM/Pardot.php index 6e54a95a9..7fac227f6 100644 --- a/packages/plugin/src/Integrations/CRM/Pardot.php +++ b/packages/plugin/src/Integrations/CRM/Pardot.php @@ -13,12 +13,12 @@ class Pardot extends AbstractCRMIntegration { - const TITLE = 'Pardot (legacy)'; - const LOG_CATEGORY = 'Pardot'; + public const TITLE = 'Pardot (legacy)'; + public const LOG_CATEGORY = 'Pardot'; - const SETTING_EMAIL = 'email'; - const SETTING_PASSWORD = 'password'; - const SETTING_USER_KEY = 'user_key'; + public const SETTING_EMAIL = 'email'; + public const SETTING_PASSWORD = 'password'; + public const SETTING_USER_KEY = 'user_key'; /** * Returns a list of additional settings for this integration diff --git a/packages/plugin/src/Integrations/CRM/PardotV5.php b/packages/plugin/src/Integrations/CRM/PardotV5.php index e1ed129a1..6d960445a 100644 --- a/packages/plugin/src/Integrations/CRM/PardotV5.php +++ b/packages/plugin/src/Integrations/CRM/PardotV5.php @@ -14,11 +14,11 @@ class PardotV5 extends CRMOAuthConnector implements RefreshTokenInterface { - const TITLE = 'Pardot (v5)'; - const LOG_CATEGORY = 'Pardot'; + public const TITLE = 'Pardot (v5)'; + public const LOG_CATEGORY = 'Pardot'; - const SETTING_BUSINESS_UNIT_ID = 'business_unit_id'; - const SETTING_REFRESH_TOKEN = 'refresh_token'; + public const SETTING_BUSINESS_UNIT_ID = 'business_unit_id'; + public const SETTING_REFRESH_TOKEN = 'refresh_token'; /** * Returns a list of additional settings for this integration diff --git a/packages/plugin/src/Integrations/CRM/Pipedrive/AbstractPipedriveIntegration.php b/packages/plugin/src/Integrations/CRM/Pipedrive/AbstractPipedriveIntegration.php index 57fc4b549..25d163001 100644 --- a/packages/plugin/src/Integrations/CRM/Pipedrive/AbstractPipedriveIntegration.php +++ b/packages/plugin/src/Integrations/CRM/Pipedrive/AbstractPipedriveIntegration.php @@ -14,15 +14,15 @@ abstract class AbstractPipedriveIntegration extends AbstractCRMIntegration { - const SETTING_DOMAIN = 'domain'; - const SETTING_API_TOKEN = 'api_token'; - const SETTING_USER_ID = 'user_id'; - const SETTING_STAGE_ID = 'stage_id'; - const SETTING_DETECT_DUPLICATES = 'detect_duplicates'; - - const PREFIX_ORGANIZATION = 'org'; - const PREFIX_PERSON = 'prsn'; - const PREFIX_DEALS = 'deals'; + public const SETTING_DOMAIN = 'domain'; + public const SETTING_API_TOKEN = 'api_token'; + public const SETTING_USER_ID = 'user_id'; + public const SETTING_STAGE_ID = 'stage_id'; + public const SETTING_DETECT_DUPLICATES = 'detect_duplicates'; + + public const PREFIX_ORGANIZATION = 'org'; + public const PREFIX_PERSON = 'prsn'; + public const PREFIX_DEALS = 'deals'; /** * Returns a list of additional settings for this integration diff --git a/packages/plugin/src/Integrations/CRM/PipedriveDeals.php b/packages/plugin/src/Integrations/CRM/PipedriveDeals.php index 49efad79f..93013445c 100644 --- a/packages/plugin/src/Integrations/CRM/PipedriveDeals.php +++ b/packages/plugin/src/Integrations/CRM/PipedriveDeals.php @@ -18,8 +18,8 @@ class PipedriveDeals extends AbstractPipedriveIntegration { - const TITLE = 'Pipedrive Deals'; - const LOG_CATEGORY = 'Pipedrive Deals'; + public const TITLE = 'Pipedrive Deals'; + public const LOG_CATEGORY = 'Pipedrive Deals'; /** * Returns a list of additional settings for this integration diff --git a/packages/plugin/src/Integrations/CRM/PipedriveLeads.php b/packages/plugin/src/Integrations/CRM/PipedriveLeads.php index a7f3e9685..759b0e8ba 100644 --- a/packages/plugin/src/Integrations/CRM/PipedriveLeads.php +++ b/packages/plugin/src/Integrations/CRM/PipedriveLeads.php @@ -17,8 +17,8 @@ class PipedriveLeads extends AbstractPipedriveIntegration { - const TITLE = 'Pipedrive Leads'; - const LOG_CATEGORY = 'Pipedrive Leads'; + public const TITLE = 'Pipedrive Leads'; + public const LOG_CATEGORY = 'Pipedrive Leads'; /** * Push objects to the CRM. diff --git a/packages/plugin/src/Integrations/CRM/SalesforceLead.php b/packages/plugin/src/Integrations/CRM/SalesforceLead.php index fcaf06f9b..4962c8c39 100644 --- a/packages/plugin/src/Integrations/CRM/SalesforceLead.php +++ b/packages/plugin/src/Integrations/CRM/SalesforceLead.php @@ -25,24 +25,24 @@ class SalesforceLead extends AbstractSalesforceIntegration { - const TITLE = 'Salesforce Lead'; - const LOG_CATEGORY = 'Salesforce'; - - const SETTING_SITE_CLIENT_ID = 'client_id'; - const SETTING_SITE_CLIENT_SECRET = 'client_secret'; - const SETTING_SITE_USER_LOGIN = 'username'; - const SETTING_SITE_USER_PASSWORD = 'password'; - const SETTING_CLIENT_ID = 'salesforce_client_id'; - const SETTING_CLIENT_SECRET = 'salesforce_client_secret'; - const SETTING_USER_LOGIN = 'salesforce_username'; - const SETTING_USER_PASSWORD = 'salesforce_password'; - const SETTING_LEAD_OWNER = 'salesforce_lead_owner'; - const SETTING_SANDBOX = 'salesforce_sandbox'; - const SETTING_CUSTOM_URL = 'salesforce_custom_url'; - const SETTING_TASKS_FOR_DUPLICATES = 'tasks_for_duplicates'; - const SETTING_TASKS_SUBJECT = 'tasks_subject'; - const SETTING_TASKS_DUE_DATE = 'tasks_due_date'; - const SETTING_INSTANCE = 'instance'; + public const TITLE = 'Salesforce Lead'; + public const LOG_CATEGORY = 'Salesforce'; + + public const SETTING_SITE_CLIENT_ID = 'client_id'; + public const SETTING_SITE_CLIENT_SECRET = 'client_secret'; + public const SETTING_SITE_USER_LOGIN = 'username'; + public const SETTING_SITE_USER_PASSWORD = 'password'; + public const SETTING_CLIENT_ID = 'salesforce_client_id'; + public const SETTING_CLIENT_SECRET = 'salesforce_client_secret'; + public const SETTING_USER_LOGIN = 'salesforce_username'; + public const SETTING_USER_PASSWORD = 'salesforce_password'; + public const SETTING_LEAD_OWNER = 'salesforce_lead_owner'; + public const SETTING_SANDBOX = 'salesforce_sandbox'; + public const SETTING_CUSTOM_URL = 'salesforce_custom_url'; + public const SETTING_TASKS_FOR_DUPLICATES = 'tasks_for_duplicates'; + public const SETTING_TASKS_SUBJECT = 'tasks_subject'; + public const SETTING_TASKS_DUE_DATE = 'tasks_due_date'; + public const SETTING_INSTANCE = 'instance'; /** * Returns a list of additional settings for this integration diff --git a/packages/plugin/src/Integrations/CRM/SalesforceOpportunity.php b/packages/plugin/src/Integrations/CRM/SalesforceOpportunity.php index 51bd1e6fd..b0197112b 100644 --- a/packages/plugin/src/Integrations/CRM/SalesforceOpportunity.php +++ b/packages/plugin/src/Integrations/CRM/SalesforceOpportunity.php @@ -26,25 +26,25 @@ class SalesforceOpportunity extends AbstractSalesforceIntegration { - const TITLE = 'Salesforce Opportunity'; - const LOG_CATEGORY = 'Salesforce'; - - const SETTING_CLIENT_ID = 'client_id'; - const SETTING_CLIENT_SECRET = 'client_secret'; - const SETTING_USER_LOGIN = 'username'; - const SETTING_USER_PASSWORD = 'password'; - const SETTING_CLOSE_DATE = 'close_date'; - const SETTING_STAGE = 'stage'; - const SETTING_SANDBOX = 'sandbox'; - const SETTING_APPEND_ACCOUNT_DATA = 'append_account_data'; - const SETTING_APPEND_CONTACT_DATA = 'append_contact_data'; - const SETTING_DOMAIN_DUPLICATE_CHECK_LOGIC = 'domain_duplicate_check_logic'; - const SETTING_INSTANCE_URL = 'instance_url'; - const SETTING_DATA_URL = 'data_url'; - - const FIELD_CATEGORY_OPPORTUNITY = 'opportunity'; - const FIELD_CATEGORY_ACCOUNT = 'account'; - const FIELD_CATEGORY_CONTACT = 'contact'; + public const TITLE = 'Salesforce Opportunity'; + public const LOG_CATEGORY = 'Salesforce'; + + public const SETTING_CLIENT_ID = 'client_id'; + public const SETTING_CLIENT_SECRET = 'client_secret'; + public const SETTING_USER_LOGIN = 'username'; + public const SETTING_USER_PASSWORD = 'password'; + public const SETTING_CLOSE_DATE = 'close_date'; + public const SETTING_STAGE = 'stage'; + public const SETTING_SANDBOX = 'sandbox'; + public const SETTING_APPEND_ACCOUNT_DATA = 'append_account_data'; + public const SETTING_APPEND_CONTACT_DATA = 'append_contact_data'; + public const SETTING_DOMAIN_DUPLICATE_CHECK_LOGIC = 'domain_duplicate_check_logic'; + public const SETTING_INSTANCE_URL = 'instance_url'; + public const SETTING_DATA_URL = 'data_url'; + + public const FIELD_CATEGORY_OPPORTUNITY = 'opportunity'; + public const FIELD_CATEGORY_ACCOUNT = 'account'; + public const FIELD_CATEGORY_CONTACT = 'contact'; /** * Returns a list of additional settings for this integration @@ -252,7 +252,7 @@ public function pushObject(array $keyValueList, $formFields = null): bool continue; } - list($_, $category, $handle) = $matches; + [$_, $category, $handle] = $matches; switch ($category) { case self::FIELD_CATEGORY_OPPORTUNITY: diff --git a/packages/plugin/src/Integrations/CRM/SharpSpring.php b/packages/plugin/src/Integrations/CRM/SharpSpring.php index 1c3de167d..03e74504d 100644 --- a/packages/plugin/src/Integrations/CRM/SharpSpring.php +++ b/packages/plugin/src/Integrations/CRM/SharpSpring.php @@ -23,10 +23,10 @@ class SharpSpring extends AbstractCRMIntegration { - const SETTING_SECRET_KEY = 'secret_key'; - const SETTING_ACCOUNT_ID = 'account_id'; - const TITLE = 'SharpSpring'; - const LOG_CATEGORY = 'SharpSpring'; + public const SETTING_SECRET_KEY = 'secret_key'; + public const SETTING_ACCOUNT_ID = 'account_id'; + public const TITLE = 'SharpSpring'; + public const LOG_CATEGORY = 'SharpSpring'; /** * Returns a list of additional settings for this integration @@ -68,7 +68,7 @@ public function pushObject(array $keyValueList, $formFields = null): bool foreach ($keyValueList as $key => $value) { preg_match('/^(\w+)___(.+)$/', $key, $matches); - list($all, $target, $propName) = $matches; + [$all, $target, $propName] = $matches; switch ($target) { case 'contact': diff --git a/packages/plugin/src/Integrations/CRM/Zoho/AbstractZohoIntegration.php b/packages/plugin/src/Integrations/CRM/Zoho/AbstractZohoIntegration.php index 469ccf66c..b96045430 100644 --- a/packages/plugin/src/Integrations/CRM/Zoho/AbstractZohoIntegration.php +++ b/packages/plugin/src/Integrations/CRM/Zoho/AbstractZohoIntegration.php @@ -13,10 +13,10 @@ abstract class AbstractZohoIntegration extends CRMOAuthConnector implements RefreshTokenInterface { - const SETTING_REFRESH_TOKEN = 'refresh_token'; - const SETTING_DOMAIN = 'domain'; - const SETTING_API_DOMAIN = 'api_domain'; - const SETTING_ACCOUNTS_SERVER = 'accounts_server'; + public const SETTING_REFRESH_TOKEN = 'refresh_token'; + public const SETTING_DOMAIN = 'domain'; + public const SETTING_API_DOMAIN = 'api_domain'; + public const SETTING_ACCOUNTS_SERVER = 'accounts_server'; /** * Returns a list of additional settings for this integration diff --git a/packages/plugin/src/Integrations/CRM/ZohoDeal.php b/packages/plugin/src/Integrations/CRM/ZohoDeal.php index 65404e183..71bca06c0 100644 --- a/packages/plugin/src/Integrations/CRM/ZohoDeal.php +++ b/packages/plugin/src/Integrations/CRM/ZohoDeal.php @@ -18,18 +18,18 @@ class ZohoDeal extends AbstractZohoIntegration { - const TITLE = 'Zoho Deal'; - const LOG_CATEGORY = 'Zoho'; + public const TITLE = 'Zoho Deal'; + public const LOG_CATEGORY = 'Zoho'; - const MODULE_DEALS = 'Deals'; - const MODULE_ACCOUNTS = 'Accounts'; - const MODULE_CONTACTS = 'Contacts'; + public const MODULE_DEALS = 'Deals'; + public const MODULE_ACCOUNTS = 'Accounts'; + public const MODULE_CONTACTS = 'Contacts'; - const CATEGORY_DEAL = 'deal'; - const CATEGORY_ACCOUNT = 'account'; - const CATEGORY_CONTACT = 'contact'; + public const CATEGORY_DEAL = 'deal'; + public const CATEGORY_ACCOUNT = 'account'; + public const CATEGORY_CONTACT = 'contact'; - const DEFAULT_CONTACT_ROLE = '4201883000000006871'; + public const DEFAULT_CONTACT_ROLE = '4201883000000006871'; public function getModule(): string { @@ -53,7 +53,7 @@ public function pushObject(array $keyValueList, $formFields = null): bool continue; } - list($_, $category, $handle) = $matches; + [$_, $category, $handle] = $matches; switch ($category) { case self::CATEGORY_DEAL: diff --git a/packages/plugin/src/Integrations/CRM/ZohoLead.php b/packages/plugin/src/Integrations/CRM/ZohoLead.php index 912114f35..805d81370 100644 --- a/packages/plugin/src/Integrations/CRM/ZohoLead.php +++ b/packages/plugin/src/Integrations/CRM/ZohoLead.php @@ -18,8 +18,8 @@ class ZohoLead extends AbstractZohoIntegration { - const TITLE = 'Zoho Lead'; - const LOG_CATEGORY = 'Zoho'; + public const TITLE = 'Zoho Lead'; + public const LOG_CATEGORY = 'Zoho'; public function getModule(): string { diff --git a/packages/plugin/src/Integrations/MailingLists/ActiveCampaign.php b/packages/plugin/src/Integrations/MailingLists/ActiveCampaign.php index 0802069f7..5d6628175 100644 --- a/packages/plugin/src/Integrations/MailingLists/ActiveCampaign.php +++ b/packages/plugin/src/Integrations/MailingLists/ActiveCampaign.php @@ -13,11 +13,11 @@ class ActiveCampaign extends AbstractMailingListIntegration { - const SETTING_API_URL = 'api_url'; - const SETTING_API_KEY = 'api_key'; + public const SETTING_API_URL = 'api_url'; + public const SETTING_API_KEY = 'api_key'; - const TITLE = 'ActiveCampaign'; - const LOG_CATEGORY = 'ActiveCampaign'; + public const TITLE = 'ActiveCampaign'; + public const LOG_CATEGORY = 'ActiveCampaign'; /** * Returns a list of additional settings for this integration diff --git a/packages/plugin/src/Integrations/MailingLists/Campaign.php b/packages/plugin/src/Integrations/MailingLists/Campaign.php index 05131b443..d544f771d 100644 --- a/packages/plugin/src/Integrations/MailingLists/Campaign.php +++ b/packages/plugin/src/Integrations/MailingLists/Campaign.php @@ -28,8 +28,8 @@ class Campaign extends AbstractMailingListIntegration { - const TITLE = 'Craft Campaign'; - const LOG_CATEGORY = 'CraftCampaign'; + public const TITLE = 'Craft Campaign'; + public const LOG_CATEGORY = 'CraftCampaign'; /** @var array */ private static $fieldCache; diff --git a/packages/plugin/src/Integrations/MailingLists/CampaignMonitor.php b/packages/plugin/src/Integrations/MailingLists/CampaignMonitor.php index 0546f9ba0..b5828af2f 100644 --- a/packages/plugin/src/Integrations/MailingLists/CampaignMonitor.php +++ b/packages/plugin/src/Integrations/MailingLists/CampaignMonitor.php @@ -23,11 +23,11 @@ class CampaignMonitor extends AbstractMailingListIntegration { - const TITLE = 'Campaign Monitor'; - const LOG_CATEGORY = 'Campaign Monitor'; + public const TITLE = 'Campaign Monitor'; + public const LOG_CATEGORY = 'Campaign Monitor'; - const SETTING_API_KEY = 'api_key'; - const SETTING_CLIENT_ID = 'client_id'; + public const SETTING_API_KEY = 'api_key'; + public const SETTING_CLIENT_ID = 'client_id'; /** * Returns a list of additional settings for this integration diff --git a/packages/plugin/src/Integrations/MailingLists/ConstantContact.php b/packages/plugin/src/Integrations/MailingLists/ConstantContact.php index 8fcfb456b..d0bdf8049 100644 --- a/packages/plugin/src/Integrations/MailingLists/ConstantContact.php +++ b/packages/plugin/src/Integrations/MailingLists/ConstantContact.php @@ -21,8 +21,8 @@ class ConstantContact extends MailingListOAuthConnector { - const TITLE = 'Constant Contact (legacy)'; - const LOG_CATEGORY = 'Constant Contact (legacy)'; + public const TITLE = 'Constant Contact (legacy)'; + public const LOG_CATEGORY = 'Constant Contact (legacy)'; /** * Returns the MailingList service provider short name diff --git a/packages/plugin/src/Integrations/MailingLists/ConstantContact3.php b/packages/plugin/src/Integrations/MailingLists/ConstantContact3.php index 68979ccb2..83e7eacd8 100644 --- a/packages/plugin/src/Integrations/MailingLists/ConstantContact3.php +++ b/packages/plugin/src/Integrations/MailingLists/ConstantContact3.php @@ -23,9 +23,9 @@ class ConstantContact3 extends MailingListOAuthConnector { - const TITLE = 'Constant Contact'; - const LOG_CATEGORY = 'Constant Contact'; - const SETTING_REFRESH_TOKEN = 'refresh_token'; + public const TITLE = 'Constant Contact'; + public const LOG_CATEGORY = 'Constant Contact'; + public const SETTING_REFRESH_TOKEN = 'refresh_token'; /** * Returns the MailingList service provider short name diff --git a/packages/plugin/src/Integrations/MailingLists/Dotmailer.php b/packages/plugin/src/Integrations/MailingLists/Dotmailer.php index f03a6abc7..12bff07ae 100644 --- a/packages/plugin/src/Integrations/MailingLists/Dotmailer.php +++ b/packages/plugin/src/Integrations/MailingLists/Dotmailer.php @@ -24,13 +24,13 @@ class Dotmailer extends AbstractMailingListIntegration { - const SETTING_USER_EMAIL = 'user_email'; - const SETTING_USER_PASS = 'user_pass'; - const SETTING_DOUBLE_OPT_IN = 'double_opt_in'; - const SETTING_ENDPOINT = 'endpoint'; + public const SETTING_USER_EMAIL = 'user_email'; + public const SETTING_USER_PASS = 'user_pass'; + public const SETTING_DOUBLE_OPT_IN = 'double_opt_in'; + public const SETTING_ENDPOINT = 'endpoint'; - const TITLE = 'Dotmailer'; - const LOG_CATEGORY = 'Dotmailer'; + public const TITLE = 'Dotmailer'; + public const LOG_CATEGORY = 'Dotmailer'; /** * Returns a list of additional settings for this integration diff --git a/packages/plugin/src/Integrations/MailingLists/MailChimp.php b/packages/plugin/src/Integrations/MailingLists/MailChimp.php index 2004b44a0..2b2cdac98 100644 --- a/packages/plugin/src/Integrations/MailingLists/MailChimp.php +++ b/packages/plugin/src/Integrations/MailingLists/MailChimp.php @@ -24,13 +24,13 @@ class MailChimp extends AbstractMailingListIntegration { - const SETTING_API_KEY = 'api_key'; - const SETTING_DOUBLE_OPT_IN = 'double_opt_in'; - const SETTING_DATA_CENTER = 'data_center'; - const SETTING_INTEREST_GROUPS = 'interest_groups'; + public const SETTING_API_KEY = 'api_key'; + public const SETTING_DOUBLE_OPT_IN = 'double_opt_in'; + public const SETTING_DATA_CENTER = 'data_center'; + public const SETTING_INTEREST_GROUPS = 'interest_groups'; - const TITLE = 'MailChimp'; - const LOG_CATEGORY = 'MailChimp'; + public const TITLE = 'MailChimp'; + public const LOG_CATEGORY = 'MailChimp'; /** @var array */ private $existingTags; diff --git a/packages/plugin/src/Integrations/PaymentGateways/Actions/Stripe/SinglePaymentAction.php b/packages/plugin/src/Integrations/PaymentGateways/Actions/Stripe/SinglePaymentAction.php index e0c1f1c1f..e709e1d90 100644 --- a/packages/plugin/src/Integrations/PaymentGateways/Actions/Stripe/SinglePaymentAction.php +++ b/packages/plugin/src/Integrations/PaymentGateways/Actions/Stripe/SinglePaymentAction.php @@ -7,7 +7,7 @@ class SinglePaymentAction extends AbstractFormAction { - const NAME = 'stripe.single_payment.payment_intent_action'; + public const NAME = 'stripe.single_payment.payment_intent_action'; public function __construct(PaymentIntent $intent) { diff --git a/packages/plugin/src/Integrations/PaymentGateways/Actions/Stripe/SubscriptionPaymentIntentAction.php b/packages/plugin/src/Integrations/PaymentGateways/Actions/Stripe/SubscriptionPaymentIntentAction.php index 0c3904758..d4c20fd47 100644 --- a/packages/plugin/src/Integrations/PaymentGateways/Actions/Stripe/SubscriptionPaymentIntentAction.php +++ b/packages/plugin/src/Integrations/PaymentGateways/Actions/Stripe/SubscriptionPaymentIntentAction.php @@ -8,7 +8,7 @@ class SubscriptionPaymentIntentAction extends AbstractFormAction { - const NAME = 'stripe.subscription.payment_intent_action'; + public const NAME = 'stripe.subscription.payment_intent_action'; /** * SubscriptionPaymentIntentAction constructor. diff --git a/packages/plugin/src/Integrations/PaymentGateways/Stripe.php b/packages/plugin/src/Integrations/PaymentGateways/Stripe.php index 0a0de8dba..db2f37334 100644 --- a/packages/plugin/src/Integrations/PaymentGateways/Stripe.php +++ b/packages/plugin/src/Integrations/PaymentGateways/Stripe.php @@ -35,25 +35,25 @@ class Stripe extends AbstractPaymentGatewayIntegration { - const SETTING_PUBLIC_KEY_LIVE = 'public_key_live'; - const SETTING_SECRET_KEY_LIVE = 'secret_key_live'; - const SETTING_PUBLIC_KEY_TEST = 'public_key_test'; - const SETTING_SECRET_KEY_TEST = 'secret_key_test'; - const SETTING_LIVE_MODE = 'live_mode'; - const SETTING_WEBHOOK_KEY = 'webhook_key'; - const SETTING_SUPPRESS_ON_FAIL = 'suppress_on_fail'; - const SETTING_SEND_ON_SUCCESS = 'send_on_success'; + public const SETTING_PUBLIC_KEY_LIVE = 'public_key_live'; + public const SETTING_SECRET_KEY_LIVE = 'secret_key_live'; + public const SETTING_PUBLIC_KEY_TEST = 'public_key_test'; + public const SETTING_SECRET_KEY_TEST = 'secret_key_test'; + public const SETTING_LIVE_MODE = 'live_mode'; + public const SETTING_WEBHOOK_KEY = 'webhook_key'; + public const SETTING_SUPPRESS_ON_FAIL = 'suppress_on_fail'; + public const SETTING_SEND_ON_SUCCESS = 'send_on_success'; - const TITLE = 'Stripe'; - const LOG_CATEGORY = 'Stripe'; + public const TITLE = 'Stripe'; + public const LOG_CATEGORY = 'Stripe'; - const PRODUCT_TYPE_SERVICE = 'service'; - const PRODUCT_TYPE_GOOD = 'good'; + public const PRODUCT_TYPE_SERVICE = 'service'; + public const PRODUCT_TYPE_GOOD = 'good'; - const EVENT_UPDATE_PAYMENT_INTENT_DATA = 'updatePaymentIntentData'; - const EVENT_UPDATE_SUBSCRIPTION_DATA = 'updateSubscriptionData'; + public const EVENT_UPDATE_PAYMENT_INTENT_DATA = 'updatePaymentIntentData'; + public const EVENT_UPDATE_SUBSCRIPTION_DATA = 'updateSubscriptionData'; - const ZERO_DECIMAL_CURRENCIES = [ + public const ZERO_DECIMAL_CURRENCIES = [ 'BIF', 'CLP', 'DJF', @@ -71,7 +71,7 @@ class Stripe extends AbstractPaymentGatewayIntegration 'XPF', ]; - const PLAN_INTERVAL_CONVERSION = [ + public const PLAN_INTERVAL_CONVERSION = [ PaymentProperties::PLAN_INTERVAL_DAILY => ['interval' => 'day', 'count' => 1], PaymentProperties::PLAN_INTERVAL_WEEKLY => ['interval' => 'week', 'count' => 1], PaymentProperties::PLAN_INTERVAL_BIWEEKLY => ['interval' => 'week', 'count' => 2], diff --git a/packages/plugin/src/Jobs/PurgeUnfinalizedAssetsJob.php b/packages/plugin/src/Jobs/PurgeUnfinalizedAssetsJob.php index e5fe93a72..b94613f86 100644 --- a/packages/plugin/src/Jobs/PurgeUnfinalizedAssetsJob.php +++ b/packages/plugin/src/Jobs/PurgeUnfinalizedAssetsJob.php @@ -7,14 +7,14 @@ class PurgeUnfinalizedAssetsJob extends BaseJob { - public $age; + public int $age; - public function execute($queue) + public function execute($queue): void { Freeform::getInstance()->files->cleanUpUnfinalizedAssets($this->age); } - protected function defaultDescription() + protected function defaultDescription(): ?string { return 'Purge Unfinalized Assets'; } diff --git a/packages/plugin/src/Library/Bags/BagInterface.php b/packages/plugin/src/Library/Bags/BagInterface.php index 19f1dc96b..d390253f0 100644 --- a/packages/plugin/src/Library/Bags/BagInterface.php +++ b/packages/plugin/src/Library/Bags/BagInterface.php @@ -4,9 +4,9 @@ interface BagInterface extends \JsonSerializable, \IteratorAggregate { - const EVENT_ON_SET = 'set'; - const EVENT_ON_GET = 'get'; - const EVENT_ON_REMOVE = 'remove'; + public const EVENT_ON_SET = 'set'; + public const EVENT_ON_GET = 'get'; + public const EVENT_ON_REMOVE = 'remove'; public function isset(string $key): bool; diff --git a/packages/plugin/src/Library/Charts/LinearChartData.php b/packages/plugin/src/Library/Charts/LinearChartData.php index 9509b0ab4..186f03bdd 100644 --- a/packages/plugin/src/Library/Charts/LinearChartData.php +++ b/packages/plugin/src/Library/Charts/LinearChartData.php @@ -4,8 +4,8 @@ class LinearChartData implements \JsonSerializable { - const TYPE_BAR = 'bar'; - const TYPE_LINE = 'line'; + public const TYPE_BAR = 'bar'; + public const TYPE_LINE = 'line'; /** @var string */ private $chartType; diff --git a/packages/plugin/src/Library/Charts/RadialChartData.php b/packages/plugin/src/Library/Charts/RadialChartData.php index 6e0896775..9249cc90b 100644 --- a/packages/plugin/src/Library/Charts/RadialChartData.php +++ b/packages/plugin/src/Library/Charts/RadialChartData.php @@ -4,9 +4,9 @@ class RadialChartData implements \JsonSerializable { - const TYPE_PIE = 'pie'; - const TYPE_DOUGHNUT = 'doughnut'; - const TYPE_POLAR_AREA = 'polarArea'; + public const TYPE_PIE = 'pie'; + public const TYPE_DOUGHNUT = 'doughnut'; + public const TYPE_POLAR_AREA = 'polarArea'; /** @var string */ private $chartType; diff --git a/packages/plugin/src/Library/Codepack/CodePack.php b/packages/plugin/src/Library/Codepack/CodePack.php index dd12ed910..e90cd3e6f 100644 --- a/packages/plugin/src/Library/Codepack/CodePack.php +++ b/packages/plugin/src/Library/Codepack/CodePack.php @@ -22,7 +22,7 @@ class CodePack { - const MANIFEST_NAME = 'manifest.json'; + public const MANIFEST_NAME = 'manifest.json'; /** @var string */ private $location; diff --git a/packages/plugin/src/Library/Composer/Components/FieldInterface.php b/packages/plugin/src/Library/Composer/Components/FieldInterface.php index 76483c438..24e210c26 100644 --- a/packages/plugin/src/Library/Composer/Components/FieldInterface.php +++ b/packages/plugin/src/Library/Composer/Components/FieldInterface.php @@ -17,46 +17,46 @@ interface FieldInterface { - const EVENT_TRANSFORM_FROM_POST = 'transform-from-post'; - const EVENT_TRANSFORM_FROM_STORAGE = 'transform-from-storage'; - const EVENT_TRANSFORM_FROM_DATABASE = 'transform-from-database'; - - const TYPE_TEXT = 'text'; - const TYPE_TEXTAREA = 'textarea'; - const TYPE_HIDDEN = 'hidden'; - const TYPE_SELECT = 'select'; - const TYPE_MULTIPLE_SELECT = 'multiple_select'; - const TYPE_CHECKBOX = 'checkbox'; - const TYPE_CHECKBOX_GROUP = 'checkbox_group'; - const TYPE_RADIO_GROUP = 'radio_group'; - const TYPE_HTML = 'html'; - const TYPE_SUBMIT = 'submit'; - const TYPE_SAVE = 'save'; - const TYPE_DYNAMIC_RECIPIENTS = 'dynamic_recipients'; - const TYPE_EMAIL = 'email'; - const TYPE_MAILING_LIST = 'mailing_list'; - const TYPE_FILE = 'file'; - const TYPE_FILE_DRAG_AND_DROP = 'file_drag_and_drop'; - const TYPE_PASSWORD = 'password'; - - const TYPE_RICH_TEXT = 'rich_text'; - const TYPE_DATETIME = 'datetime'; - const TYPE_NUMBER = 'number'; - const TYPE_PHONE = 'phone'; - const TYPE_WEBSITE = 'website'; - const TYPE_RATING = 'rating'; - const TYPE_REGEX = 'regex'; - const TYPE_CONFIRMATION = 'confirmation'; - const TYPE_RECAPTCHA = 'recaptcha'; - const TYPE_OPINION_SCALE = 'opinion_scale'; - const TYPE_SIGNATURE = 'signature'; - const TYPE_TABLE = 'table'; - const TYPE_INVISIBLE = 'invisible'; - - const TYPE_CREDIT_CARD_DETAILS = 'cc_details'; - const TYPE_CREDIT_CARD_NUMBER = 'cc_number'; - const TYPE_CREDIT_CARD_EXPIRY = 'cc_expiry'; - const TYPE_CREDIT_CARD_CVC = 'cc_cvc'; + public const EVENT_TRANSFORM_FROM_POST = 'transform-from-post'; + public const EVENT_TRANSFORM_FROM_STORAGE = 'transform-from-storage'; + public const EVENT_TRANSFORM_FROM_DATABASE = 'transform-from-database'; + + public const TYPE_TEXT = 'text'; + public const TYPE_TEXTAREA = 'textarea'; + public const TYPE_HIDDEN = 'hidden'; + public const TYPE_SELECT = 'select'; + public const TYPE_MULTIPLE_SELECT = 'multiple_select'; + public const TYPE_CHECKBOX = 'checkbox'; + public const TYPE_CHECKBOX_GROUP = 'checkbox_group'; + public const TYPE_RADIO_GROUP = 'radio_group'; + public const TYPE_HTML = 'html'; + public const TYPE_SUBMIT = 'submit'; + public const TYPE_SAVE = 'save'; + public const TYPE_DYNAMIC_RECIPIENTS = 'dynamic_recipients'; + public const TYPE_EMAIL = 'email'; + public const TYPE_MAILING_LIST = 'mailing_list'; + public const TYPE_FILE = 'file'; + public const TYPE_FILE_DRAG_AND_DROP = 'file_drag_and_drop'; + public const TYPE_PASSWORD = 'password'; + + public const TYPE_RICH_TEXT = 'rich_text'; + public const TYPE_DATETIME = 'datetime'; + public const TYPE_NUMBER = 'number'; + public const TYPE_PHONE = 'phone'; + public const TYPE_WEBSITE = 'website'; + public const TYPE_RATING = 'rating'; + public const TYPE_REGEX = 'regex'; + public const TYPE_CONFIRMATION = 'confirmation'; + public const TYPE_RECAPTCHA = 'recaptcha'; + public const TYPE_OPINION_SCALE = 'opinion_scale'; + public const TYPE_SIGNATURE = 'signature'; + public const TYPE_TABLE = 'table'; + public const TYPE_INVISIBLE = 'invisible'; + + public const TYPE_CREDIT_CARD_DETAILS = 'cc_details'; + public const TYPE_CREDIT_CARD_NUMBER = 'cc_number'; + public const TYPE_CREDIT_CARD_EXPIRY = 'cc_expiry'; + public const TYPE_CREDIT_CARD_CVC = 'cc_cvc'; /** * Returns the INPUT type. diff --git a/packages/plugin/src/Library/Composer/Components/Fields/Interfaces/ExternalOptionsInterface.php b/packages/plugin/src/Library/Composer/Components/Fields/Interfaces/ExternalOptionsInterface.php index d061bec6e..7eea8cd41 100644 --- a/packages/plugin/src/Library/Composer/Components/Fields/Interfaces/ExternalOptionsInterface.php +++ b/packages/plugin/src/Library/Composer/Components/Fields/Interfaces/ExternalOptionsInterface.php @@ -4,29 +4,29 @@ interface ExternalOptionsInterface extends OptionsInterface { - const SOURCE_CUSTOM = 'custom'; - const SOURCE_ENTRIES = 'entries'; - const SOURCE_CATEGORIES = 'categories'; - const SOURCE_TAGS = 'tags'; - const SOURCE_USERS = 'users'; - const SOURCE_ASSETS = 'assets'; - const SOURCE_COMMERCE_PRODUCTS = 'commerce_products'; - const SOURCE_CALENDAR = 'calendar'; - const SOURCE_PREDEFINED = 'predefined'; + public const SOURCE_CUSTOM = 'custom'; + public const SOURCE_ENTRIES = 'entries'; + public const SOURCE_CATEGORIES = 'categories'; + public const SOURCE_TAGS = 'tags'; + public const SOURCE_USERS = 'users'; + public const SOURCE_ASSETS = 'assets'; + public const SOURCE_COMMERCE_PRODUCTS = 'commerce_products'; + public const SOURCE_CALENDAR = 'calendar'; + public const SOURCE_PREDEFINED = 'predefined'; - const PREDEFINED_DAYS = 'days'; - const PREDEFINED_DAYS_OF_WEEK = 'days_of_week'; - const PREDEFINED_MONTHS = 'months'; - const PREDEFINED_NUMBERS = 'numbers'; - const PREDEFINED_YEARS = 'years'; - const PREDEFINED_PROVINCES = 'provinces'; - const PREDEFINED_PROVINCES_FR = 'provinces_fr'; - const PREDEFINED_PROVINCES_BIL = 'provinces_bil'; - const PREDEFINED_STATES = 'states'; - const PREDEFINED_STATES_TERRITORIES = 'states_territories'; - const PREDEFINED_COUNTRIES = 'countries'; - const PREDEFINED_LANGUAGES = 'languages'; - const PREDEFINED_CURRENCIES = 'currencies'; + public const PREDEFINED_DAYS = 'days'; + public const PREDEFINED_DAYS_OF_WEEK = 'days_of_week'; + public const PREDEFINED_MONTHS = 'months'; + public const PREDEFINED_NUMBERS = 'numbers'; + public const PREDEFINED_YEARS = 'years'; + public const PREDEFINED_PROVINCES = 'provinces'; + public const PREDEFINED_PROVINCES_FR = 'provinces_fr'; + public const PREDEFINED_PROVINCES_BIL = 'provinces_bil'; + public const PREDEFINED_STATES = 'states'; + public const PREDEFINED_STATES_TERRITORIES = 'states_territories'; + public const PREDEFINED_COUNTRIES = 'countries'; + public const PREDEFINED_LANGUAGES = 'languages'; + public const PREDEFINED_CURRENCIES = 'currencies'; /** * Returns the option source. diff --git a/packages/plugin/src/Library/Composer/Components/Form.php b/packages/plugin/src/Library/Composer/Components/Form.php index 405948a6e..11b88b64d 100644 --- a/packages/plugin/src/Library/Composer/Components/Form.php +++ b/packages/plugin/src/Library/Composer/Components/Form.php @@ -64,65 +64,65 @@ abstract class Form implements FormTypeInterface, \JsonSerializable, \Iterator, \ArrayAccess, Arrayable, \Countable { - const ID_KEY = 'id'; - const HASH_KEY = 'hash'; - const ACTION_KEY = 'freeform-action'; - const SUBMISSION_FLASH_KEY = 'freeform_submission_flash'; - - const EVENT_FORM_LOADED = 'form-loaded'; - const EVENT_ON_STORE_SUBMISSION = 'on-store-submission'; - const EVENT_REGISTER_CONTEXT = 'register-context'; - const EVENT_RENDER_BEFORE_OPEN_TAG = 'render-before-opening-tag'; - const EVENT_RENDER_AFTER_OPEN_TAG = 'render-after-opening-tag'; - const EVENT_RENDER_BEFORE_CLOSING_TAG = 'render-before-closing-tag'; - const EVENT_RENDER_AFTER_CLOSING_TAG = 'render-after-closing-tag'; - const EVENT_OUTPUT_AS_JSON = 'output-as-json'; - const EVENT_SET_PROPERTIES = 'set-properties'; + public const ID_KEY = 'id'; + public const HASH_KEY = 'hash'; + public const ACTION_KEY = 'freeform-action'; + public const SUBMISSION_FLASH_KEY = 'freeform_submission_flash'; + + public const EVENT_FORM_LOADED = 'form-loaded'; + public const EVENT_ON_STORE_SUBMISSION = 'on-store-submission'; + public const EVENT_REGISTER_CONTEXT = 'register-context'; + public const EVENT_RENDER_BEFORE_OPEN_TAG = 'render-before-opening-tag'; + public const EVENT_RENDER_AFTER_OPEN_TAG = 'render-after-opening-tag'; + public const EVENT_RENDER_BEFORE_CLOSING_TAG = 'render-before-closing-tag'; + public const EVENT_RENDER_AFTER_CLOSING_TAG = 'render-after-closing-tag'; + public const EVENT_OUTPUT_AS_JSON = 'output-as-json'; + public const EVENT_SET_PROPERTIES = 'set-properties'; /** @deprecated use EVENT_SET_PROPERTIES instead. */ - const EVENT_UPDATE_ATTRIBUTES = 'update-attributes'; - const EVENT_SUBMIT = 'submit'; - const EVENT_AFTER_SUBMIT = 'after-submit'; - const EVENT_BEFORE_VALIDATE = 'before-validate'; - const EVENT_AFTER_VALIDATE = 'after-validate'; - const EVENT_ATTACH_TAG_ATTRIBUTES = 'attach-tag-attributes'; - const EVENT_BEFORE_HANDLE_REQUEST = 'before-handle-request'; - const EVENT_AFTER_HANDLE_REQUEST = 'after-handle-request'; - const EVENT_BEFORE_RESET = 'before-reset-form'; - const EVENT_AFTER_RESET = 'after-reset-form'; - const EVENT_PERSIST_STATE = 'persist-state'; - const EVENT_HYDRATE_FORM = 'hydrate-form'; - const EVENT_GENERATE_RETURN_URL = 'generate-return-url'; - const EVENT_PREPARE_AJAX_RESPONSE_PAYLOAD = 'prepare-ajax-response-payload'; - const EVENT_CREATE_SUBMISSION = 'create-submission'; - const EVENT_SEND_NOTIFICATIONS = 'send-notifications'; - - const PROPERTY_STORED_VALUES = 'storedValues'; - const PROPERTY_PAGE_INDEX = 'pageIndex'; - const PROPERTY_PAGE_HISTORY = 'pageHistory'; - const PROPERTY_SPAM_REASONS = 'spamReasons'; - - const SUCCESS_BEHAVIOUR_NO_EFFECT = 'no-effect'; - const SUCCESS_BEHAVIOUR_RELOAD = 'reload'; - const SUCCESS_BEHAVIOUR_REDIRECT_RETURN_URL = 'redirect-return-url'; - const SUCCESS_BEHAVIOUR_LOAD_SUCCESS_TEMPLATE = 'load-success-template'; - - const PAGE_INDEX_KEY = 'page_index'; - const RETURN_URI_KEY = 'formReturnUrl'; - const STATUS_KEY = 'formStatus'; + public const EVENT_UPDATE_ATTRIBUTES = 'update-attributes'; + public const EVENT_SUBMIT = 'submit'; + public const EVENT_AFTER_SUBMIT = 'after-submit'; + public const EVENT_BEFORE_VALIDATE = 'before-validate'; + public const EVENT_AFTER_VALIDATE = 'after-validate'; + public const EVENT_ATTACH_TAG_ATTRIBUTES = 'attach-tag-attributes'; + public const EVENT_BEFORE_HANDLE_REQUEST = 'before-handle-request'; + public const EVENT_AFTER_HANDLE_REQUEST = 'after-handle-request'; + public const EVENT_BEFORE_RESET = 'before-reset-form'; + public const EVENT_AFTER_RESET = 'after-reset-form'; + public const EVENT_PERSIST_STATE = 'persist-state'; + public const EVENT_HYDRATE_FORM = 'hydrate-form'; + public const EVENT_GENERATE_RETURN_URL = 'generate-return-url'; + public const EVENT_PREPARE_AJAX_RESPONSE_PAYLOAD = 'prepare-ajax-response-payload'; + public const EVENT_CREATE_SUBMISSION = 'create-submission'; + public const EVENT_SEND_NOTIFICATIONS = 'send-notifications'; + + public const PROPERTY_STORED_VALUES = 'storedValues'; + public const PROPERTY_PAGE_INDEX = 'pageIndex'; + public const PROPERTY_PAGE_HISTORY = 'pageHistory'; + public const PROPERTY_SPAM_REASONS = 'spamReasons'; + + public const SUCCESS_BEHAVIOUR_NO_EFFECT = 'no-effect'; + public const SUCCESS_BEHAVIOUR_RELOAD = 'reload'; + public const SUCCESS_BEHAVIOUR_REDIRECT_RETURN_URL = 'redirect-return-url'; + public const SUCCESS_BEHAVIOUR_LOAD_SUCCESS_TEMPLATE = 'load-success-template'; + + public const PAGE_INDEX_KEY = 'page_index'; + public const RETURN_URI_KEY = 'formReturnUrl'; + public const STATUS_KEY = 'formStatus'; /** @deprecated will be removed in FF 4.x. Use EditSubmissionContext::TOKEN_KEY */ - const SUBMISSION_TOKEN_KEY = 'formSubmissionToken'; - const ELEMENT_ID_KEY = 'formElementId'; - const DEFAULT_PAGE_INDEX = 0; - - const DATA_DYNAMIC_TEMPLATE_KEY = 'dynamicTemplate'; - const DATA_SUBMISSION_TOKEN = 'submissionToken'; - const DATA_SUPPRESS = 'suppress'; - const DATA_RELATIONS = 'relations'; - const DATA_PERSISTENT_VALUES = 'persistentValues'; - const DATA_DISABLE_RECAPTCHA = 'disableRecaptcha'; - - const LIMIT_COOKIE = 'cookie'; - const LIMIT_IP_COOKIE = 'ip_cookie'; + public const SUBMISSION_TOKEN_KEY = 'formSubmissionToken'; + public const ELEMENT_ID_KEY = 'formElementId'; + public const DEFAULT_PAGE_INDEX = 0; + + public const DATA_DYNAMIC_TEMPLATE_KEY = 'dynamicTemplate'; + public const DATA_SUBMISSION_TOKEN = 'submissionToken'; + public const DATA_SUPPRESS = 'suppress'; + public const DATA_RELATIONS = 'relations'; + public const DATA_PERSISTENT_VALUES = 'persistentValues'; + public const DATA_DISABLE_RECAPTCHA = 'disableRecaptcha'; + + public const LIMIT_COOKIE = 'cookie'; + public const LIMIT_IP_COOKIE = 'ip_cookie'; /** @var PropertyBag */ private $propertyBag; diff --git a/packages/plugin/src/Library/Composer/Components/Properties.php b/packages/plugin/src/Library/Composer/Components/Properties.php index dfc9a67a4..ceda4ebd0 100644 --- a/packages/plugin/src/Library/Composer/Components/Properties.php +++ b/packages/plugin/src/Library/Composer/Components/Properties.php @@ -27,14 +27,14 @@ class Properties implements \JsonSerializable { - const PAGE_PREFIX = 'page'; - const FORM_HASH = 'form'; - const VALIDATION_HASH = 'validation'; - const INTEGRATION_HASH = 'integration'; - const CONNECTIONS_HASH = 'connections'; - const RULES_HASH = 'rules'; - const ADMIN_NOTIFICATIONS_HASH = 'admin_notifications'; - const PAYMENT_HASH = 'payment'; + public const PAGE_PREFIX = 'page'; + public const FORM_HASH = 'form'; + public const VALIDATION_HASH = 'validation'; + public const INTEGRATION_HASH = 'integration'; + public const CONNECTIONS_HASH = 'connections'; + public const RULES_HASH = 'rules'; + public const ADMIN_NOTIFICATIONS_HASH = 'admin_notifications'; + public const PAYMENT_HASH = 'payment'; /** @var array */ private $propertyList; diff --git a/packages/plugin/src/Library/Composer/Components/Properties/AbstractProperties.php b/packages/plugin/src/Library/Composer/Components/Properties/AbstractProperties.php index 5aef45be7..946e82090 100644 --- a/packages/plugin/src/Library/Composer/Components/Properties/AbstractProperties.php +++ b/packages/plugin/src/Library/Composer/Components/Properties/AbstractProperties.php @@ -17,13 +17,13 @@ abstract class AbstractProperties { - const TYPE_STRING = 'string'; - const TYPE_BOOLEAN = 'boolean'; - const TYPE_INTEGER = 'integer'; - const TYPE_ARRAY = 'array'; - const TYPE_OBJECT = 'object'; - const TYPE_FLOAT = 'float'; - const TYPE_DOUBLE = 'double'; + public const TYPE_STRING = 'string'; + public const TYPE_BOOLEAN = 'boolean'; + public const TYPE_INTEGER = 'integer'; + public const TYPE_ARRAY = 'array'; + public const TYPE_OBJECT = 'object'; + public const TYPE_FLOAT = 'float'; + public const TYPE_DOUBLE = 'double'; /** @var string */ protected $type; diff --git a/packages/plugin/src/Library/Composer/Components/Properties/PaymentProperties.php b/packages/plugin/src/Library/Composer/Components/Properties/PaymentProperties.php index 2dfcb103f..2e00a1c0a 100644 --- a/packages/plugin/src/Library/Composer/Components/Properties/PaymentProperties.php +++ b/packages/plugin/src/Library/Composer/Components/Properties/PaymentProperties.php @@ -14,32 +14,32 @@ class PaymentProperties extends IntegrationProperties { - const PAYMENT_TYPE_SINGLE = 'single'; - const PAYMENT_TYPE_PREDEFINED_SUBSCRIPTION = 'predefined_subscription'; - const PAYMENT_TYPE_DYNAMIC_SUBSCRIPTION = 'dynamic_subscription'; - - const PLAN_INTERVAL_DAILY = 'daily'; - const PLAN_INTERVAL_WEEKLY = 'weekly'; - const PLAN_INTERVAL_BIWEEKLY = 'biweekly'; - const PLAN_INTERVAL_MONTHLY = 'monthly'; - const PLAN_INTERVAL_ANNUALLY = 'annually'; - - const NOTIFICATION_TYPE_CHARGE_SUCCEEDED = 'charge_success'; - const NOTIFICATION_TYPE_CHARGE_FAILED = 'charge_failed'; - const NOTIFICATION_TYPE_SUBSCRIPTION_CREATED = 'subscription_created'; - const NOTIFICATION_TYPE_SUBSCRIPTION_ENDED = 'subscription_ended'; - const NOTIFICATION_TYPE_SUBSCRIPTION_PAYMENT_SUCCEEDED = 'subscription_payment_succeeded'; - const NOTIFICATION_TYPE_SUBSCRIPTION_PAYMENT_FAILED = 'subscription_payment_failed'; - - const FIELD_PAYMENT_TYPE = 'paymentType'; - const FIELD_AMOUNT = 'amount'; - const FIELD_CURRENCY = 'currency'; - const FIELD_PLAN = 'plan'; - const FIELD_INTERVAL = 'interval'; - const FIELD_DESCRIPTION = 'description'; - const FIELD_PAYMENT_NOTIFICATIONS = 'paymentNotifications'; - const FIELD_PAYMENT_FIELD_MAPPING = 'paymentFieldMapping'; - const FIELD_CUSTOMER_FIELD_MAPPING = 'customerFieldMapping'; + public const PAYMENT_TYPE_SINGLE = 'single'; + public const PAYMENT_TYPE_PREDEFINED_SUBSCRIPTION = 'predefined_subscription'; + public const PAYMENT_TYPE_DYNAMIC_SUBSCRIPTION = 'dynamic_subscription'; + + public const PLAN_INTERVAL_DAILY = 'daily'; + public const PLAN_INTERVAL_WEEKLY = 'weekly'; + public const PLAN_INTERVAL_BIWEEKLY = 'biweekly'; + public const PLAN_INTERVAL_MONTHLY = 'monthly'; + public const PLAN_INTERVAL_ANNUALLY = 'annually'; + + public const NOTIFICATION_TYPE_CHARGE_SUCCEEDED = 'charge_success'; + public const NOTIFICATION_TYPE_CHARGE_FAILED = 'charge_failed'; + public const NOTIFICATION_TYPE_SUBSCRIPTION_CREATED = 'subscription_created'; + public const NOTIFICATION_TYPE_SUBSCRIPTION_ENDED = 'subscription_ended'; + public const NOTIFICATION_TYPE_SUBSCRIPTION_PAYMENT_SUCCEEDED = 'subscription_payment_succeeded'; + public const NOTIFICATION_TYPE_SUBSCRIPTION_PAYMENT_FAILED = 'subscription_payment_failed'; + + public const FIELD_PAYMENT_TYPE = 'paymentType'; + public const FIELD_AMOUNT = 'amount'; + public const FIELD_CURRENCY = 'currency'; + public const FIELD_PLAN = 'plan'; + public const FIELD_INTERVAL = 'interval'; + public const FIELD_DESCRIPTION = 'description'; + public const FIELD_PAYMENT_NOTIFICATIONS = 'paymentNotifications'; + public const FIELD_PAYMENT_FIELD_MAPPING = 'paymentFieldMapping'; + public const FIELD_CUSTOMER_FIELD_MAPPING = 'customerFieldMapping'; /** @var string */ protected $paymentType; diff --git a/packages/plugin/src/Library/Composer/Components/Properties/ValidationProperties.php b/packages/plugin/src/Library/Composer/Components/Properties/ValidationProperties.php index 1c6e98ffc..c0f96c287 100644 --- a/packages/plugin/src/Library/Composer/Components/Properties/ValidationProperties.php +++ b/packages/plugin/src/Library/Composer/Components/Properties/ValidationProperties.php @@ -14,11 +14,11 @@ class ValidationProperties extends AbstractProperties { - const VALIDATION_TYPE_SUBMIT = 'submit'; - const VALIDATION_TYPE_LIVE = 'live'; + public const VALIDATION_TYPE_SUBMIT = 'submit'; + public const VALIDATION_TYPE_LIVE = 'live'; - const DEFAULT_SUCCESS_MESSAGE = 'Form has been submitted successfully!'; - const DEFAULT_ERROR_MESSAGE = 'Sorry, there was an error submitting the form. Please try again.'; + public const DEFAULT_SUCCESS_MESSAGE = 'Form has been submitted successfully!'; + public const DEFAULT_ERROR_MESSAGE = 'Sorry, there was an error submitting the form. Please try again.'; /** @var string */ protected $validationType; diff --git a/packages/plugin/src/Library/Composer/Components/Validation/Constraints/DateTimeConstraint.php b/packages/plugin/src/Library/Composer/Components/Validation/Constraints/DateTimeConstraint.php index 8459466ff..0668ef991 100644 --- a/packages/plugin/src/Library/Composer/Components/Validation/Constraints/DateTimeConstraint.php +++ b/packages/plugin/src/Library/Composer/Components/Validation/Constraints/DateTimeConstraint.php @@ -6,7 +6,7 @@ class DateTimeConstraint implements ConstraintInterface { - const PATTERN_MATCH_FORMAT = '/^((?:[Yy])|(?:[mn])|(?:[dj]))(.*?)((?:[Yy])|(?:[mn])|(?:[dj]))(.*?)((?:[Yy])|(?:[mn])|(?:[dj]))$/'; + public const PATTERN_MATCH_FORMAT = '/^((?:[Yy])|(?:[mn])|(?:[dj]))(.*?)((?:[Yy])|(?:[mn])|(?:[dj]))(.*?)((?:[Yy])|(?:[mn])|(?:[dj]))$/'; /** @var string */ private $message; diff --git a/packages/plugin/src/Library/Composer/Components/Validation/Constraints/WebsiteConstraint.php b/packages/plugin/src/Library/Composer/Components/Validation/Constraints/WebsiteConstraint.php index f44a5f449..42c3bde25 100644 --- a/packages/plugin/src/Library/Composer/Components/Validation/Constraints/WebsiteConstraint.php +++ b/packages/plugin/src/Library/Composer/Components/Validation/Constraints/WebsiteConstraint.php @@ -6,7 +6,7 @@ class WebsiteConstraint implements ConstraintInterface { - const PATTERN = '/^((((http(s)?)|(sftp)|(ftp)|(ssh)):\/\/)|(\/\/))?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&\/=]*)$/i'; + public const PATTERN = '/^((((http(s)?)|(sftp)|(ftp)|(ssh)):\/\/)|(\/\/))?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&\/=]*)$/i'; /** @var string */ private $message; diff --git a/packages/plugin/src/Library/Composer/Composer.php b/packages/plugin/src/Library/Composer/Composer.php index e7c858ba3..a2bb6c686 100644 --- a/packages/plugin/src/Library/Composer/Composer.php +++ b/packages/plugin/src/Library/Composer/Composer.php @@ -25,11 +25,11 @@ class Composer { - const KEY_COMPOSER = 'composer'; - const KEY_PROPERTIES = 'properties'; - const KEY_LAYOUT = 'layout'; - const KEY_CONTEXT = 'context'; - const KEY_PAYMENT = 'payment'; + public const KEY_COMPOSER = 'composer'; + public const KEY_PROPERTIES = 'properties'; + public const KEY_LAYOUT = 'layout'; + public const KEY_CONTEXT = 'context'; + public const KEY_PAYMENT = 'payment'; /** @var Form */ private $form; diff --git a/packages/plugin/src/Library/Configuration/CraftPluginConfiguration.php b/packages/plugin/src/Library/Configuration/CraftPluginConfiguration.php index 6fc0cf758..43f261fac 100644 --- a/packages/plugin/src/Library/Configuration/CraftPluginConfiguration.php +++ b/packages/plugin/src/Library/Configuration/CraftPluginConfiguration.php @@ -16,7 +16,7 @@ class CraftPluginConfiguration implements ConfigurationInterface { - const CONTEXT = 'freeform'; + public const CONTEXT = 'freeform'; /** * @param string $key diff --git a/packages/plugin/src/Library/Connections/AbstractConnection.php b/packages/plugin/src/Library/Connections/AbstractConnection.php index 01d11f5c0..5c083bc17 100644 --- a/packages/plugin/src/Library/Connections/AbstractConnection.php +++ b/packages/plugin/src/Library/Connections/AbstractConnection.php @@ -21,10 +21,10 @@ abstract class AbstractConnection extends BaseConfiguration implements ConnectionInterface { - const EVENT_BEFORE_VALIDATE = 'beforeValidate'; - const EVENT_AFTER_VALIDATE = 'afterValidate'; - const EVENT_BEFORE_CONNECT = 'beforeConnect'; - const EVENT_AFTER_CONNECT = 'afterConnect'; + public const EVENT_BEFORE_VALIDATE = 'beforeValidate'; + public const EVENT_AFTER_VALIDATE = 'afterValidate'; + public const EVENT_BEFORE_CONNECT = 'beforeConnect'; + public const EVENT_AFTER_CONNECT = 'afterConnect'; /** @var Form */ protected $form; diff --git a/packages/plugin/src/Library/DataObjects/Diagnostics/DiagnosticItem.php b/packages/plugin/src/Library/DataObjects/Diagnostics/DiagnosticItem.php index d0acc82df..6dff8b0d4 100644 --- a/packages/plugin/src/Library/DataObjects/Diagnostics/DiagnosticItem.php +++ b/packages/plugin/src/Library/DataObjects/Diagnostics/DiagnosticItem.php @@ -12,9 +12,9 @@ class DiagnosticItem { - const COLOR_BASE = 'base'; - const COLOR_PASS = 'pass'; - const COLOR_ERROR = 'error'; + public const COLOR_BASE = 'base'; + public const COLOR_PASS = 'pass'; + public const COLOR_ERROR = 'error'; /** @var string */ private $label; diff --git a/packages/plugin/src/Library/DataObjects/EmailTemplate.php b/packages/plugin/src/Library/DataObjects/EmailTemplate.php index b834bf725..20696c8bc 100644 --- a/packages/plugin/src/Library/DataObjects/EmailTemplate.php +++ b/packages/plugin/src/Library/DataObjects/EmailTemplate.php @@ -17,7 +17,7 @@ class EmailTemplate { - const METADATA_PATTERN = '/{#\\s*__KEY__:\\s*(.*)#}/'; + public const METADATA_PATTERN = '/{#\\s*__KEY__:\\s*(.*)#}/'; /** @var string */ private $name; @@ -250,7 +250,7 @@ private function getMetadata($key, $required = false) $pattern = str_replace('__KEY__', $key, self::METADATA_PATTERN); if (preg_match($pattern, $this->templateData, $matches)) { - list($_, $value) = $matches; + [$_, $value] = $matches; $value = trim($value); } elseif ($required) { throw new EmailTemplateException(sprintf("Email template does not contain '%s'", $key)); diff --git a/packages/plugin/src/Library/DataObjects/FormRenderObject/AbstractFormRenderObject.php b/packages/plugin/src/Library/DataObjects/FormRenderObject/AbstractFormRenderObject.php index 7dc463140..4c0c735d2 100644 --- a/packages/plugin/src/Library/DataObjects/FormRenderObject/AbstractFormRenderObject.php +++ b/packages/plugin/src/Library/DataObjects/FormRenderObject/AbstractFormRenderObject.php @@ -8,7 +8,7 @@ abstract class AbstractFormRenderObject implements FormRenderObjectInterface { - const EVENT_REGISTER_OPTIONS = 'registerOptions'; + public const EVENT_REGISTER_OPTIONS = 'registerOptions'; /** @var array */ protected $options; diff --git a/packages/plugin/src/Library/DataObjects/FreeformFeed/Notification.php b/packages/plugin/src/Library/DataObjects/FreeformFeed/Notification.php index d6cd4b560..1d7321888 100644 --- a/packages/plugin/src/Library/DataObjects/FreeformFeed/Notification.php +++ b/packages/plugin/src/Library/DataObjects/FreeformFeed/Notification.php @@ -4,9 +4,9 @@ class Notification { - const TYPE_NOTICE = 'notice'; - const TYPE_WARNING = 'warning'; - const TYPE_CRITICAL = 'critical'; + public const TYPE_NOTICE = 'notice'; + public const TYPE_WARNING = 'warning'; + public const TYPE_CRITICAL = 'critical'; /** @var string */ private $type; diff --git a/packages/plugin/src/Library/DataObjects/SpamReason.php b/packages/plugin/src/Library/DataObjects/SpamReason.php index c0a1879b7..d62cbc8d7 100644 --- a/packages/plugin/src/Library/DataObjects/SpamReason.php +++ b/packages/plugin/src/Library/DataObjects/SpamReason.php @@ -4,15 +4,15 @@ class SpamReason { - const TYPE_GENERIC = 'generic'; - const TYPE_HONEYPOT = 'honeypot'; - const TYPE_JS_TEST = 'js_test'; - const TYPE_RECAPTCHA = 'recaptcha'; - const TYPE_BLOCKED_KEYWORDS = 'blocked_keywords'; - const TYPE_BLOCKED_EMAIL_ADDRESS = 'blocked_email_address'; - const TYPE_BLOCKED_IP = 'blocked_ip'; - const TYPE_MINIMUM_SUBMIT_TIME = 'minimum_submit_time'; - const TYPE_MAXIMUM_SUBMIT_TIME = 'maximum_submit_time'; + public const TYPE_GENERIC = 'generic'; + public const TYPE_HONEYPOT = 'honeypot'; + public const TYPE_JS_TEST = 'js_test'; + public const TYPE_RECAPTCHA = 'recaptcha'; + public const TYPE_BLOCKED_KEYWORDS = 'blocked_keywords'; + public const TYPE_BLOCKED_EMAIL_ADDRESS = 'blocked_email_address'; + public const TYPE_BLOCKED_IP = 'blocked_ip'; + public const TYPE_MINIMUM_SUBMIT_TIME = 'minimum_submit_time'; + public const TYPE_MAXIMUM_SUBMIT_TIME = 'maximum_submit_time'; /** @var string */ private $type; diff --git a/packages/plugin/src/Library/Database/FormHandlerInterface.php b/packages/plugin/src/Library/Database/FormHandlerInterface.php index 24c255cf9..44793250a 100644 --- a/packages/plugin/src/Library/Database/FormHandlerInterface.php +++ b/packages/plugin/src/Library/Database/FormHandlerInterface.php @@ -19,27 +19,27 @@ interface FormHandlerInterface { /** @deprecated */ - const EVENT_BEFORE_SUBMIT = 'beforeSubmit'; + public const EVENT_BEFORE_SUBMIT = 'beforeSubmit'; /** @deprecated */ - const EVENT_AFTER_SUBMIT = 'afterSubmit'; - const EVENT_PAGE_JUMP = 'pageJump'; - const EVENT_BEFORE_SAVE = 'beforeSave'; - const EVENT_AFTER_SAVE = 'afterSave'; - const EVENT_BEFORE_DELETE = 'beforeDelete'; - const EVENT_AFTER_DELETE = 'afterDelete'; + public const EVENT_AFTER_SUBMIT = 'afterSubmit'; + public const EVENT_PAGE_JUMP = 'pageJump'; + public const EVENT_BEFORE_SAVE = 'beforeSave'; + public const EVENT_AFTER_SAVE = 'afterSave'; + public const EVENT_BEFORE_DELETE = 'beforeDelete'; + public const EVENT_AFTER_DELETE = 'afterDelete'; /** @deprecated */ - const EVENT_RENDER_OPENING_TAG = 'renderOpeningTag'; + public const EVENT_RENDER_OPENING_TAG = 'renderOpeningTag'; /** @deprecated */ - const EVENT_RENDER_CLOSING_TAG = 'renderClosingTag'; + public const EVENT_RENDER_CLOSING_TAG = 'renderClosingTag'; /** @deprecated */ - const EVENT_FORM_VALIDATE = 'validateForm'; + public const EVENT_FORM_VALIDATE = 'validateForm'; /** @deprecated */ - const EVENT_AFTER_FORM_VALIDATE = 'afterValidateForm'; + public const EVENT_AFTER_FORM_VALIDATE = 'afterValidateForm'; /** @deprecated */ - const EVENT_ATTACH_FORM_ATTRIBUTES = 'attachFormAttributes'; + public const EVENT_ATTACH_FORM_ATTRIBUTES = 'attachFormAttributes'; /** @deprecated */ - const EVENT_AFTER_GENERATE_RETURN_URL = 'afterGenerateReturnUrl'; + public const EVENT_AFTER_GENERATE_RETURN_URL = 'afterGenerateReturnUrl'; /** * @param string $templateName diff --git a/packages/plugin/src/Library/Factories/PredefinedOptionsFactory.php b/packages/plugin/src/Library/Factories/PredefinedOptionsFactory.php index fdc0fc9cf..f13ba1a6b 100644 --- a/packages/plugin/src/Library/Factories/PredefinedOptionsFactory.php +++ b/packages/plugin/src/Library/Factories/PredefinedOptionsFactory.php @@ -9,10 +9,10 @@ class PredefinedOptionsFactory { - const TYPE_INT = 'int'; - const TYPE_INT_LEADING_ZERO = 'int_w_zero'; - const TYPE_FULL = 'full'; - const TYPE_ABBREVIATED = 'abbreviated'; + public const TYPE_INT = 'int'; + public const TYPE_INT_LEADING_ZERO = 'int_w_zero'; + public const TYPE_FULL = 'full'; + public const TYPE_ABBREVIATED = 'abbreviated'; /** @var ExternalOptionsConfiguration */ private $configuration; diff --git a/packages/plugin/src/Library/Helpers/FileHelper.php b/packages/plugin/src/Library/Helpers/FileHelper.php index fc2fe6303..941aabd30 100644 --- a/packages/plugin/src/Library/Helpers/FileHelper.php +++ b/packages/plugin/src/Library/Helpers/FileHelper.php @@ -4,7 +4,7 @@ class FileHelper { - const MIME_TYPE_TO_EXTENSION_MAP = [ + public const MIME_TYPE_TO_EXTENSION_MAP = [ 'video/3gpp2' => '3g2', 'video/3gp' => '3gp', 'video/3gpp' => '3gp', diff --git a/packages/plugin/src/Library/Helpers/HashHelper.php b/packages/plugin/src/Library/Helpers/HashHelper.php index b477f4419..3fba583ca 100644 --- a/packages/plugin/src/Library/Helpers/HashHelper.php +++ b/packages/plugin/src/Library/Helpers/HashHelper.php @@ -16,8 +16,8 @@ class HashHelper { - const SALT = 'composer'; - const MIN_LENGTH = 9; + public const SALT = 'composer'; + public const MIN_LENGTH = 9; /** @var Hashids */ private static $hashids = []; diff --git a/packages/plugin/src/Library/Helpers/IpUtils.php b/packages/plugin/src/Library/Helpers/IpUtils.php index e0751d0e3..20a8a9b3e 100755 --- a/packages/plugin/src/Library/Helpers/IpUtils.php +++ b/packages/plugin/src/Library/Helpers/IpUtils.php @@ -73,7 +73,7 @@ public static function checkIp4($requestIp, $ip) } if (false !== strpos($ip, '/')) { - list($address, $netmask) = explode('/', $ip, 2); + [$address, $netmask] = explode('/', $ip, 2); if ('0' === $netmask) { return self::$checkedIps[$cacheKey] = filter_var($address, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV4); @@ -121,7 +121,7 @@ public static function checkIp6($requestIp, $ip) } if (false !== strpos($ip, '/')) { - list($address, $netmask) = explode('/', $ip, 2); + [$address, $netmask] = explode('/', $ip, 2); if ('0' === $netmask) { return (bool) unpack('n*', @inet_pton($address)); diff --git a/packages/plugin/src/Library/Integrations/CRM/CRMOAuthConnector.php b/packages/plugin/src/Library/Integrations/CRM/CRMOAuthConnector.php index dff0c77b2..af708a093 100644 --- a/packages/plugin/src/Library/Integrations/CRM/CRMOAuthConnector.php +++ b/packages/plugin/src/Library/Integrations/CRM/CRMOAuthConnector.php @@ -19,9 +19,9 @@ abstract class CRMOAuthConnector extends AbstractCRMIntegration { - const SETTING_CLIENT_ID = 'client_id'; - const SETTING_CLIENT_SECRET = 'client_secret'; - const SETTING_RETURN_URI = 'return_uri'; + public const SETTING_CLIENT_ID = 'client_id'; + public const SETTING_CLIENT_SECRET = 'client_secret'; + public const SETTING_RETURN_URI = 'return_uri'; /** * Returns a list of additional settings for this integration diff --git a/packages/plugin/src/Library/Integrations/DataObjects/FieldObject.php b/packages/plugin/src/Library/Integrations/DataObjects/FieldObject.php index f9ede3e27..8e26f55b5 100644 --- a/packages/plugin/src/Library/Integrations/DataObjects/FieldObject.php +++ b/packages/plugin/src/Library/Integrations/DataObjects/FieldObject.php @@ -14,15 +14,15 @@ class FieldObject implements \JsonSerializable { - const TYPE_STRING = 'string'; - const TYPE_ARRAY = 'array'; - const TYPE_NUMERIC = 'numeric'; - const TYPE_FLOAT = 'float'; - const TYPE_DATE = 'date'; - const TYPE_DATETIME = 'datetime'; - const TYPE_TIMESTAMP = 'timestamp'; - const TYPE_MICROTIME = 'microtime'; - const TYPE_BOOLEAN = 'boolean'; + public const TYPE_STRING = 'string'; + public const TYPE_ARRAY = 'array'; + public const TYPE_NUMERIC = 'numeric'; + public const TYPE_FLOAT = 'float'; + public const TYPE_DATE = 'date'; + public const TYPE_DATETIME = 'datetime'; + public const TYPE_TIMESTAMP = 'timestamp'; + public const TYPE_MICROTIME = 'microtime'; + public const TYPE_BOOLEAN = 'boolean'; /** @var string */ private $handle; diff --git a/packages/plugin/src/Library/Integrations/MailingLists/AbstractMailingListIntegration.php b/packages/plugin/src/Library/Integrations/MailingLists/AbstractMailingListIntegration.php index e68ec5da0..605270527 100644 --- a/packages/plugin/src/Library/Integrations/MailingLists/AbstractMailingListIntegration.php +++ b/packages/plugin/src/Library/Integrations/MailingLists/AbstractMailingListIntegration.php @@ -25,7 +25,7 @@ abstract class AbstractMailingListIntegration extends AbstractIntegration implements MailingListIntegrationInterface, IntegrationInterface, \JsonSerializable { - const TYPE = 'mailing_list'; + public const TYPE = 'mailing_list'; /** @var MailingListHandlerInterface */ private $mailingListHandler; diff --git a/packages/plugin/src/Library/Integrations/MailingLists/MailingListOAuthConnector.php b/packages/plugin/src/Library/Integrations/MailingLists/MailingListOAuthConnector.php index b094ebc71..3184187bf 100644 --- a/packages/plugin/src/Library/Integrations/MailingLists/MailingListOAuthConnector.php +++ b/packages/plugin/src/Library/Integrations/MailingLists/MailingListOAuthConnector.php @@ -19,9 +19,9 @@ abstract class MailingListOAuthConnector extends AbstractMailingListIntegration { - const SETTING_CLIENT_ID = 'client_id'; - const SETTING_CLIENT_SECRET = 'client_secret'; - const SETTING_RETURN_URI = 'return_uri'; + public const SETTING_CLIENT_ID = 'client_id'; + public const SETTING_CLIENT_SECRET = 'client_secret'; + public const SETTING_RETURN_URI = 'return_uri'; /** * Returns a list of additional settings for this integration diff --git a/packages/plugin/src/Library/Integrations/PaymentGateways/AbstractPaymentGatewayIntegration.php b/packages/plugin/src/Library/Integrations/PaymentGateways/AbstractPaymentGatewayIntegration.php index 3ca97e555..209ec6c46 100644 --- a/packages/plugin/src/Library/Integrations/PaymentGateways/AbstractPaymentGatewayIntegration.php +++ b/packages/plugin/src/Library/Integrations/PaymentGateways/AbstractPaymentGatewayIntegration.php @@ -23,7 +23,7 @@ abstract class AbstractPaymentGatewayIntegration extends AbstractIntegration implements PaymentGatewayIntegrationInterface, IntegrationInterface, \JsonSerializable { - const TYPE = 'payment_gateway'; + public const TYPE = 'payment_gateway'; /** * Payment Gateway service. diff --git a/packages/plugin/src/Library/Integrations/SettingBlueprint.php b/packages/plugin/src/Library/Integrations/SettingBlueprint.php index 1b5125b7b..adfdd40d8 100644 --- a/packages/plugin/src/Library/Integrations/SettingBlueprint.php +++ b/packages/plugin/src/Library/Integrations/SettingBlueprint.php @@ -14,12 +14,12 @@ class SettingBlueprint { - const TYPE_INTERNAL = 'internal'; - const TYPE_CONFIG = 'config'; - const TYPE_TEXT = 'text'; - const TYPE_AUTO = 'auto'; - const TYPE_PASSWORD = 'password'; - const TYPE_BOOL = 'bool'; + public const TYPE_INTERNAL = 'internal'; + public const TYPE_CONFIG = 'config'; + public const TYPE_TEXT = 'text'; + public const TYPE_AUTO = 'auto'; + public const TYPE_PASSWORD = 'password'; + public const TYPE_BOOL = 'bool'; /** @var string */ private $type; diff --git a/packages/plugin/src/Library/Logging/FreeformLogger.php b/packages/plugin/src/Library/Logging/FreeformLogger.php index d310012e7..1ddb6e405 100644 --- a/packages/plugin/src/Library/Logging/FreeformLogger.php +++ b/packages/plugin/src/Library/Logging/FreeformLogger.php @@ -18,28 +18,28 @@ class FreeformLogger { - const LEVEL_DEBUG = Logger::DEBUG; - const LEVEL_INFO = Logger::INFO; - const LEVEL_NOTICE = Logger::NOTICE; - const LEVEL_WARNING = Logger::WARNING; - const LEVEL_ERROR = Logger::ERROR; - const LEVEL_CRITICAL = Logger::CRITICAL; - const LEVEL_ALERT = Logger::ALERT; - const LEVEL_EMERGENCY = Logger::EMERGENCY; + public const LEVEL_DEBUG = Logger::DEBUG; + public const LEVEL_INFO = Logger::INFO; + public const LEVEL_NOTICE = Logger::NOTICE; + public const LEVEL_WARNING = Logger::WARNING; + public const LEVEL_ERROR = Logger::ERROR; + public const LEVEL_CRITICAL = Logger::CRITICAL; + public const LEVEL_ALERT = Logger::ALERT; + public const LEVEL_EMERGENCY = Logger::EMERGENCY; - const FREEFORM = 'Freeform'; - const FORM = 'Form'; - const EMAIL_NOTIFICATION = 'Email Notification'; - const CRM_INTEGRATION = 'CRM Integration'; - const MAILING_LIST_INTEGRATION = 'Email Marketing Integration'; - const STRIPE = 'Stripe'; - const DASHBOARD = 'Dashboard'; - const MAILER = 'Mailer service'; - const PAYMENT_GATEWAY = 'Payment Gateway'; - const CONDITIONAL_RULE = 'Conditional Rule'; - const ELEMENT_CONNECTION = 'Element Connection'; - const PAYLOAD_FORWARDING = 'POST Forwarding'; - const FEATURE_BUNDLES = 'bundles'; + public const FREEFORM = 'Freeform'; + public const FORM = 'Form'; + public const EMAIL_NOTIFICATION = 'Email Notification'; + public const CRM_INTEGRATION = 'CRM Integration'; + public const MAILING_LIST_INTEGRATION = 'Email Marketing Integration'; + public const STRIPE = 'Stripe'; + public const DASHBOARD = 'Dashboard'; + public const MAILER = 'Mailer service'; + public const PAYMENT_GATEWAY = 'Payment Gateway'; + public const CONDITIONAL_RULE = 'Conditional Rule'; + public const ELEMENT_CONNECTION = 'Element Connection'; + public const PAYLOAD_FORWARDING = 'POST Forwarding'; + public const FEATURE_BUNDLES = 'bundles'; private static $categoryColorMap = [ self::FREEFORM => '#333333', diff --git a/packages/plugin/src/Library/Payments/PaymentInterface.php b/packages/plugin/src/Library/Payments/PaymentInterface.php index b7a7c046e..251ce507d 100644 --- a/packages/plugin/src/Library/Payments/PaymentInterface.php +++ b/packages/plugin/src/Library/Payments/PaymentInterface.php @@ -14,8 +14,8 @@ interface PaymentInterface { - const TYPE_SINGLE = 'single'; - const TYPE_SUBSCRIPTION = 'subscription'; + public const TYPE_SINGLE = 'single'; + public const TYPE_SUBSCRIPTION = 'subscription'; /** * Returns type of payment. diff --git a/packages/plugin/src/Library/Pro/Payments/ElementHookHandlers/SubmissionHookHandler.php b/packages/plugin/src/Library/Pro/Payments/ElementHookHandlers/SubmissionHookHandler.php index 6849fb334..eacc19084 100644 --- a/packages/plugin/src/Library/Pro/Payments/ElementHookHandlers/SubmissionHookHandler.php +++ b/packages/plugin/src/Library/Pro/Payments/ElementHookHandlers/SubmissionHookHandler.php @@ -16,17 +16,17 @@ class SubmissionHookHandler { - const COLUMN_STATUS = 'paymentStatus'; - const COLUMN_TYPE = 'paymentType'; - const COLUMN_CARD = 'paymentCard'; + public const COLUMN_STATUS = 'paymentStatus'; + public const COLUMN_TYPE = 'paymentType'; + public const COLUMN_CARD = 'paymentCard'; - const ATTRIBUTES = [ + public const ATTRIBUTES = [ self::COLUMN_TYPE => 'Payment Type', self::COLUMN_STATUS => 'Payment Status', self::COLUMN_CARD => 'Payment Card', ]; - const TEMPLATE_FOLDER = 'freeform/_components/fields'; + public const TEMPLATE_FOLDER = 'freeform/_components/fields'; /** * Register hooks on Submission element handled by this class. diff --git a/packages/plugin/src/Library/Rules/BaseRule.php b/packages/plugin/src/Library/Rules/BaseRule.php index 9e42ef68f..a04c2a615 100644 --- a/packages/plugin/src/Library/Rules/BaseRule.php +++ b/packages/plugin/src/Library/Rules/BaseRule.php @@ -7,8 +7,8 @@ abstract class BaseRule { - const TYPE_MATCH_ALL = 'all'; - const TYPE_MATCH_ANY = 'any'; + public const TYPE_MATCH_ALL = 'all'; + public const TYPE_MATCH_ANY = 'any'; /** @var bool */ private $matchAll; diff --git a/packages/plugin/src/Library/Rules/FieldCriteria.php b/packages/plugin/src/Library/Rules/FieldCriteria.php index e84a4d97f..373f2f224 100644 --- a/packages/plugin/src/Library/Rules/FieldCriteria.php +++ b/packages/plugin/src/Library/Rules/FieldCriteria.php @@ -4,8 +4,8 @@ class FieldCriteria implements \JsonSerializable { - const OPERAND_EQUALS = '='; - const OPERAND_NOT_EQUALS = '!='; + public const OPERAND_EQUALS = '='; + public const OPERAND_NOT_EQUALS = '!='; /** @var string */ private $hash; diff --git a/packages/plugin/src/Library/Rules/RuleProperties.php b/packages/plugin/src/Library/Rules/RuleProperties.php index dc5a6532b..c98d44dea 100644 --- a/packages/plugin/src/Library/Rules/RuleProperties.php +++ b/packages/plugin/src/Library/Rules/RuleProperties.php @@ -14,8 +14,8 @@ class RuleProperties extends AbstractProperties { - const DEFAULT_SHOW = false; - const DEFAULT_MATCH_ALL = false; + public const DEFAULT_SHOW = false; + public const DEFAULT_MATCH_ALL = false; /** @var array */ protected $list; diff --git a/packages/plugin/src/Library/Session/Honeypot.php b/packages/plugin/src/Library/Session/Honeypot.php index 5f8f3b534..ca30ec663 100644 --- a/packages/plugin/src/Library/Session/Honeypot.php +++ b/packages/plugin/src/Library/Session/Honeypot.php @@ -16,7 +16,7 @@ class Honeypot implements \JsonSerializable { - const NAME_PREFIX = 'freeform_form_handle'; + public const NAME_PREFIX = 'freeform_form_handle'; /** @var string */ private $name; diff --git a/packages/plugin/src/Models/FieldModel.php b/packages/plugin/src/Models/FieldModel.php index 693edbfa0..3af9a9b44 100644 --- a/packages/plugin/src/Models/FieldModel.php +++ b/packages/plugin/src/Models/FieldModel.php @@ -24,10 +24,10 @@ class FieldModel extends Model implements \JsonSerializable { - const SMALL_DATA_STORAGE_LENGTH = 100; + public const SMALL_DATA_STORAGE_LENGTH = 100; - const PROPERTY_TYPE_BOOL = 'bool'; - const PROPERTY_TYPE_INT = 'int'; + public const PROPERTY_TYPE_BOOL = 'bool'; + public const PROPERTY_TYPE_INT = 'int'; /** @var int */ public $id; diff --git a/packages/plugin/src/Models/Pro/ExportProfileModel.php b/packages/plugin/src/Models/Pro/ExportProfileModel.php index 45b2d195c..3e05b61b0 100644 --- a/packages/plugin/src/Models/Pro/ExportProfileModel.php +++ b/packages/plugin/src/Models/Pro/ExportProfileModel.php @@ -20,9 +20,9 @@ class ExportProfileModel extends Model { - const RANGE_TODAY = 'today'; - const RANGE_YESTERDAY = 'yesterday'; - const RANGE_CUSTOM = 'custom'; + public const RANGE_TODAY = 'today'; + public const RANGE_YESTERDAY = 'yesterday'; + public const RANGE_CUSTOM = 'custom'; /** @var int */ public $id; diff --git a/packages/plugin/src/Models/Settings.php b/packages/plugin/src/Models/Settings.php index e07eb67d6..c2dc703e3 100644 --- a/packages/plugin/src/Models/Settings.php +++ b/packages/plugin/src/Models/Settings.php @@ -22,54 +22,54 @@ class Settings extends Model { - const EMAIL_TEMPLATE_STORAGE_DB = 'db'; - const EMAIL_TEMPLATE_STORAGE_FILE = 'template'; + public const EMAIL_TEMPLATE_STORAGE_DB = 'db'; + public const EMAIL_TEMPLATE_STORAGE_FILE = 'template'; - const PROTECTION_SIMULATE_SUCCESS = 'simulate_success'; - const PROTECTION_DISPLAY_ERRORS = 'display_errors'; - const PROTECTION_RELOAD_FORM = 'reload_form'; + public const PROTECTION_SIMULATE_SUCCESS = 'simulate_success'; + public const PROTECTION_DISPLAY_ERRORS = 'display_errors'; + public const PROTECTION_RELOAD_FORM = 'reload_form'; - const DEFAULT_BLOCKED_EMAILS_ERROR_MESSAGE = 'Invalid Email Address'; - const DEFAULT_BLOCKED_KEYWORDS_ERROR_MESSAGE = 'Invalid Entry Data'; + public const DEFAULT_BLOCKED_EMAILS_ERROR_MESSAGE = 'Invalid Email Address'; + public const DEFAULT_BLOCKED_KEYWORDS_ERROR_MESSAGE = 'Invalid Entry Data'; - const THROTTLING_TIME_FRAME_MINUTES = 'm'; - const THROTTLING_TIME_FRAME_SECONDS = 's'; + public const THROTTLING_TIME_FRAME_MINUTES = 'm'; + public const THROTTLING_TIME_FRAME_SECONDS = 's'; - const RECAPTCHA_TYPE_V2_CHECKBOX = 'v2_checkbox'; - const RECAPTCHA_TYPE_V2_INVISIBLE = 'v2_invisible'; - const RECAPTCHA_TYPE_V3 = 'v3'; - const RECAPTCHA_TYPE_H_CHECKBOX = 'h_checkbox'; - const RECAPTCHA_TYPE_H_INVISIBLE = 'h_invisible'; + public const RECAPTCHA_TYPE_V2_CHECKBOX = 'v2_checkbox'; + public const RECAPTCHA_TYPE_V2_INVISIBLE = 'v2_invisible'; + public const RECAPTCHA_TYPE_V3 = 'v3'; + public const RECAPTCHA_TYPE_H_CHECKBOX = 'h_checkbox'; + public const RECAPTCHA_TYPE_H_INVISIBLE = 'h_invisible'; - const RECAPTCHA_BEHAVIOUR_DISPLAY_ERROR = 'display_error'; - const RECAPTCHA_BEHAVIOUR_SPAM = 'spam'; + public const RECAPTCHA_BEHAVIOUR_DISPLAY_ERROR = 'display_error'; + public const RECAPTCHA_BEHAVIOUR_SPAM = 'spam'; - const RECAPTCHA_THEME = 'light'; - const RECAPTCHA_SIZE = 'normal'; - const RECAPTCHA_ERROR_MESSAGE = 'Please verify that you are not a robot.'; + public const RECAPTCHA_THEME = 'light'; + public const RECAPTCHA_SIZE = 'normal'; + public const RECAPTCHA_ERROR_MESSAGE = 'Please verify that you are not a robot.'; - const SCRIPT_INSERT_LOCATION_FOOTER = 'footer'; - const SCRIPT_INSERT_LOCATION_FORM = 'form'; - const SCRIPT_INSERT_LOCATION_MANUAL = 'manual'; + public const SCRIPT_INSERT_LOCATION_FOOTER = 'footer'; + public const SCRIPT_INSERT_LOCATION_FORM = 'form'; + public const SCRIPT_INSERT_LOCATION_MANUAL = 'manual'; - const SCRIPT_INSERT_TYPE_FILES = 'files'; - const SCRIPT_INSERT_TYPE_POINTERS = 'pointers'; - const SCRIPT_INSERT_TYPE_INLINE = 'inline'; + public const SCRIPT_INSERT_TYPE_FILES = 'files'; + public const SCRIPT_INSERT_TYPE_POINTERS = 'pointers'; + public const SCRIPT_INSERT_TYPE_INLINE = 'inline'; - const CONTEXT_TYPE_PAYLOAD = 'payload'; - const CONTEXT_TYPE_SESSION = 'session'; - const CONTEXT_TYPE_DATABASE = 'database'; + public const CONTEXT_TYPE_PAYLOAD = 'payload'; + public const CONTEXT_TYPE_SESSION = 'session'; + public const CONTEXT_TYPE_DATABASE = 'database'; - const DEFAULT_AJAX = true; - const DEFAULT_FORMATTING_TEMPLATE = 'flexbox.html'; + public const DEFAULT_AJAX = true; + public const DEFAULT_FORMATTING_TEMPLATE = 'flexbox.html'; - const DEFAULT_ACTIVE_SESSION_ENTRIES = 50; - const DEFAULT_SESSION_ENTRY_TTL = 10800; // 3 hours + public const DEFAULT_ACTIVE_SESSION_ENTRIES = 50; + public const DEFAULT_SESSION_ENTRY_TTL = 10800; // 3 hours - const DEFAULT_UNFINALIZED_ASSET_AGE_MINUTES = 180; + public const DEFAULT_UNFINALIZED_ASSET_AGE_MINUTES = 180; - const SAVE_FORM_TTL = 30; - const SAVE_FORM_SESSION_LIMIT = 10; + public const SAVE_FORM_TTL = 30; + public const SAVE_FORM_SESSION_LIMIT = 10; /** @var string */ public $pluginName; diff --git a/packages/plugin/src/Records/CrmFieldRecord.php b/packages/plugin/src/Records/CrmFieldRecord.php index cffb460dc..338b73750 100644 --- a/packages/plugin/src/Records/CrmFieldRecord.php +++ b/packages/plugin/src/Records/CrmFieldRecord.php @@ -24,7 +24,7 @@ */ class CrmFieldRecord extends ActiveRecord { - const TABLE = '{{%freeform_crm_fields}}'; + public const TABLE = '{{%freeform_crm_fields}}'; public static function tableName(): string { diff --git a/packages/plugin/src/Records/FeedMessageRecord.php b/packages/plugin/src/Records/FeedMessageRecord.php index 1cb30f662..a9fff44a8 100644 --- a/packages/plugin/src/Records/FeedMessageRecord.php +++ b/packages/plugin/src/Records/FeedMessageRecord.php @@ -16,7 +16,7 @@ */ class FeedMessageRecord extends ActiveRecord { - const TABLE = '{{%freeform_feed_messages}}'; + public const TABLE = '{{%freeform_feed_messages}}'; public static function tableName(): string { diff --git a/packages/plugin/src/Records/FeedRecord.php b/packages/plugin/src/Records/FeedRecord.php index 931b58b15..f61f4cc9b 100644 --- a/packages/plugin/src/Records/FeedRecord.php +++ b/packages/plugin/src/Records/FeedRecord.php @@ -13,7 +13,7 @@ */ class FeedRecord extends ActiveRecord { - const TABLE = '{{%freeform_feeds}}'; + public const TABLE = '{{%freeform_feeds}}'; public static function tableName(): string { diff --git a/packages/plugin/src/Records/FieldRecord.php b/packages/plugin/src/Records/FieldRecord.php index b9e67b7ce..37457017f 100644 --- a/packages/plugin/src/Records/FieldRecord.php +++ b/packages/plugin/src/Records/FieldRecord.php @@ -31,9 +31,9 @@ */ class FieldRecord extends ActiveRecord { - const TABLE = '{{%freeform_fields}}'; + public const TABLE = '{{%freeform_fields}}'; - const RESERVED_FIELD_KEYWORDS = [ + public const RESERVED_FIELD_KEYWORDS = [ 'id', 'title', 'incrementalId', diff --git a/packages/plugin/src/Records/FormRecord.php b/packages/plugin/src/Records/FormRecord.php index 6f774cb6c..17ffd49e1 100644 --- a/packages/plugin/src/Records/FormRecord.php +++ b/packages/plugin/src/Records/FormRecord.php @@ -42,8 +42,8 @@ */ class FormRecord extends ActiveRecord { - const TABLE = '{{%freeform_forms}}'; - const TABLE_STD = 'freeform_forms'; + public const TABLE = '{{%freeform_forms}}'; + public const TABLE_STD = 'freeform_forms'; public static function tableName(): string { diff --git a/packages/plugin/src/Records/IntegrationRecord.php b/packages/plugin/src/Records/IntegrationRecord.php index 35df6f467..c3f8b27ce 100644 --- a/packages/plugin/src/Records/IntegrationRecord.php +++ b/packages/plugin/src/Records/IntegrationRecord.php @@ -29,11 +29,11 @@ */ class IntegrationRecord extends ActiveRecord { - const TABLE = '{{%freeform_integrations}}'; + public const TABLE = '{{%freeform_integrations}}'; - const TYPE_MAILING_LIST = 'mailing_list'; - const TYPE_CRM = 'crm'; - const TYPE_PAYMENT_GATEWAY = 'payment_gateway'; + public const TYPE_MAILING_LIST = 'mailing_list'; + public const TYPE_CRM = 'crm'; + public const TYPE_PAYMENT_GATEWAY = 'payment_gateway'; public static function tableName(): string { diff --git a/packages/plugin/src/Records/IntegrationsQueueRecord.php b/packages/plugin/src/Records/IntegrationsQueueRecord.php index 04fdf005a..f29873f66 100644 --- a/packages/plugin/src/Records/IntegrationsQueueRecord.php +++ b/packages/plugin/src/Records/IntegrationsQueueRecord.php @@ -26,17 +26,17 @@ */ class IntegrationsQueueRecord extends ActiveRecord { - const TABLE = '{{%freeform_integrations_queue}}'; + public const TABLE = '{{%freeform_integrations_queue}}'; - const STATUS_ENQUEUED = 'enqueued'; - const STATUS_PROCESSING = 'processing'; - const STATUS_DONE = 'done'; - const STATUS_FAILED = 'failed'; - const STATUS_HALTED = 'halted'; + public const STATUS_ENQUEUED = 'enqueued'; + public const STATUS_PROCESSING = 'processing'; + public const STATUS_DONE = 'done'; + public const STATUS_FAILED = 'failed'; + public const STATUS_HALTED = 'halted'; - const INTEGRATION_TYPE_MAILING_LIST = 'mailing_list'; - const INTEGRATION_TYPE_CRM = 'crm'; - const INTEGRATION_TYPE_NOTIFICATION = 'notification'; + public const INTEGRATION_TYPE_MAILING_LIST = 'mailing_list'; + public const INTEGRATION_TYPE_CRM = 'crm'; + public const INTEGRATION_TYPE_NOTIFICATION = 'notification'; public static function tableName(): string { diff --git a/packages/plugin/src/Records/LockRecord.php b/packages/plugin/src/Records/LockRecord.php index 9b599b484..436be4434 100644 --- a/packages/plugin/src/Records/LockRecord.php +++ b/packages/plugin/src/Records/LockRecord.php @@ -10,7 +10,7 @@ */ class LockRecord extends ActiveRecord { - const TABLE = '{{%freeform_lock}}'; + public const TABLE = '{{%freeform_lock}}'; public static function tableName(): string { diff --git a/packages/plugin/src/Records/MailingListFieldRecord.php b/packages/plugin/src/Records/MailingListFieldRecord.php index 10f15b039..d74164860 100644 --- a/packages/plugin/src/Records/MailingListFieldRecord.php +++ b/packages/plugin/src/Records/MailingListFieldRecord.php @@ -24,7 +24,7 @@ */ class MailingListFieldRecord extends ActiveRecord { - const TABLE = '{{%freeform_mailing_list_fields}}'; + public const TABLE = '{{%freeform_mailing_list_fields}}'; public static function tableName(): string { diff --git a/packages/plugin/src/Records/MailingListRecord.php b/packages/plugin/src/Records/MailingListRecord.php index 7064fca4a..fde61d379 100644 --- a/packages/plugin/src/Records/MailingListRecord.php +++ b/packages/plugin/src/Records/MailingListRecord.php @@ -24,7 +24,7 @@ */ class MailingListRecord extends ActiveRecord { - const TABLE = '{{%freeform_mailing_lists}}'; + public const TABLE = '{{%freeform_mailing_lists}}'; public static function tableName(): string { diff --git a/packages/plugin/src/Records/NotificationLogRecord.php b/packages/plugin/src/Records/NotificationLogRecord.php index e86ad8e3b..e5d187ac8 100644 --- a/packages/plugin/src/Records/NotificationLogRecord.php +++ b/packages/plugin/src/Records/NotificationLogRecord.php @@ -23,10 +23,10 @@ */ class NotificationLogRecord extends ActiveRecord { - const TYPE_DIGEST_DEV = 'digest'; - const TYPE_DIGEST_CLIENT = 'digest-client'; + public const TYPE_DIGEST_DEV = 'digest'; + public const TYPE_DIGEST_CLIENT = 'digest-client'; - const TABLE = '{{%freeform_notification_log}}'; + public const TABLE = '{{%freeform_notification_log}}'; public static function tableName(): string { diff --git a/packages/plugin/src/Records/NotificationRecord.php b/packages/plugin/src/Records/NotificationRecord.php index d02fe271f..0a222cb1b 100644 --- a/packages/plugin/src/Records/NotificationRecord.php +++ b/packages/plugin/src/Records/NotificationRecord.php @@ -40,7 +40,7 @@ */ class NotificationRecord extends ActiveRecord implements NotificationInterface, \JsonSerializable { - const TABLE = '{{%freeform_notifications}}'; + public const TABLE = '{{%freeform_notifications}}'; /** @var string */ public $filepath; @@ -57,20 +57,20 @@ public static function create(): self $record->subject = 'New submission on your {{ form.name }} form'; $record->autoText = true; $record->bodyHtml = <<<'EOT' -

Submitted on: {{ dateCreated|date('l, F j, Y \\a\\t g:ia') }}

-
    -{% for field in allFields %} -
  • {{ field.label }}: {{ field.valueAsString }}
  • -{% endfor %} -
-EOT; +

Submitted on: {{ dateCreated|date('l, F j, Y \\a\\t g:ia') }}

+
    + {% for field in allFields %} +
  • {{ field.label }}: {{ field.valueAsString }}
  • + {% endfor %} +
+ EOT; $record->bodyText = <<<'EOT' -Submitted on: {{ dateCreated|date('l, F j, Y \\a\\t g:ia') }} + Submitted on: {{ dateCreated|date('l, F j, Y \\a\\t g:ia') }} -{% for field in allFields %} - - {{ field.label }}: {{ field.valueAsString }} -{% endfor %} -EOT; + {% for field in allFields %} + - {{ field.label }}: {{ field.valueAsString }} + {% endfor %} + EOT; return $record; } diff --git a/packages/plugin/src/Records/Pro/ExportProfileRecord.php b/packages/plugin/src/Records/Pro/ExportProfileRecord.php index 029a23181..568d97f7c 100644 --- a/packages/plugin/src/Records/Pro/ExportProfileRecord.php +++ b/packages/plugin/src/Records/Pro/ExportProfileRecord.php @@ -22,7 +22,7 @@ */ class ExportProfileRecord extends ActiveRecord { - const TABLE = '{{%freeform_export_profiles}}'; + public const TABLE = '{{%freeform_export_profiles}}'; public static function tableName(): string { diff --git a/packages/plugin/src/Records/Pro/ExportSettingRecord.php b/packages/plugin/src/Records/Pro/ExportSettingRecord.php index 3d4795571..eee484d61 100644 --- a/packages/plugin/src/Records/Pro/ExportSettingRecord.php +++ b/packages/plugin/src/Records/Pro/ExportSettingRecord.php @@ -23,7 +23,7 @@ */ class ExportSettingRecord extends ActiveRecord { - const TABLE = '{{%freeform_export_settings}}'; + public const TABLE = '{{%freeform_export_settings}}'; public static function tableName(): string { diff --git a/packages/plugin/src/Records/Pro/Payments/PaymentRecord.php b/packages/plugin/src/Records/Pro/Payments/PaymentRecord.php index cf06f5e87..589745170 100644 --- a/packages/plugin/src/Records/Pro/Payments/PaymentRecord.php +++ b/packages/plugin/src/Records/Pro/Payments/PaymentRecord.php @@ -33,13 +33,13 @@ */ class PaymentRecord extends ActiveRecord { - const TABLE = '{{%freeform_payments_payments}}'; + public const TABLE = '{{%freeform_payments_payments}}'; - const STATUS_SUCCESS = 'success'; - const STATUS_PAID = 'paid'; - const STATUS_FAILED = 'failed'; - const STATUS_ACTIVE = 'active'; - const STATUS_INACTIVE = 'inactive'; + public const STATUS_SUCCESS = 'success'; + public const STATUS_PAID = 'paid'; + public const STATUS_FAILED = 'failed'; + public const STATUS_ACTIVE = 'active'; + public const STATUS_INACTIVE = 'inactive'; public static function tableName(): string { diff --git a/packages/plugin/src/Records/Pro/Payments/SubscriptionPlanRecord.php b/packages/plugin/src/Records/Pro/Payments/SubscriptionPlanRecord.php index a13c61130..25f53ab78 100644 --- a/packages/plugin/src/Records/Pro/Payments/SubscriptionPlanRecord.php +++ b/packages/plugin/src/Records/Pro/Payments/SubscriptionPlanRecord.php @@ -24,7 +24,7 @@ */ class SubscriptionPlanRecord extends ActiveRecord { - const TABLE = '{{%freeform_payments_subscription_plans}}'; + public const TABLE = '{{%freeform_payments_subscription_plans}}'; public static function tableName(): string { diff --git a/packages/plugin/src/Records/Pro/Payments/SubscriptionRecord.php b/packages/plugin/src/Records/Pro/Payments/SubscriptionRecord.php index 3b2dec1fb..2e2702d01 100644 --- a/packages/plugin/src/Records/Pro/Payments/SubscriptionRecord.php +++ b/packages/plugin/src/Records/Pro/Payments/SubscriptionRecord.php @@ -34,7 +34,7 @@ */ class SubscriptionRecord extends ActiveRecord { - const TABLE = '{{%freeform_payments_subscriptions}}'; + public const TABLE = '{{%freeform_payments_subscriptions}}'; public static function tableName(): string { diff --git a/packages/plugin/src/Records/Pro/WebhookRecord.php b/packages/plugin/src/Records/Pro/WebhookRecord.php index 9ade9288a..b3b0829a9 100644 --- a/packages/plugin/src/Records/Pro/WebhookRecord.php +++ b/packages/plugin/src/Records/Pro/WebhookRecord.php @@ -13,8 +13,8 @@ */ class WebhookRecord extends ActiveRecord { - const TABLE = '{{%freeform_webhooks}}'; - const RELATION_TABLE = '{{%freeform_webhooks_form_relations}}'; + public const TABLE = '{{%freeform_webhooks}}'; + public const RELATION_TABLE = '{{%freeform_webhooks_form_relations}}'; public static function tableName(): string { diff --git a/packages/plugin/src/Records/SavedFormRecord.php b/packages/plugin/src/Records/SavedFormRecord.php index 0f7a27b46..e52458df2 100644 --- a/packages/plugin/src/Records/SavedFormRecord.php +++ b/packages/plugin/src/Records/SavedFormRecord.php @@ -13,7 +13,7 @@ */ class SavedFormRecord extends ActiveRecord { - const TABLE = '{{%freeform_saved_forms}}'; + public const TABLE = '{{%freeform_saved_forms}}'; public static function tableName(): string { diff --git a/packages/plugin/src/Records/SessionContextRecord.php b/packages/plugin/src/Records/SessionContextRecord.php index de9b2d3d2..65443f26f 100644 --- a/packages/plugin/src/Records/SessionContextRecord.php +++ b/packages/plugin/src/Records/SessionContextRecord.php @@ -26,7 +26,7 @@ */ class SessionContextRecord extends ActiveRecord { - const TABLE = '{{%freeform_session_context}}'; + public const TABLE = '{{%freeform_session_context}}'; public static function tableName(): string { diff --git a/packages/plugin/src/Records/SpamReasonRecord.php b/packages/plugin/src/Records/SpamReasonRecord.php index 873d75a99..0cd588dfc 100644 --- a/packages/plugin/src/Records/SpamReasonRecord.php +++ b/packages/plugin/src/Records/SpamReasonRecord.php @@ -25,8 +25,8 @@ */ class SpamReasonRecord extends ActiveRecord { - const TABLE = '{{%freeform_spam_reason}}'; - const TABLE_STD = 'freeform_spam_reason'; + public const TABLE = '{{%freeform_spam_reason}}'; + public const TABLE_STD = 'freeform_spam_reason'; public static function tableName(): string { diff --git a/packages/plugin/src/Records/StatusRecord.php b/packages/plugin/src/Records/StatusRecord.php index 1032833d7..538510aea 100644 --- a/packages/plugin/src/Records/StatusRecord.php +++ b/packages/plugin/src/Records/StatusRecord.php @@ -24,8 +24,8 @@ */ class StatusRecord extends ActiveRecord { - const TABLE = '{{%freeform_statuses}}'; - const TABLE_STD = 'freeform_statuses'; + public const TABLE = '{{%freeform_statuses}}'; + public const TABLE_STD = 'freeform_statuses'; public static function getAllowedColors(): array { diff --git a/packages/plugin/src/Records/SubmissionNoteRecord.php b/packages/plugin/src/Records/SubmissionNoteRecord.php index 8202c283c..ba1d938c1 100644 --- a/packages/plugin/src/Records/SubmissionNoteRecord.php +++ b/packages/plugin/src/Records/SubmissionNoteRecord.php @@ -23,9 +23,9 @@ */ class SubmissionNoteRecord extends ActiveRecord { - const TABLE = '{{%freeform_submission_notes}}'; + public const TABLE = '{{%freeform_submission_notes}}'; - const NOTE_FIELD_NAME = 'freeform-submission-note'; + public const NOTE_FIELD_NAME = 'freeform-submission-note'; public static function tableName(): string { diff --git a/packages/plugin/src/Records/UnfinalizedFileRecord.php b/packages/plugin/src/Records/UnfinalizedFileRecord.php index 7c60aa38f..a413cde9f 100644 --- a/packages/plugin/src/Records/UnfinalizedFileRecord.php +++ b/packages/plugin/src/Records/UnfinalizedFileRecord.php @@ -26,7 +26,7 @@ */ class UnfinalizedFileRecord extends ActiveRecord { - const TABLE = '{{%freeform_unfinalized_files}}'; + public const TABLE = '{{%freeform_unfinalized_files}}'; public static function tableName(): string { diff --git a/packages/plugin/src/Services/AbstractIntegrationService.php b/packages/plugin/src/Services/AbstractIntegrationService.php index 8f05804ff..264f26388 100644 --- a/packages/plugin/src/Services/AbstractIntegrationService.php +++ b/packages/plugin/src/Services/AbstractIntegrationService.php @@ -26,14 +26,14 @@ abstract class AbstractIntegrationService extends BaseService implements IntegrationHandlerInterface { - const EVENT_BEFORE_SAVE = 'beforeSave'; - const EVENT_AFTER_SAVE = 'afterSave'; - const EVENT_BEFORE_DELETE = 'beforeDelete'; - const EVENT_AFTER_DELETE = 'afterDelete'; - const EVENT_FETCH_TYPES = 'fetchTypes'; - const EVENT_BEFORE_PUSH = 'beforePush'; - const EVENT_AFTER_PUSH = 'afterPush'; - const EVENT_AFTER_RESPONSE = 'afterResponse'; + public const EVENT_BEFORE_SAVE = 'beforeSave'; + public const EVENT_AFTER_SAVE = 'afterSave'; + public const EVENT_BEFORE_DELETE = 'beforeDelete'; + public const EVENT_AFTER_DELETE = 'afterDelete'; + public const EVENT_FETCH_TYPES = 'fetchTypes'; + public const EVENT_BEFORE_PUSH = 'beforePush'; + public const EVENT_AFTER_PUSH = 'afterPush'; + public const EVENT_AFTER_RESPONSE = 'afterResponse'; /** * @return IntegrationModel[] diff --git a/packages/plugin/src/Services/CrmService.php b/packages/plugin/src/Services/CrmService.php index 49743dace..cea9cda8c 100644 --- a/packages/plugin/src/Services/CrmService.php +++ b/packages/plugin/src/Services/CrmService.php @@ -302,7 +302,7 @@ public function pushObject(Submission $submission): bool } } - list($isValid, $objectValues) = $this->onBeforePush($integration, $objectValues); + [$isValid, $objectValues] = $this->onBeforePush($integration, $objectValues); if (!$isValid) { return false; } @@ -374,7 +374,7 @@ private function getExtraFieldsValue(string $handle, Submission $submission, Abs ); } - list($_, $object, $property) = $matches; + [$_, $object, $property] = $matches; switch ($object) { case 'payments': diff --git a/packages/plugin/src/Services/DiagnosticsService.php b/packages/plugin/src/Services/DiagnosticsService.php index 7efe2d6a8..d736cfba1 100644 --- a/packages/plugin/src/Services/DiagnosticsService.php +++ b/packages/plugin/src/Services/DiagnosticsService.php @@ -249,7 +249,7 @@ public function getFreeformChecks() ->scalar() ; - list($emailTransport, $emailIssues) = $this->getEmailSettings(); + [$emailTransport, $emailIssues] = $this->getEmailSettings(); return [ new DiagnosticItem( diff --git a/packages/plugin/src/Services/FieldsService.php b/packages/plugin/src/Services/FieldsService.php index 17bfeb39e..7ebcf122b 100644 --- a/packages/plugin/src/Services/FieldsService.php +++ b/packages/plugin/src/Services/FieldsService.php @@ -40,13 +40,13 @@ class FieldsService extends BaseService implements FieldHandlerInterface { - const EVENT_BEFORE_SAVE = 'beforeSave'; - const EVENT_AFTER_SAVE = 'afterSave'; - const EVENT_BEFORE_DELETE = 'beforeDelete'; - const EVENT_AFTER_DELETE = 'afterDelete'; - const EVENT_FETCH_TYPES = 'fetchTypes'; - const EVENT_BEFORE_VALIDATE = 'beforeValidate'; - const EVENT_AFTER_VALIDATE = 'afterValidate'; + public const EVENT_BEFORE_SAVE = 'beforeSave'; + public const EVENT_AFTER_SAVE = 'afterSave'; + public const EVENT_BEFORE_DELETE = 'beforeDelete'; + public const EVENT_AFTER_DELETE = 'afterDelete'; + public const EVENT_FETCH_TYPES = 'fetchTypes'; + public const EVENT_BEFORE_VALIDATE = 'beforeValidate'; + public const EVENT_AFTER_VALIDATE = 'afterValidate'; /** @var FieldModel[] */ private static $fieldCache; diff --git a/packages/plugin/src/Services/FilesService.php b/packages/plugin/src/Services/FilesService.php index 36400a0e2..a7bc24ded 100644 --- a/packages/plugin/src/Services/FilesService.php +++ b/packages/plugin/src/Services/FilesService.php @@ -36,11 +36,11 @@ class FilesService extends BaseService implements FileUploadHandlerInterface { - const CLEANUP_CACHE_KEY = 'freeform_file_cleanup_cache_key'; - const CACHE_TTL = 3600; // 1 hour + public const CLEANUP_CACHE_KEY = 'freeform_file_cleanup_cache_key'; + public const CACHE_TTL = 3600; // 1 hour - const EVENT_BEFORE_UPLOAD = 'beforeUpload'; - const EVENT_AFTER_UPLOAD = 'afterUpload'; + public const EVENT_BEFORE_UPLOAD = 'beforeUpload'; + public const EVENT_AFTER_UPLOAD = 'afterUpload'; /** @var array */ private static $fileUploadFieldIds; diff --git a/packages/plugin/src/Services/FormTypesService.php b/packages/plugin/src/Services/FormTypesService.php index f094413b9..57a37cfcf 100644 --- a/packages/plugin/src/Services/FormTypesService.php +++ b/packages/plugin/src/Services/FormTypesService.php @@ -7,7 +7,7 @@ class FormTypesService extends BaseService { - const EVENT_REGISTER_FORM_TYPES = 'register-form-types'; + public const EVENT_REGISTER_FORM_TYPES = 'register-form-types'; public function getTypes(bool $includeDefault = true): array { diff --git a/packages/plugin/src/Services/FreeformFeedService.php b/packages/plugin/src/Services/FreeformFeedService.php index 3655dfac4..4bbf10c10 100644 --- a/packages/plugin/src/Services/FreeformFeedService.php +++ b/packages/plugin/src/Services/FreeformFeedService.php @@ -15,9 +15,9 @@ class FreeformFeedService extends Component { - const FREEFORM_API_FEED_URL = 'https://api.solspace.com/craft/freeform/updates'; - const CACHE_KEY_FEED = 'freeform-feed-cache-key'; - const CACHE_TTL_FEED = 60 * 60 * 5; // every 5 hours + public const FREEFORM_API_FEED_URL = 'https://api.solspace.com/craft/freeform/updates'; + public const CACHE_KEY_FEED = 'freeform-feed-cache-key'; + public const CACHE_TTL_FEED = 60 * 60 * 5; // every 5 hours public function markFeedCategoryAsRead(string $type) { diff --git a/packages/plugin/src/Services/HoneypotService.php b/packages/plugin/src/Services/HoneypotService.php index b02b43539..fc953fff1 100644 --- a/packages/plugin/src/Services/HoneypotService.php +++ b/packages/plugin/src/Services/HoneypotService.php @@ -14,13 +14,13 @@ class HoneypotService extends BaseService { - const FORM_HONEYPOT_KEY = 'freeformHoneypotHashList'; - const HONEYPOT_DISABLE_KEY = 'disableHoneypot'; + public const FORM_HONEYPOT_KEY = 'freeformHoneypotHashList'; + public const HONEYPOT_DISABLE_KEY = 'disableHoneypot'; - const EVENT_RENDER_HONEYPOT = 'renderHoneypot'; + public const EVENT_RENDER_HONEYPOT = 'renderHoneypot'; - const MAX_HONEYPOT_TTL = 10800; // 3 Hours - const MAX_HONEYPOT_COUNT = 100; // Limit the number of maximum honeypot values per session + public const MAX_HONEYPOT_TTL = 10800; // 3 Hours + public const MAX_HONEYPOT_COUNT = 100; // Limit the number of maximum honeypot values per session /** @var array */ private static $validHoneypots = []; diff --git a/packages/plugin/src/Services/LoggerService.php b/packages/plugin/src/Services/LoggerService.php index 9fc6dabe7..4a5fb71c3 100644 --- a/packages/plugin/src/Services/LoggerService.php +++ b/packages/plugin/src/Services/LoggerService.php @@ -11,7 +11,7 @@ class LoggerService extends BaseService { - const DEFAULT_CATEGORY = 'freeform'; + public const DEFAULT_CATEGORY = 'freeform'; public function getLogger(string $category): LoggerInterface { diff --git a/packages/plugin/src/Services/MailerService.php b/packages/plugin/src/Services/MailerService.php index e893c7fe0..84ee15a9d 100644 --- a/packages/plugin/src/Services/MailerService.php +++ b/packages/plugin/src/Services/MailerService.php @@ -38,13 +38,13 @@ class MailerService extends BaseService implements MailHandlerInterface { - const EVENT_BEFORE_SEND = 'beforeSend'; - const EVENT_AFTER_SEND = 'afterSend'; - const EVENT_BEFORE_RENDER = 'beforeRender'; + public const EVENT_BEFORE_SEND = 'beforeSend'; + public const EVENT_AFTER_SEND = 'afterSend'; + public const EVENT_BEFORE_RENDER = 'beforeRender'; - const ERROR_CODE_LINES_PROXIMITY = 5; + public const ERROR_CODE_LINES_PROXIMITY = 5; - const LOG_CATEGORY = 'freeform_notifications'; + public const LOG_CATEGORY = 'freeform_notifications'; /** * Send out an email to recipients using the given mail template. diff --git a/packages/plugin/src/Services/NotificationsService.php b/packages/plugin/src/Services/NotificationsService.php index f4cb21c99..83e4bb6c2 100644 --- a/packages/plugin/src/Services/NotificationsService.php +++ b/packages/plugin/src/Services/NotificationsService.php @@ -23,10 +23,10 @@ class NotificationsService extends BaseService { - const EVENT_BEFORE_SAVE = 'beforeSave'; - const EVENT_AFTER_SAVE = 'afterSave'; - const EVENT_BEFORE_DELETE = 'beforeDelete'; - const EVENT_AFTER_DELETE = 'afterDelete'; + public const EVENT_BEFORE_SAVE = 'beforeSave'; + public const EVENT_AFTER_SAVE = 'afterSave'; + public const EVENT_BEFORE_DELETE = 'beforeDelete'; + public const EVENT_AFTER_DELETE = 'afterDelete'; /** @var NotificationRecord[] */ private static $notificationCache; diff --git a/packages/plugin/src/Services/Pro/DigestService.php b/packages/plugin/src/Services/Pro/DigestService.php index 2817d0bbd..0d6338626 100644 --- a/packages/plugin/src/Services/Pro/DigestService.php +++ b/packages/plugin/src/Services/Pro/DigestService.php @@ -13,19 +13,19 @@ class DigestService extends Component { - const FREQUENCY_DAILY = -1; - const FREQUENCY_WEEKLY_SUNDAYS = 0; - const FREQUENCY_WEEKLY_MONDAYS = 1; - const FREQUENCY_WEEKLY_TUESDAYS = 2; - const FREQUENCY_WEEKLY_WEDNESDAYS = 3; - const FREQUENCY_WEEKLY_THURSDAYS = 4; - const FREQUENCY_WEEKLY_FRIDAYS = 5; - const FREQUENCY_WEEKLY_SATURDAYS = 6; - - const CACHE_KEY_DIGEST = 'freeform-digest-cache-key'; - const CACHE_TTL_DIGEST = 60 * 60 * 3; // every 3h - - const TEMPLATE_PATH = __DIR__.'/../../templates/_emailTemplates/digest.twig'; + public const FREQUENCY_DAILY = -1; + public const FREQUENCY_WEEKLY_SUNDAYS = 0; + public const FREQUENCY_WEEKLY_MONDAYS = 1; + public const FREQUENCY_WEEKLY_TUESDAYS = 2; + public const FREQUENCY_WEEKLY_WEDNESDAYS = 3; + public const FREQUENCY_WEEKLY_THURSDAYS = 4; + public const FREQUENCY_WEEKLY_FRIDAYS = 5; + public const FREQUENCY_WEEKLY_SATURDAYS = 6; + + public const CACHE_KEY_DIGEST = 'freeform-digest-cache-key'; + public const CACHE_TTL_DIGEST = 60 * 60 * 3; // every 3h + + public const TEMPLATE_PATH = __DIR__.'/../../templates/_emailTemplates/digest.twig'; public function triggerDigest() { diff --git a/packages/plugin/src/Services/Pro/ExportProfilesService.php b/packages/plugin/src/Services/Pro/ExportProfilesService.php index d08307bcb..01ff3e2b4 100644 --- a/packages/plugin/src/Services/Pro/ExportProfilesService.php +++ b/packages/plugin/src/Services/Pro/ExportProfilesService.php @@ -22,11 +22,11 @@ class ExportProfilesService extends Component { - const EVENT_BEFORE_SAVE = 'beforeSave'; - const EVENT_AFTER_SAVE = 'afterSave'; - const EVENT_BEFORE_DELETE = 'beforeDelete'; - const EVENT_AFTER_DELETE = 'afterDelete'; - const EVENT_REGISTER_EXPORTER = 'registerExporter'; + public const EVENT_BEFORE_SAVE = 'beforeSave'; + public const EVENT_AFTER_SAVE = 'afterSave'; + public const EVENT_BEFORE_DELETE = 'beforeDelete'; + public const EVENT_AFTER_DELETE = 'afterDelete'; + public const EVENT_REGISTER_EXPORTER = 'registerExporter'; /** @var ExportProfileModel[] */ private static $profileCache; diff --git a/packages/plugin/src/Services/Pro/PayloadForwardingService.php b/packages/plugin/src/Services/Pro/PayloadForwardingService.php index 5c25eb43f..1e1f4a4ea 100644 --- a/packages/plugin/src/Services/Pro/PayloadForwardingService.php +++ b/packages/plugin/src/Services/Pro/PayloadForwardingService.php @@ -22,5 +22,5 @@ class PayloadForwardingService extends BaseService /** * @deprecated use PayloadForwarding::EVENT_PAYLOAD_FORWARDING instead */ - const BEFORE_PAYLOAD_FORWARD = 'beforePayloadForward'; + public const BEFORE_PAYLOAD_FORWARD = 'beforePayloadForward'; } diff --git a/packages/plugin/src/Services/Pro/Payments/StripeService.php b/packages/plugin/src/Services/Pro/Payments/StripeService.php index 8596fb757..c5434c341 100644 --- a/packages/plugin/src/Services/Pro/Payments/StripeService.php +++ b/packages/plugin/src/Services/Pro/Payments/StripeService.php @@ -38,7 +38,7 @@ class StripeService extends Component { - const FIELD_GROUP_TYPES = [FieldInterface::TYPE_CHECKBOX_GROUP, FieldInterface::TYPE_RADIO_GROUP]; + public const FIELD_GROUP_TYPES = [FieldInterface::TYPE_CHECKBOX_GROUP, FieldInterface::TYPE_RADIO_GROUP]; public function preProcessPayment(ValidationEvent $event) { diff --git a/packages/plugin/src/Services/Pro/WebhooksService.php b/packages/plugin/src/Services/Pro/WebhooksService.php index fdaa65e44..62ec3c185 100644 --- a/packages/plugin/src/Services/Pro/WebhooksService.php +++ b/packages/plugin/src/Services/Pro/WebhooksService.php @@ -15,11 +15,11 @@ class WebhooksService extends BaseService { - const EVENT_BEFORE_SAVE = 'beforeSave'; - const EVENT_AFTER_SAVE = 'afterSave'; - const EVENT_BEFORE_DELETE = 'beforeDelete'; - const EVENT_AFTER_DELETE = 'afterDelete'; - const EVENT_FETCH_TYPES = 'fetchTypes'; + public const EVENT_BEFORE_SAVE = 'beforeSave'; + public const EVENT_AFTER_SAVE = 'afterSave'; + public const EVENT_BEFORE_DELETE = 'beforeDelete'; + public const EVENT_AFTER_DELETE = 'afterDelete'; + public const EVENT_FETCH_TYPES = 'fetchTypes'; /** @var array */ private static $providers; diff --git a/packages/plugin/src/Services/Pro/WidgetsService.php b/packages/plugin/src/Services/Pro/WidgetsService.php index 53e239232..db4a274dc 100644 --- a/packages/plugin/src/Services/Pro/WidgetsService.php +++ b/packages/plugin/src/Services/Pro/WidgetsService.php @@ -19,17 +19,17 @@ class WidgetsService extends Component { - const CHART_LINE = 'line'; - const CHART_BAR = 'bar'; - const CHART_DONUT = 'doughnut'; - const CHART_PIE = 'pie'; - const CHART_POLAR_AREA = 'polarArea'; - - const RANGE_LAST_24_HOURS = 'last_24_hours'; - const RANGE_LAST_7_DAYS = 'last_7_days'; - const RANGE_LAST_30_DAYS = 'last_30_days'; - const RANGE_LAST_60_DAYS = 'last_60_days'; - const RANGE_LAST_90_DAYS = 'last_90_days'; + public const CHART_LINE = 'line'; + public const CHART_BAR = 'bar'; + public const CHART_DONUT = 'doughnut'; + public const CHART_PIE = 'pie'; + public const CHART_POLAR_AREA = 'polarArea'; + + public const RANGE_LAST_24_HOURS = 'last_24_hours'; + public const RANGE_LAST_7_DAYS = 'last_7_days'; + public const RANGE_LAST_30_DAYS = 'last_30_days'; + public const RANGE_LAST_60_DAYS = 'last_60_days'; + public const RANGE_LAST_90_DAYS = 'last_90_days'; /** @var array */ private static $dateRanges = [ diff --git a/packages/plugin/src/Services/SettingsService.php b/packages/plugin/src/Services/SettingsService.php index 939649dc3..9837d4703 100644 --- a/packages/plugin/src/Services/SettingsService.php +++ b/packages/plugin/src/Services/SettingsService.php @@ -24,10 +24,10 @@ class SettingsService extends BaseService { - const CACHE_KEY_PURGE = 'freeform-purge-cache-key'; - const CACHE_TTL_SECONDS = 60 * 60; // 1 hour + public const CACHE_KEY_PURGE = 'freeform-purge-cache-key'; + public const CACHE_TTL_SECONDS = 60 * 60; // 1 hour - const EVENT_REGISTER_SETTINGS_NAVIGATION = 'registerSettingsNavigation'; + public const EVENT_REGISTER_SETTINGS_NAVIGATION = 'registerSettingsNavigation'; /** @var Settings */ private static $settingsModel; diff --git a/packages/plugin/src/Services/StatusesService.php b/packages/plugin/src/Services/StatusesService.php index 107ead9ae..096c0cc9f 100644 --- a/packages/plugin/src/Services/StatusesService.php +++ b/packages/plugin/src/Services/StatusesService.php @@ -23,10 +23,10 @@ class StatusesService extends BaseService implements StatusHandlerInterface { - const EVENT_BEFORE_SAVE = 'beforeSave'; - const EVENT_AFTER_SAVE = 'afterSave'; - const EVENT_BEFORE_DELETE = 'beforeDelete'; - const EVENT_AFTER_DELETE = 'afterDelete'; + public const EVENT_BEFORE_SAVE = 'beforeSave'; + public const EVENT_AFTER_SAVE = 'afterSave'; + public const EVENT_BEFORE_DELETE = 'beforeDelete'; + public const EVENT_AFTER_DELETE = 'afterDelete'; /** @var StatusModel[] */ private static $statusCache = []; diff --git a/packages/plugin/src/Services/SubmissionsService.php b/packages/plugin/src/Services/SubmissionsService.php index f517b1af7..00a220884 100644 --- a/packages/plugin/src/Services/SubmissionsService.php +++ b/packages/plugin/src/Services/SubmissionsService.php @@ -38,11 +38,11 @@ class SubmissionsService extends BaseService implements SubmissionHandlerInterface { - const EVENT_BEFORE_SUBMIT = 'beforeSubmit'; - const EVENT_AFTER_SUBMIT = 'afterSubmit'; - const EVENT_BEFORE_DELETE = 'beforeDelete'; - const EVENT_AFTER_DELETE = 'afterDelete'; - const EVENT_POST_PROCESS = 'postProcess'; + public const EVENT_BEFORE_SUBMIT = 'beforeSubmit'; + public const EVENT_AFTER_SUBMIT = 'afterSubmit'; + public const EVENT_BEFORE_DELETE = 'beforeDelete'; + public const EVENT_AFTER_DELETE = 'afterDelete'; + public const EVENT_POST_PROCESS = 'postProcess'; /** @var Submission[] */ private static $submissionCache = []; diff --git a/packages/plugin/src/Widgets/Pro/FieldValuesWidget.php b/packages/plugin/src/Widgets/Pro/FieldValuesWidget.php index 7cae37f91..2d435cb2b 100644 --- a/packages/plugin/src/Widgets/Pro/FieldValuesWidget.php +++ b/packages/plugin/src/Widgets/Pro/FieldValuesWidget.php @@ -163,7 +163,7 @@ private function getChartData(): array $widgets = $this->getWidgetsService(); - list($rangeStart, $rangeEnd) = $widgets->getRange($this->dateRange); + [$rangeStart, $rangeEnd] = $widgets->getRange($this->dateRange); $formId = $this->formId; $fieldId = $this->fieldId; diff --git a/packages/plugin/src/Widgets/Pro/LinearChartsWidget.php b/packages/plugin/src/Widgets/Pro/LinearChartsWidget.php index df2c1be14..50141147d 100644 --- a/packages/plugin/src/Widgets/Pro/LinearChartsWidget.php +++ b/packages/plugin/src/Widgets/Pro/LinearChartsWidget.php @@ -168,7 +168,7 @@ public function getSettingsHtml(): string */ private function getChartData(): LinearChartData { - list($rangeStart, $rangeEnd) = $this->getWidgetsService()->getRange($this->dateRange); + [$rangeStart, $rangeEnd] = $this->getWidgetsService()->getRange($this->dateRange); $formIds = $this->formIds; if ('*' === $formIds) { diff --git a/packages/plugin/src/Widgets/Pro/RadialChartsWidget.php b/packages/plugin/src/Widgets/Pro/RadialChartsWidget.php index 2c24f3cb2..3d6de1f77 100644 --- a/packages/plugin/src/Widgets/Pro/RadialChartsWidget.php +++ b/packages/plugin/src/Widgets/Pro/RadialChartsWidget.php @@ -122,7 +122,7 @@ public function getSettingsHtml(): string */ private function getChartData(): RadialChartData { - list($rangeStart, $rangeEnd) = $this->getWidgetsService()->getRange($this->dateRange); + [$rangeStart, $rangeEnd] = $this->getWidgetsService()->getRange($this->dateRange); $forms = $this->getFormService()->getAllForms(); diff --git a/packages/plugin/src/Widgets/Pro/RecentWidget.php b/packages/plugin/src/Widgets/Pro/RecentWidget.php index 06f7235f3..2f19733f1 100644 --- a/packages/plugin/src/Widgets/Pro/RecentWidget.php +++ b/packages/plugin/src/Widgets/Pro/RecentWidget.php @@ -20,7 +20,7 @@ class RecentWidget extends AbstractWidget implements ExtraWidgetInterface { - const DEFAULT_LIMIT = 5; + public const DEFAULT_LIMIT = 5; /** @var string */ public $title; diff --git a/packages/plugin/src/migrations/m180214_094247_AddUniqueTokenToSubmissionsAndForms.php b/packages/plugin/src/migrations/m180214_094247_AddUniqueTokenToSubmissionsAndForms.php index ddfc35f01..2c1134c53 100644 --- a/packages/plugin/src/migrations/m180214_094247_AddUniqueTokenToSubmissionsAndForms.php +++ b/packages/plugin/src/migrations/m180214_094247_AddUniqueTokenToSubmissionsAndForms.php @@ -11,7 +11,7 @@ */ class m180214_094247_AddUniqueTokenToSubmissionsAndForms extends Migration { - const TOKEN_LENGTH = 100; + public const TOKEN_LENGTH = 100; /** * {@inheritdoc} diff --git a/packages/plugin/src/migrations/m200203_180318_AddSpamReasonTable.php b/packages/plugin/src/migrations/m200203_180318_AddSpamReasonTable.php index 3aa2d66f4..b40ee77bc 100644 --- a/packages/plugin/src/migrations/m200203_180318_AddSpamReasonTable.php +++ b/packages/plugin/src/migrations/m200203_180318_AddSpamReasonTable.php @@ -10,7 +10,7 @@ */ class m200203_180318_AddSpamReasonTable extends Migration { - const TARGET_TABLE = '{{%freeform_spam_reason}}'; + public const TARGET_TABLE = '{{%freeform_spam_reason}}'; /** * {@inheritdoc} diff --git a/packages/plugin/tests/Unit/Library/Export/ExportCsvTest.php b/packages/plugin/tests/Unit/Library/Export/ExportCsvTest.php index 32e40a50a..8571ed026 100644 --- a/packages/plugin/tests/Unit/Library/Export/ExportCsvTest.php +++ b/packages/plugin/tests/Unit/Library/Export/ExportCsvTest.php @@ -106,10 +106,10 @@ public function testExportBasicRows() ]); $expected = <<<'EXPECTED' -"ID","Date Created" -"1","2019-01-01 08:00:00" -"2","2019-01-01 09:20:00" -EXPECTED; + "ID","Date Created" + "1","2019-01-01 08:00:00" + "2","2019-01-01 09:20:00" + EXPECTED; $this->assertSame($expected, $exporter->export()); } @@ -145,16 +145,16 @@ public function testExportTableRows() ]); $expected = <<<'EXPECTED' -"ID","T1C1","T1C2","T1C3","First Name","T2C1","T2C2","T2C3","T2C4","T2C5" -"1","one","two","three","Some Name","r1c1","r1c2","r1c3","r1c4","r1c5" -,"four","five",,,"r2c1","r2c2","r2c3","r2c4","r2c5" -,,"six",,,,,,, -"2","some","value",,"Other Name","r1c1","r1c2","r1c3","r1c4","r1c5" -,,,,,"r2c1","r2c2","r2c3","r2c4","r2c5" -,,,,,"r3c1","r3c2","r3c3","r3c4","r3c5" -,,,,,"r4c1","r4c2","r4c3","r4c4","r4c5" -,,,,,"r5c1","r5c2","r5c3","r5c4","r5c5" -EXPECTED; + "ID","T1C1","T1C2","T1C3","First Name","T2C1","T2C2","T2C3","T2C4","T2C5" + "1","one","two","three","Some Name","r1c1","r1c2","r1c3","r1c4","r1c5" + ,"four","five",,,"r2c1","r2c2","r2c3","r2c4","r2c5" + ,,"six",,,,,,, + "2","some","value",,"Other Name","r1c1","r1c2","r1c3","r1c4","r1c5" + ,,,,,"r2c1","r2c2","r2c3","r2c4","r2c5" + ,,,,,"r3c1","r3c2","r3c3","r3c4","r3c5" + ,,,,,"r4c1","r4c2","r4c3","r4c4","r4c5" + ,,,,,"r5c1","r5c2","r5c3","r5c4","r5c5" + EXPECTED; $this->assertSame($expected, $exporter->export()); } @@ -193,10 +193,10 @@ public function testExportRemoveNewlinesOn() ); $expected = <<<'EXPECTED' -"ID","Textarea" -"1","some text containing newlines" -"2","other text containing newlines" -EXPECTED; + "ID","Textarea" + "1","some text containing newlines" + "2","other text containing newlines" + EXPECTED; $this->assertSame($expected, $exporter->export()); } @@ -231,16 +231,16 @@ public function testExportRemoveNewlinesOff() ]); $expected = <<<'EXPECTED' -"ID","Textarea" -"1","some text -containing -newlines" -"2","other text -containing + "ID","Textarea" + "1","some text + containing + newlines" + "2","other text + containing -newlines" -EXPECTED; + newlines" + EXPECTED; $this->assertSame($expected, $exporter->export()); } diff --git a/packages/plugin/tests/Unit/Library/Export/ExportJsonTest.php b/packages/plugin/tests/Unit/Library/Export/ExportJsonTest.php index d01240970..772d3270d 100644 --- a/packages/plugin/tests/Unit/Library/Export/ExportJsonTest.php +++ b/packages/plugin/tests/Unit/Library/Export/ExportJsonTest.php @@ -108,17 +108,17 @@ public function testExportBasicRows() ]); $expected = <<<'EXPECTED' -[ - { - "id": 1, - "dateCreated": "2019-01-01 08:00:00" - }, - { - "id": 2, - "dateCreated": "2019-01-01 09:20:00" - } -] -EXPECTED; + [ + { + "id": 1, + "dateCreated": "2019-01-01 08:00:00" + }, + { + "id": 2, + "dateCreated": "2019-01-01 09:20:00" + } + ] + EXPECTED; $this->assertSame($expected, $exporter->export()); } @@ -154,94 +154,94 @@ public function testExportTableRows() ]); $expected = <<<'EXPECTED' -[ - { - "id": 1, - "table1": [ - [ - "one", - "two", - "three" - ], - [ - "four", - "five", - "" - ], - [ - "", - "six", - "" - ] - ], - "firstName": "Some Name", - "table2": [ - [ - "r1c1", - "r1c2", - "r1c3", - "r1c4", - "r1c5" - ], [ - "r2c1", - "r2c2", - "r2c3", - "r2c4", - "r2c5" + { + "id": 1, + "table1": [ + [ + "one", + "two", + "three" + ], + [ + "four", + "five", + "" + ], + [ + "", + "six", + "" + ] + ], + "firstName": "Some Name", + "table2": [ + [ + "r1c1", + "r1c2", + "r1c3", + "r1c4", + "r1c5" + ], + [ + "r2c1", + "r2c2", + "r2c3", + "r2c4", + "r2c5" + ] + ] + }, + { + "id": 2, + "table1": [ + [ + "some", + "value", + "" + ] + ], + "firstName": "Other Name", + "table2": [ + [ + "r1c1", + "r1c2", + "r1c3", + "r1c4", + "r1c5" + ], + [ + "r2c1", + "r2c2", + "r2c3", + "r2c4", + "r2c5" + ], + [ + "r3c1", + "r3c2", + "r3c3", + "r3c4", + "r3c5" + ], + [ + "r4c1", + "r4c2", + "r4c3", + "r4c4", + "r4c5" + ], + [ + "r5c1", + "r5c2", + "r5c3", + "r5c4", + "r5c5" + ] + ] + } ] - ] - }, - { - "id": 2, - "table1": [ - [ - "some", - "value", - "" - ] - ], - "firstName": "Other Name", - "table2": [ - [ - "r1c1", - "r1c2", - "r1c3", - "r1c4", - "r1c5" - ], - [ - "r2c1", - "r2c2", - "r2c3", - "r2c4", - "r2c5" - ], - [ - "r3c1", - "r3c2", - "r3c3", - "r3c4", - "r3c5" - ], - [ - "r4c1", - "r4c2", - "r4c3", - "r4c4", - "r4c5" - ], - [ - "r5c1", - "r5c2", - "r5c3", - "r5c4", - "r5c5" - ] - ] - } -] -EXPECTED; + EXPECTED; $this->assertSame($expected, $exporter->export()); } diff --git a/packages/plugin/tests/Unit/Library/Export/ExportTextTest.php b/packages/plugin/tests/Unit/Library/Export/ExportTextTest.php index 3d8721cb3..7dca71bbf 100644 --- a/packages/plugin/tests/Unit/Library/Export/ExportTextTest.php +++ b/packages/plugin/tests/Unit/Library/Export/ExportTextTest.php @@ -108,14 +108,14 @@ public function testExportBasicRows() ]); $expected = <<<'EXPECTED' -id: 1 -dateCreated: 2019-01-01 08:00:00 + id: 1 + dateCreated: 2019-01-01 08:00:00 -id: 2 -dateCreated: 2019-01-01 09:20:00 + id: 2 + dateCreated: 2019-01-01 09:20:00 -EXPECTED; + EXPECTED; $this->assertSame($expected, $exporter->export()); } @@ -151,18 +151,18 @@ public function testExportTableRows() ]); $expected = <<<'EXPECTED' -id: 1 -table1: one, two, three, four, five, , , six, sib -firstName: Some Name -table2: r1c1, r1c2, r1c3, r1c4, r1c5, r2c1, r2c2, r2c3, r2c4, r2c5 + id: 1 + table1: one, two, three, four, five, , , six, sib + firstName: Some Name + table2: r1c1, r1c2, r1c3, r1c4, r1c5, r2c1, r2c2, r2c3, r2c4, r2c5 -id: 2 -table1: some, value, , chalice -firstName: Other Name -table2: r1c1, r1c2, r1c3, r1c4, r1c5, r2c1, r2c2, r2c3, r2c4, r2c5, r3c1, r3c2, r3c3, r3c4, r3c5, r4c1, r4c2, r4c3, r4c4, r4c5, r5c1, r5c2, r5c3, r5c4, r5c5 + id: 2 + table1: some, value, , chalice + firstName: Other Name + table2: r1c1, r1c2, r1c3, r1c4, r1c5, r2c1, r2c2, r2c3, r2c4, r2c5, r3c1, r3c2, r3c3, r3c4, r3c5, r4c1, r4c2, r4c3, r4c4, r4c5, r5c1, r5c2, r5c3, r5c4, r5c5 -EXPECTED; + EXPECTED; $this->assertSame($expected, $exporter->export()); } diff --git a/packages/plugin/tests/Unit/Library/Export/ExportXmlTest.php b/packages/plugin/tests/Unit/Library/Export/ExportXmlTest.php index 7d1bf0ad9..2285b4eb7 100644 --- a/packages/plugin/tests/Unit/Library/Export/ExportXmlTest.php +++ b/packages/plugin/tests/Unit/Library/Export/ExportXmlTest.php @@ -108,19 +108,19 @@ public function testExportBasicRows() ]); $expected = <<<'EXPECTED' - - - - 1 - 2019-01-01 08:00:00 - - - 2 - 2019-01-01 09:20:00 - - - -EXPECTED; + + + + 1 + 2019-01-01 08:00:00 + + + 2 + 2019-01-01 09:20:00 + + + + EXPECTED; $this->assertSame($expected, $exporter->export()); } @@ -156,96 +156,96 @@ public function testExportTableRows() ]); $expected = <<<'EXPECTED' - - - - 1 - - - one - two - three - - - four - five - - - - - six - - - - Some Name - - - r1c1 - r1c2 - r1c3 - r1c4 - r1c5 - - - r2c1 - r2c2 - r2c3 - r2c4 - r2c5 - - - - - 2 - - - some - value - - - - Other Name - - - r1c1 - r1c2 - r1c3 - r1c4 - r1c5 - - - r2c1 - r2c2 - r2c3 - r2c4 - r2c5 - - - r3c1 - r3c2 - r3c3 - r3c4 - r3c5 - - - r4c1 - r4c2 - r4c3 - r4c4 - r4c5 - - - r5c1 - r5c2 - r5c3 - r5c4 - r5c5 - - - - - -EXPECTED; + + + + 1 + + + one + two + three + + + four + five + + + + + six + + + + Some Name + + + r1c1 + r1c2 + r1c3 + r1c4 + r1c5 + + + r2c1 + r2c2 + r2c3 + r2c4 + r2c5 + + + + + 2 + + + some + value + + + + Other Name + + + r1c1 + r1c2 + r1c3 + r1c4 + r1c5 + + + r2c1 + r2c2 + r2c3 + r2c4 + r2c5 + + + r3c1 + r3c2 + r3c3 + r3c4 + r3c5 + + + r4c1 + r4c2 + r4c3 + r4c4 + r4c5 + + + r5c1 + r5c2 + r5c3 + r5c4 + r5c5 + + + + + + EXPECTED; $this->assertSame($expected, $exporter->export()); }