<commit_before><?php 

require_once("cshp_Selector.class.php");

class Cshp_OutputObject {

  //This class will contain the "css" code itself, "CRUD" and other methods

  private $outputArray = [];
  private $indexArray = [];

  public function erase(){
  }

  public function addString($string = ""){
    array_push($this->outputArray, $string);
    array_push($this->indexArray, "?");
  }

  public function addStringAtBeginning($string = ""){
    array_unshift($this->outputArray, $string);
    array_unshift($this->indexArray, "?");
  }

  public function addSelector(Cshp_Selector $selector){

    $mainSelectors = explode(",", $selector->mainSelector);

    foreach ($mainSelectors as $mainSelector) { 

      $existentIndex = array_search($mainSelector, $this->indexArray);

      if($existentIndex === false){
        $selector->mainSelector = $mainSelector;
        array_push($this->outputArray, $selector);
        array_push($this->indexArray, $mainSelector);
      } else {
        //Add the new properties
        $this->outputArray[$existentIndex]->properties = array_merge($this->outputArray[$existentIndex]->properties, $selector->properties);
      }

    }

    print_r($this->outputArray);
  }

  

}

?><commit_msg>remove whitespaces<commit_after><?php 

require_once("cshp_Selector.class.php");

class Cshp_OutputObject {

  //This class will contain the "css" code itself, "CRUD" and other methods

  private $outputArray = [];
  private $indexArray = [];

  public function erase(){
  }

  public function addString($string = ""){
    array_push($this->outputArray, $string);
    array_push($this->indexArray, "?");
  }

  public function addStringAtBeginning($string = ""){
    array_unshift($this->outputArray, $string);
    array_unshift($this->indexArray, "?");
  }

  public function addSelector(Cshp_Selector $selector){

    $mainSelectors = explode(",", $selector->mainSelector);

    foreach ($mainSelectors as $mainSelector) { 

      $mainSelector = trim($mainSelector);

      $existentIndex = array_search($mainSelector, $this->indexArray);

      if($existentIndex === false){
        $selector->mainSelector = $mainSelector;
        array_push($this->outputArray, $selector);
        array_push($this->indexArray, $mainSelector);
      } else {
        //Add the new properties
        $this->outputArray[$existentIndex]->properties = array_merge($this->outputArray[$existentIndex]->properties, $selector->properties);
      }

    }

    print_r($this->outputArray);
  }

  

}

?>
{'fraction_non_alphanumeric': 0.14994049980166602, 'fraction_numerical': 0.0, 'mean_word_length': 3.8687258687258685, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 35, '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': '4215108', 'n_tokens_mistral': 765, 'n_tokens_neox': 727, 'n_words': 135}