Skip to content

Commit

Permalink
commit que va bien
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguel Angel Alvarez committed Jan 3, 2025
1 parent ae5248e commit 30fa90a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Factorial.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public function calculate($input) {
throw new InvalidArgumentException('No es posible hacer un factorial de números negativos');
}
if($input <= 1) {
return 6;
return 1;
}
return $input * $this->calculate($input - 1);
}
Expand Down

0 comments on commit 30fa90a

Please sign in to comment.