Laravel version update

Laravel version update
This commit is contained in:
Manish Verma
2018-08-06 18:48:58 +05:30
parent d143048413
commit 126fbb0255
13678 changed files with 1031482 additions and 778530 deletions

View File

@@ -52,7 +52,7 @@ class Barcode extends AbstractValidator
$options = [];
}
if (!is_array($options) && !($options instanceof Traversable)) {
if (! is_array($options) && ! ($options instanceof Traversable)) {
$options = ['adapter' => $options];
}
@@ -70,7 +70,7 @@ class Barcode extends AbstractValidator
*/
public function getAdapter()
{
if (!($this->options['adapter'] instanceof Barcode\AdapterInterface)) {
if (! ($this->options['adapter'] instanceof Barcode\AdapterInterface)) {
$this->setAdapter('Ean13');
}
@@ -91,14 +91,14 @@ class Barcode extends AbstractValidator
$adapter = ucfirst(strtolower($adapter));
$adapter = 'Zend\\Validator\\Barcode\\' . $adapter;
if (!class_exists($adapter)) {
if (! class_exists($adapter)) {
throw new Exception\InvalidArgumentException('Barcode adapter matching "' . $adapter . '" not found');
}
$adapter = new $adapter($options);
}
if (!$adapter instanceof Barcode\AdapterInterface) {
if (! $adapter instanceof Barcode\AdapterInterface) {
throw new Exception\InvalidArgumentException(
sprintf(
"Adapter %s does not implement Zend\\Validator\\Barcode\\AdapterInterface",
@@ -143,7 +143,7 @@ class Barcode extends AbstractValidator
*/
public function isValid($value)
{
if (!is_string($value)) {
if (! is_string($value)) {
$this->error(self::INVALID);
return false;
}
@@ -152,7 +152,7 @@ class Barcode extends AbstractValidator
$adapter = $this->getAdapter();
$this->options['length'] = $adapter->getLength();
$result = $adapter->hasValidLength($value);
if (!$result) {
if (! $result) {
if (is_array($this->options['length'])) {
$temp = $this->options['length'];
$this->options['length'] = "";
@@ -169,14 +169,14 @@ class Barcode extends AbstractValidator
}
$result = $adapter->hasValidCharacters($value);
if (!$result) {
if (! $result) {
$this->error(self::INVALID_CHARS);
return false;
}
if ($this->useChecksum(null)) {
$result = $adapter->hasValidChecksum($value);
if (!$result) {
if (! $result) {
$this->error(self::FAILED);
return false;
}