Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:zendframework/zf2
Browse files Browse the repository at this point in the history
  • Loading branch information
Show file tree
Hide file tree
Showing 156 changed files with 342 additions and 316 deletions.
6 changes: 3 additions & 3 deletions src/AbstractValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Validator
*/
Expand Down Expand Up @@ -171,7 +171,7 @@ public function getMessages()
* Invoke as command
*
* @param mixed $value
* @return boolean
* @return bool
*/
public function __invoke($value)
{
Expand Down Expand Up @@ -499,7 +499,7 @@ public static function getDefaultTranslator()
/**
* Is there a default translation object set?
*
* @return boolean
* @return bool
*/
public static function hasDefaultTranslator()
{
Expand Down
8 changes: 4 additions & 4 deletions src/Barcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Validator
*/
Expand Down Expand Up @@ -121,8 +121,8 @@ public function getChecksum()
/**
* Sets if checksum should be validated, if no value is given the actual setting is returned
*
* @param boolean $checksum
* @return boolean
* @param bool $checksum
* @return bool
*/
public function useChecksum($checksum = null)
{
Expand All @@ -135,7 +135,7 @@ public function useChecksum($checksum = null)
* Returns true if and only if $value contains a valid barcode
*
* @param string $value
* @return boolean
* @return bool
*/
public function isValid($value)
{
Expand Down
22 changes: 11 additions & 11 deletions src/Barcode/AbstractAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Validator
*/
Expand Down Expand Up @@ -31,7 +31,7 @@ abstract class AbstractAdapter implements AdapterInterface
* Checks the length of a barcode
*
* @param string $value The barcode to check for proper length
* @return boolean
* @return bool
*/
public function hasValidLength($value)
{
Expand Down Expand Up @@ -71,7 +71,7 @@ public function hasValidLength($value)
* Checks for allowed characters within the barcode
*
* @param string $value The barcode to check for allowed characters
* @return boolean
* @return bool
*/
public function hasValidCharacters($value)
{
Expand Down Expand Up @@ -102,7 +102,7 @@ public function hasValidCharacters($value)
* Validates the checksum
*
* @param string $value The barcode to check the checksum for
* @return boolean
* @return bool
*/
public function hasValidChecksum($value)
{
Expand Down Expand Up @@ -160,16 +160,16 @@ protected function setChecksum($checksum)
/**
* Sets the checksum validation, if no value is given, the actual setting is returned
*
* @param boolean $check
* @return AbstractAdapter|boolean
* @param bool $check
* @return AbstractAdapter|bool
*/
public function useChecksum($check = null)
{
if ($check === null) {
return $this->options['useChecksum'];
}

$this->options['useChecksum'] = (boolean) $check;
$this->options['useChecksum'] = (bool) $check;
return $this;
}

Expand Down Expand Up @@ -202,7 +202,7 @@ protected function setCharacters($characters)
* GTIN implementation factor 3
*
* @param string $value The barcode to validate
* @return boolean
* @return bool
*/
protected function gtin($value)
{
Expand Down Expand Up @@ -232,7 +232,7 @@ protected function gtin($value)
* IDENTCODE implementation factors 9 and 4
*
* @param string $value The barcode to validate
* @return boolean
* @return bool
*/
protected function identcode($value)
{
Expand Down Expand Up @@ -262,7 +262,7 @@ protected function identcode($value)
* CODE25 implementation factor 3
*
* @param string $value The barcode to validate
* @return boolean
* @return bool
*/
protected function code25($value)
{
Expand Down Expand Up @@ -292,7 +292,7 @@ protected function code25($value)
* POSTNET implementation
*
* @param string $value The barcode to validate
* @return boolean
* @return bool
*/
protected function postnet($value)
{
Expand Down
14 changes: 7 additions & 7 deletions src/Barcode/AdapterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Validator
*/
Expand All @@ -20,23 +20,23 @@ interface AdapterInterface
* Checks the length of a barcode
*
* @param string $value The barcode to check for proper length
* @return boolean
* @return bool
*/
public function hasValidLength($value);

/**
* Checks for allowed characters within the barcode
*
* @param string $value The barcode to check for allowed characters
* @return boolean
* @return bool
*/
public function hasValidCharacters($value);

/**
* Validates the checksum
*
* @param string $value The barcode to check the checksum for
* @return boolean
* @return bool
*/
public function hasValidChecksum($value);

Expand All @@ -57,15 +57,15 @@ public function getCharacters();
/**
* Returns if barcode uses a checksum
*
* @return boolean
* @return bool
*/
public function getChecksum();

/**
* Sets the checksum validation, if no value is given, the actual setting is returned
*
* @param boolean $check
* @return AbstractAdapter|boolean
* @param bool $check
* @return AbstractAdapter|bool
*/
public function useChecksum($check = null);
}
2 changes: 1 addition & 1 deletion src/Barcode/Codabar.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Validator
*/
Expand Down
10 changes: 5 additions & 5 deletions src/Barcode/Code128.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Validator
*/
Expand Down Expand Up @@ -76,7 +76,7 @@ public function __construct()
* Checks for allowed characters within the barcode
*
* @param string $value The barcode to check for allowed characters
* @return boolean
* @return bool
*/
public function hasValidCharacters($value)
{
Expand Down Expand Up @@ -164,7 +164,7 @@ public function hasValidCharacters($value)
* Validates the checksum ()
*
* @param string $value The barcode to validate
* @return boolean
* @return bool
*/
protected function code128($value)
{
Expand Down Expand Up @@ -406,8 +406,8 @@ protected function chr128($value, $set)
return -1;
}
} else {
if ($ord <= 106) {
return ($ord + 32);
if ($value <= 106) {
return ($value + 32);
} else {
return -1;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Barcode/Code25.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Validator
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Barcode/Code25interleaved.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Validator
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Barcode/Code39.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Validator
*/
Expand Down Expand Up @@ -44,7 +44,7 @@ public function __construct()
* Validates the checksum (Modulo 43)
*
* @param string $value The barcode to validate
* @return boolean
* @return bool
*/
protected function code39($value)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Barcode/Code39ext.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Validator
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Barcode/Code93.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Validator
*/
Expand Down Expand Up @@ -45,7 +45,7 @@ public function __construct()
* Validates the checksum (Modulo CK)
*
* @param string $value The barcode to validate
* @return boolean
* @return bool
*/
protected function code93($value)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Barcode/Code93ext.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Validator
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Barcode/Ean12.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Validator
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Barcode/Ean13.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Validator
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Barcode/Ean14.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Validator
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Barcode/Ean18.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Validator
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Barcode/Ean2.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Validator
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Barcode/Ean5.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Validator
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Barcode/Ean8.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Validator
*/
Expand All @@ -30,7 +30,7 @@ public function __construct()
* Overrides parent checkLength
*
* @param string $value Value
* @return boolean
* @return bool
*/
public function hasValidLength($value)
{
Expand Down
Loading

0 comments on commit 8f989d6

Please sign in to comment.