<commit_before><?php

namespace Acme\ValidationBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;

use Nebumix\rtValidationBundle\Controller\CheckController as BaseController;

use Symfony\Component\HttpFoundation\Request;

use Symfony\Component\HttpFoundation\Response;

class CheckController extends BaseController
{
    public function __construct()
    {

    }

    public function isTimebreakValidAction(Request $request)
    {
		$break = $request->request->get('item');
		$timebreak = $request->request->get('item1');

    	if($break == 1){
    					
    		if(trim($timebreak) != NULL){
    			return new Response('1');
    		}else{
    			return new Response('Please, select a time for break.');
    		}	
    			
    	}else{
    		return new Response('1');
    	}
    }   

    public function isTimestartendValidAction(Request $request)
    {
                
        $dS = $request->request->get('item');
        $dE = $request->request->get('item1');

        if( $dS != "" && $dE != ""){


            $startshift = new \DateTime($dS);
            $endshift = new \DateTime($dE);


            if($startshift->format('H') > $endshift->format('H')){
                return new Response('End of shift must be later than start of shift');
            }elseif($startshift->format('H') < $endshift->format('H')){
                return new Response('1');
            }elseif($startshift->format('H') == $endshift->format('H')){
                if($startshift->format('i') >= $endshift->format('i')){
                    return new Response('End of shift must be later than start of shift');
                }else{
                    return new Response('1');
                }
            }else{
                return new Response('End of shift must be later than start of shift');
            }


        }else{
            return new Response('-1');
        }
    }     

}
<commit_msg>Update CheckController.php<commit_after><?php

namespace Acme\ValidationBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;

use Nebumix\rtValidationBundle\Controller\CheckController as BaseController;

use Symfony\Component\HttpFoundation\Request;

use Symfony\Component\HttpFoundation\Response;

class CheckController extends BaseController
{
    public function __construct()
    {

    }

    public function isTimebreakValidAction(Request $request)
    {
	$break = $request->request->get('item');
	$timebreak = $request->request->get('item1');

    	if($break == 1){
    					
    		if(trim($timebreak) != NULL){
    			return new Response('1');
    		}else{
    			return new Response('Please, select a time for break.');
    		}	
    			
    	}else{
    		return new Response('1');
    	}
    }   

    public function isTimestartendValidAction(Request $request)
    {
                
        $dS = $request->request->get('item');
        $dE = $request->request->get('item1');

        if( $dS != "" && $dE != ""){


            $startshift = new \DateTime($dS);
            $endshift = new \DateTime($dE);


            if($startshift->format('H') > $endshift->format('H')){
                return new Response('End of shift must be later than start of shift');
            }elseif($startshift->format('H') < $endshift->format('H')){
                return new Response('1');
            }elseif($startshift->format('H') == $endshift->format('H')){
                if($startshift->format('i') >= $endshift->format('i')){
                    return new Response('End of shift must be later than start of shift');
                }else{
                    return new Response('1');
                }
            }else{
                return new Response('End of shift must be later than start of shift');
            }


        }else{
            return new Response('-1');
        }
    }     

}

{'fraction_non_alphanumeric': 0.140710028504794, 'fraction_numerical': 0.004146151852811609, 'mean_word_length': 2.145884270578647, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 39, 'https://': 0, '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': '6643969', 'n_tokens_mistral': 1123, 'n_tokens_neox': 1072, 'n_words': 243}