<commit_before><?php

defined('BASEPATH') OR exit('No direct script access allowed');

class Welcome extends Application
{

	/**
	 * Index Page for this controller.
	 *
	 * Maps to the following URL
	 * 		http://example.com/
	 * 	- or -
	 * 		http://example.com/welcome/index
	 *
	 * So any other public methods not prefixed with an underscore will
	 * map to /welcome/<method_name>
	 * @see https://codeigniter.com/user_guide/general/urls.html
	 */
	public function index()
	{
		$this->data['pagebody'] = 'welcome_message';
		$this->render(); 
	}

}<commit_msg>add count function for calculate the number of item<commit_after><?php

defined('BASEPATH') OR exit('No direct script access allowed');

class Welcome extends Application
{

	/**
	 * Index Page for this controller.
	 *
	 * Maps to the following URL
	 * 		http://example.com/
	 * 	- or -
	 * 		http://example.com/welcome/index
	 *
	 * So any other public methods not prefixed with an underscore will
	 * map to /welcome/<method_name>
	 * @see https://codeigniter.com/user_guide/general/urls.html
	 */
	public function index()
	{
		$this->data['pagebody'] = 'welcome_message';
		$this->render(); 
	}
        
        function counte($goods){
            $this->load->model('recipes');
            $this->load->model('inventories');

            foreach($this->recipes->all() as $detail){
                if($detail['menu'] == $goods){
                    foreach ($this->inventories->all() as $item) {
                        if($item['name'] == $detail['item']){
                            $all = intval($item['quantity']);
                            $each = intval($detail['quantity']);
                            $rest = $all % $each;
                            $counter[] = ($all - $rest)/ $each;
                        }
                    }   
                }
            }    
            return min($counter);   
    }
}
{'fraction_non_alphanumeric': 0.1460970464135021, 'fraction_numerical': 0.0, 'mean_word_length': 1.9456521739130435, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 17, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, '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': '6182906', 'n_tokens_mistral': 582, 'n_tokens_neox': 537, 'n_words': 130}