<commit_before><?php
/**
 * This file is extension of the Nette Framework (http://nette.org)
 *
 * Copyright (c) 2012 <NAME> (<EMAIL>)
 */
namespace Nette\Application\Responses;
use Nette,
    Nette\Utils\Json;
/**
 * JSONP response used mainly for AJAX requests cross domain.
 *
 * @author     <NAME>
 */
class JsonpResponse extends JsonResponse
{
	/** @var string */
	private $callback;
	/**
	 * @param  string  callback
	 * @param  array|stdClass  payload
	 */
	public function __construct($callback, $payload)
	{
		if (!is_string($callback) || empty($callback)) {
			throw new Nette\InvalidArgumentException("Callback isn't string or is empty.");
		}
		
		if (!is_array($payload) && !$payload instanceof \stdClass) {
			throw new Nette\InvalidArgumentException("Payload has to be instance of stdClass or array.");<commit_msg>Update JsonpResponse.php<commit_after><?php
/**
 * This file is extension of the Nette Framework (http://nette.org)
 *
 * Copyright (c) 2012 <NAME> (<EMAIL>)
 */
namespace Residit\Application\Responses;
use Nette,
    Nette\Utils\Json;
/**
 * JSONP response used mainly for AJAX requests cross domain.
 *
 * @author     <NAME>
 */
class JsonpResponse extends JsonResponse
{
	/** @var string */
	private $callback;
	/**
	 * @param  string  callback
	 * @param  array|stdClass  payload
	 */
	public function __construct($callback, $payload)
	{
		if (!is_string($callback) || empty($callback)) {
			throw new Nette\InvalidArgumentException("Callback isn't string or is empty.");
		}
		
		if (!is_array($payload) && !$payload instanceof \stdClass) {
			throw new Nette\InvalidArgumentException("Payload has to be instance of stdClass or array.");
{'fraction_non_alphanumeric': 0.13345302214242968, 'fraction_numerical': 0.0047875523638539795, 'mean_word_length': 4.021021021021021, 'pattern_counts': {'":': 0, '<': 11, '<?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': '7620918', 'n_tokens_mistral': 535, 'n_tokens_neox': 490, 'n_words': 152}