<commit_before><?php
namespace Tenet\Storage;

use Doctrine\Common\Persistence\Event\LifecycleEventArgs;

class StorageHandler
{
	private $storageDirectory;

	/**
	 *
	 */
	public function __construct($storage_directory)
	{
		$this->storageDirectory = rtrim(realpath($storage_directory), '/\\' . DIRECTORY_SEPARATOR);

		if (!is_writable($this->storageDirectory) || !is_dir($this->storageDirectory)) {
			throw new InvalidArgumentException(sprintf(
				'The provided storage root "%s" is not a directory or is not writable',
				$storage_directory
			));
		}
	}


	/**
	 *
	 */
    public function prePersist(LifecycleEventArgs $args)<commit_msg>Namespacing fix<commit_after><?php
namespace Tenet\Storage;

use Doctrine\Common\Persistence\Event\LifecycleEventArgs;
use InvalidArgumentException;

class StorageHandler
{
	private $storageDirectory;

	/**
	 *
	 */
	public function __construct($storage_directory)
	{
		$this->storageDirectory = rtrim(realpath($storage_directory), '/\\' . DIRECTORY_SEPARATOR);

		if (!is_writable($this->storageDirectory) || !is_dir($this->storageDirectory)) {
			throw new InvalidArgumentException(sprintf(
				'The provided storage root "%s" is not a directory or is not writable',
				$storage_directory
			));
		}
	}


	/**
	 *
	 */
    public function prePersist(LifecycleEventArgs $args)
{'fraction_non_alphanumeric': 0.12462235649546828, 'fraction_numerical': 0.0, 'mean_word_length': 4.711206896551724, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '5300402', 'n_tokens_mistral': 432, 'n_tokens_neox': 387, 'n_words': 80}