PHPCS: Fix lowerCamel format errors
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3568119. --> Reported by: [lostcarpark](https://www.drupal.org/user/346773) Related to !21 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>This is one of a series of PHPCS fixes, and is only targeting errors of the specified type.</p> <p>This issue is to fix the following PHPCS <code>Drupal.NamingConventions.ValidFunctionName</code> errors:</p> <pre>FILE: /var/www/html/web/modules/custom/conreg/src/SimpleConregAdminMemberEmail.php<br>---------------------------------------------------------------------------------------------------------------------------------------------<br>FOUND 1 ERROR AFFECTING 1 LINE<br>---------------------------------------------------------------------------------------------------------------------------------------------<br> 16 | ERROR | Public method name "SimpleConregAdminMemberEmail::getFormID" is not in lowerCamel format<br>&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | (Drupal.NamingConventions.ValidFunctionName.ScopeNotCamelCaps)<br>---------------------------------------------------------------------------------------------------------------------------------------------<br><br><br>FILE: /var/www/html/web/modules/custom/conreg/src/SimpleConregAdminMailoutEmails.php<br>---------------------------------------------------------------------------------------------------------------------------------------------<br>FOUND 1 ERROR AFFECTING 1 LINE<br>---------------------------------------------------------------------------------------------------------------------------------------------<br> 20 | ERROR | Public method name "SimpleConregAdminMailoutEmails::getFormID" is not in lowerCamel format<br>&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | (Drupal.NamingConventions.ValidFunctionName.ScopeNotCamelCaps)<br>---------------------------------------------------------------------------------------------------------------------------------------------<br><br><br>FILE: /var/www/html/web/modules/custom/conreg/conreg_planz/src/PlanZ.php<br>---------------------------------------------------------------------------------------------------------------------------------------------<br>FOUND 1 ERROR AFFECTING 1 LINE<br>---------------------------------------------------------------------------------------------------------------------------------------------<br> 146 | ERROR | Public method name "PlanZ::getPlanZConnection" is not in lowerCamel format<br>&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | (Drupal.NamingConventions.ValidFunctionName.ScopeNotCamelCaps)<br>---------------------------------------------------------------------------------------------------------------------------------------------<br><br>Time: 573ms; Memory: 14MB<br><br><br>PHP CODE SNIFFER REPORT SUMMARY<br>---------------------------------------------------------------------------------------------------<br>FILE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ERRORS&nbsp; WARNINGS<br>---------------------------------------------------------------------------------------------------<br>/var/www/html/web/modules/custom/conreg/conreg_planz/src/PlanZ.php&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br>/var/www/html/web/modules/custom/conreg/src/SimpleConregAdminMailoutEmails.php&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br>/var/www/html/web/modules/custom/conreg/src/SimpleConregAdminMemberEmail.php&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br>---------------------------------------------------------------------------------------------------<br>A TOTAL OF 3 ERRORS AND 0 WARNINGS WERE FOUND IN 3 FILES<br>---------------------------------------------------------------------------------------------------</pre><h4 id="summary-steps-reproduce">Steps to reproduce</h4> <p>Run <code>ddev phpcs --sniffs=Drupal.NamingConventions.ValidFunctionName</code></p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Two of the errors are with functions "getFormID", which should be "getFormId". </p> <p>The third is with a function "getPlanZConnection". As it is part of the PlanZ object, including PlanZ in the name is redundant, so the function could be renamed "getConnection".</p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <p>Fix them.</p> <h3 id="summary-ui-changes">User interface changes</h3> <p>None.</p> <h3 id="summary-api-changes">API changes</h3> <p>None.</p> <h3 id="summary-data-model-changes">Data model changes</h3> <p>None.</p>
issue