Esempio n. 1
0
 /**
  * @return bool
  */
 protected function getResult()
 {
     if ($this->account[0] != 0) {
         return $this->validator->isValid($this->account);
     }
     $set = (int) substr($this->account, 0, 3);
     return $set >= 1 && $set <= 9;
 }
Esempio n. 2
0
 /**
  * @param string $account
  * @return bool
  */
 public function isValid($account)
 {
     if (parent::isValid($account)) {
         return true;
     }
     $account = ltrim($account, '0') . '00';
     return strlen($account) <= $this->normalizedSize && parent::isValid($account);
 }
Esempio n. 3
0
 public function isValid($account)
 {
     // 8-stellige Kontonummern sind nicht prüfbar
     $trimedAccount = ltrim($account, "0");
     if (strlen($trimedAccount) === 8) {
         return true;
     }
     return parent::isValid($account);
 }
Esempio n. 4
0
 protected function validate()
 {
     if (in_array($this->account[0], [6, 7, 8, 9])) {
         $this->result = false;
         return;
     }
     $validator = new Validator00($this->bank);
     $validator->doNormalization = false;
     $prefixedAccount = self::$prefixes[$this->account[0]] . substr($this->account, 1);
     $this->result = $validator->isValid($prefixedAccount);
 }
Esempio n. 5
0
 public function isValid($account)
 {
     $this->checkType($account);
     $account = ltrim($account, '0');
     $length = strlen($account);
     if ($length < 6 || $length > 9) {
         return false;
     }
     if ($length == 9) {
         if ($account[0] == 9) {
             $account = substr($account, 1, 6);
         } else {
             $account = substr($account, 0, 6);
         }
     }
     return parent::isValid($account);
 }
Esempio n. 6
0
 /**
  * @return bool
  */
 protected function getResult()
 {
     return in_array($this->account[0], array_keys(self::$transformation)) ? $this->validator->isValid($this->transformedAccount) : false;
 }
Esempio n. 7
0
 /**
  * @return bool
  */
 protected function getResult()
 {
     return $this->account[0] != 0 && $this->validator->isValid($this->transformedAccount);
 }
Esempio n. 8
0
 /**
  * @return bool
  */
 protected function getResult()
 {
     return !is_null($this->validator) && $this->validator->isValid($this->account);
 }
Esempio n. 9
0
 /**
  * @return bool
  */
 protected function getResult()
 {
     return array_key_exists($this->getTransformationIndex(), self::$transformation) && $this->validator->isValid($this->transformedAccount);
 }
Esempio n. 10
0
 public function isValid($account)
 {
     return strlen($account) >= 2 && parent::isValid($account);
 }
Esempio n. 11
0
 /**
  * @param string $account
  * @return bool
  */
 public function isValid($account)
 {
     return (int) $account <= 999999999 ? $this->validator00->isValid($account) : parent::isValid($account);
 }