<commit_before><?php
require_once 'com/moip/api/MoIPAPIStrategy.php';
require_once 'com/moip/api/composition/html/MoIPFormComponent.php';
require_once 'com/moip/api/composition/html/MoIPInputComponent.php';

class MoIPIntegracaoHTMLStrategy implements MoIPAPIStrategy {
	/**
	 * @var	string
	 */
	private $carteira;

	/**
	 * @var	string
	 */
	private $urlRetorno;

	public function __construct( $carteira , $urlRetorno ) {
		$this->carteira = $carteira;
	}

	/**
	 * @param	MoIP $context
	 * @see		MoIPAPIStrategy::execute()
	 */
	public function execute( MoIP $context ) {
		$form = new MoIPFormComponent();
		$form->addChild( new MoIPInputComponent( 'id_carteira' , $this->carteira ) )->addAttribute( 'type' , 'hidden' );
		$form->addChild( new MoIPInputComponent( 'url_retorno' , $this->urlRetorno ) )->addAttribute( 'type' , 'hidden' );
		$form->addChild( new MoIPInputComponent( 'valor' , current( $context->getValores() )->getValor() ) )->addAttribute( 'type' , 'hidden' );
		$form->addChild( new MoIPInputComponent( 'nome' , $context->getRazao() ) )->addAttribute( 'type' , 'hidden' );
		$form->addChild( new MoIPInputComponent( 'id_transacao' , $context->getIdProprio() ) )->addAttribute( 'type' , 'hidden' );

		$pagador = $context->getPagador();

		$form->addChild( new MoIPInputComponent( 'pagador_nome' , $pagador->getNome() ) )->addAttribute( 'type' , 'hidden' );
		$form->addChild( new MoIPInputComponent( 'pagador_email' , $pagador->getEmail() ) )->addAttribute( 'type' , 'hidden' );
		$form->addChild( new MoIPInputComponent( 'pagador_celular' , $pagador->getTelefoneCelular() ) )->addAttribute( 'type' , 'hidden' );

		$identidade = $pagador->getIdentidade();
		$form->addChild( new MoIPInputComponent( 'pagador_' . $identidade->getTipo() , $identidade->getIdentidade() ) )->addAttribute( 'type' , 'hidden' );

		$endereco = $pagador->getEnderecoCobranca();
<commit_msg>Ajuste na estratégia HTML<commit_after><?php
require_once 'com/moip/api/MoIPAPIStrategy.php';
require_once 'com/moip/api/composition/html/MoIPFormComponent.php';
require_once 'com/moip/api/composition/html/MoIPInputComponent.php';

class MoIPIntegracaoHTMLStrategy implements MoIPAPIStrategy {
	/**
	 * @var	string
	 */
	private $carteira;

	/**
	 * @var	string
	 */
	private $urlRetorno;

	public function __construct( $carteira , $urlRetorno ) {
		$this->carteira = $carteira;
		$this->urlRetorno = $urlRetorno;
	}

	/**
	 * @param	MoIP $context
	 * @see		MoIPAPIStrategy::execute()
	 */
	public function execute( MoIP $context ) {
		$form = new MoIPFormComponent();
		$valor = current( $context->getValores() )->getValor();
		$valor = (int) ($valor * 100);

		$form->addChild( new MoIPInputComponent( 'id_carteira' , $this->carteira ) )->addAttribute( 'type' , 'hidden' );
		$form->addChild( new MoIPInputComponent( 'url_retorno' , $this->urlRetorno ) )->addAttribute( 'type' , 'hidden' );
		$form->addChild( new MoIPInputComponent( 'valor' , $valor ) )->addAttribute( 'type' , 'hidden' );
		$form->addChild( new MoIPInputComponent( 'nome' , $context->getRazao() ) )->addAttribute( 'type' , 'hidden' );
		$form->addChild( new MoIPInputComponent( 'id_transacao' , $context->getIdProprio() ) )->addAttribute( 'type' , 'hidden' );

		$pagador = $context->getPagador();

		$form->addChild( new MoIPInputComponent( 'pagador_nome' , $pagador->getNome() ) )->addAttribute( 'type' , 'hidden' );
		$form->addChild( new MoIPInputComponent( 'pagador_email' , $pagador->getEmail() ) )->addAttribute( 'type' , 'hidden' );
		$form->addChild( new MoIPInputComponent( 'pagador_celular' , $pagador->getTelefoneCelular() ) )->addAttribute( 'type' , 'hidden' );

		$identidade = $pagador->getIdentidade();
		$form->addChild( new MoIPInputComponent( 'pagador_' . $identidade->getTipo() , $identidade->getIdentidade() ) )->addAttribute( 'type' , 'hidden' );

		$endereco = $pagador->getEnderecoCobranca();

{'fraction_non_alphanumeric': 0.18137254901960784, 'fraction_numerical': 0.0007739938080495357, 'mean_word_length': 5.334967320261438, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 70, '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': '663462', 'n_tokens_mistral': 1448, 'n_tokens_neox': 1376, 'n_words': 251}