for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace ParcelValue\ApiClient;
use WebServCo\Framework\Framework;
final class OutputLoader extends \WebServCo\Framework\AbstractOutputLoader
{
public function __construct($projectPath)
parent::__construct(
$projectPath,
Framework::library('HtmlOutput'),
Framework::library('JsonOutput')
);
}
public function html($data, $template)
return parent::html($data, $template);
public function htmlPage($data, $pageTemplate, $mainTemplate = null)
return parent::htmlPage($data, $pageTemplate, $mainTemplate);
public function json($data)
return parent::json($data);
public function cli($string, $eol = true)
return parent::cli($string, $eol);
parent::cli($string, $eol)
WebServCo\Framework\AbstractOutputLoader::cli()
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.