Improvement of Exercise - Nucleotide Count

Hi,

I would like to suggest an improvement of the Nucleotide Count Exercise in PHP.

The description indicates, that an invalid string (containing other letters than AGCT) should give an error, but that’s currently not the case.

"GATTACA" -> 'A': 3, 'C': 1, 'G': 1, 'T': 2
"INVALID" -> error

I my opinion either the exercise description should be added, or the test cases.
If the testcase I would add an extra test like:

public function testDNASequenceWithInvalidChar(): void
    {
        $this->expectException(Exception::class);
        nucleotideCount('AGCTZ');
    }

This would then make the users ensure that invalid chars isn’t used like the description says.

I would be happy to provide the PR if the test case should be added.

Dear Tomas,

nearly all exercises in the PHP track are not in sync to the Exercism problem specifications. This is due to a lack of contributors, helping to keep the tests in sync with the test cases listed there:

The test case you request is already listed in the problem specification, and it would be very welcome if you could implement it. And sync the rest of the Nucleotide Count tests to the problem specification, too.

Thanks for your reply. I’ll see what I can do.

I have created the PR with the synchronized tests.

I have allowed myself to add an additional PR, with improvements to README.md