PHP Classes

Remove $this->_db = DB::getInstance(); line on the __construc...

Recommend this page to a friend!

      Validate.php  >  All threads  >  Remove $this->_db =...  >  (Un) Subscribe thread alerts  
Subject:Remove $this->_db =...
Summary:Package rating comment
Messages:1
Author:Maykonn Welington Candido
Date:2013-11-10 23:06:31
 

Maykonn Welington Candido rated this package as follows:

Utility: Insufficient
Consistency: Good

  1. Remove $this->_db =...   Reply   Report abuse  
Picture of Maykonn Welington Candido Maykonn Welington Candido - 2013-11-10 23:06:31
Remove $this->_db = DB::getInstance(); line on the __construct method. Because users do not have the package DB, and this dependence is not specified. Or better yet, remove also the case unique, this will give the necessary decoupling.

When you apply the fix, the usefulness of the package will change: insufficient for good.