Skip to content

Commit

Permalink
Formatting doc blocks.
Browse files Browse the repository at this point in the history
Standardising version and packages throughout.
  • Loading branch information
predominant committed Dec 11, 2009
1 parent 91977a3 commit e3debd0
Show file tree
Hide file tree
Showing 38 changed files with 370 additions and 65 deletions.
12 changes: 10 additions & 2 deletions libs/au_validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,25 @@
* @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org
* @package localized
* @since localized 0.1
* @subpackage localized.tests.cases.libs
* @since Localized Plugin v 0.1
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

/**
* AuValidation
*
* @package localized
* @subpackage localized.tests.cases.libs
*/
class AuValidation {

/**
* Checks Postal Codes for Australia
*
* @param string $check The value to check.
* @access public
* @return boolean
* @access public
*/
function postal($check) {
$pattern = '/^[0-9]{4}$/i';
Expand Down
12 changes: 10 additions & 2 deletions libs/bd_validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,25 @@
* @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org
* @package localized
* @since localized 0.1
* @subpackage localized.tests.cases.libs
* @since Localized Plugin v 0.1
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

/**
* BdValidation
*
* @package localized
* @subpackage localized.tests.cases.libs
*/
class BdValidation {

/**
* Checks zipcodes for Bangladesh
*
* @param string $check The value to check.
* @access public
* @return boolean
* @access public
*/
function postal($check) {
$pattern = '/^\d{4}$/';
Expand Down
12 changes: 10 additions & 2 deletions libs/be_validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,25 @@
* @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org
* @package localized
* @since localized 0.1
* @subpackage localized.tests.cases.libs
* @since Localized Plugin v 0.1
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

/**
* BeValidation
*
* @package localized
* @subpackage localized.tests.cases.libs
*/
class BeValidation {

/**
* Checks zipcodes for Belgium
*
* @param string $check The value to check.
* @access public
* @return boolean
* @access public
*/
function postal($check) {
$pattern = '/^[1-9]{1}[0-9]{3}$/i';
Expand Down
16 changes: 12 additions & 4 deletions libs/br_validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,25 @@
* @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org
* @package localized
* @since localized 0.1
* @subpackage localized.tests.cases.libs
* @since Localized Plugin v 0.1
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

/**
* BrValidation
*
* @package localized
* @subpackage localized.tests.cases.libs
*/
class BrValidation {

/**
* Checks phone numbers for Brazil
*
* @param string $check The value to check.
* @access public
* @return boolean
* @access public
*/
function phone($check) {
return (bool)preg_match('/^(\+?\d{1,3}? ?)?(\(0?\d{2}\) ?)?\d{4}[-. ]?\d{4}$/', $check);
Expand All @@ -33,8 +41,8 @@ function phone($check) {
* Checks zipcodes (CEP) for Brazil
*
* @param string $check The value to check.
* @access public
* @return boolean
* @access public
*/
function postal($check) {
return (bool)preg_match('/^[0-9]{5}-?[0-9]{3}$/', $check);
Expand All @@ -44,8 +52,8 @@ function postal($check) {
* Checks cadastro de pessoa física (CPF) for Brazil
*
* @param string $check The value to check.
* @access public
* @return boolean
* @access public
*/
function ssn($check) {
$check = str_replace(array(' ', '-', '.'), '', $check);
Expand Down
12 changes: 10 additions & 2 deletions libs/ca_validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,25 @@
* @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org
* @package localized
* @since localized 0.1
* @subpackage localized.tests.cases.libs
* @since Localized Plugin v 0.1
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

/**
* CaValidation
*
* @package localized
* @subpackage localized.tests.cases.libs
*/
class CaValidation {

/**
* Checks zipcodes for Canada
*
* @param string $check The value to check.
* @access public
* @return boolean
* @access public
*/
function postal($check) {
$pattern = '/\\A\\b[ABCEGHJKLMNPRSTVXY][0-9][A-Z] [0-9][A-Z][0-9]\\b\\z/i';
Expand Down
12 changes: 10 additions & 2 deletions libs/cz_validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,25 @@
* @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org
* @package localized
* @since localized 0.1
* @subpackage localized.tests.cases.libs
* @since Localized Plugin v 0.1
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

/**
* CzValidation
*
* @package localized
* @subpackage localized.tests.cases.libs
*/
class CzValidation {

/**
* Checks zipcodes for Czech Republic
*
* @param string $check The value to check.
* @access public
* @return boolean
* @access public
*/
function postal($check) {
$pattern = '/^[1-7]\d{2} ?\d{2}$/i';
Expand Down
12 changes: 10 additions & 2 deletions libs/de_validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,25 @@
* @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org
* @package localized
* @since localized 0.1
* @subpackage localized.tests.cases.libs
* @since Localized Plugin v 0.1
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

/**
* DeValidation
*
* @package localized
* @subpackage localized.tests.cases.libs
*/
class DeValidation {

/**
* Checks zipcodes for Germany
*
* @param string $check The value to check.
* @access public
* @return boolean
* @access public
*/
function postal($check) {
$pattern = '/^[0-9]{5}$/i';
Expand Down
12 changes: 10 additions & 2 deletions libs/dk_validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,25 @@
* @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org
* @package localized
* @since localized 0.1
* @subpackage localized.tests.cases.libs
* @since Localized Plugin v 0.1
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

/**
* DkValidation
*
* @package localized
* @subpackage localized.tests.cases.libs
*/
class DkValidation {

/**
* Checks social security numbers for Denmark
*
* @param string $check The value to check.
* @access public
* @return boolean
* @access public
*/
function ssn($check) {
$pattern = '/\\A\\b[0-9]{6}-[0-9]{4}\\b\\z/i';
Expand Down
12 changes: 10 additions & 2 deletions libs/es_validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,25 @@
* @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org
* @package localized
* @since localized 0.1
* @subpackage localized.tests.cases.libs
* @since Localized Plugin v 0.1
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

/**
* EsValidation
*
* @package localized
* @subpackage localized.tests.cases.libs
*/
class EsValidation {

/**
* Checks phone numbers for Spain
*
* @param string $check The value to check.
* @access public
* @return boolean
* @access public
*/
function phone($check) {
$pattern = '/^\\+?(34[-. ]?)?\\(?(([689]{1})(([0-9]{2})\\)?[-. ]?|([0-9]{1})\\)?[-. ]?([0-9]{1}))|70\\)?[-. ]?([0-9]{1}))([0-9]{2})[-. ]?([0-9]{1})[-. ]?([0-9]{1})[-. ]?([0-9]{2})$/';
Expand Down
12 changes: 10 additions & 2 deletions libs/fr_validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,25 @@
* @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org
* @package localized
* @since localized 0.1
* @subpackage localized.tests.cases.libs
* @since Localized Plugin v 0.1
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

/**
* FrValidation
*
* @package localized
* @subpackage localized.tests.cases.libs
*/
class FrValidation {

/**
* Checks phone numbers for France
*
* @param string $check The value to check.
* @access public
* @return boolean
* @access public
*/
function phone($check) {
$pattern = '/^0[1-6]{1}(([0-9]{2}){4})|((\s[0-9]{2}){4})|((-[0-9]{2}){4})$/';
Expand Down
14 changes: 11 additions & 3 deletions libs/it_validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,25 @@
* @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org
* @package localized
* @since localized 0.1
* @subpackage localized.tests.cases.libs
* @since Localized Plugin v 0.1
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

/**
* ItValidation
*
* @package localized
* @subpackage localized.tests.cases.libs
*/
class ItValidation {

/**
* Checks phone numbers for Italy
*
* @param string $check The value to check.
* @access public
* @return boolean
* @access public
*/
function phone($check) {
$pattern = '/^([0-9]*\-?\ ?\/?[0-9]*)$/';
Expand All @@ -34,8 +42,8 @@ function phone($check) {
* Checks zipcodes for Italy
*
* @param string $check The value to check.
* @access public
* @return boolean
* @access public
*/
function postal($check) {
$pattern = '/^[0-9]{5}$/i';
Expand Down
12 changes: 10 additions & 2 deletions libs/jp_validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,25 @@
* @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org
* @package localized
* @since localized 0.1
* @subpackage localized.tests.cases.libs
* @since Localized Plugin v 0.1
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

/**
* JpValidation
*
* @package localized
* @subpackage localized.tests.cases.libs
*/
class JpValidation {

/**
* Checks zipcodes for Japan
*
* @param string $check The value to check.
* @access public
* @return boolean
* @access public
*/
function postal($check) {
$pattern = '/^[0-9]{3}-[0-9]{4}$/';
Expand Down
9 changes: 8 additions & 1 deletion libs/mx_validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,17 @@
* @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org
* @package localized
* @subpackage localized.libs
* @subpackage localized.tests.cases.libs
* @since Localized Plugin v 0.1
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

/**
* MxValidation
*
* @package localized
* @subpackage localized.tests.cases.libs
*/
class MxValidation {

/**
Expand Down
Loading

0 comments on commit e3debd0

Please sign in to comment.