ErrorList showing false positives
Submitted by Friday, 19 December, 2008 - 19:20
on
I'm working on a PHP singleton pattern file. This is the method which am getting a lot of errors from PHPParserPlugin/ErrorList
class MyClass
{
private static $instance;
private function __construct()
{
}
public static function getInstance()
{
if (!isset(self::$instance))
{
$class = __CLASS__;
self::$instance = new $class();
}
return self::$instance;
}
public function doSomething()
{
echo 'something';
}
}
This is valid code for creating a singleton class. (it compiles and runs fine). However the ErrorList is throwing tons of errors on these lines (because of the self::$instance I am using). I am using the most updated version of both plugins. Is there a way I can at least set to ignore these lines? because The structure browser won't list anything while it is returning the errors.
thanks,
-Danny
class MyClass
{
private static $instance;
private function __construct()
{
}
public static function getInstance()
{
if (!isset(self::$instance))
{
$class = __CLASS__;
self::$instance = new $class();
}
return self::$instance;
}
public function doSomething()
{
echo 'something';
}
}
This is valid code for creating a singleton class. (it compiles and runs fine). However the ErrorList is throwing tons of errors on these lines (because of the self::$instance I am using). I am using the most updated version of both plugins. Is there a way I can at least set to ignore these lines? because The structure browser won't list anything while it is returning the errors.
thanks,
-Danny