Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/upload-to-codacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,20 @@ jobs:
strategy:
fail-fast: true
name: upload-coverage

steps:
- name: Setup logs directory
run: mkdir -p build/coverage

- name: Download clover.xml artifact
uses: actions/download-artifact@v3
with:
name: clover.xml
path: build/coverage

- name: Upload Coverage to Codacy
shell: bash
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r build/logs/clover.xml

run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r build/coverage/clover.xml
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ This library aims to support RFCs:
* [Spoofchecking](/src/Validation/Extra/SpoofCheckValidation.php) and
[DNSCheckValidation](/src/Validation/DNSCheckValidation.php) validation
requires that your PHP system has the
[PHP Internationalization Libraries](https://php.net/manual/en/book.intl.php)
[PHP Internationalization Libraries](https://php.net/manual/en/book.intl.php)
(also known as PHP Intl)

**Note**: `PHP version upgrades will happen to accomodate to the pace of major
Expand Down Expand Up @@ -109,7 +109,6 @@ Validations not present in the RFCs
1. [SpoofCheckValidation](/src/Validation/Extra/SpoofCheckValidation.php):
Will check for multi-utf-8 chars that can signal an erroneous email name.


### How to extend

It's easy! You just need to implement
Expand All @@ -126,7 +125,8 @@ Is short and simple and will help a lot.
(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:
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 (v2 and earlier)
Expand Down
12 changes: 8 additions & 4 deletions src/Result/Result.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,26 @@ interface Result
{
/**
* Is validation result valid?
*
*/
public function isValid() : bool;
public function isValid(): bool;

/**
* Is validation result invalid?
* Usually the inverse of isValid()
*
*/
public function isInvalid() : bool;
public function isInvalid(): bool;

/**
* Short description of the result, human readable.
*
*/
public function description() : string;
public function description(): string;

/**
* Code for user land to act upon.
*
*/
public function code() : int;
public function code(): int;
}