From b0eb1284b8929623f6dd47f9e8cccb3a6626fa92 Mon Sep 17 00:00:00 2001 From: Augusto Pascutti Date: Fri, 11 Jul 2014 00:42:24 -0300 Subject: [PATCH 1/2] Add scrutinizer badges to README. Also removes the unstable build badge, which is kind of redundant since we will always respect the pattern of keeping the `master` branch stable enough to be used. Two Scrutinizer badges were added: code coverage and code quality. Travis changed to report code coverage to Scrutinizer. --- .scrutinizer.yml | 11 +++++++++++ .travis.yml | 1 + README.md | 13 +++++++++---- 3 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 .scrutinizer.yml diff --git a/.scrutinizer.yml b/.scrutinizer.yml new file mode 100644 index 000000000..807ccb36a --- /dev/null +++ b/.scrutinizer.yml @@ -0,0 +1,11 @@ +filter: + paths: [library/*] +tools: + external_code_coverage: + runs: 4 + php_cpd: + excluded_dirs: [vendor] + php_pdepend: + excluded_dirs: [vendor] + sensiolabs_security_checker: true + php_changetracking: true diff --git a/.travis.yml b/.travis.yml index 05f17008e..21322db68 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,6 +17,7 @@ before_script: script: - make testdox + - make scrutinizer-coverage matrix: allow_failures: diff --git a/README.md b/README.md index 45b67aa6d..3246686b8 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,12 @@ Respect\Validation ================== -[![Build Status](https://secure.travis-ci.org/Respect/Validation.png)](http://travis-ci.org/Respect/Validation) [![Latest Stable Version](https://poser.pugx.org/respect/validation/v/stable.png)](https://packagist.org/packages/respect/validation) [![Total Downloads](https://poser.pugx.org/respect/validation/downloads.png)](https://packagist.org/packages/respect/validation) [![Latest Unstable Version](https://poser.pugx.org/respect/validation/v/unstable.png)](https://packagist.org/packages/respect/validation) [![License](https://poser.pugx.org/respect/validation/license.png)](https://packagist.org/packages/respect/validation) +[![Build Status](https://secure.travis-ci.org/Respect/Validation.png)](http://travis-ci.org/Respect/Validation) +[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/Respect/Validation/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/Respect/Validation/?branch=master) +[![Code Coverage](https://scrutinizer-ci.com/g/Respect/Validation/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/Respect/Validation/?branch=master) +[![Latest Stable Version](https://poser.pugx.org/respect/validation/v/stable.png)](https://packagist.org/packages/respect/validation) +[![Total Downloads](https://poser.pugx.org/respect/validation/downloads.png)](https://packagist.org/packages/respect/validation) +[![License](https://poser.pugx.org/respect/validation/license.png)](https://packagist.org/packages/respect/validation) [The most awesome validation engine ever created for PHP.](http://bit.ly/1a1oeQv) @@ -1538,8 +1543,8 @@ v::perfectSquare()->validate(9); //true (3*3) ``` #### v::phone() -Validates a valid 7, 10, 11 digit phone number (North America, Europe and most -Asian and Middle East countries), supporting country and area codes (in dot, +Validates a valid 7, 10, 11 digit phone number (North America, Europe and most +Asian and Middle East countries), supporting country and area codes (in dot, space or dashed notations) such as: (555)555-5555 @@ -1549,7 +1554,7 @@ space or dashed notations) such as: +33(1)22 22 22 22 +33(020)7777 7777 03-6106666 - + #### v::positive() Validates if a number is higher than zero From 5043a430174634a78952c18184954e1297cb7a5b Mon Sep 17 00:00:00 2001 From: Augusto Pascutti Date: Fri, 11 Jul 2014 01:58:51 -0300 Subject: [PATCH 2/2] Removes new line from beggining of file. Since this is considered output by PHP and could harm the output buffer for requests that will send headers after this. Nasty bug. --- library/Respect/Validation/Exceptions/SymbolicLinkException.php | 1 - 1 file changed, 1 deletion(-) diff --git a/library/Respect/Validation/Exceptions/SymbolicLinkException.php b/library/Respect/Validation/Exceptions/SymbolicLinkException.php index f652ad872..41eacbb37 100644 --- a/library/Respect/Validation/Exceptions/SymbolicLinkException.php +++ b/library/Respect/Validation/Exceptions/SymbolicLinkException.php @@ -1,4 +1,3 @@ -