Skip to content

Commit

Permalink
Merge pull request #55 from r-martins/patch-2
Browse files Browse the repository at this point in the history
Solves:
Deprecated Functionality: Array and string offset access syntax with curly braces is deprecated
  • Loading branch information
eduardoddias authored Oct 23, 2020
2 parents b9850d1 + 9a7eea6 commit aec5db0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ function validateCPF($cpf) {
// Faz o calculo para validar o CPF
for ($t = 9; $t < 11; $t++) {
for ($d = 0, $c = 0; $c < $t; $c++) {
$d += $cpf{$c} * (($t + 1) - $c);
$d += $cpf[$c] * (($t + 1) - $c);
}
$d = ((10 * $d) % 11) % 10;
if ($cpf{$c} != $d) {
if ($cpf[$c] != $d) {
return false;
}
}
Expand Down Expand Up @@ -149,4 +149,4 @@ public function getRegionId($state){
}

}
}
}

0 comments on commit aec5db0

Please sign in to comment.