<commit_before><?php
/*
 * Copyright 2015 <NAME> <http://jacksleight.com/>
 * This source file is subject to the MIT license that is bundled with this package in the file LICENCE. 
 */

namespace Chalk\Core;

use Chalk\Core,
    Chalk\Chalk,
	Doctrine\Common\Collections\ArrayCollection;

/**
 * @Entity
 */
class File extends Content
{
	public static $_chalkInfo = [
		'singular'	=> 'File',
		'plural'	=> 'Files',
	];

	protected static $_baseDir;
	protected static $_mimeTypes = [];
	
    /**
     * @Column(type="string")
     */
	protected $baseName;
	
    /**
     * @Column(type="integer")
     */
	protected $size;

    /**
     * @Column(type="string")
     */
	protected $hash;

	protected $file;

	protected $newFile;

	public static function baseDir(\Coast\Dir $baseDir = null)
	{
		if (isset($baseDir)) {
			self::$_baseDir = $baseDir;
		}
		return self::$_baseDir;
	}

	public static function mimeTypes(array $mimeTypes = null)
	{
		if (isset($mimeTypes)) {
			self::$_mimeTypes = $mimeTypes;
		}
		return self::$_mimeTypes;
	}

	public function move(\Coast\File $file)
	{<commit_msg>Make files published by default,<commit_after><?php
/*
 * Copyright 2015 <NAME> <http://jacksleight.com/>
 * This source file is subject to the MIT license that is bundled with this package in the file LICENCE. 
 */

namespace Chalk\Core;

use Chalk\Core,
    Chalk\Chalk,
	Doctrine\Common\Collections\ArrayCollection;

/**
 * @Entity
 */
class File extends Content
{
	public static $_chalkInfo = [
		'singular'	=> 'File',
		'plural'	=> 'Files',
	];

	protected static $_baseDir;
	protected static $_mimeTypes = [];
	
    /**
     * @Column(type="string")
     */
	protected $baseName;
	
    /**
     * @Column(type="integer")
     */
	protected $size;

    /**
     * @Column(type="string")
     */
	protected $hash;

	protected $file;

	protected $newFile;

	public function __construct()
	{
		parent::__construct();

		$this->status		= Chalk::STATUS_PUBLISHED;
		$this->publishDate	= new \DateTime();
	}

	public static function baseDir(\Coast\Dir $baseDir = null)
	{
		if (isset($baseDir)) {
			self::$_baseDir = $baseDir;
		}
		return self::$_baseDir;
	}

	public static function mimeTypes(array $mimeTypes = null)
	{
		if (isset($mimeTypes)) {
			self::$_mimeTypes = $mimeTypes;
		}
		return self::$_mimeTypes;
	}

	public function move(\Coast\File $file)
	{
{'fraction_non_alphanumeric': 0.15036001694197373, 'fraction_numerical': 0.0033883947479881405, 'mean_word_length': 3.3339449541284405, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, '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': '5902719', 'n_tokens_mistral': 870, 'n_tokens_neox': 793, 'n_words': 191}