mysqli functions detected as mysql functions and reported as errors

A file with the following content:

<?php
$x = mysqli_connect($dbhost, $dbuser, $dbpassword,$dbname);
$y = mysql_connect($dbhost, $dbuser, $dbpassword,$dbname);

Returns the following errors:

FOUND 2 ERROR(S) AFFECTING 2 LINE(S)
-----------------------------------------------------------------------------

 2 | ERROR | Extension 'mysql' is removed since PHP 5.0 - use mysqli instead.
 3 | ERROR | Extension 'mysql' is removed since PHP 5.0 - use mysqli instead.
-----------------------------------------------------------------------------

If I change line 186 of Sniffs/PHP/RemovedExtensionsSniff.php from:

To:

It correctly returns:

FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
-----------------------------------------------------------------------------

 3 | ERROR | Extension 'mysql_' is removed since PHP 5.0 - use mysqli instead.
-----------------------------------------------------------------------------

I am not sure if this is the best way to fix this issue; but it appears to solve my issue.