for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use Nickcheek\Handwriting\Writer;
class renderPNGClass
{
protected Writer $writer;
public function __construct()
$this->writer = new Writer('your_user_key','your_secret_key');
}
public function makeImage($text)
$builder = $this->writer->font()->text($text)->build();
$this->writer->renderPNGImage($builder);
$test = new renderPNGClass();
echo $test->makeImage('This is a new image');
$test->makeImage('This is a new image')
renderPNGClass::makeImage()
This check looks for function or method calls that always return null and whose return value is used.
class A { function getObject() { return null; } } $a = new A(); if ($a->getObject()) {
The method getObject() can return nothing but null, so it makes no sense to use the return value.
getObject()
The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.
This check looks for function or method calls that always return null and whose return value is used.
The method
getObject()
can return nothing but null, so it makes no sense to use the return value.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.