Commit Graph

21 Commits

Author SHA1 Message Date
Bastien Wermeille 4898bc2528 Fix psalm type check 2022-12-18 23:38:43 +01:00
Bastien Wermeille 4665415250 Fix psalm type issues info 2022-12-18 23:33:57 +01:00
Bastien Wermeille 3d25492123 Fix Tests + Psalm issues 2022-12-15 00:04:10 +01:00
Bastien Wermeille d80748070a Apply feedbacks 2022-12-14 20:29:41 +01:00
Bastien Wermeille 86933da4bb Migrate to doctrine/lexer v2.0 2022-12-14 14:12:31 +01:00
Mathias Reker ⚡️ 413b263617 Nullable type declaration for default null value (#328)
Adds ? before type declarations for parameters with a default null value
2022-07-13 16:53:11 +02:00
Mathias Reker ⚡️ 18b9e5b572 Visibility required (#329)
Visibility MUST be declared on all properties and methods; abstract and final MUST be declared before the visibility; static MUST be declared after the visibility.
2022-07-13 16:52:42 +02:00
Mathias Reker ⚡️ 1ca313dfcd Single blank line at eof (#330)
A PHP file without end tag must always end with a single empty line feed.
2022-07-13 16:51:51 +02:00
Mathias Reker ⚡️ b241b54919 No unused imports (#332)
Unused use statements must be removed.
2022-07-13 16:50:27 +02:00
Eduardo Gulias Davis a5ed8d58ed Bug #321 (#323)
* Update dependencies

* dns_get_record wrapper for testing of the function's behaviour

* remove unused classes

* Fix Psalm errors

* Increase PHP Version
2022-05-29 00:19:18 +02:00
Julien Gidel 007bfd424e Small contribution - code readability improvements (#306)
* Some code improvements - tests same as beginning

* isUTF8Invalid returns a boolean

* Changes for tests passed

* Revert change + scrutinizer to flaky

* Null coalescing on token to return a null token

* Psalm pass and PHPunit too (php 7.4)

* Minor change to set lookahead to nullToken
2021-11-20 22:34:12 +01:00
Alies Lapatsin 451b438902 Use a safe way to execute dns_get_record (v3) (#286)
* #256 Bypass a PHP warning generated by @dns_get_record

The idea is to create a custom error handler for dns_get_record(), call dns_get_record and then restore the original error handler.
This way we can catch PHP warnings (e.g. "Warning: dns_get_record(): DNS Query failed" or "dns_get_record(): A temporary server error occurred." [ErrorException])

* #256 Make `UnableToGetDNSRecord` reason more testable

* #256 Suppress psalm’s false-positive error

see https://github.com/vimeo/psalm/issues/5134#issuecomment-782937791

* #256 Speed up tests: start from previously failed

* #256 Suppress psalm’s false-positive error

We don’t have a control over AbstractLexer and can’t specify array shape in this parent class
2021-02-28 15:27:57 +01:00
Eduardo Gulias Davis 790881fe75 improving types 2020-12-05 23:16:56 +01:00
Eduardo Gulias Davis 729ecb2a35 Psalm fixes 2020-11-08 16:19:44 +01:00
Eduardo Gulias Davis 49b18fbcfc Remove deprecation, comes from #257 2020-09-19 16:37:33 +02:00
Eduardo Gulias Davis 044b1d55d9 Return type in signature 2020-09-12 16:41:06 +02:00
Eduardo Gulias Davis bf39b372c1 update DNS validation 2020-09-12 15:43:58 +02:00
Eduardo Gulias Davis 3647ed6037 Fix #260 reporting an unhandled exception 2020-09-06 15:17:48 +02:00
Eduardo Gulias Davis e2e234c4d8 merging from master, folder structure change 2020-08-30 15:59:42 +02:00
BenHarris 840d5603eb Reimplement DNSCheckValidation (#250)
* Reimplement DNSCheckValidation to utilise get_dns_record and extend support for detection of Null MX records (RFC7505) and reserved, mDNS and private namespaces (RFC2606 & RFC6762)

* Change valid email tests to use github.com instead of example.com as example.com now (correctly) fails the tests due to the Null MX case

* Tweak to pass CI psalm issue

* Encapsulate dns check code. Simplify local and reserved domain checks. Switch test domain

* Set PHPDoc return type

* Use strict comparisons
2020-08-08 23:28:19 +02:00
Simon Schaufelberger cfa3d44471 Move files in typical src and tests folder (#242)
* Move files in typical src and tests folder

* Fix psalm error
2020-06-16 22:11:17 +02:00