Example #1
0
 protected function getResult()
 {
     for ($result = $this->accumulator; $result >= 10; $result = Math::crossSum($result)) {
     }
     $result = 10 - $result;
     return (string) $result === $this->getCheckNumber();
 }
Example #2
0
 public function isValid($account)
 {
     return parent::isValid($account) || Math::isBetween($account, 396000000, 499999999);
 }
Example #3
0
 /**
  * @formatter:on
  */
 protected function iterationStep()
 {
     $this->accumulator += Math::crossSum($this->number * $this->getWeight());
 }
Example #4
0
 protected function getResult()
 {
     return Math::isBetween($this->account, 1000000, 5999999) || Math::isBetween($this->account, 700000000, 899999999) ? parent::getResult() : true;
 }
Example #5
0
 protected function getResult()
 {
     return $this->accumulator % $this->modulo === 1 ? $this->getChecknumber() === $this->account[Math::getNormalizedPosition($this->account, $this->checknumberPosition) - 1] : parent::getResult();
 }