install/project/includes/codegen/QCodeGen.class.php
Avoid too many return
statements within this method. Open
Open
return parent::Pluralize($strName);
Avoid unused parameters such as '$objSettingsXml'. Open
Open
public function __construct($objSettingsXml) {
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
The method Pluralize is not named in camelCase. Open
Open
protected function Pluralize($strName) {
// Special Rules go Here
switch (true) {
case ($strName == 'person'):
return 'people';
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}