<commit_before><?php
	
	class TimberCore {

		function import($info){
			if (is_object($info)){
				$info = get_object_vars($info);
			}
			if (is_array($info)){
				foreach($info as $key=>$value){
					$this->$key = $value;
				}
			}
		}

		function url_to_path($url = ''){
			if (!strlen($url) && $this->url){
				$url = $this->url;
			}
			$url_info = parse_url($url);
			return $url_info['path'];
		}

		function can_edit(){
			if (isset($this->_can_edit)){
				return $this->_can_edit;
			}
			$this->_can_edit = false;
			if (!function_exists('current_user_can')){
				return false;
			}
			if (current_user_can('edit_post', $this->ID)){
				$this->_can_edit = true;
  			}
  			return $this->_can_edit;
 		}
	}<commit_msg>formatting change<commit_after><?php

class TimberCore
{

  function import($info)
  {
    if (is_object($info)) {
      $info = get_object_vars($info);
    }
    if (is_array($info)) {
      foreach ($info as $key => $value) {
        $this->$key = $value;
      }
    }
  }

  function url_to_path($url = '')
  {
    if (!strlen($url) && $this->url) {
      $url = $this->url;
    }
    $url_info = parse_url($url);
    return $url_info['path'];
  }

  function can_edit()
  {
    if (isset($this->_can_edit)) {
      return $this->_can_edit;
    }
    $this->_can_edit = false;
    if (!function_exists('current_user_can')) {
      return false;
    }
    if (current_user_can('edit_post', $this->ID)) {
      $this->_can_edit = true;
    }
    return $this->_can_edit;
  }
}

{'fraction_non_alphanumeric': 0.1855533465871438, 'fraction_numerical': 0.0, 'mean_word_length': 2.71007371007371, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, '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': '5275967', 'n_tokens_mistral': 636, 'n_tokens_neox': 569, 'n_words': 95}