Tests should use new array syntax.
All checks were successful
The build was successful.

This commit is contained in:
2019-03-21 17:33:40 +01:00
parent 075d2f0963
commit ab09ba6943
2 changed files with 4 additions and 4 deletions

View File

@@ -3,9 +3,9 @@ class Program {
private string num2Roman(int $num) {
int $n = intval($num);
string $result = '';
int[] $lookup = array('M' => 1000, 'CM' => 900, 'D' => 500, 'CD' => 400,
int[] $lookup = {'M' => 1000, 'CM' => 900, 'D' => 500, 'CD' => 400,
'C' => 100, 'XC' => 90, 'L' => 50, 'XL' => 40,
'X' => 10, 'IX' => 9, 'V' => 5, 'IV' => 4, 'I' => 1);
'X' => 10, 'IX' => 9, 'V' => 5, 'IV' => 4, 'I' => 1};
int $matches;
foreach($lookup as $roman => $value) {