<commit_before><?php
/**
 * Vision PHP-Framework
 *
 * @author <NAME> <<EMAIL>>
 * @copyright 2012-2013 <NAME>
 * @license http://www.opensource.org/licenses/mit-license.php MIT
 */
namespace Vision\File;

/**
 * UploadedFile
 *
 * @author <NAME> <<EMAIL>>
 */
class UploadedFile extends File
{
    /** @type array $clientData */
    protected $clientData = array();

    public function __construct($filename)
    {
        if (!is_uploaded_file($filename)) {
            throw new \InvalidArgumentException(sprintf(
                'The file "%s" is not an uploaded file.',
                $filename
            ));
        }

        parent::__construct($filename);
    }

    /**
     * @api
     *
     * @param array $data
     *
     * @return UploadedFile Provides a fluent interface.
     */
    public function setClientData(array $data)
    {
        $this->clientData = $data;
        return $this;
    }

    /**
     * @api
     *
     * @return string|null
     */
    public function getClientName()
    {
        if (isset($this->clientData['name'])) {
            return $this->clientData['name'];
        }
        return null;
    }

    /**
     * @api
     *
     * @return string|null
     */
    public function getClientType()
    {
        if (isset($this->clientData['type'])) {
            return $this->clientData['type'];
        }
        return null;
    }

    /**
     * @api
     *
     * @return string|null
     */
    public function getClientSize()
    {
        if (isset($this->clientData['size'])) {
            return $this->clientData['size'];
        }
        return null;
    }

    /**
     * @api
     *
     * @return string|null
     */
    public function getClientTmpName()
    {
        if (isset($this->clientData['tmp_name'])) {
            return $this->clientData['tmp_name'];
        }
        return null;
    }

    /**
     * @api
     *
     * @return string|null
     */
    public function getClientError()
    {
        if (isset($this->clientData['error'])) {
            return $this->clientData['error'];
        }
        return null;
    }

    /**
     * @api
     *
     * @return string
     */
    public function getClientExtension()
    {
        $extension = pathinfo($this->getClientName(), PATHINFO_EXTENSION);
        return $extension;
    }
}
<commit_msg>Remove: $clientData<commit_after><?php
/**
 * Vision PHP-Framework
 *
 * @author <NAME> <<EMAIL>>
 * @copyright 2012-2013 <NAME>
 * @license http://www.opensource.org/licenses/mit-license.php MIT
 */
namespace Vision\File;

use InvalidArgumentException;

/**
 * UploadedFile
 *
 * @author <NAME> <<EMAIL>>
 */
class UploadedFile extends File
{
    /**
     * Constructor
     *
     * @param string $filename
     */
    public function __construct($filename)
    {
        if (!is_uploaded_file($filename)) {
            throw new InvalidArgumentException(sprintf(
                'The file "%s" is not an uploaded file.',
                $filename
            ));
        }

        parent::__construct($filename);
    }
}

{'fraction_non_alphanumeric': 0.14430297094351943, 'fraction_numerical': 0.005223636957231472, 'mean_word_length': 1.839666357738647, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5194943', 'n_tokens_mistral': 929, 'n_tokens_neox': 898, 'n_words': 182}