From d95648cf4c38e13f8d33f74159ea41288d653f64 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 29 Dec 2020 14:00:32 +0000 Subject: [PATCH] Bump swiftmailer/swiftmailer from 6.2.3 to 6.2.4 Bumps [swiftmailer/swiftmailer](https://github.com/swiftmailer/swiftmailer) from 6.2.3 to 6.2.4. - [Release notes](https://github.com/swiftmailer/swiftmailer/releases) - [Changelog](https://github.com/swiftmailer/swiftmailer/blob/master/CHANGES) - [Commits](https://github.com/swiftmailer/swiftmailer/compare/v6.2.3...v6.2.4) Signed-off-by: dependabot-preview[bot] Signed-off-by: Christoph Wurst --- composer.lock | 100 +++-- composer/InstalledVersions.php | 22 +- composer/autoload_classmap.php | 63 --- composer/autoload_files.php | 4 +- composer/autoload_psr4.php | 2 +- composer/autoload_static.php | 69 +--- composer/installed.json | 101 +++-- composer/installed.php | 22 +- .../EmailValidator/EmailLexer.php | 241 ----------- .../EmailValidator/EmailParser.php | 104 ----- .../EmailValidator/EmailValidator.php | 67 --- .../Exception/AtextAfterCFWS.php | 9 - .../EmailValidator/Exception/CRLFAtTheEnd.php | 9 - .../EmailValidator/Exception/CRLFX2.php | 9 - .../EmailValidator/Exception/CRNoLF.php | 9 - .../Exception/CharNotAllowed.php | 9 - .../Exception/CommaInDomain.php | 9 - .../Exception/ConsecutiveAt.php | 9 - .../Exception/ConsecutiveDot.php | 9 - .../Exception/DomainHyphened.php | 9 - .../EmailValidator/Exception/DotAtEnd.php | 9 - .../EmailValidator/Exception/DotAtStart.php | 9 - .../EmailValidator/Exception/ExpectingAT.php | 9 - .../Exception/ExpectingATEXT.php | 9 - .../Exception/ExpectingCTEXT.php | 9 - .../Exception/ExpectingDTEXT.php | 9 - .../Exception/ExpectingDomainLiteralClose.php | 9 - .../Exception/ExpectingQPair.php | 9 - .../EmailValidator/Exception/InvalidEmail.php | 14 - .../EmailValidator/Exception/NoDNSRecord.php | 9 - .../EmailValidator/Exception/NoDomainPart.php | 9 - .../EmailValidator/Exception/NoLocalPart.php | 9 - .../Exception/UnclosedComment.php | 9 - .../Exception/UnclosedQuotedString.php | 9 - .../Exception/UnopenedComment.php | 9 - .../EmailValidator/Parser/DomainPart.php | 386 ------------------ .../EmailValidator/Parser/LocalPart.php | 138 ------- .../EmailValidator/Parser/Parser.php | 215 ---------- .../Validation/DNSCheckValidation.php | 72 ---- .../Validation/EmailValidation.php | 34 -- .../Validation/Error/RFCWarnings.php | 11 - .../Validation/Error/SpoofEmail.php | 11 - .../Exception/EmptyValidationList.php | 13 - .../Validation/MultipleErrors.php | 26 -- .../Validation/MultipleValidationWithAnd.php | 111 ----- .../Validation/NoRFCWarningsValidation.php | 41 -- .../Validation/RFCValidation.php | 49 --- .../Validation/SpoofCheckValidation.php | 45 -- .../EmailValidator/Warning/AddressLiteral.php | 14 - .../EmailValidator/Warning/CFWSNearAt.php | 13 - .../EmailValidator/Warning/CFWSWithFWS.php | 13 - .../EmailValidator/Warning/Comment.php | 13 - .../Warning/DeprecatedComment.php | 13 - .../EmailValidator/Warning/DomainLiteral.php | 14 - .../EmailValidator/Warning/DomainTooLong.php | 14 - .../EmailValidator/Warning/EmailTooLong.php | 15 - .../EmailValidator/Warning/IPV6BadChar.php | 14 - .../EmailValidator/Warning/IPV6ColonEnd.php | 14 - .../EmailValidator/Warning/IPV6ColonStart.php | 14 - .../EmailValidator/Warning/IPV6Deprecated.php | 14 - .../Warning/IPV6DoubleColon.php | 14 - .../EmailValidator/Warning/IPV6GroupCount.php | 14 - .../EmailValidator/Warning/IPV6MaxGroups.php | 14 - .../EmailValidator/Warning/LabelTooLong.php | 14 - .../EmailValidator/Warning/LocalTooLong.php | 15 - .../EmailValidator/Warning/NoDNSMXRecord.php | 14 - .../EmailValidator/Warning/ObsoleteDTEXT.php | 14 - .../EmailValidator/Warning/QuotedPart.php | 13 - .../EmailValidator/Warning/QuotedString.php | 13 - .../EmailValidator/Warning/TLD.php | 13 - .../EmailValidator/Warning/Warning.php | 30 -- egulias/email-validator/README.md | 82 ---- egulias/email-validator/composer.json | 27 +- egulias/email-validator/phpunit.xml.dist | 29 -- swiftmailer/swiftmailer/.php_cs.dist | 9 +- swiftmailer/swiftmailer/lib/classes/Swift.php | 4 +- .../lib/classes/Swift/AddressEncoder.php | 4 +- .../lib/classes/Swift/Attachment.php | 2 +- .../Swift/ByteStream/ArrayByteStream.php | 8 +- .../Swift/ByteStream/FileByteStream.php | 8 +- .../GenericFixedWidthReader.php | 2 +- .../Swift/CharacterReader/UsAsciiReader.php | 4 +- .../Swift/CharacterReader/Utf8Reader.php | 8 +- .../SimpleCharacterReaderFactory.php | 4 +- .../lib/classes/Swift/CharacterStream.php | 2 - .../CharacterStream/ArrayCharacterStream.php | 14 +- .../CharacterStream/NgCharacterStream.php | 4 +- .../lib/classes/Swift/DependencyContainer.php | 12 +- .../lib/classes/Swift/EmbeddedFile.php | 2 +- .../lib/classes/Swift/Encoder/QpEncoder.php | 6 +- .../classes/Swift/Encoder/Rfc2231Encoder.php | 4 +- .../classes/Swift/Events/CommandListener.php | 2 - .../classes/Swift/Events/EventDispatcher.php | 21 +- .../classes/Swift/Events/ResponseListener.php | 2 - .../lib/classes/Swift/Events/SendListener.php | 4 - .../Swift/Events/SimpleEventDispatcher.php | 23 +- .../Swift/Events/TransportChangeListener.php | 8 - .../Events/TransportExceptionListener.php | 2 - .../lib/classes/Swift/FailoverTransport.php | 2 +- .../lib/classes/Swift/FileSpool.php | 2 +- .../lib/classes/Swift/Filterable.php | 3 +- .../lib/classes/Swift/KeyCache.php | 7 +- .../classes/Swift/KeyCache/ArrayKeyCache.php | 14 +- .../classes/Swift/KeyCache/DiskKeyCache.php | 12 +- .../Swift/KeyCache/KeyCacheInputStream.php | 4 - .../classes/Swift/LoadBalancedTransport.php | 2 +- .../swiftmailer/lib/classes/Swift/Message.php | 4 +- .../lib/classes/Swift/Mime/Attachment.php | 2 +- .../ContentEncoder/Base64ContentEncoder.php | 6 +- .../ContentEncoder/NativeQpContentEncoder.php | 14 +- .../ContentEncoder/PlainContentEncoder.php | 8 +- .../Mime/ContentEncoder/QpContentEncoder.php | 4 +- .../ContentEncoder/QpContentEncoderProxy.php | 2 +- .../classes/Swift/Mime/EncodingObserver.php | 2 - .../Mime/HeaderEncoder/QpHeaderEncoder.php | 2 +- .../Swift/Mime/Headers/AbstractHeader.php | 14 +- .../Mime/Headers/IdentificationHeader.php | 4 +- .../Swift/Mime/Headers/MailboxHeader.php | 8 +- .../Mime/Headers/ParameterizedHeader.php | 12 +- .../classes/Swift/Mime/Headers/PathHeader.php | 4 +- .../lib/classes/Swift/Mime/MimePart.php | 4 +- .../Swift/Mime/SimpleHeaderFactory.php | 3 +- .../classes/Swift/Mime/SimpleHeaderSet.php | 20 +- .../lib/classes/Swift/Mime/SimpleMessage.php | 16 +- .../classes/Swift/Mime/SimpleMimeEntity.php | 4 +- .../lib/classes/Swift/MimePart.php | 2 +- .../lib/classes/Swift/NullTransport.php | 2 +- .../Swift/Plugins/BandwidthMonitorPlugin.php | 6 +- .../classes/Swift/Plugins/DecoratorPlugin.php | 12 +- .../classes/Swift/Plugins/LoggerPlugin.php | 8 +- .../Swift/Plugins/Loggers/ArrayLogger.php | 2 +- .../classes/Swift/Plugins/MessageLogger.php | 2 +- .../Swift/Plugins/PopBeforeSmtpPlugin.php | 24 +- .../Swift/Plugins/RedirectingPlugin.php | 4 +- .../lib/classes/Swift/Plugins/Reporter.php | 5 +- .../classes/Swift/Plugins/ReporterPlugin.php | 6 +- .../lib/classes/Swift/SendmailTransport.php | 2 +- .../lib/classes/Swift/Signers/BodySigner.php | 2 - .../lib/classes/Swift/Signers/DKIMSigner.php | 8 +- .../classes/Swift/Signers/DomainKeySigner.php | 4 +- .../classes/Swift/Signers/HeaderSigner.php | 4 - .../classes/Swift/Signers/OpenDKIMSigner.php | 6 +- .../lib/classes/Swift/Signers/SMimeSigner.php | 6 +- .../lib/classes/Swift/SmtpTransport.php | 2 +- .../lib/classes/Swift/SpoolTransport.php | 2 +- .../ByteArrayReplacementFilter.php | 14 +- .../lib/classes/Swift/Transport.php | 5 +- .../Swift/Transport/AbstractSmtpTransport.php | 39 +- .../Esmtp/Auth/CramMd5Authenticator.php | 10 +- .../Esmtp/Auth/NTLMAuthenticator.php | 36 +- .../Esmtp/Auth/PlainAuthenticator.php | 2 +- .../Swift/Transport/Esmtp/AuthHandler.php | 2 +- .../Swift/Transport/Esmtp/Authenticator.php | 5 +- .../Swift/Transport/EsmtpTransport.php | 12 +- .../Swift/Transport/FailoverTransport.php | 12 +- .../lib/classes/Swift/Transport/IoBuffer.php | 2 - .../Swift/Transport/LoadBalancedTransport.php | 12 +- .../classes/Swift/Transport/NullTransport.php | 6 +- .../Swift/Transport/SendmailTransport.php | 6 +- .../classes/Swift/Transport/StreamBuffer.php | 22 +- .../lib/swiftmailer_generate_mimes_config.php | 10 +- 161 files changed, 455 insertions(+), 2826 deletions(-) delete mode 100644 egulias/email-validator/EmailValidator/EmailLexer.php delete mode 100644 egulias/email-validator/EmailValidator/EmailParser.php delete mode 100644 egulias/email-validator/EmailValidator/EmailValidator.php delete mode 100644 egulias/email-validator/EmailValidator/Exception/AtextAfterCFWS.php delete mode 100644 egulias/email-validator/EmailValidator/Exception/CRLFAtTheEnd.php delete mode 100644 egulias/email-validator/EmailValidator/Exception/CRLFX2.php delete mode 100644 egulias/email-validator/EmailValidator/Exception/CRNoLF.php delete mode 100644 egulias/email-validator/EmailValidator/Exception/CharNotAllowed.php delete mode 100644 egulias/email-validator/EmailValidator/Exception/CommaInDomain.php delete mode 100644 egulias/email-validator/EmailValidator/Exception/ConsecutiveAt.php delete mode 100644 egulias/email-validator/EmailValidator/Exception/ConsecutiveDot.php delete mode 100644 egulias/email-validator/EmailValidator/Exception/DomainHyphened.php delete mode 100644 egulias/email-validator/EmailValidator/Exception/DotAtEnd.php delete mode 100644 egulias/email-validator/EmailValidator/Exception/DotAtStart.php delete mode 100644 egulias/email-validator/EmailValidator/Exception/ExpectingAT.php delete mode 100644 egulias/email-validator/EmailValidator/Exception/ExpectingATEXT.php delete mode 100644 egulias/email-validator/EmailValidator/Exception/ExpectingCTEXT.php delete mode 100644 egulias/email-validator/EmailValidator/Exception/ExpectingDTEXT.php delete mode 100644 egulias/email-validator/EmailValidator/Exception/ExpectingDomainLiteralClose.php delete mode 100644 egulias/email-validator/EmailValidator/Exception/ExpectingQPair.php delete mode 100644 egulias/email-validator/EmailValidator/Exception/InvalidEmail.php delete mode 100644 egulias/email-validator/EmailValidator/Exception/NoDNSRecord.php delete mode 100644 egulias/email-validator/EmailValidator/Exception/NoDomainPart.php delete mode 100644 egulias/email-validator/EmailValidator/Exception/NoLocalPart.php delete mode 100644 egulias/email-validator/EmailValidator/Exception/UnclosedComment.php delete mode 100644 egulias/email-validator/EmailValidator/Exception/UnclosedQuotedString.php delete mode 100644 egulias/email-validator/EmailValidator/Exception/UnopenedComment.php delete mode 100644 egulias/email-validator/EmailValidator/Parser/DomainPart.php delete mode 100644 egulias/email-validator/EmailValidator/Parser/LocalPart.php delete mode 100644 egulias/email-validator/EmailValidator/Parser/Parser.php delete mode 100644 egulias/email-validator/EmailValidator/Validation/DNSCheckValidation.php delete mode 100644 egulias/email-validator/EmailValidator/Validation/EmailValidation.php delete mode 100644 egulias/email-validator/EmailValidator/Validation/Error/RFCWarnings.php delete mode 100644 egulias/email-validator/EmailValidator/Validation/Error/SpoofEmail.php delete mode 100644 egulias/email-validator/EmailValidator/Validation/Exception/EmptyValidationList.php delete mode 100644 egulias/email-validator/EmailValidator/Validation/MultipleErrors.php delete mode 100644 egulias/email-validator/EmailValidator/Validation/MultipleValidationWithAnd.php delete mode 100644 egulias/email-validator/EmailValidator/Validation/NoRFCWarningsValidation.php delete mode 100644 egulias/email-validator/EmailValidator/Validation/RFCValidation.php delete mode 100644 egulias/email-validator/EmailValidator/Validation/SpoofCheckValidation.php delete mode 100644 egulias/email-validator/EmailValidator/Warning/AddressLiteral.php delete mode 100644 egulias/email-validator/EmailValidator/Warning/CFWSNearAt.php delete mode 100644 egulias/email-validator/EmailValidator/Warning/CFWSWithFWS.php delete mode 100644 egulias/email-validator/EmailValidator/Warning/Comment.php delete mode 100644 egulias/email-validator/EmailValidator/Warning/DeprecatedComment.php delete mode 100644 egulias/email-validator/EmailValidator/Warning/DomainLiteral.php delete mode 100644 egulias/email-validator/EmailValidator/Warning/DomainTooLong.php delete mode 100644 egulias/email-validator/EmailValidator/Warning/EmailTooLong.php delete mode 100644 egulias/email-validator/EmailValidator/Warning/IPV6BadChar.php delete mode 100644 egulias/email-validator/EmailValidator/Warning/IPV6ColonEnd.php delete mode 100644 egulias/email-validator/EmailValidator/Warning/IPV6ColonStart.php delete mode 100644 egulias/email-validator/EmailValidator/Warning/IPV6Deprecated.php delete mode 100644 egulias/email-validator/EmailValidator/Warning/IPV6DoubleColon.php delete mode 100644 egulias/email-validator/EmailValidator/Warning/IPV6GroupCount.php delete mode 100644 egulias/email-validator/EmailValidator/Warning/IPV6MaxGroups.php delete mode 100644 egulias/email-validator/EmailValidator/Warning/LabelTooLong.php delete mode 100644 egulias/email-validator/EmailValidator/Warning/LocalTooLong.php delete mode 100644 egulias/email-validator/EmailValidator/Warning/NoDNSMXRecord.php delete mode 100644 egulias/email-validator/EmailValidator/Warning/ObsoleteDTEXT.php delete mode 100644 egulias/email-validator/EmailValidator/Warning/QuotedPart.php delete mode 100644 egulias/email-validator/EmailValidator/Warning/QuotedString.php delete mode 100644 egulias/email-validator/EmailValidator/Warning/TLD.php delete mode 100644 egulias/email-validator/EmailValidator/Warning/Warning.php delete mode 100644 egulias/email-validator/README.md delete mode 100644 egulias/email-validator/phpunit.xml.dist diff --git a/composer.lock b/composer.lock index 3f44d5e61..8313bb7d0 100644 --- a/composer.lock +++ b/composer.lock @@ -610,20 +610,20 @@ }, { "name": "doctrine/lexer", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6" + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6", - "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/e864bbf5904cb8f5bb334f99209b48018522f042", + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042", "shasum": "" }, "require": { - "php": "^7.2" + "php": "^7.2 || ^8.0" }, "require-dev": { "doctrine/coding-standard": "^6.0", @@ -668,31 +668,49 @@ "parser", "php" ], - "time": "2019-10-30T14:39:59+00:00" + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2020-05-25T17:44:05+00:00" }, { "name": "egulias/email-validator", - "version": "2.1.11", + "version": "2.1.24", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "92dd169c32f6f55ba570c309d83f5209cefb5e23" + "reference": "ca90a3291eee1538cd48ff25163240695bd95448" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/92dd169c32f6f55ba570c309d83f5209cefb5e23", - "reference": "92dd169c32f6f55ba570c309d83f5209cefb5e23", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ca90a3291eee1538cd48ff25163240695bd95448", + "reference": "ca90a3291eee1538cd48ff25163240695bd95448", "shasum": "" }, "require": { "doctrine/lexer": "^1.0.1", - "php": ">= 5.5" + "php": ">=5.5", + "symfony/polyfill-intl-idn": "^1.10" }, "require-dev": { - "dominicsayers/isemail": "dev-master", - "phpunit/phpunit": "^4.8.35||^5.7||^6.0", - "satooshi/php-coveralls": "^1.0.1", - "symfony/phpunit-bridge": "^4.4@dev" + "dominicsayers/isemail": "^3.0.7", + "phpunit/phpunit": "^4.8.36|^7.5.15", + "satooshi/php-coveralls": "^1.0.1" }, "suggest": { "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" @@ -705,7 +723,7 @@ }, "autoload": { "psr-4": { - "Egulias\\EmailValidator\\": "EmailValidator" + "Egulias\\EmailValidator\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -726,7 +744,17 @@ "validation", "validator" ], - "time": "2019-08-13T17:33:27+00:00" + "support": { + "issues": "https://github.com/egulias/EmailValidator/issues", + "source": "https://github.com/egulias/EmailValidator/tree/2.1.24" + }, + "funding": [ + { + "url": "https://github.com/egulias", + "type": "github" + } + ], + "time": "2020-11-14T15:56:27+00:00" }, { "name": "fgrosse/phpasn1", @@ -1912,6 +1940,11 @@ "pseudorandom", "random" ], + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/random_compat/issues", + "source": "https://github.com/paragonie/random_compat" + }, "time": "2018-07-02T15:55:56+00:00" }, { @@ -3737,32 +3770,31 @@ }, { "name": "swiftmailer/swiftmailer", - "version": "v6.2.3", + "version": "v6.2.4", "source": { "type": "git", "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "149cfdf118b169f7840bbe3ef0d4bc795d1780c9" + "reference": "56f0ab23f54c4ccbb0d5dcc67ff8552e0c98d59e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/149cfdf118b169f7840bbe3ef0d4bc795d1780c9", - "reference": "149cfdf118b169f7840bbe3ef0d4bc795d1780c9", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/56f0ab23f54c4ccbb0d5dcc67ff8552e0c98d59e", + "reference": "56f0ab23f54c4ccbb0d5dcc67ff8552e0c98d59e", "shasum": "" }, "require": { - "egulias/email-validator": "~2.0", + "egulias/email-validator": "^2.0", "php": ">=7.0.0", "symfony/polyfill-iconv": "^1.0", "symfony/polyfill-intl-idn": "^1.10", "symfony/polyfill-mbstring": "^1.0" }, "require-dev": { - "mockery/mockery": "~0.9.1", - "symfony/phpunit-bridge": "^3.4.19|^4.1.8" + "mockery/mockery": "^1.0", + "symfony/phpunit-bridge": "^4.4|^5.0" }, "suggest": { - "ext-intl": "Needed to support internationalized email addresses", - "true/punycode": "Needed to support internationalized email addresses, if ext-intl is not installed" + "ext-intl": "Needed to support internationalized email addresses" }, "type": "library", "extra": { @@ -3795,7 +3827,21 @@ "mail", "mailer" ], - "time": "2019-11-12T09:31:26+00:00" + "support": { + "issues": "https://github.com/swiftmailer/swiftmailer/issues", + "source": "https://github.com/swiftmailer/swiftmailer/tree/v6.2.4" + }, + "funding": [ + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/swiftmailer/swiftmailer", + "type": "tidelift" + } + ], + "time": "2020-12-08T18:02:06+00:00" }, { "name": "symfony/console", diff --git a/composer/InstalledVersions.php b/composer/InstalledVersions.php index 4ed5f7fc3..83773d95a 100644 --- a/composer/InstalledVersions.php +++ b/composer/InstalledVersions.php @@ -29,7 +29,7 @@ class InstalledVersions 'aliases' => array ( ), - 'reference' => '1c9341631508ff217c3ebec6b64a97eb1137248c', + 'reference' => '3a98f51c7293a2559b6ff31ffba4ab7571be9992', 'name' => 'nextcloud/3rdparty', ), 'versions' => @@ -117,21 +117,21 @@ class InstalledVersions ), 'doctrine/lexer' => array ( - 'pretty_version' => '1.2.0', - 'version' => '1.2.0.0', + 'pretty_version' => '1.2.1', + 'version' => '1.2.1.0', 'aliases' => array ( ), - 'reference' => '5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6', + 'reference' => 'e864bbf5904cb8f5bb334f99209b48018522f042', ), 'egulias/email-validator' => array ( - 'pretty_version' => '2.1.11', - 'version' => '2.1.11.0', + 'pretty_version' => '2.1.24', + 'version' => '2.1.24.0', 'aliases' => array ( ), - 'reference' => '92dd169c32f6f55ba570c309d83f5209cefb5e23', + 'reference' => 'ca90a3291eee1538cd48ff25163240695bd95448', ), 'fgrosse/phpasn1' => array ( @@ -284,7 +284,7 @@ class InstalledVersions 'aliases' => array ( ), - 'reference' => '1c9341631508ff217c3ebec6b64a97eb1137248c', + 'reference' => '3a98f51c7293a2559b6ff31ffba4ab7571be9992', ), 'nextcloud/lognormalizer' => array ( @@ -673,12 +673,12 @@ class InstalledVersions ), 'swiftmailer/swiftmailer' => array ( - 'pretty_version' => 'v6.2.3', - 'version' => '6.2.3.0', + 'pretty_version' => 'v6.2.4', + 'version' => '6.2.4.0', 'aliases' => array ( ), - 'reference' => '149cfdf118b169f7840bbe3ef0d4bc795d1780c9', + 'reference' => '56f0ab23f54c4ccbb0d5dcc67ff8552e0c98d59e', ), 'symfony/console' => array ( diff --git a/composer/autoload_classmap.php b/composer/autoload_classmap.php index 8f7d624e8..ae938b2fb 100644 --- a/composer/autoload_classmap.php +++ b/composer/autoload_classmap.php @@ -1103,69 +1103,6 @@ 'Ds\\Traits\\GenericSequence' => $vendorDir . '/php-ds/php-ds/src/Traits/GenericSequence.php', 'Ds\\Traits\\SquaredCapacity' => $vendorDir . '/php-ds/php-ds/src/Traits/SquaredCapacity.php', 'Ds\\Vector' => $vendorDir . '/php-ds/php-ds/src/Vector.php', - 'Egulias\\EmailValidator\\EmailLexer' => $vendorDir . '/egulias/email-validator/EmailValidator/EmailLexer.php', - 'Egulias\\EmailValidator\\EmailParser' => $vendorDir . '/egulias/email-validator/EmailValidator/EmailParser.php', - 'Egulias\\EmailValidator\\EmailValidator' => $vendorDir . '/egulias/email-validator/EmailValidator/EmailValidator.php', - 'Egulias\\EmailValidator\\Exception\\AtextAfterCFWS' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/AtextAfterCFWS.php', - 'Egulias\\EmailValidator\\Exception\\CRLFAtTheEnd' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/CRLFAtTheEnd.php', - 'Egulias\\EmailValidator\\Exception\\CRLFX2' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/CRLFX2.php', - 'Egulias\\EmailValidator\\Exception\\CRNoLF' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/CRNoLF.php', - 'Egulias\\EmailValidator\\Exception\\CharNotAllowed' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/CharNotAllowed.php', - 'Egulias\\EmailValidator\\Exception\\CommaInDomain' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/CommaInDomain.php', - 'Egulias\\EmailValidator\\Exception\\ConsecutiveAt' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/ConsecutiveAt.php', - 'Egulias\\EmailValidator\\Exception\\ConsecutiveDot' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/ConsecutiveDot.php', - 'Egulias\\EmailValidator\\Exception\\DomainHyphened' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/DomainHyphened.php', - 'Egulias\\EmailValidator\\Exception\\DotAtEnd' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/DotAtEnd.php', - 'Egulias\\EmailValidator\\Exception\\DotAtStart' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/DotAtStart.php', - 'Egulias\\EmailValidator\\Exception\\ExpectingAT' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/ExpectingAT.php', - 'Egulias\\EmailValidator\\Exception\\ExpectingATEXT' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/ExpectingATEXT.php', - 'Egulias\\EmailValidator\\Exception\\ExpectingCTEXT' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/ExpectingCTEXT.php', - 'Egulias\\EmailValidator\\Exception\\ExpectingDTEXT' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/ExpectingDTEXT.php', - 'Egulias\\EmailValidator\\Exception\\ExpectingDomainLiteralClose' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/ExpectingDomainLiteralClose.php', - 'Egulias\\EmailValidator\\Exception\\ExpectingQPair' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/ExpectingQPair.php', - 'Egulias\\EmailValidator\\Exception\\InvalidEmail' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/InvalidEmail.php', - 'Egulias\\EmailValidator\\Exception\\NoDNSRecord' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/NoDNSRecord.php', - 'Egulias\\EmailValidator\\Exception\\NoDomainPart' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/NoDomainPart.php', - 'Egulias\\EmailValidator\\Exception\\NoLocalPart' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/NoLocalPart.php', - 'Egulias\\EmailValidator\\Exception\\UnclosedComment' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/UnclosedComment.php', - 'Egulias\\EmailValidator\\Exception\\UnclosedQuotedString' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/UnclosedQuotedString.php', - 'Egulias\\EmailValidator\\Exception\\UnopenedComment' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/UnopenedComment.php', - 'Egulias\\EmailValidator\\Parser\\DomainPart' => $vendorDir . '/egulias/email-validator/EmailValidator/Parser/DomainPart.php', - 'Egulias\\EmailValidator\\Parser\\LocalPart' => $vendorDir . '/egulias/email-validator/EmailValidator/Parser/LocalPart.php', - 'Egulias\\EmailValidator\\Parser\\Parser' => $vendorDir . '/egulias/email-validator/EmailValidator/Parser/Parser.php', - 'Egulias\\EmailValidator\\Validation\\DNSCheckValidation' => $vendorDir . '/egulias/email-validator/EmailValidator/Validation/DNSCheckValidation.php', - 'Egulias\\EmailValidator\\Validation\\EmailValidation' => $vendorDir . '/egulias/email-validator/EmailValidator/Validation/EmailValidation.php', - 'Egulias\\EmailValidator\\Validation\\Error\\RFCWarnings' => $vendorDir . '/egulias/email-validator/EmailValidator/Validation/Error/RFCWarnings.php', - 'Egulias\\EmailValidator\\Validation\\Error\\SpoofEmail' => $vendorDir . '/egulias/email-validator/EmailValidator/Validation/Error/SpoofEmail.php', - 'Egulias\\EmailValidator\\Validation\\Exception\\EmptyValidationList' => $vendorDir . '/egulias/email-validator/EmailValidator/Validation/Exception/EmptyValidationList.php', - 'Egulias\\EmailValidator\\Validation\\MultipleErrors' => $vendorDir . '/egulias/email-validator/EmailValidator/Validation/MultipleErrors.php', - 'Egulias\\EmailValidator\\Validation\\MultipleValidationWithAnd' => $vendorDir . '/egulias/email-validator/EmailValidator/Validation/MultipleValidationWithAnd.php', - 'Egulias\\EmailValidator\\Validation\\NoRFCWarningsValidation' => $vendorDir . '/egulias/email-validator/EmailValidator/Validation/NoRFCWarningsValidation.php', - 'Egulias\\EmailValidator\\Validation\\RFCValidation' => $vendorDir . '/egulias/email-validator/EmailValidator/Validation/RFCValidation.php', - 'Egulias\\EmailValidator\\Validation\\SpoofCheckValidation' => $vendorDir . '/egulias/email-validator/EmailValidator/Validation/SpoofCheckValidation.php', - 'Egulias\\EmailValidator\\Warning\\AddressLiteral' => $vendorDir . '/egulias/email-validator/EmailValidator/Warning/AddressLiteral.php', - 'Egulias\\EmailValidator\\Warning\\CFWSNearAt' => $vendorDir . '/egulias/email-validator/EmailValidator/Warning/CFWSNearAt.php', - 'Egulias\\EmailValidator\\Warning\\CFWSWithFWS' => $vendorDir . '/egulias/email-validator/EmailValidator/Warning/CFWSWithFWS.php', - 'Egulias\\EmailValidator\\Warning\\Comment' => $vendorDir . '/egulias/email-validator/EmailValidator/Warning/Comment.php', - 'Egulias\\EmailValidator\\Warning\\DeprecatedComment' => $vendorDir . '/egulias/email-validator/EmailValidator/Warning/DeprecatedComment.php', - 'Egulias\\EmailValidator\\Warning\\DomainLiteral' => $vendorDir . '/egulias/email-validator/EmailValidator/Warning/DomainLiteral.php', - 'Egulias\\EmailValidator\\Warning\\DomainTooLong' => $vendorDir . '/egulias/email-validator/EmailValidator/Warning/DomainTooLong.php', - 'Egulias\\EmailValidator\\Warning\\EmailTooLong' => $vendorDir . '/egulias/email-validator/EmailValidator/Warning/EmailTooLong.php', - 'Egulias\\EmailValidator\\Warning\\IPV6BadChar' => $vendorDir . '/egulias/email-validator/EmailValidator/Warning/IPV6BadChar.php', - 'Egulias\\EmailValidator\\Warning\\IPV6ColonEnd' => $vendorDir . '/egulias/email-validator/EmailValidator/Warning/IPV6ColonEnd.php', - 'Egulias\\EmailValidator\\Warning\\IPV6ColonStart' => $vendorDir . '/egulias/email-validator/EmailValidator/Warning/IPV6ColonStart.php', - 'Egulias\\EmailValidator\\Warning\\IPV6Deprecated' => $vendorDir . '/egulias/email-validator/EmailValidator/Warning/IPV6Deprecated.php', - 'Egulias\\EmailValidator\\Warning\\IPV6DoubleColon' => $vendorDir . '/egulias/email-validator/EmailValidator/Warning/IPV6DoubleColon.php', - 'Egulias\\EmailValidator\\Warning\\IPV6GroupCount' => $vendorDir . '/egulias/email-validator/EmailValidator/Warning/IPV6GroupCount.php', - 'Egulias\\EmailValidator\\Warning\\IPV6MaxGroups' => $vendorDir . '/egulias/email-validator/EmailValidator/Warning/IPV6MaxGroups.php', - 'Egulias\\EmailValidator\\Warning\\LabelTooLong' => $vendorDir . '/egulias/email-validator/EmailValidator/Warning/LabelTooLong.php', - 'Egulias\\EmailValidator\\Warning\\LocalTooLong' => $vendorDir . '/egulias/email-validator/EmailValidator/Warning/LocalTooLong.php', - 'Egulias\\EmailValidator\\Warning\\NoDNSMXRecord' => $vendorDir . '/egulias/email-validator/EmailValidator/Warning/NoDNSMXRecord.php', - 'Egulias\\EmailValidator\\Warning\\ObsoleteDTEXT' => $vendorDir . '/egulias/email-validator/EmailValidator/Warning/ObsoleteDTEXT.php', - 'Egulias\\EmailValidator\\Warning\\QuotedPart' => $vendorDir . '/egulias/email-validator/EmailValidator/Warning/QuotedPart.php', - 'Egulias\\EmailValidator\\Warning\\QuotedString' => $vendorDir . '/egulias/email-validator/EmailValidator/Warning/QuotedString.php', - 'Egulias\\EmailValidator\\Warning\\TLD' => $vendorDir . '/egulias/email-validator/EmailValidator/Warning/TLD.php', - 'Egulias\\EmailValidator\\Warning\\Warning' => $vendorDir . '/egulias/email-validator/EmailValidator/Warning/Warning.php', 'FG\\ASN1\\ASNObject' => $vendorDir . '/fgrosse/phpasn1/lib/ASN1/ASNObject.php', 'FG\\ASN1\\AbstractString' => $vendorDir . '/fgrosse/phpasn1/lib/ASN1/AbstractString.php', 'FG\\ASN1\\AbstractTime' => $vendorDir . '/fgrosse/phpasn1/lib/ASN1/AbstractTime.php', diff --git a/composer/autoload_files.php b/composer/autoload_files.php index 1654353d9..ac38d2fb9 100644 --- a/composer/autoload_files.php +++ b/composer/autoload_files.php @@ -20,13 +20,13 @@ 'a1cce3d26cc15c00fcd0b3354bd72c88' => $vendorDir . '/sabre/event/lib/Promise/functions.php', '3569eecfeed3bcf0bad3c998a494ecb8' => $vendorDir . '/sabre/xml/lib/Deserializer/functions.php', '93aa591bc4ca510c520999e34229ee79' => $vendorDir . '/sabre/xml/lib/Serializer/functions.php', + '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php', + 'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php', 'ebdb698ed4152ae445614b69b5e4bb6a' => $vendorDir . '/sabre/http/lib/functions.php', '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php', - '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php', 'b067bc7112e384b61c701452d53a14a8' => $vendorDir . '/mtdowling/jmespath.php/src/JmesPath.php', 'e39a8b23c42d4e1452234d762b03835a' => $vendorDir . '/ramsey/uuid/src/functions.php', 'def43f6c87e4f8dfd0c9e1b1bab14fe8' => $vendorDir . '/symfony/polyfill-iconv/bootstrap.php', - 'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php', '8a9dc1de0ca7e01f3e08231539562f61' => $vendorDir . '/aws/aws-sdk-php/src/functions.php', '538ca81a9a966a6716601ecf48f4eaef' => $vendorDir . '/opis/closure/functions.php', 'decc78cc4436b1292c6c0d151b19445c' => $vendorDir . '/phpseclib/phpseclib/phpseclib/bootstrap.php', diff --git a/composer/autoload_psr4.php b/composer/autoload_psr4.php index e31277052..8ac4cfac9 100644 --- a/composer/autoload_psr4.php +++ b/composer/autoload_psr4.php @@ -67,7 +67,7 @@ 'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'), 'Giggsey\\Locale\\' => array($vendorDir . '/giggsey/locale/src'), 'FG\\' => array($vendorDir . '/fgrosse/phpasn1/lib'), - 'Egulias\\EmailValidator\\' => array($vendorDir . '/egulias/email-validator/EmailValidator'), + 'Egulias\\EmailValidator\\' => array($vendorDir . '/egulias/email-validator/src'), 'Ds\\' => array($vendorDir . '/php-ds/php-ds/src'), 'Doctrine\\DBAL\\' => array($vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL'), 'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/lib/Doctrine/Common/Lexer'), diff --git a/composer/autoload_static.php b/composer/autoload_static.php index db5172648..dd65212d3 100644 --- a/composer/autoload_static.php +++ b/composer/autoload_static.php @@ -21,13 +21,13 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652 'a1cce3d26cc15c00fcd0b3354bd72c88' => __DIR__ . '/..' . '/sabre/event/lib/Promise/functions.php', '3569eecfeed3bcf0bad3c998a494ecb8' => __DIR__ . '/..' . '/sabre/xml/lib/Deserializer/functions.php', '93aa591bc4ca510c520999e34229ee79' => __DIR__ . '/..' . '/sabre/xml/lib/Serializer/functions.php', + '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php', + 'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php', 'ebdb698ed4152ae445614b69b5e4bb6a' => __DIR__ . '/..' . '/sabre/http/lib/functions.php', '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', - '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php', 'b067bc7112e384b61c701452d53a14a8' => __DIR__ . '/..' . '/mtdowling/jmespath.php/src/JmesPath.php', 'e39a8b23c42d4e1452234d762b03835a' => __DIR__ . '/..' . '/ramsey/uuid/src/functions.php', 'def43f6c87e4f8dfd0c9e1b1bab14fe8' => __DIR__ . '/..' . '/symfony/polyfill-iconv/bootstrap.php', - 'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php', '8a9dc1de0ca7e01f3e08231539562f61' => __DIR__ . '/..' . '/aws/aws-sdk-php/src/functions.php', '538ca81a9a966a6716601ecf48f4eaef' => __DIR__ . '/..' . '/opis/closure/functions.php', 'decc78cc4436b1292c6c0d151b19445c' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/bootstrap.php', @@ -429,7 +429,7 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652 ), 'Egulias\\EmailValidator\\' => array ( - 0 => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator', + 0 => __DIR__ . '/..' . '/egulias/email-validator/src', ), 'Ds\\' => array ( @@ -1599,69 +1599,6 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652 'Ds\\Traits\\GenericSequence' => __DIR__ . '/..' . '/php-ds/php-ds/src/Traits/GenericSequence.php', 'Ds\\Traits\\SquaredCapacity' => __DIR__ . '/..' . '/php-ds/php-ds/src/Traits/SquaredCapacity.php', 'Ds\\Vector' => __DIR__ . '/..' . '/php-ds/php-ds/src/Vector.php', - 'Egulias\\EmailValidator\\EmailLexer' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/EmailLexer.php', - 'Egulias\\EmailValidator\\EmailParser' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/EmailParser.php', - 'Egulias\\EmailValidator\\EmailValidator' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/EmailValidator.php', - 'Egulias\\EmailValidator\\Exception\\AtextAfterCFWS' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/AtextAfterCFWS.php', - 'Egulias\\EmailValidator\\Exception\\CRLFAtTheEnd' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/CRLFAtTheEnd.php', - 'Egulias\\EmailValidator\\Exception\\CRLFX2' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/CRLFX2.php', - 'Egulias\\EmailValidator\\Exception\\CRNoLF' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/CRNoLF.php', - 'Egulias\\EmailValidator\\Exception\\CharNotAllowed' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/CharNotAllowed.php', - 'Egulias\\EmailValidator\\Exception\\CommaInDomain' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/CommaInDomain.php', - 'Egulias\\EmailValidator\\Exception\\ConsecutiveAt' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/ConsecutiveAt.php', - 'Egulias\\EmailValidator\\Exception\\ConsecutiveDot' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/ConsecutiveDot.php', - 'Egulias\\EmailValidator\\Exception\\DomainHyphened' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/DomainHyphened.php', - 'Egulias\\EmailValidator\\Exception\\DotAtEnd' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/DotAtEnd.php', - 'Egulias\\EmailValidator\\Exception\\DotAtStart' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/DotAtStart.php', - 'Egulias\\EmailValidator\\Exception\\ExpectingAT' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/ExpectingAT.php', - 'Egulias\\EmailValidator\\Exception\\ExpectingATEXT' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/ExpectingATEXT.php', - 'Egulias\\EmailValidator\\Exception\\ExpectingCTEXT' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/ExpectingCTEXT.php', - 'Egulias\\EmailValidator\\Exception\\ExpectingDTEXT' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/ExpectingDTEXT.php', - 'Egulias\\EmailValidator\\Exception\\ExpectingDomainLiteralClose' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/ExpectingDomainLiteralClose.php', - 'Egulias\\EmailValidator\\Exception\\ExpectingQPair' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/ExpectingQPair.php', - 'Egulias\\EmailValidator\\Exception\\InvalidEmail' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/InvalidEmail.php', - 'Egulias\\EmailValidator\\Exception\\NoDNSRecord' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/NoDNSRecord.php', - 'Egulias\\EmailValidator\\Exception\\NoDomainPart' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/NoDomainPart.php', - 'Egulias\\EmailValidator\\Exception\\NoLocalPart' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/NoLocalPart.php', - 'Egulias\\EmailValidator\\Exception\\UnclosedComment' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/UnclosedComment.php', - 'Egulias\\EmailValidator\\Exception\\UnclosedQuotedString' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/UnclosedQuotedString.php', - 'Egulias\\EmailValidator\\Exception\\UnopenedComment' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/UnopenedComment.php', - 'Egulias\\EmailValidator\\Parser\\DomainPart' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Parser/DomainPart.php', - 'Egulias\\EmailValidator\\Parser\\LocalPart' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Parser/LocalPart.php', - 'Egulias\\EmailValidator\\Parser\\Parser' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Parser/Parser.php', - 'Egulias\\EmailValidator\\Validation\\DNSCheckValidation' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Validation/DNSCheckValidation.php', - 'Egulias\\EmailValidator\\Validation\\EmailValidation' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Validation/EmailValidation.php', - 'Egulias\\EmailValidator\\Validation\\Error\\RFCWarnings' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Validation/Error/RFCWarnings.php', - 'Egulias\\EmailValidator\\Validation\\Error\\SpoofEmail' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Validation/Error/SpoofEmail.php', - 'Egulias\\EmailValidator\\Validation\\Exception\\EmptyValidationList' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Validation/Exception/EmptyValidationList.php', - 'Egulias\\EmailValidator\\Validation\\MultipleErrors' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Validation/MultipleErrors.php', - 'Egulias\\EmailValidator\\Validation\\MultipleValidationWithAnd' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Validation/MultipleValidationWithAnd.php', - 'Egulias\\EmailValidator\\Validation\\NoRFCWarningsValidation' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Validation/NoRFCWarningsValidation.php', - 'Egulias\\EmailValidator\\Validation\\RFCValidation' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Validation/RFCValidation.php', - 'Egulias\\EmailValidator\\Validation\\SpoofCheckValidation' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Validation/SpoofCheckValidation.php', - 'Egulias\\EmailValidator\\Warning\\AddressLiteral' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Warning/AddressLiteral.php', - 'Egulias\\EmailValidator\\Warning\\CFWSNearAt' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Warning/CFWSNearAt.php', - 'Egulias\\EmailValidator\\Warning\\CFWSWithFWS' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Warning/CFWSWithFWS.php', - 'Egulias\\EmailValidator\\Warning\\Comment' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Warning/Comment.php', - 'Egulias\\EmailValidator\\Warning\\DeprecatedComment' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Warning/DeprecatedComment.php', - 'Egulias\\EmailValidator\\Warning\\DomainLiteral' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Warning/DomainLiteral.php', - 'Egulias\\EmailValidator\\Warning\\DomainTooLong' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Warning/DomainTooLong.php', - 'Egulias\\EmailValidator\\Warning\\EmailTooLong' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Warning/EmailTooLong.php', - 'Egulias\\EmailValidator\\Warning\\IPV6BadChar' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Warning/IPV6BadChar.php', - 'Egulias\\EmailValidator\\Warning\\IPV6ColonEnd' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Warning/IPV6ColonEnd.php', - 'Egulias\\EmailValidator\\Warning\\IPV6ColonStart' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Warning/IPV6ColonStart.php', - 'Egulias\\EmailValidator\\Warning\\IPV6Deprecated' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Warning/IPV6Deprecated.php', - 'Egulias\\EmailValidator\\Warning\\IPV6DoubleColon' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Warning/IPV6DoubleColon.php', - 'Egulias\\EmailValidator\\Warning\\IPV6GroupCount' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Warning/IPV6GroupCount.php', - 'Egulias\\EmailValidator\\Warning\\IPV6MaxGroups' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Warning/IPV6MaxGroups.php', - 'Egulias\\EmailValidator\\Warning\\LabelTooLong' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Warning/LabelTooLong.php', - 'Egulias\\EmailValidator\\Warning\\LocalTooLong' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Warning/LocalTooLong.php', - 'Egulias\\EmailValidator\\Warning\\NoDNSMXRecord' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Warning/NoDNSMXRecord.php', - 'Egulias\\EmailValidator\\Warning\\ObsoleteDTEXT' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Warning/ObsoleteDTEXT.php', - 'Egulias\\EmailValidator\\Warning\\QuotedPart' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Warning/QuotedPart.php', - 'Egulias\\EmailValidator\\Warning\\QuotedString' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Warning/QuotedString.php', - 'Egulias\\EmailValidator\\Warning\\TLD' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Warning/TLD.php', - 'Egulias\\EmailValidator\\Warning\\Warning' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Warning/Warning.php', 'FG\\ASN1\\ASNObject' => __DIR__ . '/..' . '/fgrosse/phpasn1/lib/ASN1/ASNObject.php', 'FG\\ASN1\\AbstractString' => __DIR__ . '/..' . '/fgrosse/phpasn1/lib/ASN1/AbstractString.php', 'FG\\ASN1\\AbstractTime' => __DIR__ . '/..' . '/fgrosse/phpasn1/lib/ASN1/AbstractTime.php', diff --git a/composer/installed.json b/composer/installed.json index 833b87357..e663bd53f 100644 --- a/composer/installed.json +++ b/composer/installed.json @@ -631,28 +631,28 @@ }, { "name": "doctrine/lexer", - "version": "1.2.0", - "version_normalized": "1.2.0.0", + "version": "1.2.1", + "version_normalized": "1.2.1.0", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6" + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6", - "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/e864bbf5904cb8f5bb334f99209b48018522f042", + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042", "shasum": "" }, "require": { - "php": "^7.2" + "php": "^7.2 || ^8.0" }, "require-dev": { "doctrine/coding-standard": "^6.0", "phpstan/phpstan": "^0.11.8", "phpunit/phpunit": "^8.2" }, - "time": "2019-10-30T14:39:59+00:00", + "time": "2020-05-25T17:44:05+00:00", "type": "library", "extra": { "branch-alias": { @@ -692,37 +692,55 @@ "parser", "php" ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], "install-path": "../doctrine/lexer" }, { "name": "egulias/email-validator", - "version": "2.1.11", - "version_normalized": "2.1.11.0", + "version": "2.1.24", + "version_normalized": "2.1.24.0", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "92dd169c32f6f55ba570c309d83f5209cefb5e23" + "reference": "ca90a3291eee1538cd48ff25163240695bd95448" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/92dd169c32f6f55ba570c309d83f5209cefb5e23", - "reference": "92dd169c32f6f55ba570c309d83f5209cefb5e23", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ca90a3291eee1538cd48ff25163240695bd95448", + "reference": "ca90a3291eee1538cd48ff25163240695bd95448", "shasum": "" }, "require": { "doctrine/lexer": "^1.0.1", - "php": ">= 5.5" + "php": ">=5.5", + "symfony/polyfill-intl-idn": "^1.10" }, "require-dev": { - "dominicsayers/isemail": "dev-master", - "phpunit/phpunit": "^4.8.35||^5.7||^6.0", - "satooshi/php-coveralls": "^1.0.1", - "symfony/phpunit-bridge": "^4.4@dev" + "dominicsayers/isemail": "^3.0.7", + "phpunit/phpunit": "^4.8.36|^7.5.15", + "satooshi/php-coveralls": "^1.0.1" }, "suggest": { "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" }, - "time": "2019-08-13T17:33:27+00:00", + "time": "2020-11-14T15:56:27+00:00", "type": "library", "extra": { "branch-alias": { @@ -732,7 +750,7 @@ "installation-source": "dist", "autoload": { "psr-4": { - "Egulias\\EmailValidator\\": "EmailValidator" + "Egulias\\EmailValidator\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -753,6 +771,16 @@ "validation", "validator" ], + "support": { + "issues": "https://github.com/egulias/EmailValidator/issues", + "source": "https://github.com/egulias/EmailValidator/tree/2.1.24" + }, + "funding": [ + { + "url": "https://github.com/egulias", + "type": "github" + } + ], "install-path": "../egulias/email-validator" }, { @@ -3917,35 +3945,34 @@ }, { "name": "swiftmailer/swiftmailer", - "version": "v6.2.3", - "version_normalized": "6.2.3.0", + "version": "v6.2.4", + "version_normalized": "6.2.4.0", "source": { "type": "git", "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "149cfdf118b169f7840bbe3ef0d4bc795d1780c9" + "reference": "56f0ab23f54c4ccbb0d5dcc67ff8552e0c98d59e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/149cfdf118b169f7840bbe3ef0d4bc795d1780c9", - "reference": "149cfdf118b169f7840bbe3ef0d4bc795d1780c9", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/56f0ab23f54c4ccbb0d5dcc67ff8552e0c98d59e", + "reference": "56f0ab23f54c4ccbb0d5dcc67ff8552e0c98d59e", "shasum": "" }, "require": { - "egulias/email-validator": "~2.0", + "egulias/email-validator": "^2.0", "php": ">=7.0.0", "symfony/polyfill-iconv": "^1.0", "symfony/polyfill-intl-idn": "^1.10", "symfony/polyfill-mbstring": "^1.0" }, "require-dev": { - "mockery/mockery": "~0.9.1", - "symfony/phpunit-bridge": "^3.4.19|^4.1.8" + "mockery/mockery": "^1.0", + "symfony/phpunit-bridge": "^4.4|^5.0" }, "suggest": { - "ext-intl": "Needed to support internationalized email addresses", - "true/punycode": "Needed to support internationalized email addresses, if ext-intl is not installed" + "ext-intl": "Needed to support internationalized email addresses" }, - "time": "2019-11-12T09:31:26+00:00", + "time": "2020-12-08T18:02:06+00:00", "type": "library", "extra": { "branch-alias": { @@ -3978,6 +4005,20 @@ "mail", "mailer" ], + "support": { + "issues": "https://github.com/swiftmailer/swiftmailer/issues", + "source": "https://github.com/swiftmailer/swiftmailer/tree/v6.2.4" + }, + "funding": [ + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/swiftmailer/swiftmailer", + "type": "tidelift" + } + ], "install-path": "../swiftmailer/swiftmailer" }, { diff --git a/composer/installed.php b/composer/installed.php index 5e2bdc1b1..f3c021c06 100644 --- a/composer/installed.php +++ b/composer/installed.php @@ -6,7 +6,7 @@ 'aliases' => array ( ), - 'reference' => '1c9341631508ff217c3ebec6b64a97eb1137248c', + 'reference' => '3a98f51c7293a2559b6ff31ffba4ab7571be9992', 'name' => 'nextcloud/3rdparty', ), 'versions' => @@ -94,21 +94,21 @@ ), 'doctrine/lexer' => array ( - 'pretty_version' => '1.2.0', - 'version' => '1.2.0.0', + 'pretty_version' => '1.2.1', + 'version' => '1.2.1.0', 'aliases' => array ( ), - 'reference' => '5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6', + 'reference' => 'e864bbf5904cb8f5bb334f99209b48018522f042', ), 'egulias/email-validator' => array ( - 'pretty_version' => '2.1.11', - 'version' => '2.1.11.0', + 'pretty_version' => '2.1.24', + 'version' => '2.1.24.0', 'aliases' => array ( ), - 'reference' => '92dd169c32f6f55ba570c309d83f5209cefb5e23', + 'reference' => 'ca90a3291eee1538cd48ff25163240695bd95448', ), 'fgrosse/phpasn1' => array ( @@ -261,7 +261,7 @@ 'aliases' => array ( ), - 'reference' => '1c9341631508ff217c3ebec6b64a97eb1137248c', + 'reference' => '3a98f51c7293a2559b6ff31ffba4ab7571be9992', ), 'nextcloud/lognormalizer' => array ( @@ -650,12 +650,12 @@ ), 'swiftmailer/swiftmailer' => array ( - 'pretty_version' => 'v6.2.3', - 'version' => '6.2.3.0', + 'pretty_version' => 'v6.2.4', + 'version' => '6.2.4.0', 'aliases' => array ( ), - 'reference' => '149cfdf118b169f7840bbe3ef0d4bc795d1780c9', + 'reference' => '56f0ab23f54c4ccbb0d5dcc67ff8552e0c98d59e', ), 'symfony/console' => array ( diff --git a/egulias/email-validator/EmailValidator/EmailLexer.php b/egulias/email-validator/EmailValidator/EmailLexer.php deleted file mode 100644 index 44857288d..000000000 --- a/egulias/email-validator/EmailValidator/EmailLexer.php +++ /dev/null @@ -1,241 +0,0 @@ - self::S_OPENPARENTHESIS, - ')' => self::S_CLOSEPARENTHESIS, - '<' => self::S_LOWERTHAN, - '>' => self::S_GREATERTHAN, - '[' => self::S_OPENBRACKET, - ']' => self::S_CLOSEBRACKET, - ':' => self::S_COLON, - ';' => self::S_SEMICOLON, - '@' => self::S_AT, - '\\' => self::S_BACKSLASH, - '/' => self::S_SLASH, - ',' => self::S_COMMA, - '.' => self::S_DOT, - '"' => self::S_DQUOTE, - '-' => self::S_HYPHEN, - '::' => self::S_DOUBLECOLON, - ' ' => self::S_SP, - "\t" => self::S_HTAB, - "\r" => self::S_CR, - "\n" => self::S_LF, - "\r\n" => self::CRLF, - 'IPv6' => self::S_IPV6TAG, - '{' => self::S_OPENQBRACKET, - '}' => self::S_CLOSEQBRACKET, - '' => self::S_EMPTY, - '\0' => self::C_NUL, - ); - - protected $hasInvalidTokens = false; - - protected $previous; - - private static $nullToken = [ - 'value' => '', - 'type' => null, - 'position' => 0, - ]; - - public function __construct() - { - $this->previous = $this->token = self::$nullToken; - } - - /** - * @return void - */ - public function reset() - { - $this->hasInvalidTokens = false; - parent::reset(); - $this->previous = $this->token = self::$nullToken; - } - - public function hasInvalidTokens() - { - return $this->hasInvalidTokens; - } - - /** - * @param string $type - * @throws \UnexpectedValueException - * @return boolean - */ - public function find($type) - { - $search = clone $this; - $search->skipUntil($type); - - if (!$search->lookahead) { - throw new \UnexpectedValueException($type . ' not found'); - } - return true; - } - - /** - * getPrevious - * - * @return array token - */ - public function getPrevious() - { - return $this->previous; - } - - /** - * moveNext - * - * @return boolean - */ - public function moveNext() - { - $this->previous = $this->token; - $hasNext = parent::moveNext(); - $this->token = $this->token ?: self::$nullToken; - - return $hasNext; - } - - /** - * Lexical catchable patterns. - * - * @return string[] - */ - protected function getCatchablePatterns() - { - return array( - '[a-zA-Z_]+[46]?', //ASCII and domain literal - '[^\x00-\x7F]', //UTF-8 - '[0-9]+', - '\r\n', - '::', - '\s+?', - '.', - ); - } - - /** - * Lexical non-catchable patterns. - * - * @return string[] - */ - protected function getNonCatchablePatterns() - { - return array('[\xA0-\xff]+'); - } - - /** - * Retrieve token type. Also processes the token value if necessary. - * - * @param string $value - * @throws \InvalidArgumentException - * @return integer - */ - protected function getType(&$value) - { - if ($this->isNullType($value)) { - return self::C_NUL; - } - - if ($this->isValid($value)) { - return $this->charValue[$value]; - } - - if ($this->isUTF8Invalid($value)) { - $this->hasInvalidTokens = true; - return self::INVALID; - } - - return self::GENERIC; - } - - protected function isValid($value) - { - if (isset($this->charValue[$value])) { - return true; - } - - return false; - } - - /** - * @param string $value - * @return bool - */ - protected function isNullType($value) - { - if ($value === "\0") { - return true; - } - - return false; - } - - /** - * @param string $value - * @return bool - */ - protected function isUTF8Invalid($value) - { - if (preg_match('/\p{Cc}+/u', $value)) { - return true; - } - - return false; - } - - /** - * @return string - */ - protected function getModifiers() - { - return 'iu'; - } -} diff --git a/egulias/email-validator/EmailValidator/EmailParser.php b/egulias/email-validator/EmailValidator/EmailParser.php deleted file mode 100644 index 5bf605ac2..000000000 --- a/egulias/email-validator/EmailValidator/EmailParser.php +++ /dev/null @@ -1,104 +0,0 @@ - - */ -class EmailParser -{ - const EMAIL_MAX_LENGTH = 254; - - protected $warnings; - protected $domainPart = ''; - protected $localPart = ''; - protected $lexer; - protected $localPartParser; - protected $domainPartParser; - - public function __construct(EmailLexer $lexer) - { - $this->lexer = $lexer; - $this->localPartParser = new LocalPart($this->lexer); - $this->domainPartParser = new DomainPart($this->lexer); - $this->warnings = new \SplObjectStorage(); - } - - /** - * @param string $str - * @return array - */ - public function parse($str) - { - $this->lexer->setInput($str); - - if (!$this->hasAtToken()) { - throw new NoLocalPart(); - } - - - $this->localPartParser->parse($str); - $this->domainPartParser->parse($str); - - $this->setParts($str); - - if ($this->lexer->hasInvalidTokens()) { - throw new ExpectingATEXT(); - } - - return array('local' => $this->localPart, 'domain' => $this->domainPart); - } - - public function getWarnings() - { - $localPartWarnings = $this->localPartParser->getWarnings(); - $domainPartWarnings = $this->domainPartParser->getWarnings(); - $this->warnings = array_merge($localPartWarnings, $domainPartWarnings); - - $this->addLongEmailWarning($this->localPart, $this->domainPart); - - return $this->warnings; - } - - public function getParsedDomainPart() - { - return $this->domainPart; - } - - protected function setParts($email) - { - $parts = explode('@', $email); - $this->domainPart = $this->domainPartParser->getDomainPart(); - $this->localPart = $parts[0]; - } - - protected function hasAtToken() - { - $this->lexer->moveNext(); - $this->lexer->moveNext(); - if ($this->lexer->token['type'] === EmailLexer::S_AT) { - return false; - } - - return true; - } - - /** - * @param string $localPart - * @param string $parsedDomainPart - */ - protected function addLongEmailWarning($localPart, $parsedDomainPart) - { - if (strlen($localPart . '@' . $parsedDomainPart) > self::EMAIL_MAX_LENGTH) { - $this->warnings[EmailTooLong::CODE] = new EmailTooLong(); - } - } -} diff --git a/egulias/email-validator/EmailValidator/EmailValidator.php b/egulias/email-validator/EmailValidator/EmailValidator.php deleted file mode 100644 index 1c2770721..000000000 --- a/egulias/email-validator/EmailValidator/EmailValidator.php +++ /dev/null @@ -1,67 +0,0 @@ -lexer = new EmailLexer(); - } - - /** - * @param string $email - * @param EmailValidation $emailValidation - * @return bool - */ - public function isValid($email, EmailValidation $emailValidation) - { - $isValid = $emailValidation->isValid($email, $this->lexer); - $this->warnings = $emailValidation->getWarnings(); - $this->error = $emailValidation->getError(); - - return $isValid; - } - - /** - * @return boolean - */ - public function hasWarnings() - { - return !empty($this->warnings); - } - - /** - * @return array - */ - public function getWarnings() - { - return $this->warnings; - } - - /** - * @return InvalidEmail - */ - public function getError() - { - return $this->error; - } -} diff --git a/egulias/email-validator/EmailValidator/Exception/AtextAfterCFWS.php b/egulias/email-validator/EmailValidator/Exception/AtextAfterCFWS.php deleted file mode 100644 index 97f41a2ca..000000000 --- a/egulias/email-validator/EmailValidator/Exception/AtextAfterCFWS.php +++ /dev/null @@ -1,9 +0,0 @@ -lexer->moveNext(); - - $this->performDomainStartChecks(); - - $domain = $this->doParseDomainPart(); - - $prev = $this->lexer->getPrevious(); - $length = strlen($domain); - - if ($prev['type'] === EmailLexer::S_DOT) { - throw new DotAtEnd(); - } - if ($prev['type'] === EmailLexer::S_HYPHEN) { - throw new DomainHyphened(); - } - if ($length > self::DOMAIN_MAX_LENGTH) { - $this->warnings[DomainTooLong::CODE] = new DomainTooLong(); - } - if ($prev['type'] === EmailLexer::S_CR) { - throw new CRLFAtTheEnd(); - } - $this->domainPart = $domain; - } - - private function performDomainStartChecks() - { - $this->checkInvalidTokensAfterAT(); - $this->checkEmptyDomain(); - - if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS) { - $this->warnings[DeprecatedComment::CODE] = new DeprecatedComment(); - $this->parseDomainComments(); - } - } - - private function checkEmptyDomain() - { - $thereIsNoDomain = $this->lexer->token['type'] === EmailLexer::S_EMPTY || - ($this->lexer->token['type'] === EmailLexer::S_SP && - !$this->lexer->isNextToken(EmailLexer::GENERIC)); - - if ($thereIsNoDomain) { - throw new NoDomainPart(); - } - } - - private function checkInvalidTokensAfterAT() - { - if ($this->lexer->token['type'] === EmailLexer::S_DOT) { - throw new DotAtStart(); - } - if ($this->lexer->token['type'] === EmailLexer::S_HYPHEN) { - throw new DomainHyphened(); - } - } - - public function getDomainPart() - { - return $this->domainPart; - } - - public function checkIPV6Tag($addressLiteral, $maxGroups = 8) - { - $prev = $this->lexer->getPrevious(); - if ($prev['type'] === EmailLexer::S_COLON) { - $this->warnings[IPV6ColonEnd::CODE] = new IPV6ColonEnd(); - } - - $IPv6 = substr($addressLiteral, 5); - //Daniel Marschall's new IPv6 testing strategy - $matchesIP = explode(':', $IPv6); - $groupCount = count($matchesIP); - $colons = strpos($IPv6, '::'); - - if (count(preg_grep('/^[0-9A-Fa-f]{0,4}$/', $matchesIP, PREG_GREP_INVERT)) !== 0) { - $this->warnings[IPV6BadChar::CODE] = new IPV6BadChar(); - } - - if ($colons === false) { - // We need exactly the right number of groups - if ($groupCount !== $maxGroups) { - $this->warnings[IPV6GroupCount::CODE] = new IPV6GroupCount(); - } - return; - } - - if ($colons !== strrpos($IPv6, '::')) { - $this->warnings[IPV6DoubleColon::CODE] = new IPV6DoubleColon(); - return; - } - - if ($colons === 0 || $colons === (strlen($IPv6) - 2)) { - // RFC 4291 allows :: at the start or end of an address - //with 7 other groups in addition - ++$maxGroups; - } - - if ($groupCount > $maxGroups) { - $this->warnings[IPV6MaxGroups::CODE] = new IPV6MaxGroups(); - } elseif ($groupCount === $maxGroups) { - $this->warnings[IPV6Deprecated::CODE] = new IPV6Deprecated(); - } - } - - protected function doParseDomainPart() - { - $domain = ''; - $openedParenthesis = 0; - do { - $prev = $this->lexer->getPrevious(); - - $this->checkNotAllowedChars($this->lexer->token); - - if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS) { - $this->parseComments(); - $openedParenthesis += $this->getOpenedParenthesis(); - $this->lexer->moveNext(); - $tmpPrev = $this->lexer->getPrevious(); - if ($tmpPrev['type'] === EmailLexer::S_CLOSEPARENTHESIS) { - $openedParenthesis--; - } - } - if ($this->lexer->token['type'] === EmailLexer::S_CLOSEPARENTHESIS) { - if ($openedParenthesis === 0) { - throw new UnopenedComment(); - } else { - $openedParenthesis--; - } - } - - $this->checkConsecutiveDots(); - $this->checkDomainPartExceptions($prev); - - if ($this->hasBrackets()) { - $this->parseDomainLiteral(); - } - - $this->checkLabelLength($prev); - - if ($this->isFWS()) { - $this->parseFWS(); - } - - $domain .= $this->lexer->token['value']; - $this->lexer->moveNext(); - } while (null !== $this->lexer->token['type']); - - return $domain; - } - - private function checkNotAllowedChars($token) - { - $notAllowed = [EmailLexer::S_BACKSLASH => true, EmailLexer::S_SLASH=> true]; - if (isset($notAllowed[$token['type']])) { - throw new CharNotAllowed(); - } - } - - protected function parseDomainLiteral() - { - if ($this->lexer->isNextToken(EmailLexer::S_COLON)) { - $this->warnings[IPV6ColonStart::CODE] = new IPV6ColonStart(); - } - if ($this->lexer->isNextToken(EmailLexer::S_IPV6TAG)) { - $lexer = clone $this->lexer; - $lexer->moveNext(); - if ($lexer->isNextToken(EmailLexer::S_DOUBLECOLON)) { - $this->warnings[IPV6ColonStart::CODE] = new IPV6ColonStart(); - } - } - - return $this->doParseDomainLiteral(); - } - - protected function doParseDomainLiteral() - { - $IPv6TAG = false; - $addressLiteral = ''; - do { - if ($this->lexer->token['type'] === EmailLexer::C_NUL) { - throw new ExpectingDTEXT(); - } - - if ($this->lexer->token['type'] === EmailLexer::INVALID || - $this->lexer->token['type'] === EmailLexer::C_DEL || - $this->lexer->token['type'] === EmailLexer::S_LF - ) { - $this->warnings[ObsoleteDTEXT::CODE] = new ObsoleteDTEXT(); - } - - if ($this->lexer->isNextTokenAny(array(EmailLexer::S_OPENQBRACKET, EmailLexer::S_OPENBRACKET))) { - throw new ExpectingDTEXT(); - } - - if ($this->lexer->isNextTokenAny( - array(EmailLexer::S_HTAB, EmailLexer::S_SP, $this->lexer->token['type'] === EmailLexer::CRLF) - )) { - $this->warnings[CFWSWithFWS::CODE] = new CFWSWithFWS(); - $this->parseFWS(); - } - - if ($this->lexer->isNextToken(EmailLexer::S_CR)) { - throw new CRNoLF(); - } - - if ($this->lexer->token['type'] === EmailLexer::S_BACKSLASH) { - $this->warnings[ObsoleteDTEXT::CODE] = new ObsoleteDTEXT(); - $addressLiteral .= $this->lexer->token['value']; - $this->lexer->moveNext(); - $this->validateQuotedPair(); - } - if ($this->lexer->token['type'] === EmailLexer::S_IPV6TAG) { - $IPv6TAG = true; - } - if ($this->lexer->token['type'] === EmailLexer::S_CLOSEQBRACKET) { - break; - } - - $addressLiteral .= $this->lexer->token['value']; - - } while ($this->lexer->moveNext()); - - $addressLiteral = str_replace('[', '', $addressLiteral); - $addressLiteral = $this->checkIPV4Tag($addressLiteral); - - if (false === $addressLiteral) { - return $addressLiteral; - } - - if (!$IPv6TAG) { - $this->warnings[DomainLiteral::CODE] = new DomainLiteral(); - return $addressLiteral; - } - - $this->warnings[AddressLiteral::CODE] = new AddressLiteral(); - - $this->checkIPV6Tag($addressLiteral); - - return $addressLiteral; - } - - protected function checkIPV4Tag($addressLiteral) - { - $matchesIP = array(); - - // Extract IPv4 part from the end of the address-literal (if there is one) - if (preg_match( - '/\\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/', - $addressLiteral, - $matchesIP - ) > 0 - ) { - $index = strrpos($addressLiteral, $matchesIP[0]); - if ($index === 0) { - $this->warnings[AddressLiteral::CODE] = new AddressLiteral(); - return false; - } - // Convert IPv4 part to IPv6 format for further testing - $addressLiteral = substr($addressLiteral, 0, $index) . '0:0'; - } - - return $addressLiteral; - } - - protected function checkDomainPartExceptions($prev) - { - $invalidDomainTokens = array( - EmailLexer::S_DQUOTE => true, - EmailLexer::S_SEMICOLON => true, - EmailLexer::S_GREATERTHAN => true, - EmailLexer::S_LOWERTHAN => true, - ); - - if (isset($invalidDomainTokens[$this->lexer->token['type']])) { - throw new ExpectingATEXT(); - } - - if ($this->lexer->token['type'] === EmailLexer::S_COMMA) { - throw new CommaInDomain(); - } - - if ($this->lexer->token['type'] === EmailLexer::S_AT) { - throw new ConsecutiveAt(); - } - - if ($this->lexer->token['type'] === EmailLexer::S_OPENQBRACKET && $prev['type'] !== EmailLexer::S_AT) { - throw new ExpectingATEXT(); - } - - if ($this->lexer->token['type'] === EmailLexer::S_HYPHEN && $this->lexer->isNextToken(EmailLexer::S_DOT)) { - throw new DomainHyphened(); - } - - if ($this->lexer->token['type'] === EmailLexer::S_BACKSLASH - && $this->lexer->isNextToken(EmailLexer::GENERIC)) { - throw new ExpectingATEXT(); - } - } - - protected function hasBrackets() - { - if ($this->lexer->token['type'] !== EmailLexer::S_OPENBRACKET) { - return false; - } - - try { - $this->lexer->find(EmailLexer::S_CLOSEBRACKET); - } catch (\RuntimeException $e) { - throw new ExpectingDomainLiteralClose(); - } - - return true; - } - - protected function checkLabelLength($prev) - { - if ($this->lexer->token['type'] === EmailLexer::S_DOT && - $prev['type'] === EmailLexer::GENERIC && - strlen($prev['value']) > 63 - ) { - $this->warnings[LabelTooLong::CODE] = new LabelTooLong(); - } - } - - protected function parseDomainComments() - { - $this->isUnclosedComment(); - while (!$this->lexer->isNextToken(EmailLexer::S_CLOSEPARENTHESIS)) { - $this->warnEscaping(); - $this->lexer->moveNext(); - } - - $this->lexer->moveNext(); - if ($this->lexer->isNextToken(EmailLexer::S_DOT)) { - throw new ExpectingATEXT(); - } - } - - protected function addTLDWarnings() - { - if ($this->warnings[DomainLiteral::CODE]) { - $this->warnings[TLD::CODE] = new TLD(); - } - } -} diff --git a/egulias/email-validator/EmailValidator/Parser/LocalPart.php b/egulias/email-validator/EmailValidator/Parser/LocalPart.php deleted file mode 100644 index fa1d17b7f..000000000 --- a/egulias/email-validator/EmailValidator/Parser/LocalPart.php +++ /dev/null @@ -1,138 +0,0 @@ -lexer->token['type'] !== EmailLexer::S_AT && null !== $this->lexer->token['type']) { - if ($this->lexer->token['type'] === EmailLexer::S_DOT && null === $this->lexer->getPrevious()['type']) { - throw new DotAtStart(); - } - - $closingQuote = $this->checkDQUOTE($closingQuote); - if ($closingQuote && $parseDQuote) { - $parseDQuote = $this->parseDoubleQuote(); - } - - if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS) { - $this->parseComments(); - $openedParenthesis += $this->getOpenedParenthesis(); - } - if ($this->lexer->token['type'] === EmailLexer::S_CLOSEPARENTHESIS) { - if ($openedParenthesis === 0) { - throw new UnopenedComment(); - } else { - $openedParenthesis--; - } - } - - $this->checkConsecutiveDots(); - - if ($this->lexer->token['type'] === EmailLexer::S_DOT && - $this->lexer->isNextToken(EmailLexer::S_AT) - ) { - throw new DotAtEnd(); - } - - $this->warnEscaping(); - $this->isInvalidToken($this->lexer->token, $closingQuote); - - if ($this->isFWS()) { - $this->parseFWS(); - } - - $this->lexer->moveNext(); - } - - $prev = $this->lexer->getPrevious(); - if (strlen($prev['value']) > LocalTooLong::LOCAL_PART_LENGTH) { - $this->warnings[LocalTooLong::CODE] = new LocalTooLong(); - } - } - - protected function parseDoubleQuote() - { - $parseAgain = true; - $special = array( - EmailLexer::S_CR => true, - EmailLexer::S_HTAB => true, - EmailLexer::S_LF => true - ); - - $invalid = array( - EmailLexer::C_NUL => true, - EmailLexer::S_HTAB => true, - EmailLexer::S_CR => true, - EmailLexer::S_LF => true - ); - $setSpecialsWarning = true; - - $this->lexer->moveNext(); - - while ($this->lexer->token['type'] !== EmailLexer::S_DQUOTE && null !== $this->lexer->token['type']) { - $parseAgain = false; - if (isset($special[$this->lexer->token['type']]) && $setSpecialsWarning) { - $this->warnings[CFWSWithFWS::CODE] = new CFWSWithFWS(); - $setSpecialsWarning = false; - } - if ($this->lexer->token['type'] === EmailLexer::S_BACKSLASH && $this->lexer->isNextToken(EmailLexer::S_DQUOTE)) { - $this->lexer->moveNext(); - } - - $this->lexer->moveNext(); - - if (!$this->escaped() && isset($invalid[$this->lexer->token['type']])) { - throw new ExpectingATEXT(); - } - } - - $prev = $this->lexer->getPrevious(); - - if ($prev['type'] === EmailLexer::S_BACKSLASH) { - if (!$this->checkDQUOTE(false)) { - throw new UnclosedQuotedString(); - } - } - - if (!$this->lexer->isNextToken(EmailLexer::S_AT) && $prev['type'] !== EmailLexer::S_BACKSLASH) { - throw new ExpectingAT(); - } - - return $parseAgain; - } - - protected function isInvalidToken($token, $closingQuote) - { - $forbidden = array( - EmailLexer::S_COMMA, - EmailLexer::S_CLOSEBRACKET, - EmailLexer::S_OPENBRACKET, - EmailLexer::S_GREATERTHAN, - EmailLexer::S_LOWERTHAN, - EmailLexer::S_COLON, - EmailLexer::S_SEMICOLON, - EmailLexer::INVALID - ); - - if (in_array($token['type'], $forbidden) && !$closingQuote) { - throw new ExpectingATEXT(); - } - } -} diff --git a/egulias/email-validator/EmailValidator/Parser/Parser.php b/egulias/email-validator/EmailValidator/Parser/Parser.php deleted file mode 100644 index fa7bd44b3..000000000 --- a/egulias/email-validator/EmailValidator/Parser/Parser.php +++ /dev/null @@ -1,215 +0,0 @@ -lexer = $lexer; - } - - public function getWarnings() - { - return $this->warnings; - } - - abstract public function parse($str); - - /** @return int */ - public function getOpenedParenthesis() - { - return $this->openedParenthesis; - } - - /** - * validateQuotedPair - */ - protected function validateQuotedPair() - { - if (!($this->lexer->token['type'] === EmailLexer::INVALID - || $this->lexer->token['type'] === EmailLexer::C_DEL)) { - throw new ExpectingQPair(); - } - - $this->warnings[QuotedPart::CODE] = - new QuotedPart($this->lexer->getPrevious()['type'], $this->lexer->token['type']); - } - - protected function parseComments() - { - $this->openedParenthesis = 1; - $this->isUnclosedComment(); - $this->warnings[Comment::CODE] = new Comment(); - while (!$this->lexer->isNextToken(EmailLexer::S_CLOSEPARENTHESIS)) { - if ($this->lexer->isNextToken(EmailLexer::S_OPENPARENTHESIS)) { - $this->openedParenthesis++; - } - $this->warnEscaping(); - $this->lexer->moveNext(); - } - - $this->lexer->moveNext(); - if ($this->lexer->isNextTokenAny(array(EmailLexer::GENERIC, EmailLexer::S_EMPTY))) { - throw new ExpectingATEXT(); - } - - if ($this->lexer->isNextToken(EmailLexer::S_AT)) { - $this->warnings[CFWSNearAt::CODE] = new CFWSNearAt(); - } - } - - protected function isUnclosedComment() - { - try { - $this->lexer->find(EmailLexer::S_CLOSEPARENTHESIS); - return true; - } catch (\RuntimeException $e) { - throw new UnclosedComment(); - } - } - - protected function parseFWS() - { - $previous = $this->lexer->getPrevious(); - - $this->checkCRLFInFWS(); - - if ($this->lexer->token['type'] === EmailLexer::S_CR) { - throw new CRNoLF(); - } - - if ($this->lexer->isNextToken(EmailLexer::GENERIC) && $previous['type'] !== EmailLexer::S_AT) { - throw new AtextAfterCFWS(); - } - - if ($this->lexer->token['type'] === EmailLexer::S_LF || $this->lexer->token['type'] === EmailLexer::C_NUL) { - throw new ExpectingCTEXT(); - } - - if ($this->lexer->isNextToken(EmailLexer::S_AT) || $previous['type'] === EmailLexer::S_AT) { - $this->warnings[CFWSNearAt::CODE] = new CFWSNearAt(); - } else { - $this->warnings[CFWSWithFWS::CODE] = new CFWSWithFWS(); - } - } - - protected function checkConsecutiveDots() - { - if ($this->lexer->token['type'] === EmailLexer::S_DOT && $this->lexer->isNextToken(EmailLexer::S_DOT)) { - throw new ConsecutiveDot(); - } - } - - protected function isFWS() - { - if ($this->escaped()) { - return false; - } - - if ($this->lexer->token['type'] === EmailLexer::S_SP || - $this->lexer->token['type'] === EmailLexer::S_HTAB || - $this->lexer->token['type'] === EmailLexer::S_CR || - $this->lexer->token['type'] === EmailLexer::S_LF || - $this->lexer->token['type'] === EmailLexer::CRLF - ) { - return true; - } - - return false; - } - - protected function escaped() - { - $previous = $this->lexer->getPrevious(); - - if ($previous['type'] === EmailLexer::S_BACKSLASH - && - $this->lexer->token['type'] !== EmailLexer::GENERIC - ) { - return true; - } - - return false; - } - - protected function warnEscaping() - { - if ($this->lexer->token['type'] !== EmailLexer::S_BACKSLASH) { - return false; - } - - if ($this->lexer->isNextToken(EmailLexer::GENERIC)) { - throw new ExpectingATEXT(); - } - - if (!$this->lexer->isNextTokenAny(array(EmailLexer::S_SP, EmailLexer::S_HTAB, EmailLexer::C_DEL))) { - return false; - } - - $this->warnings[QuotedPart::CODE] = - new QuotedPart($this->lexer->getPrevious()['type'], $this->lexer->token['type']); - return true; - - } - - protected function checkDQUOTE($hasClosingQuote) - { - if ($this->lexer->token['type'] !== EmailLexer::S_DQUOTE) { - return $hasClosingQuote; - } - if ($hasClosingQuote) { - return $hasClosingQuote; - } - $previous = $this->lexer->getPrevious(); - if ($this->lexer->isNextToken(EmailLexer::GENERIC) && $previous['type'] === EmailLexer::GENERIC) { - throw new ExpectingATEXT(); - } - - try { - $this->lexer->find(EmailLexer::S_DQUOTE); - $hasClosingQuote = true; - } catch (\Exception $e) { - throw new UnclosedQuotedString(); - } - $this->warnings[QuotedString::CODE] = new QuotedString($previous['value'], $this->lexer->token['value']); - - return $hasClosingQuote; - } - - protected function checkCRLFInFWS() - { - if ($this->lexer->token['type'] !== EmailLexer::CRLF) { - return; - } - - if (!$this->lexer->isNextTokenAny(array(EmailLexer::S_SP, EmailLexer::S_HTAB))) { - throw new CRLFX2(); - } - - if (!$this->lexer->isNextTokenAny(array(EmailLexer::S_SP, EmailLexer::S_HTAB))) { - throw new CRLFAtTheEnd(); - } - } -} diff --git a/egulias/email-validator/EmailValidator/Validation/DNSCheckValidation.php b/egulias/email-validator/EmailValidator/Validation/DNSCheckValidation.php deleted file mode 100644 index e5c3e5df9..000000000 --- a/egulias/email-validator/EmailValidator/Validation/DNSCheckValidation.php +++ /dev/null @@ -1,72 +0,0 @@ -checkDNS($host); - } - - public function getError() - { - return $this->error; - } - - public function getWarnings() - { - return $this->warnings; - } - - protected function checkDNS($host) - { - $variant = INTL_IDNA_VARIANT_2003; - if ( defined('INTL_IDNA_VARIANT_UTS46') ) { - $variant = INTL_IDNA_VARIANT_UTS46; - } - $host = rtrim(idn_to_ascii($host, IDNA_DEFAULT, $variant), '.') . '.'; - - $Aresult = true; - $MXresult = checkdnsrr($host, 'MX'); - - if (!$MXresult) { - $this->warnings[NoDNSMXRecord::CODE] = new NoDNSMXRecord(); - $Aresult = checkdnsrr($host, 'A') || checkdnsrr($host, 'AAAA'); - if (!$Aresult) { - $this->error = new NoDNSRecord(); - } - } - return $MXresult || $Aresult; - } -} diff --git a/egulias/email-validator/EmailValidator/Validation/EmailValidation.php b/egulias/email-validator/EmailValidator/Validation/EmailValidation.php deleted file mode 100644 index d5a015be5..000000000 --- a/egulias/email-validator/EmailValidator/Validation/EmailValidation.php +++ /dev/null @@ -1,34 +0,0 @@ -errors = $errors; - parent::__construct(); - } - - public function getErrors() - { - return $this->errors; - } -} diff --git a/egulias/email-validator/EmailValidator/Validation/MultipleValidationWithAnd.php b/egulias/email-validator/EmailValidator/Validation/MultipleValidationWithAnd.php deleted file mode 100644 index ce161ac84..000000000 --- a/egulias/email-validator/EmailValidator/Validation/MultipleValidationWithAnd.php +++ /dev/null @@ -1,111 +0,0 @@ -validations = $validations; - $this->mode = $mode; - } - - /** - * {@inheritdoc} - */ - public function isValid($email, EmailLexer $emailLexer) - { - $result = true; - $errors = []; - foreach ($this->validations as $validation) { - $emailLexer->reset(); - $validationResult = $validation->isValid($email, $emailLexer); - $result = $result && $validationResult; - $this->warnings = array_merge($this->warnings, $validation->getWarnings()); - $errors = $this->addNewError($validation->getError(), $errors); - - if ($this->shouldStop($result)) { - break; - } - } - - if (!empty($errors)) { - $this->error = new MultipleErrors($errors); - } - - return $result; - } - - private function addNewError($possibleError, array $errors) - { - if (null !== $possibleError) { - $errors[] = $possibleError; - } - - return $errors; - } - - private function shouldStop($result) - { - return !$result && $this->mode === self::STOP_ON_ERROR; - } - - /** - * {@inheritdoc} - */ - public function getError() - { - return $this->error; - } - - /** - * {@inheritdoc} - */ - public function getWarnings() - { - return $this->warnings; - } -} diff --git a/egulias/email-validator/EmailValidator/Validation/NoRFCWarningsValidation.php b/egulias/email-validator/EmailValidator/Validation/NoRFCWarningsValidation.php deleted file mode 100644 index e4bf0cc4d..000000000 --- a/egulias/email-validator/EmailValidator/Validation/NoRFCWarningsValidation.php +++ /dev/null @@ -1,41 +0,0 @@ -getWarnings())) { - return true; - } - - $this->error = new RFCWarnings(); - - return false; - } - - /** - * {@inheritdoc} - */ - public function getError() - { - return $this->error ?: parent::getError(); - } -} diff --git a/egulias/email-validator/EmailValidator/Validation/RFCValidation.php b/egulias/email-validator/EmailValidator/Validation/RFCValidation.php deleted file mode 100644 index c4ffe3503..000000000 --- a/egulias/email-validator/EmailValidator/Validation/RFCValidation.php +++ /dev/null @@ -1,49 +0,0 @@ -parser = new EmailParser($emailLexer); - try { - $this->parser->parse((string)$email); - } catch (InvalidEmail $invalid) { - $this->error = $invalid; - return false; - } - - $this->warnings = $this->parser->getWarnings(); - return true; - } - - public function getError() - { - return $this->error; - } - - public function getWarnings() - { - return $this->warnings; - } -} diff --git a/egulias/email-validator/EmailValidator/Validation/SpoofCheckValidation.php b/egulias/email-validator/EmailValidator/Validation/SpoofCheckValidation.php deleted file mode 100644 index 4721f0d8c..000000000 --- a/egulias/email-validator/EmailValidator/Validation/SpoofCheckValidation.php +++ /dev/null @@ -1,45 +0,0 @@ -setChecks(Spoofchecker::SINGLE_SCRIPT); - - if ($checker->isSuspicious($email)) { - $this->error = new SpoofEmail(); - } - - return $this->error === null; - } - - public function getError() - { - return $this->error; - } - - public function getWarnings() - { - return []; - } -} diff --git a/egulias/email-validator/EmailValidator/Warning/AddressLiteral.php b/egulias/email-validator/EmailValidator/Warning/AddressLiteral.php deleted file mode 100644 index 77e70f7f5..000000000 --- a/egulias/email-validator/EmailValidator/Warning/AddressLiteral.php +++ /dev/null @@ -1,14 +0,0 @@ -message = 'Address literal in domain part'; - $this->rfcNumber = 5321; - } -} diff --git a/egulias/email-validator/EmailValidator/Warning/CFWSNearAt.php b/egulias/email-validator/EmailValidator/Warning/CFWSNearAt.php deleted file mode 100644 index be43bbe6f..000000000 --- a/egulias/email-validator/EmailValidator/Warning/CFWSNearAt.php +++ /dev/null @@ -1,13 +0,0 @@ -message = "Deprecated folding white space near @"; - } -} diff --git a/egulias/email-validator/EmailValidator/Warning/CFWSWithFWS.php b/egulias/email-validator/EmailValidator/Warning/CFWSWithFWS.php deleted file mode 100644 index dea3450ec..000000000 --- a/egulias/email-validator/EmailValidator/Warning/CFWSWithFWS.php +++ /dev/null @@ -1,13 +0,0 @@ -message = 'Folding whites space followed by folding white space'; - } -} diff --git a/egulias/email-validator/EmailValidator/Warning/Comment.php b/egulias/email-validator/EmailValidator/Warning/Comment.php deleted file mode 100644 index 704c2908b..000000000 --- a/egulias/email-validator/EmailValidator/Warning/Comment.php +++ /dev/null @@ -1,13 +0,0 @@ -message = "Comments found in this email"; - } -} diff --git a/egulias/email-validator/EmailValidator/Warning/DeprecatedComment.php b/egulias/email-validator/EmailValidator/Warning/DeprecatedComment.php deleted file mode 100644 index ad43bd7c9..000000000 --- a/egulias/email-validator/EmailValidator/Warning/DeprecatedComment.php +++ /dev/null @@ -1,13 +0,0 @@ -message = 'Deprecated comments'; - } -} diff --git a/egulias/email-validator/EmailValidator/Warning/DomainLiteral.php b/egulias/email-validator/EmailValidator/Warning/DomainLiteral.php deleted file mode 100644 index 6f36b5e29..000000000 --- a/egulias/email-validator/EmailValidator/Warning/DomainLiteral.php +++ /dev/null @@ -1,14 +0,0 @@ -message = 'Domain Literal'; - $this->rfcNumber = 5322; - } -} diff --git a/egulias/email-validator/EmailValidator/Warning/DomainTooLong.php b/egulias/email-validator/EmailValidator/Warning/DomainTooLong.php deleted file mode 100644 index 61ff17a76..000000000 --- a/egulias/email-validator/EmailValidator/Warning/DomainTooLong.php +++ /dev/null @@ -1,14 +0,0 @@ -message = 'Domain is too long, exceeds 255 chars'; - $this->rfcNumber = 5322; - } -} diff --git a/egulias/email-validator/EmailValidator/Warning/EmailTooLong.php b/egulias/email-validator/EmailValidator/Warning/EmailTooLong.php deleted file mode 100644 index 497309dbb..000000000 --- a/egulias/email-validator/EmailValidator/Warning/EmailTooLong.php +++ /dev/null @@ -1,15 +0,0 @@ -message = 'Email is too long, exceeds ' . EmailParser::EMAIL_MAX_LENGTH; - } -} diff --git a/egulias/email-validator/EmailValidator/Warning/IPV6BadChar.php b/egulias/email-validator/EmailValidator/Warning/IPV6BadChar.php deleted file mode 100644 index ba2fcc01b..000000000 --- a/egulias/email-validator/EmailValidator/Warning/IPV6BadChar.php +++ /dev/null @@ -1,14 +0,0 @@ -message = 'Bad char in IPV6 domain literal'; - $this->rfcNumber = 5322; - } -} diff --git a/egulias/email-validator/EmailValidator/Warning/IPV6ColonEnd.php b/egulias/email-validator/EmailValidator/Warning/IPV6ColonEnd.php deleted file mode 100644 index 41afa78c6..000000000 --- a/egulias/email-validator/EmailValidator/Warning/IPV6ColonEnd.php +++ /dev/null @@ -1,14 +0,0 @@ -message = ':: found at the end of the domain literal'; - $this->rfcNumber = 5322; - } -} diff --git a/egulias/email-validator/EmailValidator/Warning/IPV6ColonStart.php b/egulias/email-validator/EmailValidator/Warning/IPV6ColonStart.php deleted file mode 100644 index 1bf754e30..000000000 --- a/egulias/email-validator/EmailValidator/Warning/IPV6ColonStart.php +++ /dev/null @@ -1,14 +0,0 @@ -message = ':: found at the start of the domain literal'; - $this->rfcNumber = 5322; - } -} diff --git a/egulias/email-validator/EmailValidator/Warning/IPV6Deprecated.php b/egulias/email-validator/EmailValidator/Warning/IPV6Deprecated.php deleted file mode 100644 index d752caaa1..000000000 --- a/egulias/email-validator/EmailValidator/Warning/IPV6Deprecated.php +++ /dev/null @@ -1,14 +0,0 @@ -message = 'Deprecated form of IPV6'; - $this->rfcNumber = 5321; - } -} diff --git a/egulias/email-validator/EmailValidator/Warning/IPV6DoubleColon.php b/egulias/email-validator/EmailValidator/Warning/IPV6DoubleColon.php deleted file mode 100644 index 4f8239499..000000000 --- a/egulias/email-validator/EmailValidator/Warning/IPV6DoubleColon.php +++ /dev/null @@ -1,14 +0,0 @@ -message = 'Double colon found after IPV6 tag'; - $this->rfcNumber = 5322; - } -} diff --git a/egulias/email-validator/EmailValidator/Warning/IPV6GroupCount.php b/egulias/email-validator/EmailValidator/Warning/IPV6GroupCount.php deleted file mode 100644 index a59d317f2..000000000 --- a/egulias/email-validator/EmailValidator/Warning/IPV6GroupCount.php +++ /dev/null @@ -1,14 +0,0 @@ -message = 'Group count is not IPV6 valid'; - $this->rfcNumber = 5322; - } -} diff --git a/egulias/email-validator/EmailValidator/Warning/IPV6MaxGroups.php b/egulias/email-validator/EmailValidator/Warning/IPV6MaxGroups.php deleted file mode 100644 index 936274c13..000000000 --- a/egulias/email-validator/EmailValidator/Warning/IPV6MaxGroups.php +++ /dev/null @@ -1,14 +0,0 @@ -message = 'Reached the maximum number of IPV6 groups allowed'; - $this->rfcNumber = 5321; - } -} diff --git a/egulias/email-validator/EmailValidator/Warning/LabelTooLong.php b/egulias/email-validator/EmailValidator/Warning/LabelTooLong.php deleted file mode 100644 index daf07f408..000000000 --- a/egulias/email-validator/EmailValidator/Warning/LabelTooLong.php +++ /dev/null @@ -1,14 +0,0 @@ -message = 'Label too long'; - $this->rfcNumber = 5322; - } -} diff --git a/egulias/email-validator/EmailValidator/Warning/LocalTooLong.php b/egulias/email-validator/EmailValidator/Warning/LocalTooLong.php deleted file mode 100644 index 0d08d8b35..000000000 --- a/egulias/email-validator/EmailValidator/Warning/LocalTooLong.php +++ /dev/null @@ -1,15 +0,0 @@ -message = 'Local part is too long, exceeds 64 chars (octets)'; - $this->rfcNumber = 5322; - } -} diff --git a/egulias/email-validator/EmailValidator/Warning/NoDNSMXRecord.php b/egulias/email-validator/EmailValidator/Warning/NoDNSMXRecord.php deleted file mode 100644 index b3c21a1f3..000000000 --- a/egulias/email-validator/EmailValidator/Warning/NoDNSMXRecord.php +++ /dev/null @@ -1,14 +0,0 @@ -message = 'No MX DSN record was found for this email'; - $this->rfcNumber = 5321; - } -} diff --git a/egulias/email-validator/EmailValidator/Warning/ObsoleteDTEXT.php b/egulias/email-validator/EmailValidator/Warning/ObsoleteDTEXT.php deleted file mode 100644 index 10f19e334..000000000 --- a/egulias/email-validator/EmailValidator/Warning/ObsoleteDTEXT.php +++ /dev/null @@ -1,14 +0,0 @@ -rfcNumber = 5322; - $this->message = 'Obsolete DTEXT in domain literal'; - } -} diff --git a/egulias/email-validator/EmailValidator/Warning/QuotedPart.php b/egulias/email-validator/EmailValidator/Warning/QuotedPart.php deleted file mode 100644 index 7be9e6a3f..000000000 --- a/egulias/email-validator/EmailValidator/Warning/QuotedPart.php +++ /dev/null @@ -1,13 +0,0 @@ -message = "Deprecated Quoted String found between $prevToken and $postToken"; - } -} diff --git a/egulias/email-validator/EmailValidator/Warning/QuotedString.php b/egulias/email-validator/EmailValidator/Warning/QuotedString.php deleted file mode 100644 index e9d56e1e0..000000000 --- a/egulias/email-validator/EmailValidator/Warning/QuotedString.php +++ /dev/null @@ -1,13 +0,0 @@ -message = "Quoted String found between $prevToken and $postToken"; - } -} diff --git a/egulias/email-validator/EmailValidator/Warning/TLD.php b/egulias/email-validator/EmailValidator/Warning/TLD.php deleted file mode 100644 index 2338b9f44..000000000 --- a/egulias/email-validator/EmailValidator/Warning/TLD.php +++ /dev/null @@ -1,13 +0,0 @@ -message = "RFC5321, TLD"; - } -} diff --git a/egulias/email-validator/EmailValidator/Warning/Warning.php b/egulias/email-validator/EmailValidator/Warning/Warning.php deleted file mode 100644 index ec6a365ff..000000000 --- a/egulias/email-validator/EmailValidator/Warning/Warning.php +++ /dev/null @@ -1,30 +0,0 @@ -message; - } - - public function code() - { - return self::CODE; - } - - public function RFCNumber() - { - return $this->rfcNumber; - } - - public function __toString() - { - return $this->message() . " rfc: " . $this->rfcNumber . "interal code: " . static::CODE; - } -} diff --git a/egulias/email-validator/README.md b/egulias/email-validator/README.md deleted file mode 100644 index b5b0d85fa..000000000 --- a/egulias/email-validator/README.md +++ /dev/null @@ -1,82 +0,0 @@ -# EmailValidator -[![Build Status](https://travis-ci.org/egulias/EmailValidator.svg?branch=master)](https://travis-ci.org/egulias/EmailValidator) [![Coverage Status](https://coveralls.io/repos/egulias/EmailValidator/badge.svg?branch=master)](https://coveralls.io/r/egulias/EmailValidator?branch=master) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/egulias/EmailValidator/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/egulias/EmailValidator/?branch=master) [![SensioLabsInsight](https://insight.sensiolabs.com/projects/22ba6692-9c02-42e5-a65d-1c5696bfffc6/small.png)](https://insight.sensiolabs.com/projects/22ba6692-9c02-42e5-a65d-1c5696bfffc6) -============================= -## Suported RFCs ## -This library aims to support: - -RFC 5321, 5322, 6530, 6531, 6532. - -## Requirements ## - - * [Composer](https://getcomposer.org) is required for installation - * [Spoofchecking](https://github.com/egulias/EmailValidator/blob/master/EmailValidator/Validation/SpoofCheckValidation.php) and [DNSCheckValidation](https://github.com/egulias/EmailValidator/blob/master/EmailValidator/Validation/DNSCheckValidation.php) validation requires that your PHP system has the [PHP Internationalization Libraries](https://php.net/manual/en/book.intl.php) (also known as PHP Intl) - -## Installation ## - -Run the command below to install via Composer - -```shell -composer require egulias/email-validator -``` - -## Getting Started ## -`EmailValidator`requires you to decide which (or combination of them) validation/s strategy/ies you'd like to follow for each [validation](#available-validations). - -A basic example with the RFC validation -```php -isValid("example@example.com", new RFCValidation()); //true -``` - - -### Available validations ### - -1. [RFCValidation](https://github.com/egulias/EmailValidator/blob/master/EmailValidator/Validation/RFCValidation.php) -2. [NoRFCWarningsValidation](https://github.com/egulias/EmailValidator/blob/master/EmailValidator/Validation/NoRFCWarningsValidation.php) -3. [DNSCheckValidation](https://github.com/egulias/EmailValidator/blob/master/EmailValidator/Validation/DNSCheckValidation.php) -4. [SpoofCheckValidation](https://github.com/egulias/EmailValidator/blob/master/EmailValidator/Validation/SpoofCheckValidation.php) -5. [MultipleValidationWithAnd](https://github.com/egulias/EmailValidator/blob/master/EmailValidator/Validation/MultipleValidationWithAnd.php) -6. [Your own validation](#how-to-extend) - -`MultipleValidationWithAnd` - -It is a validation that operates over other validations performing a logical and (&&) over the result of each validation. - -```php -isValid("example@example.com", $multipleValidations); //true -``` - -### How to extend ### - -It's easy! You just need to implement [EmailValidation](https://github.com/egulias/EmailValidator/blob/master/EmailValidator/Validation/EmailValidation.php) and you can use your own validation. - - -## Other Contributors ## -(You can find current contributors [here](https://github.com/egulias/EmailValidator/graphs/contributors)) - -As this is a port from another library and work, here are other people related to the previous one: - -* Ricard Clau [@ricardclau](https://github.com/ricardclau): Performance against PHP built-in filter_var -* Josepf Bielawski [@stloyd](https://github.com/stloyd): For its first re-work of Dominic's lib -* Dominic Sayers [@dominicsayers](https://github.com/dominicsayers): The original isemail function - -## License ## -Released under the MIT License attached with this code. - diff --git a/egulias/email-validator/composer.json b/egulias/email-validator/composer.json index 4956da9e0..a275696ab 100644 --- a/egulias/email-validator/composer.json +++ b/egulias/email-validator/composer.json @@ -2,7 +2,6 @@ "name": "egulias/email-validator", "description": "A library for validating emails against several RFCs", "homepage": "https://github.com/egulias/EmailValidator", - "type": "Library", "keywords": ["email", "validation", "validator", "emailvalidation", "emailvalidator"], "license": "MIT", "authors": [ @@ -13,33 +12,27 @@ "dev-master": "2.1.x-dev" } }, - "repositories": [ - { - "type": "git", - "url": "https://github.com/dominicsayers/isemail" - } - ], - "require": { - "php": ">= 5.5", - "doctrine/lexer": "^1.0.1" + "require": { + "php": ">=5.5", + "doctrine/lexer": "^1.0.1", + "symfony/polyfill-intl-idn": "^1.10" }, - "require-dev" : { - "satooshi/php-coveralls": "^1.0.1", - "phpunit/phpunit": "^4.8.35||^5.7||^6.0", - "symfony/phpunit-bridge": "^4.4@dev", - "dominicsayers/isemail": "dev-master" + "require-dev": { + "dominicsayers/isemail": "^3.0.7", + "phpunit/phpunit": "^4.8.36|^7.5.15", + "satooshi/php-coveralls": "^1.0.1" }, "suggest": { "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" }, "autoload": { "psr-4": { - "Egulias\\EmailValidator\\": "EmailValidator" + "Egulias\\EmailValidator\\": "src" } }, "autoload-dev": { "psr-4": { - "Egulias\\Tests\\": "test" + "Egulias\\EmailValidator\\Tests\\": "tests" } } } diff --git a/egulias/email-validator/phpunit.xml.dist b/egulias/email-validator/phpunit.xml.dist deleted file mode 100644 index 754445a76..000000000 --- a/egulias/email-validator/phpunit.xml.dist +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - ./Tests/EmailValidator - ./vendor/ - - - - - - ./EmailValidator/ - - - - - - - diff --git a/swiftmailer/swiftmailer/.php_cs.dist b/swiftmailer/swiftmailer/.php_cs.dist index 2c04e04be..563b48b90 100644 --- a/swiftmailer/swiftmailer/.php_cs.dist +++ b/swiftmailer/swiftmailer/.php_cs.dist @@ -4,12 +4,17 @@ return PhpCsFixer\Config::create() ->setRules([ '@Symfony' => true, '@Symfony:risky' => true, + '@PHPUnit75Migration:risky' => true, + 'php_unit_dedicate_assert' => ['target' => '5.6'], 'array_syntax' => ['syntax' => 'short'], + 'php_unit_fqcn_annotation' => true, 'no_unreachable_default_argument_value' => false, 'braces' => ['allow_single_line_closure' => true], 'heredoc_to_nowdoc' => false, - 'phpdoc_annotation_without_dot' => false, - 'ternary_to_null_coalescing' => true, + 'ordered_imports' => true, + 'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'], + 'native_function_invocation' => ['include' => ['@compiler_optimized'], 'scope' => 'all'], + 'fopen_flags' => false, ]) ->setRiskyAllowed(true) ->setFinder(PhpCsFixer\Finder::create()->in(__DIR__)) diff --git a/swiftmailer/swiftmailer/lib/classes/Swift.php b/swiftmailer/swiftmailer/lib/classes/Swift.php index daf75fbd4..1de679623 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift.php @@ -15,7 +15,7 @@ */ abstract class Swift { - const VERSION = '6.2.3'; + const VERSION = '6.2.4'; public static $initialized = false; public static $inits = []; @@ -56,7 +56,7 @@ public static function autoload($class) if (self::$inits && !self::$initialized) { self::$initialized = true; foreach (self::$inits as $init) { - call_user_func($init); + \call_user_func($init); } } } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/AddressEncoder.php b/swiftmailer/swiftmailer/lib/classes/Swift/AddressEncoder.php index 7ec3e90b4..a1704ffb4 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/AddressEncoder.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/AddressEncoder.php @@ -18,8 +18,8 @@ interface Swift_AddressEncoder /** * Encodes an email address. * - * @throws Swift_AddressEncoderException If the email cannot be represented in - * the encoding implemented by this class. + * @throws Swift_AddressEncoderException if the email cannot be represented in + * the encoding implemented by this class */ public function encodeString(string $address): string; } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Attachment.php b/swiftmailer/swiftmailer/lib/classes/Swift/Attachment.php index 642aa6f23..7a1420f79 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Attachment.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Attachment.php @@ -26,7 +26,7 @@ class Swift_Attachment extends Swift_Mime_Attachment */ public function __construct($data = null, $filename = null, $contentType = null) { - call_user_func_array( + \call_user_func_array( [$this, 'Swift_Mime_Attachment::__construct'], Swift_DependencyContainer::getInstance() ->createDependenciesFor('mime.attachment') diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/ArrayByteStream.php b/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/ArrayByteStream.php index 68dc3b1ec..4f3dcc377 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/ArrayByteStream.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/ArrayByteStream.php @@ -52,10 +52,10 @@ class Swift_ByteStream_ArrayByteStream implements Swift_InputByteStream, Swift_O */ public function __construct($stack = null) { - if (is_array($stack)) { + if (\is_array($stack)) { $this->array = $stack; - $this->arraySize = count($stack); - } elseif (is_string($stack)) { + $this->arraySize = \count($stack); + } elseif (\is_string($stack)) { $this->write($stack); } else { $this->array = []; @@ -102,7 +102,7 @@ public function write($bytes) foreach ($to_add as $value) { $this->array[] = $value; } - $this->arraySize = count($this->array); + $this->arraySize = \count($this->array); foreach ($this->mirrors as $stream) { $stream->write($bytes); diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/FileByteStream.php b/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/FileByteStream.php index 0c428f796..f6391219e 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/FileByteStream.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/FileByteStream.php @@ -81,7 +81,7 @@ public function read($length) // If we read one byte after reaching the end of the file // feof() will return false and an empty string is returned - if ('' === $bytes && feof($fp)) { + if ((false === $bytes || '' === $bytes) && feof($fp)) { $this->resetReadHandle(); return false; @@ -145,9 +145,7 @@ private function getWriteHandle() { if (!isset($this->writer)) { if (!$this->writer = fopen($this->path, $this->mode)) { - throw new Swift_IoException( - 'Unable to open file for writing ['.$this->path.']' - ); + throw new Swift_IoException('Unable to open file for writing ['.$this->path.']'); } } @@ -194,7 +192,7 @@ private function copyReadStream() { if ($tmpFile = fopen('php://temp/maxmemory:4096', 'w+b')) { /* We have opened a php:// Stream Should work without problem */ - } elseif (function_exists('sys_get_temp_dir') && is_writable(sys_get_temp_dir()) && ($tmpFile = tmpfile())) { + } elseif (\function_exists('sys_get_temp_dir') && is_writable(sys_get_temp_dir()) && ($tmpFile = tmpfile())) { /* We have opened a tmpfile */ } else { throw new Swift_IoException('Unable to copy the file to make it seekable, sys_temp_dir is not writable, php://memory not available'); diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/GenericFixedWidthReader.php b/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/GenericFixedWidthReader.php index b09bb5b6c..3e055afd9 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/GenericFixedWidthReader.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/GenericFixedWidthReader.php @@ -45,7 +45,7 @@ public function __construct($width) */ public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars) { - $strlen = strlen($string); + $strlen = \strlen($string); // % and / are CPU intensive, so, maybe find a better way $ignored = $strlen % $this->width; $ignoredChars = $ignored ? substr($string, -$ignored) : ''; diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/UsAsciiReader.php b/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/UsAsciiReader.php index 67da48f6c..ffc05f716 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/UsAsciiReader.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/UsAsciiReader.php @@ -27,7 +27,7 @@ class Swift_CharacterReader_UsAsciiReader implements Swift_CharacterReader */ public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars) { - $strlen = strlen($string); + $strlen = \strlen($string); $ignoredChars = ''; for ($i = 0; $i < $strlen; ++$i) { if ($string[$i] > "\x07F") { @@ -65,7 +65,7 @@ public function getMapType() public function validateByteSequence($bytes, $size) { $byte = reset($bytes); - if (1 == count($bytes) && $byte >= 0x00 && $byte <= 0x7F) { + if (1 == \count($bytes) && $byte >= 0x00 && $byte <= 0x7F) { return 0; } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/Utf8Reader.php b/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/Utf8Reader.php index 4a2df31db..da37e0da9 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/Utf8Reader.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/Utf8Reader.php @@ -18,7 +18,7 @@ class Swift_CharacterReader_Utf8Reader implements Swift_CharacterReader { /** Pre-computed for optimization */ private static $length_map = [ - // N=0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F, + // N=0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x0N 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x1N 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x2N @@ -34,7 +34,7 @@ class Swift_CharacterReader_Utf8Reader implements Swift_CharacterReader 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xCN 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xDN 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 0xEN - 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 0, 0, // 0xFN + 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 0, 0, // 0xFN ]; private static $s_length_map = [ @@ -88,8 +88,8 @@ public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredC $currentMap['p'] = $currentMap['i'] = []; } - $strlen = strlen($string); - $charPos = count($currentMap['p']); + $strlen = \strlen($string); + $charPos = \count($currentMap['p']); $foundChars = 0; $invalid = false; for ($i = 0; $i < $strlen; ++$i) { diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReaderFactory/SimpleCharacterReaderFactory.php b/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReaderFactory/SimpleCharacterReaderFactory.php index 78fffa987..debab675f 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReaderFactory/SimpleCharacterReaderFactory.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReaderFactory/SimpleCharacterReaderFactory.php @@ -44,7 +44,7 @@ public function __wakeup() public function init() { - if (count(self::$map) > 0) { + if (\count(self::$map) > 0) { return; } @@ -107,7 +107,7 @@ public function getReaderFor($charset) foreach (self::$map as $pattern => $spec) { $re = '/^'.$pattern.'$/D'; if (preg_match($re, $charset)) { - if (!array_key_exists($pattern, self::$loaded)) { + if (!\array_key_exists($pattern, self::$loaded)) { $reflector = new ReflectionClass($spec['class']); if ($reflector->getConstructor()) { $reader = $reflector->newInstanceArgs($spec['constructor']); diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream.php b/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream.php index 717924f5d..c9d8a078e 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream.php @@ -28,8 +28,6 @@ public function setCharacterSet($charset); /** * Set the CharacterReaderFactory for multi charset support. - * - * @param Swift_CharacterReaderFactory $factory */ public function setCharacterReaderFactory(Swift_CharacterReaderFactory $factory); diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream/ArrayCharacterStream.php b/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream/ArrayCharacterStream.php index 887658c53..5c2869455 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream/ArrayCharacterStream.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream/ArrayCharacterStream.php @@ -86,15 +86,15 @@ public function importByteStream(Swift_OutputByteStream $os) $startLength = $this->charReader->getInitialByteSize(); while (false !== $bytes = $os->read($startLength)) { $c = []; - for ($i = 0, $len = strlen($bytes); $i < $len; ++$i) { + for ($i = 0, $len = \strlen($bytes); $i < $len; ++$i) { $c[] = self::$byteMap[$bytes[$i]]; } - $size = count($c); + $size = \count($c); $need = $this->charReader ->validateByteSequence($c, $size); if ($need > 0 && false !== $bytes = $os->read($need)) { - for ($i = 0, $len = strlen($bytes); $i < $len; ++$i) { + for ($i = 0, $len = \strlen($bytes); $i < $len; ++$i) { $c[] = self::$byteMap[$bytes[$i]]; } } @@ -204,7 +204,7 @@ public function write($chars) $new = $this->reloadBuffer($fp, 100); if ($new) { $buffer = array_merge($buf, $new); - $buf_len = count($buffer); + $buf_len = \count($buffer); $buf_pos = 0; } else { $has_datas = false; @@ -224,7 +224,7 @@ public function write($chars) if ($new) { $buffer = array_merge($buffer, $new); - $buf_len = count($buffer); + $buf_len = \count($buffer); } } for ($i = 0; $i < $need && isset($buffer[$buf_pos]); ++$i) { @@ -268,7 +268,7 @@ private function reloadBuffer($fp, $len) { if (!feof($fp) && false !== ($bytes = fread($fp, $len))) { $buf = []; - for ($i = 0, $len = strlen($bytes); $i < $len; ++$i) { + for ($i = 0, $len = \strlen($bytes); $i < $len; ++$i) { $buf[] = self::$byteMap[$bytes[$i]]; } @@ -283,7 +283,7 @@ private static function initializeMaps() if (!isset(self::$charMap)) { self::$charMap = []; for ($byte = 0; $byte < 256; ++$byte) { - self::$charMap[$byte] = chr($byte); + self::$charMap[$byte] = \chr($byte); } self::$byteMap = array_flip(self::$charMap); } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream/NgCharacterStream.php b/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream/NgCharacterStream.php index a733063c9..7578dda9c 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream/NgCharacterStream.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream/NgCharacterStream.php @@ -254,9 +254,9 @@ public function write($chars) $this->datas .= $chars; $this->charCount += $this->charReader->getCharPositions(substr($this->datas, $this->datasSize), $this->datasSize, $this->map, $ignored); if (false !== $ignored) { - $this->datasSize = strlen($this->datas) - strlen($ignored); + $this->datasSize = \strlen($this->datas) - \strlen($ignored); } else { - $this->datasSize = strlen($this->datas); + $this->datasSize = \strlen($this->datas); } } } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/DependencyContainer.php b/swiftmailer/swiftmailer/lib/classes/Swift/DependencyContainer.php index b38f8ce51..3cc885ec0 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/DependencyContainer.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/DependencyContainer.php @@ -83,7 +83,7 @@ public function listItems() */ public function has($itemName) { - return array_key_exists($itemName, $this->store) + return \array_key_exists($itemName, $this->store) && isset($this->store[$itemName]['lookupType']); } @@ -101,9 +101,7 @@ public function has($itemName) public function lookup($itemName) { if (!$this->has($itemName)) { - throw new Swift_DependencyException( - 'Cannot lookup dependency "'.$itemName.'" since it is not registered.' - ); + throw new Swift_DependencyException('Cannot lookup dependency "'.$itemName.'" since it is not registered.'); } switch ($this->store[$itemName]['lookupType']) { @@ -348,9 +346,7 @@ private function createSharedInstance($itemName) private function &getEndPoint() { if (!isset($this->endPoint)) { - throw new BadMethodCallException( - 'Component must first be registered by calling register()' - ); + throw new BadMethodCallException('Component must first be registered by calling register()'); } return $this->endPoint; @@ -377,7 +373,7 @@ private function resolveArgs(array $args) /** Resolve a single dependency with an collections */ private function lookupRecursive($item) { - if (is_array($item)) { + if (\is_array($item)) { $collection = []; foreach ($item as $k => $v) { $collection[$k] = $this->lookupRecursive($v); diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/EmbeddedFile.php b/swiftmailer/swiftmailer/lib/classes/Swift/EmbeddedFile.php index 20b81412e..30fc68ab0 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/EmbeddedFile.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/EmbeddedFile.php @@ -26,7 +26,7 @@ class Swift_EmbeddedFile extends Swift_Mime_EmbeddedFile */ public function __construct($data = null, $filename = null, $contentType = null) { - call_user_func_array( + \call_user_func_array( [$this, 'Swift_Mime_EmbeddedFile::__construct'], Swift_DependencyContainer::getInstance() ->createDependenciesFor('mime.embeddedfile') diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/QpEncoder.php b/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/QpEncoder.php index 95b4ae97b..f078d6d7c 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/QpEncoder.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/QpEncoder.php @@ -135,14 +135,14 @@ public function __wakeup() protected function getSafeMapShareId() { - return get_class($this); + return static::class; } protected function initSafeMap() { foreach (array_merge( [0x09, 0x20], range(0x21, 0x3C), range(0x3E, 0x7E)) as $byte) { - $this->safeMap[$byte] = chr($byte); + $this->safeMap[$byte] = \chr($byte); } } @@ -281,7 +281,7 @@ protected function standardize($string) $string = str_replace(["\t=0D=0A", ' =0D=0A', '=0D=0A'], ["=09\r\n", "=20\r\n", "\r\n"], $string ); - switch ($end = ord(substr($string, -1))) { + switch ($end = \ord(substr($string, -1))) { case 0x09: case 0x20: $string = substr_replace($string, self::$qpMap[$end], -1); diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/Rfc2231Encoder.php b/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/Rfc2231Encoder.php index 2458515ad..7eac36813 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/Rfc2231Encoder.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/Rfc2231Encoder.php @@ -58,8 +58,8 @@ public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0) while (false !== $char = $this->charStream->read(4)) { $encodedChar = rawurlencode($char); - if (0 != strlen($currentLine) - && strlen($currentLine.$encodedChar) > $thisLineLength) { + if (0 != \strlen($currentLine) + && \strlen($currentLine.$encodedChar) > $thisLineLength) { $lines[] = ''; $currentLine = &$lines[$lineCount++]; $thisLineLength = $maxLineLength; diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Events/CommandListener.php b/swiftmailer/swiftmailer/lib/classes/Swift/Events/CommandListener.php index 7545404e7..b158eab46 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Events/CommandListener.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Events/CommandListener.php @@ -17,8 +17,6 @@ interface Swift_Events_CommandListener extends Swift_Events_EventListener { /** * Invoked immediately following a command being sent. - * - * @param Swift_Events_CommandEvent $evt */ public function commandSent(Swift_Events_CommandEvent $evt); } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Events/EventDispatcher.php b/swiftmailer/swiftmailer/lib/classes/Swift/Events/EventDispatcher.php index a01dfa260..c57222f24 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Events/EventDispatcher.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Events/EventDispatcher.php @@ -18,7 +18,6 @@ interface Swift_Events_EventDispatcher /** * Create a new SendEvent for $source and $message. * - * @param Swift_Transport $source * @param Swift_Mime_SimpleMessage * * @return Swift_Events_SendEvent @@ -28,9 +27,8 @@ public function createSendEvent(Swift_Transport $source, Swift_Mime_SimpleMessag /** * Create a new CommandEvent for $source and $command. * - * @param Swift_Transport $source - * @param string $command That will be executed - * @param array $successCodes That are needed + * @param string $command That will be executed + * @param array $successCodes That are needed * * @return Swift_Events_CommandEvent */ @@ -39,9 +37,8 @@ public function createCommandEvent(Swift_Transport $source, $command, $successCo /** * Create a new ResponseEvent for $source and $response. * - * @param Swift_Transport $source - * @param string $response - * @param bool $valid If the response is valid + * @param string $response + * @param bool $valid If the response is valid * * @return Swift_Events_ResponseEvent */ @@ -50,8 +47,6 @@ public function createResponseEvent(Swift_Transport $source, $response, $valid); /** * Create a new TransportChangeEvent for $source. * - * @param Swift_Transport $source - * * @return Swift_Events_TransportChangeEvent */ public function createTransportChangeEvent(Swift_Transport $source); @@ -59,25 +54,19 @@ public function createTransportChangeEvent(Swift_Transport $source); /** * Create a new TransportExceptionEvent for $source. * - * @param Swift_Transport $source - * @param Swift_TransportException $ex - * * @return Swift_Events_TransportExceptionEvent */ public function createTransportExceptionEvent(Swift_Transport $source, Swift_TransportException $ex); /** * Bind an event listener to this dispatcher. - * - * @param Swift_Events_EventListener $listener */ public function bindEventListener(Swift_Events_EventListener $listener); /** * Dispatch the given Event to all suitable listeners. * - * @param Swift_Events_EventObject $evt - * @param string $target method + * @param string $target method */ public function dispatchEvent(Swift_Events_EventObject $evt, $target); } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Events/ResponseListener.php b/swiftmailer/swiftmailer/lib/classes/Swift/Events/ResponseListener.php index c40919d21..85115a338 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Events/ResponseListener.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Events/ResponseListener.php @@ -17,8 +17,6 @@ interface Swift_Events_ResponseListener extends Swift_Events_EventListener { /** * Invoked immediately following a response coming back. - * - * @param Swift_Events_ResponseEvent $evt */ public function responseReceived(Swift_Events_ResponseEvent $evt); } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Events/SendListener.php b/swiftmailer/swiftmailer/lib/classes/Swift/Events/SendListener.php index d922e1bfa..f7bf55ef5 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Events/SendListener.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Events/SendListener.php @@ -17,15 +17,11 @@ interface Swift_Events_SendListener extends Swift_Events_EventListener { /** * Invoked immediately before the Message is sent. - * - * @param Swift_Events_SendEvent $evt */ public function beforeSendPerformed(Swift_Events_SendEvent $evt); /** * Invoked immediately after the Message is sent. - * - * @param Swift_Events_SendEvent $evt */ public function sendPerformed(Swift_Events_SendEvent $evt); } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Events/SimpleEventDispatcher.php b/swiftmailer/swiftmailer/lib/classes/Swift/Events/SimpleEventDispatcher.php index 1396f6164..6557103c9 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Events/SimpleEventDispatcher.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Events/SimpleEventDispatcher.php @@ -21,9 +21,6 @@ class Swift_Events_SimpleEventDispatcher implements Swift_Events_EventDispatcher /** Event listeners bound to this dispatcher */ private $listeners = []; - /** Listeners queued to have an Event bubbled up the stack to them */ - private $bubbleQueue = []; - /** * Create a new EventDispatcher. */ @@ -115,29 +112,31 @@ public function bindEventListener(Swift_Events_EventListener $listener) */ public function dispatchEvent(Swift_Events_EventObject $evt, $target) { - $this->prepareBubbleQueue($evt); - $this->bubble($evt, $target); + $bubbleQueue = $this->prepareBubbleQueue($evt); + $this->bubble($bubbleQueue, $evt, $target); } /** Queue listeners on a stack ready for $evt to be bubbled up it */ private function prepareBubbleQueue(Swift_Events_EventObject $evt) { - $this->bubbleQueue = []; - $evtClass = get_class($evt); + $bubbleQueue = []; + $evtClass = \get_class($evt); foreach ($this->listeners as $listener) { - if (array_key_exists($evtClass, $this->eventMap) + if (\array_key_exists($evtClass, $this->eventMap) && ($listener instanceof $this->eventMap[$evtClass])) { - $this->bubbleQueue[] = $listener; + $bubbleQueue[] = $listener; } } + + return $bubbleQueue; } /** Bubble $evt up the stack calling $target() on each listener */ - private function bubble(Swift_Events_EventObject $evt, $target) + private function bubble(array &$bubbleQueue, Swift_Events_EventObject $evt, $target) { - if (!$evt->bubbleCancelled() && $listener = array_shift($this->bubbleQueue)) { + if (!$evt->bubbleCancelled() && $listener = array_shift($bubbleQueue)) { $listener->$target($evt); - $this->bubble($evt, $target); + $this->bubble($bubbleQueue, $evt, $target); } } } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportChangeListener.php b/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportChangeListener.php index 253165de8..4a7492bc5 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportChangeListener.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportChangeListener.php @@ -17,29 +17,21 @@ interface Swift_Events_TransportChangeListener extends Swift_Events_EventListene { /** * Invoked just before a Transport is started. - * - * @param Swift_Events_TransportChangeEvent $evt */ public function beforeTransportStarted(Swift_Events_TransportChangeEvent $evt); /** * Invoked immediately after the Transport is started. - * - * @param Swift_Events_TransportChangeEvent $evt */ public function transportStarted(Swift_Events_TransportChangeEvent $evt); /** * Invoked just before a Transport is stopped. - * - * @param Swift_Events_TransportChangeEvent $evt */ public function beforeTransportStopped(Swift_Events_TransportChangeEvent $evt); /** * Invoked immediately after the Transport is stopped. - * - * @param Swift_Events_TransportChangeEvent $evt */ public function transportStopped(Swift_Events_TransportChangeEvent $evt); } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportExceptionListener.php b/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportExceptionListener.php index cc3c09937..ad80eb01d 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportExceptionListener.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportExceptionListener.php @@ -17,8 +17,6 @@ interface Swift_Events_TransportExceptionListener extends Swift_Events_EventList { /** * Invoked as a TransportException is thrown in the Transport system. - * - * @param Swift_Events_TransportExceptionEvent $evt */ public function exceptionThrown(Swift_Events_TransportExceptionEvent $evt); } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/FailoverTransport.php b/swiftmailer/swiftmailer/lib/classes/Swift/FailoverTransport.php index 0044be59b..af0be9179 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/FailoverTransport.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/FailoverTransport.php @@ -22,7 +22,7 @@ class Swift_FailoverTransport extends Swift_Transport_FailoverTransport */ public function __construct($transports = []) { - call_user_func_array( + \call_user_func_array( [$this, 'Swift_Transport_FailoverTransport::__construct'], Swift_DependencyContainer::getInstance() ->createDependenciesFor('transport.failover') diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/FileSpool.php b/swiftmailer/swiftmailer/lib/classes/Swift/FileSpool.php index d16c47cd6..7af8471c9 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/FileSpool.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/FileSpool.php @@ -198,7 +198,7 @@ protected function getRandomString($count) // This string MUST stay FS safe, avoid special chars $base = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-'; $ret = ''; - $strlen = strlen($base); + $strlen = \strlen($base); for ($i = 0; $i < $count; ++$i) { $ret .= $base[random_int(0, $strlen - 1)]; } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Filterable.php b/swiftmailer/swiftmailer/lib/classes/Swift/Filterable.php index 6b75b5274..efa1b1def 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Filterable.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Filterable.php @@ -18,8 +18,7 @@ interface Swift_Filterable /** * Add a new StreamFilter, referenced by $key. * - * @param Swift_StreamFilter $filter - * @param string $key + * @param string $key */ public function addFilter(Swift_StreamFilter $filter, $key); diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache.php b/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache.php index cd6f786df..87f6a0742 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache.php @@ -38,10 +38,9 @@ public function setString($nsKey, $itemKey, $string, $mode); * * @see MODE_WRITE, MODE_APPEND * - * @param string $nsKey - * @param string $itemKey - * @param Swift_OutputByteStream $os - * @param int $mode + * @param string $nsKey + * @param string $itemKey + * @param int $mode */ public function importFromByteStream($nsKey, $itemKey, Swift_OutputByteStream $os, $mode); diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/ArrayKeyCache.php b/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/ArrayKeyCache.php index 76fafdfc6..e8fef1c95 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/ArrayKeyCache.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/ArrayKeyCache.php @@ -62,10 +62,7 @@ public function setString($nsKey, $itemKey, $string, $mode) $this->contents[$nsKey][$itemKey] .= $string; break; default: - throw new Swift_SwiftException( - 'Invalid mode ['.$mode.'] used to set nsKey='. - $nsKey.', itemKey='.$itemKey - ); + throw new Swift_SwiftException('Invalid mode ['.$mode.'] used to set nsKey='.$nsKey.', itemKey='.$itemKey); } } @@ -94,10 +91,7 @@ public function importFromByteStream($nsKey, $itemKey, Swift_OutputByteStream $o } break; default: - throw new Swift_SwiftException( - 'Invalid mode ['.$mode.'] used to set nsKey='. - $nsKey.', itemKey='.$itemKey - ); + throw new Swift_SwiftException('Invalid mode ['.$mode.'] used to set nsKey='.$nsKey.', itemKey='.$itemKey); } } @@ -165,7 +159,7 @@ public function hasKey($nsKey, $itemKey) { $this->prepareCache($nsKey); - return array_key_exists($itemKey, $this->contents[$nsKey]); + return \array_key_exists($itemKey, $this->contents[$nsKey]); } /** @@ -196,7 +190,7 @@ public function clearAll($nsKey) */ private function prepareCache($nsKey) { - if (!array_key_exists($nsKey, $this->contents)) { + if (!\array_key_exists($nsKey, $this->contents)) { $this->contents[$nsKey] = []; } } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/DiskKeyCache.php b/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/DiskKeyCache.php index 7dc2886cc..7f2962c10 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/DiskKeyCache.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/DiskKeyCache.php @@ -80,10 +80,7 @@ public function setString($nsKey, $itemKey, $string, $mode) $fp = $this->getHandle($nsKey, $itemKey, self::POSITION_END); break; default: - throw new Swift_SwiftException( - 'Invalid mode ['.$mode.'] used to set nsKey='. - $nsKey.', itemKey='.$itemKey - ); + throw new Swift_SwiftException('Invalid mode ['.$mode.'] used to set nsKey='.$nsKey.', itemKey='.$itemKey); break; } fwrite($fp, $string); @@ -112,10 +109,7 @@ public function importFromByteStream($nsKey, $itemKey, Swift_OutputByteStream $o $fp = $this->getHandle($nsKey, $itemKey, self::POSITION_END); break; default: - throw new Swift_SwiftException( - 'Invalid mode ['.$mode.'] used to set nsKey='. - $nsKey.', itemKey='.$itemKey - ); + throw new Swift_SwiftException('Invalid mode ['.$mode.'] used to set nsKey='.$nsKey.', itemKey='.$itemKey); break; } while (false !== $bytes = $os->read(8192)) { @@ -224,7 +218,7 @@ public function clearKey($nsKey, $itemKey) */ public function clearAll($nsKey) { - if (array_key_exists($nsKey, $this->keys)) { + if (\array_key_exists($nsKey, $this->keys)) { foreach ($this->keys[$nsKey] as $itemKey => $null) { $this->clearKey($nsKey, $itemKey); } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/KeyCacheInputStream.php b/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/KeyCacheInputStream.php index af80bdca6..be2dbba0c 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/KeyCacheInputStream.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/KeyCacheInputStream.php @@ -17,8 +17,6 @@ interface Swift_KeyCache_KeyCacheInputStream extends Swift_InputByteStream { /** * Set the KeyCache to wrap. - * - * @param Swift_KeyCache $keyCache */ public function setKeyCache(Swift_KeyCache $keyCache); @@ -38,8 +36,6 @@ public function setItemKey($itemKey); /** * Specify a stream to write through for each write(). - * - * @param Swift_InputByteStream $is */ public function setWriteThroughStream(Swift_InputByteStream $is); diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/LoadBalancedTransport.php b/swiftmailer/swiftmailer/lib/classes/Swift/LoadBalancedTransport.php index ce732af5f..244b5f602 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/LoadBalancedTransport.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/LoadBalancedTransport.php @@ -22,7 +22,7 @@ class Swift_LoadBalancedTransport extends Swift_Transport_LoadBalancedTransport */ public function __construct($transports = []) { - call_user_func_array( + \call_user_func_array( [$this, 'Swift_Transport_LoadBalancedTransport::__construct'], Swift_DependencyContainer::getInstance() ->createDependenciesFor('transport.loadbalanced') diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Message.php b/swiftmailer/swiftmailer/lib/classes/Swift/Message.php index 42b861fc1..819ffc389 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Message.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Message.php @@ -42,7 +42,7 @@ class Swift_Message extends Swift_Mime_SimpleMessage */ public function __construct($subject = null, $body = null, $contentType = null, $charset = null) { - call_user_func_array( + \call_user_func_array( [$this, 'Swift_Mime_SimpleMessage::__construct'], Swift_DependencyContainer::getInstance() ->createDependenciesFor('mime.message') @@ -212,7 +212,7 @@ protected function saveMessage() $this->savedMessage = ['headers' => []]; $this->savedMessage['body'] = $this->getBody(); $this->savedMessage['children'] = $this->getChildren(); - if (count($this->savedMessage['children']) > 0 && '' != $this->getBody()) { + if (\count($this->savedMessage['children']) > 0 && '' != $this->getBody()) { $this->setChildren(array_merge([$this->becomeMimePart()], $this->savedMessage['children'])); $this->setBody(''); } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Attachment.php b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Attachment.php index 917007e46..d994373bd 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Attachment.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Attachment.php @@ -134,7 +134,7 @@ public function setFile(Swift_FileStream $file, $contentType = null) if (!isset($contentType)) { $extension = strtolower(substr($file->getPath(), strrpos($file->getPath(), '.') + 1)); - if (array_key_exists($extension, $this->mimeTypes)) { + if (\array_key_exists($extension, $this->mimeTypes)) { $this->setContentType($this->mimeTypes[$extension]); } } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/Base64ContentEncoder.php b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/Base64ContentEncoder.php index 8c4e2266f..2751130d4 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/Base64ContentEncoder.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/Base64ContentEncoder.php @@ -46,7 +46,7 @@ public function encodeByteStream(Swift_OutputByteStream $os, Swift_InputByteStre $streamTheseBytes = $base64ReadBufferRemainderBytes.$readBytes; } $base64ReadBufferRemainderBytes = null; - $bytesLength = strlen($streamTheseBytes); + $bytesLength = \strlen($streamTheseBytes); if (0 === $bytesLength) { // no data left to encode break; @@ -66,7 +66,7 @@ public function encodeByteStream(Swift_OutputByteStream $os, Swift_InputByteStre $encodedTransformed = ''; $thisMaxLineLength = $maxLineLength - $remainder - $firstLineOffset; - while ($thisMaxLineLength < strlen($encoded)) { + while ($thisMaxLineLength < \strlen($encoded)) { $encodedTransformed .= substr($encoded, 0, $thisMaxLineLength)."\r\n"; $firstLineOffset = 0; $encoded = substr($encoded, $thisMaxLineLength); @@ -74,7 +74,7 @@ public function encodeByteStream(Swift_OutputByteStream $os, Swift_InputByteStre $remainder = 0; } - if (0 < $remainingLength = strlen($encoded)) { + if (0 < $remainingLength = \strlen($encoded)) { $remainder += $remainingLength; $encodedTransformed .= $encoded; $encoded = null; diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/NativeQpContentEncoder.php b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/NativeQpContentEncoder.php index 9aae48718..8dfea605f 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/NativeQpContentEncoder.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/NativeQpContentEncoder.php @@ -16,16 +16,16 @@ class Swift_Mime_ContentEncoder_NativeQpContentEncoder implements Swift_Mime_ContentEncoder { /** - * @var null|string + * @var string|null */ private $charset; /** - * @param null|string $charset + * @param string|null $charset */ public function __construct($charset = null) { - $this->charset = $charset ? $charset : 'utf-8'; + $this->charset = $charset ?: 'utf-8'; } /** @@ -51,8 +51,7 @@ public function charsetChanged($charset) public function encodeByteStream(Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, $maxLineLength = 0) { if ('utf-8' !== $this->charset) { - throw new RuntimeException( - sprintf('Charset "%s" not supported. NativeQpContentEncoder only supports "utf-8"', $this->charset)); + throw new RuntimeException(sprintf('Charset "%s" not supported. NativeQpContentEncoder only supports "utf-8"', $this->charset)); } $string = ''; @@ -88,8 +87,7 @@ public function getName() public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0) { if ('utf-8' !== $this->charset) { - throw new RuntimeException( - sprintf('Charset "%s" not supported. NativeQpContentEncoder only supports "utf-8"', $this->charset)); + throw new RuntimeException(sprintf('Charset "%s" not supported. NativeQpContentEncoder only supports "utf-8"', $this->charset)); } return $this->standardize(quoted_printable_encode($string)); @@ -109,7 +107,7 @@ protected function standardize($string) // transform =0D=0A to CRLF $string = str_replace(["\t=0D=0A", ' =0D=0A', '=0D=0A'], ["=09\r\n", "=20\r\n", "\r\n"], $string); - switch (ord(substr($string, -1))) { + switch (\ord(substr($string, -1))) { case 0x09: $string = substr_replace($string, '=09', -1); break; diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/PlainContentEncoder.php b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/PlainContentEncoder.php index aa634f54e..72592fc58 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/PlainContentEncoder.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/PlainContentEncoder.php @@ -37,7 +37,7 @@ class Swift_Mime_ContentEncoder_PlainContentEncoder implements Swift_Mime_Conten * Creates a new PlainContentEncoder with $name (probably 7bit or 8bit). * * @param string $name - * @param bool $canonical If canonicalization transformation should be done. + * @param bool $canonical if canonicalization transformation should be done */ public function __construct($name, $canonical = false) { @@ -84,7 +84,7 @@ public function encodeByteStream(Swift_OutputByteStream $os, Swift_InputByteStre $is->write($wrapped); } - if (strlen($leftOver)) { + if (\strlen($leftOver)) { $is->write($leftOver); } } @@ -134,8 +134,8 @@ private function safeWordwrap($string, $length = 75, $le = "\r\n") $chunks = preg_split('/(?<=\s)/', $originalLine); foreach ($chunks as $chunk) { - if (0 != strlen($currentLine) - && strlen($currentLine.$chunk) > $length) { + if (0 != \strlen($currentLine) + && \strlen($currentLine.$chunk) > $length) { $lines[] = ''; $currentLine = &$lines[$lineCount++]; } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php index 84e3d2475..465ffd878 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php @@ -37,7 +37,7 @@ public function __sleep() protected function getSafeMapShareId() { - return get_class($this).($this->dotEscape ? '.dotEscape' : ''); + return static::class.($this->dotEscape ? '.dotEscape' : ''); } protected function initSafeMap() @@ -116,7 +116,7 @@ public function encodeByteStream(Swift_OutputByteStream $os, Swift_InputByteStre $lineLen = $size - strrpos($enc, '=0D=0A') - 6; } } - if (strlen($currentLine)) { + if (\strlen($currentLine)) { $is->write($prepend.$this->standardize($currentLine)); } } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoderProxy.php b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoderProxy.php index 1b06da8c7..f3ece43ae 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoderProxy.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoderProxy.php @@ -28,7 +28,7 @@ class Swift_Mime_ContentEncoder_QpContentEncoderProxy implements Swift_Mime_Cont private $nativeEncoder; /** - * @var null|string + * @var string|null */ private $charset; diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/EncodingObserver.php b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/EncodingObserver.php index cc44a6efb..1a952ece1 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/EncodingObserver.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/EncodingObserver.php @@ -17,8 +17,6 @@ interface Swift_Mime_EncodingObserver { /** * Notify this observer that the observed entity's ContentEncoder has changed. - * - * @param Swift_Mime_ContentEncoder $encoder */ public function encoderChanged(Swift_Mime_ContentEncoder $encoder); } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/HeaderEncoder/QpHeaderEncoder.php b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/HeaderEncoder/QpHeaderEncoder.php index 0eef3e1e7..378c48050 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/HeaderEncoder/QpHeaderEncoder.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/HeaderEncoder/QpHeaderEncoder.php @@ -31,7 +31,7 @@ protected function initSafeMap() range(0x61, 0x7A), range(0x41, 0x5A), range(0x30, 0x39), [0x20, 0x21, 0x2A, 0x2B, 0x2D, 0x2F] ) as $byte) { - $this->safeMap[$byte] = chr($byte); + $this->safeMap[$byte] = \chr($byte); } } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/AbstractHeader.php b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/AbstractHeader.php index 3a19404a6..22caeb236 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/AbstractHeader.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/AbstractHeader.php @@ -216,7 +216,7 @@ protected function createPhrase(Swift_Mime_Header $header, $string, $charset, Sw // ... otherwise it needs encoding // Determine space remaining on line if first line if ($shorten) { - $usedLength = strlen($header->getFieldName().': '); + $usedLength = \strlen($header->getFieldName().': '); } else { $usedLength = 0; } @@ -271,7 +271,7 @@ protected function encodeWords(Swift_Mime_Header $header, $input, $usedLength = } if (-1 == $usedLength) { - $usedLength = strlen($header->getFieldName().': ') + strlen($value); + $usedLength = \strlen($header->getFieldName().': ') + \strlen($value); } $value .= $this->getTokenAsEncodedWord($token, $usedLength); @@ -313,14 +313,14 @@ protected function getEncodableWordTokens($string) if ($this->tokenNeedsEncoding($token)) { $encodedToken .= $token; } else { - if (strlen($encodedToken) > 0) { + if (\strlen($encodedToken) > 0) { $tokens[] = $encodedToken; $encodedToken = ''; } $tokens[] = $token; } } - if (strlen($encodedToken)) { + if (\strlen($encodedToken)) { $tokens[] = $encodedToken; } @@ -342,7 +342,7 @@ protected function getTokenAsEncodedWord($token, $firstLineOffset = 0) if (isset($this->lang)) { $charsetDecl .= '*'.$this->lang; } - $encodingWrapperLength = strlen( + $encodingWrapperLength = \strlen( '=?'.$charsetDecl.'?'.$this->encoder->getName().'??=' ); @@ -458,8 +458,8 @@ private function tokensToString(array $tokens) foreach ($tokens as $i => $token) { // Line longer than specified maximum or token was just a new line if (("\r\n" == $token) || - ($i > 0 && strlen($currentLine.$token) > $this->lineLength) - && 0 < strlen($currentLine)) { + ($i > 0 && \strlen($currentLine.$token) > $this->lineLength) + && 0 < \strlen($currentLine)) { $headerLines[] = ''; $currentLine = &$headerLines[$lineCount++]; } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php index cadc63f85..dcea0c9cc 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php @@ -96,7 +96,7 @@ public function getFieldBodyModel() */ public function setId($id) { - $this->setIds(is_array($id) ? $id : [$id]); + $this->setIds(\is_array($id) ? $id : [$id]); } /** @@ -108,7 +108,7 @@ public function setId($id) */ public function getId() { - if (count($this->ids) > 0) { + if (\count($this->ids) > 0) { return $this->ids[0]; } } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php index 9f1fe1749..ddd5e8cff 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php @@ -261,7 +261,7 @@ protected function normalizeMailboxes(array $mailboxes) $actualMailboxes = []; foreach ($mailboxes as $key => $value) { - if (is_string($key)) { + if (\is_string($key)) { //key is email addr $address = $key; $name = $value; @@ -347,14 +347,12 @@ private function createNameAddressStrings(array $mailboxes) * * @param string $address * - * @throws Swift_RfcComplianceException If invalid. + * @throws Swift_RfcComplianceException if invalid */ private function assertValidAddress($address) { if (!$this->emailValidator->isValid($address, new RFCValidation())) { - throw new Swift_RfcComplianceException( - 'Address in mailbox given ['.$address.'] does not comply with RFC 2822, 3.6.2.' - ); + throw new Swift_RfcComplianceException('Address in mailbox given ['.$address.'] does not comply with RFC 2822, 3.6.2.'); } } } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/ParameterizedHeader.php b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/ParameterizedHeader.php index 02933c417..47c15e6c0 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/ParameterizedHeader.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/ParameterizedHeader.php @@ -155,7 +155,7 @@ protected function toTokens($string = null) foreach ($this->params as $name => $value) { if (null !== $value) { // Add the semi-colon separator - $tokens[count($tokens) - 1] .= ';'; + $tokens[\count($tokens) - 1] .= ';'; $tokens = array_merge($tokens, $this->generateTokenLines( ' '.$this->createParameter($name, $value) )); @@ -179,7 +179,7 @@ private function createParameter($name, $value) $encoded = false; // Allow room for parameter name, indices, "=" and DQUOTEs - $maxValueLength = $this->getMaxLineLength() - strlen($name.'=*N"";') - 1; + $maxValueLength = $this->getMaxLineLength() - \strlen($name.'=*N"";') - 1; $firstLineOffset = 0; // If it's not already a valid parameter value... @@ -189,15 +189,15 @@ private function createParameter($name, $value) if (!preg_match('/^[\x00-\x08\x0B\x0C\x0E-\x7F]*$/D', $value)) { $encoded = true; // Allow space for the indices, charset and language - $maxValueLength = $this->getMaxLineLength() - strlen($name.'*N*="";') - 1; - $firstLineOffset = strlen( + $maxValueLength = $this->getMaxLineLength() - \strlen($name.'*N*="";') - 1; + $firstLineOffset = \strlen( $this->getCharset()."'".$this->getLanguage()."'" ); } } // Encode if we need to - if ($encoded || strlen($value) > $maxValueLength) { + if ($encoded || \strlen($value) > $maxValueLength) { if (isset($this->paramEncoder)) { $value = $this->paramEncoder->encodeString( $origValue, $firstLineOffset, $maxValueLength, $this->getCharset() @@ -212,7 +212,7 @@ private function createParameter($name, $value) $valueLines = isset($this->paramEncoder) ? explode("\r\n", $value) : [$value]; // Need to add indices - if (count($valueLines) > 1) { + if (\count($valueLines) > 1) { $paramLines = []; foreach ($valueLines as $i => $line) { $paramLines[] = $name.'*'.$i. diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php index d22afbfe9..81b421ee7 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php @@ -147,9 +147,7 @@ public function getFieldBody() private function assertValidAddress($address) { if (!$this->emailValidator->isValid($address, new RFCValidation())) { - throw new Swift_RfcComplianceException( - 'Address set in PathHeader does not comply with addr-spec of RFC 2822.' - ); + throw new Swift_RfcComplianceException('Address set in PathHeader does not comply with addr-spec of RFC 2822.'); } } } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/MimePart.php b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/MimePart.php index 0acfd4e27..fa0726a35 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/MimePart.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/MimePart.php @@ -169,7 +169,7 @@ public function charsetChanged($charset) protected function fixHeaders() { parent::fixHeaders(); - if (count($this->getChildren())) { + if (\count($this->getChildren())) { $this->setHeaderParameter('Content-Type', 'charset', null); $this->setHeaderParameter('Content-Type', 'format', null); $this->setHeaderParameter('Content-Type', 'delsp', null); @@ -190,7 +190,7 @@ protected function setNestingLevel($level) protected function convertString($string) { $charset = strtolower($this->getCharset()); - if (!in_array($charset, ['utf-8', 'iso-8859-1', 'iso-8859-15', ''])) { + if (!\in_array($charset, ['utf-8', 'iso-8859-1', 'iso-8859-15', ''])) { return mb_convert_encoding($string, $charset, 'utf-8'); } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderFactory.php b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderFactory.php index 93af99634..b4345f439 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderFactory.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderFactory.php @@ -68,8 +68,7 @@ public function createMailboxHeader($name, $addresses = null) /** * Create a new Date header using $dateTime. * - * @param string $name - * @param DateTimeInterface|null $dateTime + * @param string $name * * @return Swift_Mime_Header */ diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php index a2c319131..d55cf66a7 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php @@ -140,16 +140,16 @@ public function has($name, $index = 0) { $lowerName = strtolower($name); - if (!array_key_exists($lowerName, $this->headers)) { + if (!\array_key_exists($lowerName, $this->headers)) { return false; } - if (func_num_args() < 2) { + if (\func_num_args() < 2) { // index was not specified, so we only need to check that there is at least one header value set - return (bool) count($this->headers[$lowerName]); + return (bool) \count($this->headers[$lowerName]); } - return array_key_exists($index, $this->headers[$lowerName]); + return \array_key_exists($index, $this->headers[$lowerName]); } /** @@ -183,7 +183,7 @@ public function get($name, $index = 0) { $name = strtolower($name); - if (func_num_args() < 2) { + if (\func_num_args() < 2) { if ($this->has($name)) { $values = array_values($this->headers[$name]); @@ -215,7 +215,7 @@ public function getAll($name = null) } $lowerName = strtolower($name); - if (!array_key_exists($lowerName, $this->headers)) { + if (!\array_key_exists($lowerName, $this->headers)) { return []; } @@ -343,7 +343,7 @@ private function storeHeader($name, Swift_Mime_Header $header, $offset = null) /** Test if the headers can be sorted */ private function canSort() { - return count($this->order) > 0; + return \count($this->order) > 0; } /** uksort() algorithm for Header ordering */ @@ -351,8 +351,8 @@ private function sortHeaders($a, $b) { $lowerA = strtolower($a); $lowerB = strtolower($b); - $aPos = array_key_exists($lowerA, $this->order) ? $this->order[$lowerA] : -1; - $bPos = array_key_exists($lowerB, $this->order) ? $this->order[$lowerB] : -1; + $aPos = \array_key_exists($lowerA, $this->order) ? $this->order[$lowerA] : -1; + $bPos = \array_key_exists($lowerB, $this->order) ? $this->order[$lowerB] : -1; if (-1 === $aPos && -1 === $bPos) { // just be sure to be determinist here @@ -371,7 +371,7 @@ private function sortHeaders($a, $b) /** Test if the given Header is always displayed */ private function isDisplayed(Swift_Mime_Header $header) { - return array_key_exists(strtolower($header->getFieldName()), $this->required); + return \array_key_exists(strtolower($header->getFieldName()), $this->required); } /** Notify all Headers of the new charset */ diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMessage.php b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMessage.php index ab32f63fe..62da1650a 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMessage.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMessage.php @@ -152,7 +152,7 @@ public function getReturnPath() */ public function setSender($address, $name = null) { - if (!is_array($address) && isset($name)) { + if (!\is_array($address) && isset($name)) { $address = [$address => $name]; } @@ -206,7 +206,7 @@ public function addFrom($address, $name = null) */ public function setFrom($addresses, $name = null) { - if (!is_array($addresses) && isset($name)) { + if (!\is_array($addresses) && isset($name)) { $addresses = [$addresses => $name]; } @@ -260,7 +260,7 @@ public function addReplyTo($address, $name = null) */ public function setReplyTo($addresses, $name = null) { - if (!is_array($addresses) && isset($name)) { + if (!\is_array($addresses) && isset($name)) { $addresses = [$addresses => $name]; } @@ -315,7 +315,7 @@ public function addTo($address, $name = null) */ public function setTo($addresses, $name = null) { - if (!is_array($addresses) && isset($name)) { + if (!\is_array($addresses) && isset($name)) { $addresses = [$addresses => $name]; } @@ -367,7 +367,7 @@ public function addCc($address, $name = null) */ public function setCc($addresses, $name = null) { - if (!is_array($addresses) && isset($name)) { + if (!\is_array($addresses) && isset($name)) { $addresses = [$addresses => $name]; } @@ -419,7 +419,7 @@ public function addBcc($address, $name = null) */ public function setBcc($addresses, $name = null) { - if (!is_array($addresses) && isset($name)) { + if (!\is_array($addresses) && isset($name)) { $addresses = [$addresses => $name]; } @@ -568,7 +568,7 @@ public function embed(Swift_Mime_SimpleMimeEntity $entity) */ public function toString() { - if (count($children = $this->getChildren()) > 0 && '' != $this->getBody()) { + if (\count($children = $this->getChildren()) > 0 && '' != $this->getBody()) { $this->setChildren(array_merge([$this->becomeMimePart()], $children)); $string = parent::toString(); $this->setChildren($children); @@ -596,7 +596,7 @@ public function __toString() */ public function toByteStream(Swift_InputByteStream $is) { - if (count($children = $this->getChildren()) > 0 && '' != $this->getBody()) { + if (\count($children = $this->getChildren()) > 0 && '' != $this->getBody()) { $this->setChildren(array_merge([$this->becomeMimePart()], $children)); parent::toByteStream($is); $this->setChildren($children); diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php index 63dda3d6e..6ee4b7e43 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php @@ -634,7 +634,7 @@ protected function setHeaderParameter($field, $parameter, $value) */ protected function fixHeaders() { - if (count($this->immediateChildren)) { + if (\count($this->immediateChildren)) { $this->setHeaderParameter('Content-Type', 'boundary', $this->getBoundary() ); @@ -778,7 +778,7 @@ private function sortChildren() $sorted = []; foreach ($this->immediateChildren as $child) { $type = $child->getContentType(); - $level = array_key_exists($type, $this->alternativePartOrder) ? $this->alternativePartOrder[$type] : max($this->alternativePartOrder) + 1; + $level = \array_key_exists($type, $this->alternativePartOrder) ? $this->alternativePartOrder[$type] : max($this->alternativePartOrder) + 1; if (empty($sorted[$level])) { $sorted[$level] = []; diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/MimePart.php b/swiftmailer/swiftmailer/lib/classes/Swift/MimePart.php index 14f84324a..ea97619ad 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/MimePart.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/MimePart.php @@ -26,7 +26,7 @@ class Swift_MimePart extends Swift_Mime_MimePart */ public function __construct($body = null, $contentType = null, $charset = null) { - call_user_func_array( + \call_user_func_array( [$this, 'Swift_Mime_MimePart::__construct'], Swift_DependencyContainer::getInstance() ->createDependenciesFor('mime.part') diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/NullTransport.php b/swiftmailer/swiftmailer/lib/classes/Swift/NullTransport.php index eefb9a6f7..e44b7af98 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/NullTransport.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/NullTransport.php @@ -17,7 +17,7 @@ class Swift_NullTransport extends Swift_Transport_NullTransport { public function __construct() { - call_user_func_array( + \call_user_func_array( [$this, 'Swift_Transport_NullTransport::__construct'], Swift_DependencyContainer::getInstance() ->createDependenciesFor('transport.null') diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/BandwidthMonitorPlugin.php b/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/BandwidthMonitorPlugin.php index f7a24dd00..36451f44f 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/BandwidthMonitorPlugin.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/BandwidthMonitorPlugin.php @@ -54,7 +54,7 @@ public function sendPerformed(Swift_Events_SendEvent $evt) public function commandSent(Swift_Events_CommandEvent $evt) { $command = $evt->getCommand(); - $this->out += strlen($command); + $this->out += \strlen($command); } /** @@ -63,7 +63,7 @@ public function commandSent(Swift_Events_CommandEvent $evt) public function responseReceived(Swift_Events_ResponseEvent $evt) { $response = $evt->getResponse(); - $this->in += strlen($response); + $this->in += \strlen($response); } /** @@ -73,7 +73,7 @@ public function responseReceived(Swift_Events_ResponseEvent $evt) */ public function write($bytes) { - $this->out += strlen($bytes); + $this->out += \strlen($bytes); foreach ($this->mirrors as $stream) { $stream->write($bytes); } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/DecoratorPlugin.php b/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/DecoratorPlugin.php index c4b6ee127..93124c9a5 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/DecoratorPlugin.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/DecoratorPlugin.php @@ -96,20 +96,20 @@ public function beforeSendPerformed(Swift_Events_SendEvent $evt) foreach ($message->getHeaders()->getAll() as $header) { $body = $header->getFieldBodyModel(); $count = 0; - if (is_array($body)) { + if (\is_array($body)) { $bodyReplaced = []; foreach ($body as $key => $value) { $count1 = 0; $count2 = 0; - $key = is_string($key) ? str_replace($search, $replace, $key, $count1) : $key; - $value = is_string($value) ? str_replace($search, $replace, $value, $count2) : $value; + $key = \is_string($key) ? str_replace($search, $replace, $key, $count1) : $key; + $value = \is_string($value) ? str_replace($search, $replace, $value, $count2) : $value; $bodyReplaced[$key] = $value; if (!$count && ($count1 || $count2)) { $count = 1; } } - } elseif (is_string($body)) { + } elseif (\is_string($body)) { $bodyReplaced = str_replace($search, $replace, $body, $count); } @@ -178,7 +178,7 @@ private function restoreMessage(Swift_Mime_SimpleMessage $message) } if (!empty($this->originalHeaders)) { foreach ($message->getHeaders()->getAll() as $header) { - if (array_key_exists($header->getFieldName(), $this->originalHeaders)) { + if (\array_key_exists($header->getFieldName(), $this->originalHeaders)) { $header->setFieldBodyModel($this->originalHeaders[$header->getFieldName()]); } } @@ -188,7 +188,7 @@ private function restoreMessage(Swift_Mime_SimpleMessage $message) $children = (array) $message->getChildren(); foreach ($children as $child) { $id = $child->getId(); - if (array_key_exists($id, $this->originalChildBodies)) { + if (\array_key_exists($id, $this->originalChildBodies)) { $child->setBody($this->originalChildBodies[$id]); } } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/LoggerPlugin.php b/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/LoggerPlugin.php index c70a03824..e183749b7 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/LoggerPlugin.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/LoggerPlugin.php @@ -77,7 +77,7 @@ public function responseReceived(Swift_Events_ResponseEvent $evt) */ public function beforeTransportStarted(Swift_Events_TransportChangeEvent $evt) { - $transportName = get_class($evt->getSource()); + $transportName = \get_class($evt->getSource()); $this->logger->add(sprintf('++ Starting %s', $transportName)); } @@ -86,7 +86,7 @@ public function beforeTransportStarted(Swift_Events_TransportChangeEvent $evt) */ public function transportStarted(Swift_Events_TransportChangeEvent $evt) { - $transportName = get_class($evt->getSource()); + $transportName = \get_class($evt->getSource()); $this->logger->add(sprintf('++ %s started', $transportName)); } @@ -95,7 +95,7 @@ public function transportStarted(Swift_Events_TransportChangeEvent $evt) */ public function beforeTransportStopped(Swift_Events_TransportChangeEvent $evt) { - $transportName = get_class($evt->getSource()); + $transportName = \get_class($evt->getSource()); $this->logger->add(sprintf('++ Stopping %s', $transportName)); } @@ -104,7 +104,7 @@ public function beforeTransportStopped(Swift_Events_TransportChangeEvent $evt) */ public function transportStopped(Swift_Events_TransportChangeEvent $evt) { - $transportName = get_class($evt->getSource()); + $transportName = \get_class($evt->getSource()); $this->logger->add(sprintf('++ %s stopped', $transportName)); } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Loggers/ArrayLogger.php b/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Loggers/ArrayLogger.php index b00bcaa11..6f595adaa 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Loggers/ArrayLogger.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Loggers/ArrayLogger.php @@ -47,7 +47,7 @@ public function __construct($size = 50) public function add($entry) { $this->log[] = $entry; - while (count($this->log) > $this->size) { + while (\count($this->log) > $this->size) { array_shift($this->log); } } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/MessageLogger.php b/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/MessageLogger.php index 3b4de80ec..39c48ed18 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/MessageLogger.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/MessageLogger.php @@ -42,7 +42,7 @@ public function getMessages() */ public function countMessages() { - return count($this->messages); + return \count($this->messages); } /** diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/PopBeforeSmtpPlugin.php b/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/PopBeforeSmtpPlugin.php index 1d5da1c64..1ecfce050 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/PopBeforeSmtpPlugin.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/PopBeforeSmtpPlugin.php @@ -132,16 +132,12 @@ public function connect() if (!isset($this->socket)) { if (!$socket = fsockopen( $this->getHostString(), $this->port, $errno, $errstr, $this->timeout)) { - throw new Swift_Plugins_Pop_Pop3Exception( - sprintf('Failed to connect to POP3 host [%s]: %s', $this->host, $errstr) - ); + throw new Swift_Plugins_Pop_Pop3Exception(sprintf('Failed to connect to POP3 host [%s]: %s', $this->host, $errstr)); } $this->socket = $socket; if (false === $greeting = fgets($this->socket)) { - throw new Swift_Plugins_Pop_Pop3Exception( - sprintf('Failed to connect to POP3 host [%s]', trim($greeting)) - ); + throw new Swift_Plugins_Pop_Pop3Exception(sprintf('Failed to connect to POP3 host [%s]', trim($greeting))); } $this->assertOk($greeting); @@ -164,9 +160,7 @@ public function disconnect() } else { $this->command("QUIT\r\n"); if (!fclose($this->socket)) { - throw new Swift_Plugins_Pop_Pop3Exception( - sprintf('POP3 host [%s] connection could not be stopped', $this->host) - ); + throw new Swift_Plugins_Pop_Pop3Exception(sprintf('POP3 host [%s] connection could not be stopped', $this->host)); } $this->socket = null; } @@ -211,15 +205,11 @@ public function transportStopped(Swift_Events_TransportChangeEvent $evt) private function command($command) { if (!fwrite($this->socket, $command)) { - throw new Swift_Plugins_Pop_Pop3Exception( - sprintf('Failed to write command [%s] to POP3 host', trim($command)) - ); + throw new Swift_Plugins_Pop_Pop3Exception(sprintf('Failed to write command [%s] to POP3 host', trim($command))); } if (false === $response = fgets($this->socket)) { - throw new Swift_Plugins_Pop_Pop3Exception( - sprintf('Failed to read from POP3 host after command [%s]', trim($command)) - ); + throw new Swift_Plugins_Pop_Pop3Exception(sprintf('Failed to read from POP3 host after command [%s]', trim($command))); } $this->assertOk($response); @@ -230,9 +220,7 @@ private function command($command) private function assertOk($response) { if ('+OK' != substr($response, 0, 3)) { - throw new Swift_Plugins_Pop_Pop3Exception( - sprintf('POP3 command failed [%s]', trim($response)) - ); + throw new Swift_Plugins_Pop_Pop3Exception(sprintf('POP3 command failed [%s]', trim($response))); } } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/RedirectingPlugin.php b/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/RedirectingPlugin.php index b0cb519e0..f7373b242 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/RedirectingPlugin.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/RedirectingPlugin.php @@ -112,7 +112,7 @@ public function beforeSendPerformed(Swift_Events_SendEvent $evt) } foreach ((array) $this->recipient as $recipient) { - if (!array_key_exists($recipient, $to)) { + if (!\array_key_exists($recipient, $to)) { $message->addTo($recipient); } } @@ -155,7 +155,7 @@ private function filterNameAddresses(array $recipients) */ protected function isWhitelisted($recipient) { - if (in_array($recipient, (array) $this->recipient)) { + if (\in_array($recipient, (array) $this->recipient)) { return true; } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporter.php b/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporter.php index 3a2b6657c..b88183397 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporter.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporter.php @@ -24,9 +24,8 @@ interface Swift_Plugins_Reporter /** * Notifies this ReportNotifier that $address failed or succeeded. * - * @param Swift_Mime_SimpleMessage $message - * @param string $address - * @param int $result from {@link RESULT_PASS, RESULT_FAIL} + * @param string $address + * @param int $result from {@link RESULT_PASS, RESULT_FAIL} */ public function notify(Swift_Mime_SimpleMessage $message, $address, $result); } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/ReporterPlugin.php b/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/ReporterPlugin.php index ae070eb64..c4a016520 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/ReporterPlugin.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/ReporterPlugin.php @@ -45,13 +45,13 @@ public function sendPerformed(Swift_Events_SendEvent $evt) $message = $evt->getMessage(); $failures = array_flip($evt->getFailedRecipients()); foreach ((array) $message->getTo() as $address => $null) { - $this->reporter->notify($message, $address, (array_key_exists($address, $failures) ? Swift_Plugins_Reporter::RESULT_FAIL : Swift_Plugins_Reporter::RESULT_PASS)); + $this->reporter->notify($message, $address, (\array_key_exists($address, $failures) ? Swift_Plugins_Reporter::RESULT_FAIL : Swift_Plugins_Reporter::RESULT_PASS)); } foreach ((array) $message->getCc() as $address => $null) { - $this->reporter->notify($message, $address, (array_key_exists($address, $failures) ? Swift_Plugins_Reporter::RESULT_FAIL : Swift_Plugins_Reporter::RESULT_PASS)); + $this->reporter->notify($message, $address, (\array_key_exists($address, $failures) ? Swift_Plugins_Reporter::RESULT_FAIL : Swift_Plugins_Reporter::RESULT_PASS)); } foreach ((array) $message->getBcc() as $address => $null) { - $this->reporter->notify($message, $address, (array_key_exists($address, $failures) ? Swift_Plugins_Reporter::RESULT_FAIL : Swift_Plugins_Reporter::RESULT_PASS)); + $this->reporter->notify($message, $address, (\array_key_exists($address, $failures) ? Swift_Plugins_Reporter::RESULT_FAIL : Swift_Plugins_Reporter::RESULT_PASS)); } } } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/SendmailTransport.php b/swiftmailer/swiftmailer/lib/classes/Swift/SendmailTransport.php index 2aa7e3261..3c756436c 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/SendmailTransport.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/SendmailTransport.php @@ -22,7 +22,7 @@ class Swift_SendmailTransport extends Swift_Transport_SendmailTransport */ public function __construct($command = '/usr/sbin/sendmail -bs') { - call_user_func_array( + \call_user_func_array( [$this, 'Swift_Transport_SendmailTransport::__construct'], Swift_DependencyContainer::getInstance() ->createDependenciesFor('transport.sendmail') diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Signers/BodySigner.php b/swiftmailer/swiftmailer/lib/classes/Swift/Signers/BodySigner.php index 8e66e18f4..b25c427af 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Signers/BodySigner.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Signers/BodySigner.php @@ -18,8 +18,6 @@ interface Swift_Signers_BodySigner extends Swift_Signer /** * Change the Swift_Signed_Message to apply the singing. * - * @param Swift_Message $message - * * @return self */ public function signMessage(Swift_Message $message); diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DKIMSigner.php b/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DKIMSigner.php index 7f1bf4a5f..9a26abd35 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DKIMSigner.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DKIMSigner.php @@ -295,7 +295,7 @@ public function setHashAlgorithm($hash) break; case 'rsa-sha256': $this->hashAlgorithm = 'rsa-sha256'; - if (!defined('OPENSSL_ALGO_SHA256')) { + if (!\defined('OPENSSL_ALGO_SHA256')) { throw new Swift_SwiftException('Unable to set sha256 as it is not supported by OpenSSL.'); } break; @@ -574,7 +574,7 @@ protected function addHeader($header, $is_sig = false) protected function canonicalizeBody($string) { - $len = strlen($string); + $len = \strlen($string); $canon = ''; $method = ('relaxed' == $this->bodyCanon); for ($i = 0; $i < $len; ++$i) { @@ -629,7 +629,7 @@ protected function canonicalizeBody($string) protected function endOfBody() { // Add trailing Line return if last line is non empty - if (strlen($this->bodyCanonLine) > 0) { + if (\strlen($this->bodyCanonLine) > 0) { $this->addToBodyHash("\r\n"); } $this->bodyHash = hash_final($this->bodyHashHandler, true); @@ -637,7 +637,7 @@ protected function endOfBody() private function addToBodyHash($string) { - $len = strlen($string); + $len = \strlen($string); if ($len > ($new_len = ($this->maxLen - $this->bodyLen))) { $string = substr($string, 0, $new_len); $len = $new_len; diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DomainKeySigner.php b/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DomainKeySigner.php index a24d2032d..8833765b3 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DomainKeySigner.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DomainKeySigner.php @@ -412,7 +412,7 @@ protected function endOfHeaders() protected function canonicalizeBody($string) { - $len = strlen($string); + $len = \strlen($string); $canon = ''; $nofws = ('nofws' == $this->canon); for ($i = 0; $i < $len; ++$i) { @@ -462,7 +462,7 @@ protected function canonicalizeBody($string) protected function endOfBody() { - if (strlen($this->bodyCanonLine) > 0) { + if (\strlen($this->bodyCanonLine) > 0) { $this->addToHash("\r\n"); } } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Signers/HeaderSigner.php b/swiftmailer/swiftmailer/lib/classes/Swift/Signers/HeaderSigner.php index 6104e34f3..6f5c20923 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Signers/HeaderSigner.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Signers/HeaderSigner.php @@ -41,8 +41,6 @@ public function endBody(); /** * Give the headers already given. * - * @param Swift_Mime_SimpleHeaderSet $headers - * * @return self */ public function setHeaders(Swift_Mime_SimpleHeaderSet $headers); @@ -50,8 +48,6 @@ public function setHeaders(Swift_Mime_SimpleHeaderSet $headers); /** * Add the header(s) to the headerSet. * - * @param Swift_Mime_SimpleHeaderSet $headers - * * @return self */ public function addSignature(Swift_Mime_SimpleHeaderSet $headers); diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Signers/OpenDKIMSigner.php b/swiftmailer/swiftmailer/lib/classes/Swift/Signers/OpenDKIMSigner.php index 7b50c51d4..6d7b589cb 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Signers/OpenDKIMSigner.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Signers/OpenDKIMSigner.php @@ -31,7 +31,7 @@ class Swift_Signers_OpenDKIMSigner extends Swift_Signers_DKIMSigner public function __construct($privateKey, $domainName, $selector) { - if (!extension_loaded('opendkim')) { + if (!\extension_loaded('opendkim')) { throw new Swift_SwiftException('php-opendkim extension not found'); } @@ -44,7 +44,7 @@ public function addSignature(Swift_Mime_SimpleHeaderSet $headers) { $header = new Swift_Mime_Headers_OpenDKIMHeader('DKIM-Signature'); $headerVal = $this->dkimHandler->getSignatureHeader(); - if (false === $headerVal || is_int($headerVal)) { + if (false === $headerVal || \is_int($headerVal)) { throw new Swift_SwiftException('OpenDKIM Error: '.$this->dkimHandler->getError()); } $header->setValue($headerVal); @@ -176,7 +176,7 @@ protected function canonicalizeBody($string) } } $this->dropFirstLF = false; - if (strlen($string)) { + if (\strlen($string)) { $this->dkimHandler->body($string); } } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Signers/SMimeSigner.php b/swiftmailer/swiftmailer/lib/classes/Swift/Signers/SMimeSigner.php index 84c53edb5..30f3cbdf6 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Signers/SMimeSigner.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Signers/SMimeSigner.php @@ -80,7 +80,7 @@ public function setSignCertificate($certificate, $privateKey = null, $signOption $this->signCertificate = 'file://'.str_replace('\\', '/', realpath($certificate)); if (null !== $privateKey) { - if (is_array($privateKey)) { + if (\is_array($privateKey)) { $this->signPrivateKey = $privateKey; $this->signPrivateKey[0] = 'file://'.str_replace('\\', '/', realpath($privateKey[0])); } else { @@ -107,7 +107,7 @@ public function setSignCertificate($certificate, $privateKey = null, $signOption */ public function setEncryptCertificate($recipientCerts, $cipher = null) { - if (is_array($recipientCerts)) { + if (\is_array($recipientCerts)) { $this->encryptCert = []; foreach ($recipientCerts as $cert) { @@ -509,7 +509,7 @@ protected function parseStream(Swift_OutputByteStream $emailStream) $bodyStream = new Swift_ByteStream_TemporaryFileByteStream(); // Skip the header and separator and point to the body - $emailStream->setReadPointer($headersPosEnd + strlen($headerBodySeparator)); + $emailStream->setReadPointer($headersPosEnd + \strlen($headerBodySeparator)); while (false !== ($buffer = $emailStream->read($bufferLength))) { $bodyStream->write($buffer); diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/SmtpTransport.php b/swiftmailer/swiftmailer/lib/classes/Swift/SmtpTransport.php index e241e6786..726b468eb 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/SmtpTransport.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/SmtpTransport.php @@ -29,7 +29,7 @@ class Swift_SmtpTransport extends Swift_Transport_EsmtpTransport */ public function __construct($host = 'localhost', $port = 25, $encryption = null) { - call_user_func_array( + \call_user_func_array( [$this, 'Swift_Transport_EsmtpTransport::__construct'], Swift_DependencyContainer::getInstance() ->createDependenciesFor('transport.smtp') diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/SpoolTransport.php b/swiftmailer/swiftmailer/lib/classes/Swift/SpoolTransport.php index 4b30f04ed..c08e0fb17 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/SpoolTransport.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/SpoolTransport.php @@ -25,7 +25,7 @@ public function __construct(Swift_Spool $spool) $arguments[] = $spool; - call_user_func_array( + \call_user_func_array( [$this, 'Swift_Transport_SpoolTransport::__construct'], $arguments ); diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilters/ByteArrayReplacementFilter.php b/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilters/ByteArrayReplacementFilter.php index c3b7675dd..7e5ddf1b7 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilters/ByteArrayReplacementFilter.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilters/ByteArrayReplacementFilter.php @@ -49,11 +49,11 @@ public function __construct($search, $replace) $last_size = $size = 0; foreach ($search as $i => $search_element) { if (null !== $tree) { - $tree[-1] = min(count($replace) - 1, $i - 1); + $tree[-1] = min(\count($replace) - 1, $i - 1); $tree[-2] = $last_size; } $tree = &$this->tree; - if (is_array($search_element)) { + if (\is_array($search_element)) { foreach ($search_element as $k => $char) { $this->index[$char] = true; if (!isset($tree[$char])) { @@ -74,19 +74,19 @@ public function __construct($search, $replace) } } if (null !== $i) { - $tree[-1] = min(count($replace) - 1, $i); + $tree[-1] = min(\count($replace) - 1, $i); $tree[-2] = $last_size; $this->treeMaxLen = $size; } foreach ($replace as $rep) { - if (!is_array($rep)) { + if (!\is_array($rep)) { $rep = [$rep]; } $this->replace[] = $rep; } - for ($i = count($this->replace) - 1; $i >= 0; --$i) { + for ($i = \count($this->replace) - 1; $i >= 0; --$i) { $this->replace[$i] = $rep = $this->filter($this->replace[$i], $i); - $this->repSize[$i] = count($rep); + $this->repSize[$i] = \count($rep); } } @@ -119,7 +119,7 @@ public function filter($buffer, $minReplaces = -1) } $newBuffer = []; - $buf_size = count($buffer); + $buf_size = \count($buffer); $last_size = 0; for ($i = 0; $i < $buf_size; ++$i) { $search_pos = $this->tree; diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Transport.php b/swiftmailer/swiftmailer/lib/classes/Swift/Transport.php index 0951f35e7..bc324e868 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Transport.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Transport.php @@ -63,8 +63,7 @@ public function ping(); * * This is the responsibility of the send method to start the transport if needed. * - * @param Swift_Mime_SimpleMessage $message - * @param string[] $failedRecipients An array of failures by-reference + * @param string[] $failedRecipients An array of failures by-reference * * @return int */ @@ -72,8 +71,6 @@ public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = nul /** * Register a plugin in the Transport. - * - * @param Swift_Events_EventListener $plugin */ public function registerPlugin(Swift_Events_EventListener $plugin); } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php b/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php index 18c8d9b90..82b86e482 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php @@ -210,7 +210,7 @@ public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = nul } if ($evt) { - if ($sent == count($to) + count($cc) + count($bcc)) { + if ($sent == \count($to) + \count($cc) + \count($bcc)) { $evt->setResult(Swift_Events_SendEvent::RESULT_SUCCESS); } elseif ($sent > 0) { $evt->setResult(Swift_Events_SendEvent::RESULT_TENTATIVE); @@ -318,7 +318,7 @@ public function getBuffer() * @param int[] $codes * @param string[] $failures An array of failures by-reference * @param bool $pipeline Do not wait for response - * @param string $address The address, if command is RCPT TO. + * @param string $address the address, if command is RCPT TO * * @return string|null The server response, or null if pipelining is enabled */ @@ -331,20 +331,23 @@ public function executeCommand($command, $codes = [], &$failures = null, $pipeli } $this->pipeline[] = [$command, $seq, $codes, $address]; + if ($pipeline && $this->pipelining) { - $response = null; - } else { - while ($this->pipeline) { - list($command, $seq, $codes, $address) = array_shift($this->pipeline); - $response = $this->getFullResponse($seq); - try { - $this->assertResponseCode($response, $codes); - } catch (Swift_TransportException $e) { - if ($this->pipeline && $address) { - $failures[] = $address; - } else { - $this->throwException($e); - } + return null; + } + + $response = null; + + while ($this->pipeline) { + list($command, $seq, $codes, $address) = array_shift($this->pipeline); + $response = $this->getFullResponse($seq); + try { + $this->assertResponseCode($response, $codes); + } catch (Swift_TransportException $e) { + if ($this->pipeline && $address) { + $failures[] = $address; + } else { + $this->throwException($e); } } } @@ -446,7 +449,7 @@ protected function assertResponseCode($response, $wanted) } list($code) = sscanf($response, '%3d'); - $valid = (empty($wanted) || in_array($code, $wanted)); + $valid = (empty($wanted) || \in_array($code, $wanted)); if ($evt = $this->eventDispatcher->createResponseEvent($this, $response, $valid)) { @@ -493,9 +496,9 @@ private function doMailTransaction($message, $reversePath, array $recipients, ar } if (0 != $sent) { - $sent += count($failedRecipients); + $sent += \count($failedRecipients); $this->doDataCommand($failedRecipients); - $sent -= count($failedRecipients); + $sent -= \count($failedRecipients); $this->streamMessage($message); } else { diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/CramMd5Authenticator.php b/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/CramMd5Authenticator.php index 51dc7f563..e7ccf6dba 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/CramMd5Authenticator.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/CramMd5Authenticator.php @@ -56,16 +56,16 @@ public function authenticate(Swift_Transport_SmtpAgent $agent, $username, $passw */ private function getResponse($secret, $challenge) { - if (strlen($secret) > 64) { + if (\strlen($secret) > 64) { $secret = pack('H32', md5($secret)); } - if (strlen($secret) < 64) { - $secret = str_pad($secret, 64, chr(0)); + if (\strlen($secret) < 64) { + $secret = str_pad($secret, 64, \chr(0)); } - $k_ipad = substr($secret, 0, 64) ^ str_repeat(chr(0x36), 64); - $k_opad = substr($secret, 0, 64) ^ str_repeat(chr(0x5C), 64); + $k_ipad = substr($secret, 0, 64) ^ str_repeat(\chr(0x36), 64); + $k_opad = substr($secret, 0, 64) ^ str_repeat(\chr(0x5C), 64); $inner = pack('H32', md5($k_ipad.$challenge)); $digest = md5($k_opad.$inner); diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/NTLMAuthenticator.php b/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/NTLMAuthenticator.php index 90081f8e6..21c070e34 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/NTLMAuthenticator.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/NTLMAuthenticator.php @@ -37,11 +37,11 @@ public function getAuthKeyword() */ public function authenticate(Swift_Transport_SmtpAgent $agent, $username, $password) { - if (!function_exists('openssl_encrypt')) { + if (!\function_exists('openssl_encrypt')) { throw new LogicException('The OpenSSL extension must be enabled to use the NTLM authenticator.'); } - if (!function_exists('bcmul')) { + if (!\function_exists('bcmul')) { throw new LogicException('The BCMath functions must be enabled to use the NTLM authenticator.'); } @@ -51,8 +51,8 @@ public function authenticate(Swift_Transport_SmtpAgent $agent, $username, $passw $response = base64_decode(substr(trim($this->sendMessage1($agent)), 4)); // extra parameters for our unit cases - $timestamp = func_num_args() > 3 ? func_get_arg(3) : $this->getCorrectTimestamp(bcmul(microtime(true), '1000')); - $client = func_num_args() > 4 ? func_get_arg(4) : random_bytes(8); + $timestamp = \func_num_args() > 3 ? func_get_arg(3) : $this->getCorrectTimestamp(bcmul(microtime(true), '1000')); + $client = \func_num_args() > 4 ? func_get_arg(4) : random_bytes(8); // Message 3 response $this->sendMessage3($response, $username, $password, $timestamp, $client, $agent); @@ -68,20 +68,20 @@ public function authenticate(Swift_Transport_SmtpAgent $agent, $username, $passw protected function si2bin($si, $bits = 32) { $bin = null; - if ($si >= -pow(2, $bits - 1) && ($si <= pow(2, $bits - 1))) { + if ($si >= -2 ** ($bits - 1) && ($si <= 2 ** ($bits - 1))) { // positive or zero if ($si >= 0) { $bin = base_convert($si, 10, 2); // pad to $bits bit - $bin_length = strlen($bin); + $bin_length = \strlen($bin); if ($bin_length < $bits) { $bin = str_repeat('0', $bits - $bin_length).$bin; } } else { // negative - $si = -$si - pow(2, $bits); + $si = -$si - 2 ** $bits; $bin = base_convert($si, 10, 2); - $bin_length = strlen($bin); + $bin_length = \strlen($bin); if ($bin_length > $bits) { $bin = str_repeat('1', $bits - $bin_length).$bin; } @@ -147,7 +147,7 @@ protected function readSubBlock($block) // remove terminatorByte cause it's always the same $block = substr($block, 0, -8); - $length = strlen($block); + $length = \strlen($block); $offset = 0; $data = []; while ($offset < $length) { @@ -157,7 +157,7 @@ protected function readSubBlock($block) $offset += $blockLength * 2; } - if (3 == count($data)) { + if (3 == \count($data)) { $data[] = $data[2]; $data[2] = ''; } @@ -364,7 +364,7 @@ protected function getCorrectTimestamp($time) $binary = $this->si2bin($time, 64); // create 64 bit binary string $timestamp = ''; for ($i = 0; $i < 8; ++$i) { - $timestamp .= chr(bindec(substr($binary, -(($i + 1) * 8), 8))); + $timestamp .= \chr(bindec(substr($binary, -(($i + 1) * 8), 8))); } return $timestamp; @@ -385,7 +385,7 @@ protected function createLMv2Password($password, $username, $domain, $challenge, { $lmPass = '00'; // by default 00 // if $password > 15 than we can't use this method - if (strlen($password) <= 15) { + if (\strlen($password) <= 15) { $ntlmHash = $this->md4Encrypt($password); $ntml2Hash = $this->md5Encrypt($ntlmHash, $this->convertTo16bit(strtoupper($username).$domain)); @@ -426,13 +426,13 @@ protected function createNTLMv2Hash($password, $username, $domain, $challenge, $ protected function createDesKey($key) { $material = [bin2hex($key[0])]; - $len = strlen($key); + $len = \strlen($key); for ($i = 1; $i < $len; ++$i) { list($high, $low) = str_split(bin2hex($key[$i])); - $v = $this->castToByte(ord($key[$i - 1]) << (7 + 1 - $i) | $this->uRShift(hexdec(dechex(hexdec($high) & 0xf).dechex(hexdec($low) & 0xf)), $i)); + $v = $this->castToByte(\ord($key[$i - 1]) << (7 + 1 - $i) | $this->uRShift(hexdec(dechex(hexdec($high) & 0xf).dechex(hexdec($low) & 0xf)), $i)); $material[] = str_pad(substr(dechex($v), -2), 2, '0', STR_PAD_LEFT); // cast to byte } - $material[] = str_pad(substr(dechex($this->castToByte(ord($key[6]) << 1)), -2), 2, '0'); + $material[] = str_pad(substr(dechex($this->castToByte(\ord($key[6]) << 1)), -2), 2, '0'); // odd parity foreach ($material as $k => $v) { @@ -465,7 +465,7 @@ protected function createDesKey($key) */ protected function createSecurityBuffer($value, $offset, $is16 = false) { - $length = strlen(bin2hex($value)); + $length = \strlen(bin2hex($value)); $length = $is16 ? $length / 2 : $length; $length = $this->createByte(str_pad(dechex($length), 2, '0', STR_PAD_LEFT), 2); @@ -563,7 +563,7 @@ protected function desEncrypt($value, $key) protected function md5Encrypt($key, $msg) { $blocksize = 64; - if (strlen($key) > $blocksize) { + if (\strlen($key) > $blocksize) { $key = pack('H*', md5($key)); } @@ -587,7 +587,7 @@ protected function md4Encrypt($input) { $input = $this->convertTo16bit($input); - return function_exists('hash') ? hex2bin(hash('md4', $input)) : mhash(MHASH_MD4, $input); + return \function_exists('hash') ? hex2bin(hash('md4', $input)) : mhash(MHASH_MD4, $input); } /** diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/PlainAuthenticator.php b/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/PlainAuthenticator.php index 1ff961cc3..41d0a50a8 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/PlainAuthenticator.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/PlainAuthenticator.php @@ -31,7 +31,7 @@ public function getAuthKeyword() public function authenticate(Swift_Transport_SmtpAgent $agent, $username, $password) { try { - $message = base64_encode($username.chr(0).$username.chr(0).$password); + $message = base64_encode($username.\chr(0).$username.\chr(0).$password); $agent->executeCommand(sprintf("AUTH PLAIN %s\r\n", $message), [235]); return true; diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php b/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php index 37334208a..dd559132b 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php @@ -171,7 +171,7 @@ public function afterEhlo(Swift_Transport_SmtpAgent $agent) $count = 0; $errors = []; foreach ($this->getAuthenticatorsForAgent() as $authenticator) { - if (in_array(strtolower($authenticator->getAuthKeyword()), array_map('strtolower', $this->esmtpParams))) { + if (\in_array(strtolower($authenticator->getAuthKeyword()), array_map('strtolower', $this->esmtpParams))) { ++$count; try { if ($authenticator->authenticate($agent, $this->username, $this->password)) { diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Authenticator.php b/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Authenticator.php index cadfdc651..f692a6fe4 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Authenticator.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Authenticator.php @@ -25,9 +25,8 @@ public function getAuthKeyword(); /** * Try to authenticate the user with $username and $password. * - * @param Swift_Transport_SmtpAgent $agent - * @param string $username - * @param string $password + * @param string $username + * @param string $password * * @return bool true if authentication worked (returning false is deprecated, throw a Swift_TransportException instead) * diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php b/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php index d1f1c2cf7..bce0cdd42 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php @@ -235,7 +235,7 @@ public function setPipelining($enabled) * Returns whether SMTP pipelining is enabled. * * @return bool|null a boolean if pipelining is explicitly enabled or disabled, - * or null if support is auto-detected. + * or null if support is auto-detected */ public function getPipelining() { @@ -284,7 +284,7 @@ public function getExtensionHandlers() * @param int[] $codes * @param string[] $failures An array of failures by-reference * @param bool $pipeline Do not wait for response - * @param string $address The address, if command is RCPT TO. + * @param string $address the address, if command is RCPT TO * * @return string|null The server response, or null if pipelining is enabled */ @@ -309,10 +309,10 @@ public function executeCommand($command, $codes = [], &$failures = null, $pipeli public function __call($method, $args) { foreach ($this->handlers as $handler) { - if (in_array(strtolower($method), + if (\in_array(strtolower($method), array_map('strtolower', (array) $handler->exposeMixinMethods()) )) { - $return = call_user_func_array([$handler, $method], $args); + $return = \call_user_func_array([$handler, $method], $args); // Allow fluid method calls if (null === $return && 'set' == substr($method, 0, 3)) { return $this; @@ -425,7 +425,7 @@ private function getCapabilities($ehloResponse) private function setHandlerParams() { foreach ($this->handlers as $keyword => $handler) { - if (array_key_exists($keyword, $this->capabilities)) { + if (\array_key_exists($keyword, $this->capabilities)) { $handler->setKeywordParams($this->capabilities[$keyword]); } } @@ -436,7 +436,7 @@ private function getActiveHandlers() { $handlers = []; foreach ($this->handlers as $keyword => $handler) { - if (array_key_exists($keyword, $this->capabilities)) { + if (\array_key_exists($keyword, $this->capabilities)) { $handlers[] = $handler; } } diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Transport/FailoverTransport.php b/swiftmailer/swiftmailer/lib/classes/Swift/Transport/FailoverTransport.php index 21bce4b60..1a4b4754f 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Transport/FailoverTransport.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Transport/FailoverTransport.php @@ -33,7 +33,7 @@ public function __construct() */ public function ping() { - $maxTransports = count($this->transports); + $maxTransports = \count($this->transports); for ($i = 0; $i < $maxTransports && $transport = $this->getNextTransport(); ++$i) { if ($transport->ping()) { @@ -43,7 +43,7 @@ public function ping() } } - return count($this->transports) > 0; + return \count($this->transports) > 0; } /** @@ -58,7 +58,7 @@ public function ping() */ public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null) { - $maxTransports = count($this->transports); + $maxTransports = \count($this->transports); $sent = 0; $this->lastUsedTransport = null; @@ -79,10 +79,8 @@ public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = nul } } - if (0 == count($this->transports)) { - throw new Swift_TransportException( - 'All Transports in FailoverTransport failed, or no Transports available' - ); + if (0 == \count($this->transports)) { + throw new Swift_TransportException('All Transports in FailoverTransport failed, or no Transports available'); } return $sent; diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Transport/IoBuffer.php b/swiftmailer/swiftmailer/lib/classes/Swift/Transport/IoBuffer.php index af97adf1f..50f1e5e40 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Transport/IoBuffer.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Transport/IoBuffer.php @@ -25,8 +25,6 @@ interface Swift_Transport_IoBuffer extends Swift_InputByteStream, Swift_OutputBy * Perform any initialization needed, using the given $params. * * Parameters will vary depending upon the type of IoBuffer used. - * - * @param array $params */ public function initialize(array $params); diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Transport/LoadBalancedTransport.php b/swiftmailer/swiftmailer/lib/classes/Swift/Transport/LoadBalancedTransport.php index a12ce8d2d..0b5ba9d30 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Transport/LoadBalancedTransport.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Transport/LoadBalancedTransport.php @@ -79,7 +79,7 @@ public function getLastUsedTransport() */ public function isStarted() { - return count($this->transports) > 0; + return \count($this->transports) > 0; } /** @@ -111,7 +111,7 @@ public function ping() } } - return count($this->transports) > 0; + return \count($this->transports) > 0; } /** @@ -126,7 +126,7 @@ public function ping() */ public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null) { - $maxTransports = count($this->transports); + $maxTransports = \count($this->transports); $sent = 0; $this->lastUsedTransport = null; @@ -145,10 +145,8 @@ public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = nul } } - if (0 == count($this->transports)) { - throw new Swift_TransportException( - 'All Transports in LoadBalancedTransport failed, or no Transports available' - ); + if (0 == \count($this->transports)) { + throw new Swift_TransportException('All Transports in LoadBalancedTransport failed, or no Transports available'); } return $sent; diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Transport/NullTransport.php b/swiftmailer/swiftmailer/lib/classes/Swift/Transport/NullTransport.php index 5934ca93b..7d910db5a 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Transport/NullTransport.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Transport/NullTransport.php @@ -80,9 +80,9 @@ public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = nul } $count = ( - count((array) $message->getTo()) - + count((array) $message->getCc()) - + count((array) $message->getBcc()) + \count((array) $message->getTo()) + + \count((array) $message->getCc()) + + \count((array) $message->getBcc()) ); return $count; diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SendmailTransport.php b/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SendmailTransport.php index 7f0476ada..72ddae845 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SendmailTransport.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SendmailTransport.php @@ -122,9 +122,9 @@ public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = nul $buffer->setWriteTranslations(["\r\n" => "\n"]); } - $count = count((array) $message->getTo()) - + count((array) $message->getCc()) - + count((array) $message->getBcc()) + $count = \count((array) $message->getTo()) + + \count((array) $message->getCc()) + + \count((array) $message->getBcc()) ; $message->toByteStream($buffer); $buffer->flushBuffers(); diff --git a/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php b/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php index 5f7b8ac9e..70782ada0 100644 --- a/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php +++ b/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php @@ -160,14 +160,10 @@ public function readLine($sequence) { if (isset($this->out) && !feof($this->out)) { $line = fgets($this->out); - if (0 == strlen($line)) { + if (0 == \strlen($line)) { $metas = stream_get_meta_data($this->out); if ($metas['timed_out']) { - throw new Swift_IoException( - 'Connection to '. - $this->getReadConnectionDescription(). - ' Timed Out' - ); + throw new Swift_IoException('Connection to '.$this->getReadConnectionDescription().' Timed Out'); } } @@ -192,14 +188,10 @@ public function read($length) { if (isset($this->out) && !feof($this->out)) { $ret = fread($this->out, $length); - if (0 == strlen($ret)) { + if (0 == \strlen($ret)) { $metas = stream_get_meta_data($this->out); if ($metas['timed_out']) { - throw new Swift_IoException( - 'Connection to '. - $this->getReadConnectionDescription(). - ' Timed Out' - ); + throw new Swift_IoException('Connection to '.$this->getReadConnectionDescription().' Timed Out'); } } @@ -224,7 +216,7 @@ protected function flush() protected function doCommit($bytes) { if (isset($this->in)) { - $bytesToWrite = strlen($bytes); + $bytesToWrite = \strlen($bytes); $totalBytesWritten = 0; while ($totalBytesWritten < $bytesToWrite) { @@ -299,9 +291,7 @@ private function establishProcessConnection() $this->stream = proc_open($command, $descriptorSpec, $pipes); stream_set_blocking($pipes[2], 0); if ($err = stream_get_contents($pipes[2])) { - throw new Swift_TransportException( - 'Process could not be started ['.$err.']' - ); + throw new Swift_TransportException('Process could not be started ['.$err.']'); } $this->in = &$pipes[0]; $this->out = &$pipes[1]; diff --git a/swiftmailer/swiftmailer/lib/swiftmailer_generate_mimes_config.php b/swiftmailer/swiftmailer/lib/swiftmailer_generate_mimes_config.php index 3b940b7f1..c9e19d320 100644 --- a/swiftmailer/swiftmailer/lib/swiftmailer_generate_mimes_config.php +++ b/swiftmailer/swiftmailer/lib/swiftmailer_generate_mimes_config.php @@ -1,8 +1,8 @@ #!/usr/bin/php '{$mime_type}'"; @@ -156,7 +156,7 @@ function generateUpToDateMimeArray() $extension = strtolower(trim($node->glob['ddpattern'][0], '*.')); // skip none glob extensions and check if string length between 1 and 10 - if (false !== strpos($extension, '.') || strlen($extension) < 1 || strlen($extension) > 9) { + if (false !== strpos($extension, '.') || \strlen($extension) < 1 || \strlen($extension) > 9) { continue; }