<commit_before><?php namespace Orchestra\Installer;

use Orchestra\HTML;

class Requirement {

	/**
	 * Installation checklist for Orchestra Platform.
	 *
	 * @var array
	 */
	protected $checklist = array();

	/**
	 * Installable status
	 *
	 * @var boolean
	 */
	protected $installable = false;
	
	/**
	 * Construct a new instance.
	 *
	 * @access public
	 * @return void
	 */
	public function __construct()
	{
		try
		{
			$asset_writable = with(new Publisher)->publish();
		}
		catch (RuntimeException $e)
		{
			$asset_writable = false;
		}

		$this->checklist = array(
			'storage_writable' => array(
				'is'       => (is_writable(path('storage'))),
				'should'   => true,
				'explicit' => false,
				'data'     => array(
					'path' => HTML::create('code', 'storage', array('title' => path('storage'))),
				),
			),
			'bundle_writable' => array(
				'is'       => (is_writable(path('bundle'))),
				'should'   => true,
				'explicit' => false,
				'data'     => array(
					'path' => HTML::create('code', 'bundles', array('title' => path('bundle'))),
				),
			),
			'asset_writable'  => array(
				'is'       => ($asset_writable),
				'should'   => true,
				'explicit' => true,
				'data'     => array(
					'path' => HTML::create('code', 'public'.DS.'bundles', array('title' => path('public').'bundles'.DS)),
				),
			),
		);

		foreach ($this->checklist as $requirement)
		{
			if ($requirement['is'] !== $requirement['should'] 
				and true === $requirement['explicit'])
			{
				$this->installable = false;
			}
		}
	}

	/**
	 * Get checklist result.
	 *
	 * @access public
	 * @return array
	 */
	public function checklist()
	{
		return $this->checklist;
	}

	/**
	 * Get installable status.
	 * 
	 * @access public
	 * @return bool
	 */
	public function installable()
	{
		return $this->installable();
	}
}<commit_msg>[#88] Bad recursive.<commit_after><?php namespace Orchestra\Installer;

use Orchestra\HTML;

class Requirement {

	/**
	 * Installation checklist for Orchestra Platform.
	 *
	 * @var array
	 */
	protected $checklist = array();

	/**
	 * Installable status
	 *
	 * @var boolean
	 */
	protected $installable = false;
	
	/**
	 * Construct a new instance.
	 *
	 * @access public
	 * @return void
	 */
	public function __construct()
	{
		try
		{
			$asset_writable = with(new Publisher)->publish();
		}
		catch (RuntimeException $e)
		{
			$asset_writable = false;
		}

		$this->checklist = array(
			'storage_writable' => array(
				'is'       => (is_writable(path('storage'))),
				'should'   => true,
				'explicit' => false,
				'data'     => array(
					'path' => HTML::create('code', 'storage', array('title' => path('storage'))),
				),
			),
			'bundle_writable' => array(
				'is'       => (is_writable(path('bundle'))),
				'should'   => true,
				'explicit' => false,
				'data'     => array(
					'path' => HTML::create('code', 'bundles', array('title' => path('bundle'))),
				),
			),
			'asset_writable'  => array(
				'is'       => ($asset_writable),
				'should'   => true,
				'explicit' => true,
				'data'     => array(
					'path' => HTML::create('code', 'public'.DS.'bundles', array('title' => path('public').'bundles'.DS)),
				),
			),
		);

		foreach ($this->checklist as $requirement)
		{
			if ($requirement['is'] !== $requirement['should'] 
				and true === $requirement['explicit'])
			{
				$this->installable = false;
			}
		}
	}

	/**
	 * Get checklist result.
	 *
	 * @access public
	 * @return array
	 */
	public function checklist()
	{
		return $this->checklist;
	}

	/**
	 * Get installable status.
	 * 
	 * @access public
	 * @return bool
	 */
	public function installable()
	{
		return $this->installable;
	}
}
{'fraction_non_alphanumeric': 0.19016571583808747, 'fraction_numerical': 0.0005433306166802499, 'mean_word_length': 2.7802874743326487, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 57, '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': '955704', 'n_tokens_mistral': 1490, 'n_tokens_neox': 1229, 'n_words': 256}