for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/* Source: https://github.com/moodle/moodle/blob/MOODLE_310_STABLE/backup/cc/cc_lib/cc_asssesment.php under GNU/GPL license */
class CcAssesmentResponseStrtype extends CcResponseLidtype
{
public function __construct()
$rtt = parent::__construct();
$rtt
parent::__construct()
CcResponseLidtype::__construct()
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
class A { function getObject() { return null; } } $a = new A(); $object = $a->getObject();
The method getObject() can return nothing but null, so it makes no sense to assign that value to a variable.
getObject()
The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.
$this->tagname = CcQtiTags::RESPONSE_STR;
}
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()
can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.