<commit_before><?php

 namespace jsondb\classes\helpers;

defined('JSONDB_SECURE') or die('Permission denied!');

 /**
  * Config managing class adapter of File class
  *
  * @category Helpers
  * @author <NAME>
  * @copyright (c) 2013, <NAME>
  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License
  */
 class Config {

     /**
      * File class
      * @var object
      */
     private static $file;

     /**
      * Setting name of table
      * @param string $name
      * @return \jsondb\classes\helpers\File
      */
     public static function name($name)
     {

         self::$file = new File($name, 'config');

         return new Config();
     }

     /**
      * Calls File methods
      * @param string $name
      * @param mixed $arguments
      */
     public function __call($name, $arguments)
     {
         $param = (isset($arguments[0])) ? $arguments[0] : null;

         call_user_func(array(self::$file, $name), $param);
     }

     /**
      * Getting decoded JSON
      * @param string $name
      * @param string $type
      * @return object Json_decode()
      */
     public function get($field = null, $assoc = false)
     {
         $return = self::$file->get($assoc);

         if ($field !== null)
             return $assoc ? $return[$field] : $return->{$field};

         return $return;
     }

     /**
      * Return array with names of fields
      * @return array
      */
     public function fields()
     {
         return array_keys($this->get('schema', true));
     }<commit_msg>bugs in _call()<commit_after><?php

 namespace jsondb\classes\helpers;

defined('JSONDB_SECURE') or die('Permission denied!');

 /**
  * Config managing class adapter of File class
  *
  * @category Helpers
  * @author <NAME>
  * @copyright (c) 2013, <NAME>
  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License
  */
 class Config {

     /**
      * File class
      * @var object
      */
     private static $file;

     /**
      * Setting name of table
      * @param string $name
      * @return \jsondb\classes\helpers\File
      */
     public static function name($name)
     {

         self::$file = new File($name, 'config');

         return new Config();
     }

     /**
      * Calls File methods
      * @param string $name
      * @param mixed $arguments
      */
     public function __call($name, $arguments)
     {
         $param = (isset($arguments[0])) ? $arguments[0] : null;

         return call_user_func(array(self::$file, $name), $param);
     }

     /**
      * Getting decoded JSON
      * @param string $name
      * @param string $type
      * @return object Json_decode()
      */
     public function get($field = null, $assoc = false)
     {
         $return = self::$file->get($assoc);

         if ($field !== null)
             return $assoc ? $return[$field] : $return->{$field};

         return $return;
     }

     /**
      * Return array with names of fields
      * @return array
      */
     public function fields()
     {
         return array_keys($this->get('schema', true));
     }
{'fraction_non_alphanumeric': 0.14207650273224043, 'fraction_numerical': 0.003857280617164899, 'mean_word_length': 1.998073217726397, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, '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': '3847325', 'n_tokens_mistral': 935, 'n_tokens_neox': 910, 'n_words': 243}