<commit_before><?php
/**
 * Panada Database API.
 *
 * @package	Resources
 * @link	http://panadaframework.com/
 * @license     http://www.opensource.org/licenses/bsd-license.php
 * @author	<NAME> <<EMAIL>>
 * @since	Version 0.3
 */
namespace Resources;

class Database {
    
    private $driver, $config;
    
    public function __construct( $connection = 'default' ){
        
        $config         = Config::database();
        $this->config   = $config[$connection];
        
        if ( isset($this->config['pdo']) & $this->config['pdo'])
            $driverNamespace = 'Drivers\Database\PanadaPDO';
        else
            $driverNamespace = 'Drivers\Database\\'.ucwords($this->config['driver']);
        
        $this->driver = new $driverNamespace( $this->config, $connection );
    }
    
    /**
     * Use magic method 'call' to pass user method
     * into driver method
     *
     * @param string @name
     * @param array @arguments
     */
    public function __call($name, $arguments){
        
        return call_user_func_array(array($this->driver, $name), $arguments);
    }
    
    public function __get($name){
        
        return $this->driver->$name;
    }
    
    public function __set($name, $value){
        
        $this->driver->$name = $value;
    }
    
}<commit_msg>Update Database class to new code style<commit_after><?php
/**
 * Panada Database API.
 *
 * @package	Resources
 * @link	http://panadaframework.com/
 * @license     http://www.opensource.org/licenses/bsd-license.php
 * @author	<NAME> <<EMAIL>>
 * @since	Version 0.3
 */
namespace Resources;

class Database
{    
    private $driver, $config;
    
    public function __construct( $connection = 'default' )
    {    
        $config         = Config::database();
        $this->config   = $config[$connection];
        
        if ( isset($this->config['pdo']) & $this->config['pdo'])
            $driverNamespace = 'Drivers\Database\PanadaPDO';
        else
            $driverNamespace = 'Drivers\Database\\'.ucwords($this->config['driver']);
        
        $this->driver = new $driverNamespace( $this->config, $connection );
    }
    
    /**
     * Use magic method 'call' to pass user method
     * into driver method
     *
     * @param string @name
     * @param array @arguments
     */
    public function __call($name, $arguments)
    {    
        return call_user_func_array(array($this->driver, $name), $arguments);
    }
    
    public function __get($name)
    {    
        return $this->driver->$name;
    }
    
    public function __set($name, $value)
    {    
        $this->driver->$name = $value;
    }
    
}
{'fraction_non_alphanumeric': 0.14722536806342015, 'fraction_numerical': 0.0015100037750094375, 'mean_word_length': 2.1850961538461537, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7032602', 'n_tokens_mistral': 791, 'n_tokens_neox': 785, 'n_words': 168}