for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* basic output functions
*
* PHP version 5
* @category PHP
* @package PSI_Output
* @author Michael Cramer <[email protected]>
* @copyright 2009 phpSysInfo
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
* @version SVN: $Id: class.Output.inc.php 569 2012-04-16 06:08:18Z namiltd $
* @link http://phpsysinfo.sourceforge.net
*/
* basic output functions for all output formats
* @version Release: 3.0
abstract class Output
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
* error object for logging errors
* @var Error
protected $error;
* call the parent constructor and check for needed extensions
public function __construct()
$this->error = PSI_Error::singleton();
$this->error
\PSI_Error::singleton()
PSI_Error::singleton()
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->_checkConfig();
CommonFunctions::checkForExtensions();
}
* read the config file and check for existence
* @return void
private function _checkConfig()
include_once APP_ROOT.'/read_config.php';
if ($this->error->errorsExist()) {
$this->error->errorsAsXML();
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.