<commit_before><?php
/**
 * File containing the ezcWorkflowNodeInput class.
 *
 * @package Workflow
 * @version //autogen//
 * @copyright Copyright (C) 2005-2007 eZ systems as. All rights reserved.
 * @license http://ez.no/licenses/new_bsd New BSD License
 */

/**
 * This node asks (the user) for input.
 *
 * @package Workflow
 * @version //autogen//
 */
class ezcWorkflowNodeInput extends ezcWorkflowNode
{
    /**
     * Constructor.
     *
     * @param mixed $configuration
     * @throws InvalidArgumentException
     */
    public function __construct( $configuration = '' )
    {
        if ( !is_array( $configuration ) )
        {
            throw new InvalidArgumentException;
        }

        $tmp = array();

        foreach ( $configuration as $key => $value )
        {
            if ( is_int( $key ) )
            {
                $variable  = $value;
                $condition = new ezcWorkflowConditionIsAnything;
            }
            else
            {
                if ( !is_object( $value ) || !$value instanceof ezcWorkflowCondition )
                {
                    throw new InvalidArgumentException;
                }

                $variable  = $key;
                $condition = $value;
            }<commit_msg>- Be more strict.<commit_after><?php
/**
 * File containing the ezcWorkflowNodeInput class.
 *
 * @package Workflow
 * @version //autogen//
 * @copyright Copyright (C) 2005-2007 eZ systems as. All rights reserved.
 * @license http://ez.no/licenses/new_bsd New BSD License
 */

/**
 * This node asks (the user) for input.
 *
 * @package Workflow
 * @version //autogen//
 */
class ezcWorkflowNodeInput extends ezcWorkflowNode
{
    /**
     * Constructor.
     *
     * @param mixed $configuration
     * @throws InvalidArgumentException
     */
    public function __construct( $configuration = '' )
    {
        if ( !is_array( $configuration ) )
        {
            throw new InvalidArgumentException;
        }

        $tmp = array();

        foreach ( $configuration as $key => $value )
        {
            if ( is_int( $key ) )
            {
                if ( !is_string( $value ) )
                {
                    throw new InvalidArgumentException;
                }

                $variable  = $value;
                $condition = new ezcWorkflowConditionIsAnything;
            }
            else
            {
                if ( !is_object( $value ) || !$value instanceof ezcWorkflowCondition )
                {
                    throw new InvalidArgumentException;
                }

                $variable  = $key;
                $condition = $value;
            }
{'fraction_non_alphanumeric': 0.10476905745399925, 'fraction_numerical': 0.0060082613593691325, 'mean_word_length': 1.5468451242829828, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2242749', 'n_tokens_mistral': 744, 'n_tokens_neox': 681, 'n_words': 179}