<commit_before><?php
namespace wcf\system\form\builder\field;

/**
 * Provides default implementations of `INullableFormField` methods.
 * 
 * @author	<NAME>
 * @copyright	2001-2018 WoltLab GmbH
 * @license	GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
 * @package	WoltLabSuite\Core\System\Form\Builder\Field
 * @since	3.2
 */
trait TNullableFormField {
	/**
	 * `true` if this field supports `null` as its value and `false` otherwise
	 * @var	bool
	 */
	protected $__nullable = false;
	
	/**
	 * Returns `true` if this field supports `null` as its value and returns `false`
	 * otherwise.
	 * 
	 * Per default, fields do not support `null` as their value.
	 * 
	 * @return	bool
	 */
	public function isNullable() {
		return $this->__nullable;
	}
	
	/**
	 * Sets whether this field supports `null` as its value and returns this field.
	 * 
	 * @param	bool	$nullable		determines if field supports `null` as its value
	 * @return	static				this node
	 * 
	 * @throws	\InvalidArgumentException	if the given value is no boolean
	 */
	public function nullable($nullable = true) {
		if (!is_bool($nullable)) {
			throw new \InvalidArgumentException("Given value is no bool, " . gettype($nullable) . " given.");
		}
		
		$this->__nullable = $nullable;
		
		return $this;
	}
}<commit_msg>Add missing newline at end of file<commit_after><?php
namespace wcf\system\form\builder\field;

/**
 * Provides default implementations of `INullableFormField` methods.
 * 
 * @author	<NAME>
 * @copyright	2001-2018 WoltLab GmbH
 * @license	GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
 * @package	WoltLabSuite\Core\System\Form\Builder\Field
 * @since	3.2
 */
trait TNullableFormField {
	/**
	 * `true` if this field supports `null` as its value and `false` otherwise
	 * @var	bool
	 */
	protected $__nullable = false;
	
	/**
	 * Returns `true` if this field supports `null` as its value and returns `false`
	 * otherwise.
	 * 
	 * Per default, fields do not support `null` as their value.
	 * 
	 * @return	bool
	 */
	public function isNullable() {
		return $this->__nullable;
	}
	
	/**
	 * Sets whether this field supports `null` as its value and returns this field.
	 * 
	 * @param	bool	$nullable		determines if field supports `null` as its value
	 * @return	static				this node
	 * 
	 * @throws	\InvalidArgumentException	if the given value is no boolean
	 */
	public function nullable($nullable = true) {
		if (!is_bool($nullable)) {
			throw new \InvalidArgumentException("Given value is no bool, " . gettype($nullable) . " given.");
		}
		
		$this->__nullable = $nullable;
		
		return $this;
	}
}

{'fraction_non_alphanumeric': 0.1181339352896915, 'fraction_numerical': 0.007524454477050414, 'mean_word_length': 3.4464882943143813, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '6651095', 'n_tokens_mistral': 903, 'n_tokens_neox': 807, 'n_words': 270}