diff --git a/BigInteger/Adapter/Bcmath.php b/BigInteger/Adapter/Bcmath.php index 65c2fcf..62b6869 100644 --- a/BigInteger/Adapter/Bcmath.php +++ b/BigInteger/Adapter/Bcmath.php @@ -212,7 +212,7 @@ public function comp($leftOperand, $rightOperand) public function intToBin($operand, $twoc = false) { $nb = chr(0); - $isNegative = (strpos($operand, '-') === 0) ? true : false; + $isNegative = (strpos($operand, '-') === 0); $operand = ltrim($operand, '+-0'); if (empty($operand)) { diff --git a/BigInteger/Adapter/Gmp.php b/BigInteger/Adapter/Gmp.php index 8084965..e29dc9c 100644 --- a/BigInteger/Adapter/Gmp.php +++ b/BigInteger/Adapter/Gmp.php @@ -203,7 +203,7 @@ public function comp($leftOperand, $rightOperand) public function intToBin($int, $twoc = false) { $nb = chr(0); - $isNegative = (strpos($int, '-') === 0) ? true : false; + $isNegative = (strpos($int, '-') === 0); $int = ltrim($int, '+-0'); if (empty($int)) { diff --git a/Rand.php b/Rand.php index 0ab500f..7a2095c 100644 --- a/Rand.php +++ b/Rand.php @@ -54,7 +54,7 @@ public static function getBytes($length, $strong = false) $checkAlternatives = (file_exists('/dev/urandom') && is_readable('/dev/urandom')) || class_exists('\\COM', false); if (true === $strong && false === $checkAlternatives) { - throw new Exception\RuntimeException ( + throw new Exception\RuntimeException( 'This PHP environment doesn\'t support secure random number generation. ' . 'Please consider installing the OpenSSL and/or Mcrypt extensions' ); diff --git a/composer.json b/composer.json index d818427..86343dc 100644 --- a/composer.json +++ b/composer.json @@ -8,11 +8,10 @@ ], "homepage": "https://github.com/zendframework/zf2", "autoload": { - "psr-0": { + "psr-4": { "Zend\\Math\\": "" } }, - "target-dir": "Zend/Math", "require": { "php": ">=5.3.23" },