<commit_before><?php
/**
 * @author           <NAME> <<EMAIL>>
 * @copyright        (c) 2018, <NAME>. All Rights Reserved.
 * @license          GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
 * @package          PH7 / Test / Unit / Framework / Layout / Tpl / Engine / PH7Tpl / Predefined
 */

namespace PH7\Test\Unit\Framework\Layout\Tpl\Engine\PH7Tpl\Predefined;

use PH7\Framework\Layout\Tpl\Engine\PH7Tpl\Predefined\Func as PredefinedFunc;
use PHPUnit_Framework_TestCase;

class FuncTest extends PHPUnit_Framework_TestCase
{
    /**
     * @dataProvider dateFormatsProvider
     */
    public function testDataFunction($sDateFormat)
    {
        $oPredefinedFunc = new PredefinedFunc('<ph:date value="' . $sDateFormat . '" />');
        $this->assertAttributeSame(
            '<ph:date value="' . $sDateFormat . '" />',
            'sCode',
            $oPredefinedFunc
        );
        $this->assertSame(
            '<?php echo date(\'' . $sDateFormat . '\')?>',
            $oPredefinedFunc->assign()->get()
        );
    }

    /**
     * @return array
     */
    public function dateFormatsProvider()
    {
        return [
            ['Y/m/d'],
            ['Y'],
            ['F j, Y, g:i a'],
            ['\i\t \i\s \t\h\e jS \d\a\y'],
            ['h-i-s, j-m-y, it is w Day'],
            ['m.d.y']
        ];
    }
}
<commit_msg>Add missing @param phpdoc tag<commit_after><?php
/**
 * @author           <NAME> <<EMAIL>>
 * @copyright        (c) 2018, <NAME>. All Rights Reserved.
 * @license          GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
 * @package          PH7 / Test / Unit / Framework / Layout / Tpl / Engine / PH7Tpl / Predefined
 */

namespace PH7\Test\Unit\Framework\Layout\Tpl\Engine\PH7Tpl\Predefined;

use PH7\Framework\Layout\Tpl\Engine\PH7Tpl\Predefined\Func as PredefinedFunc;
use PHPUnit_Framework_TestCase;

class FuncTest extends PHPUnit_Framework_TestCase
{
    /**
     * @param string $sDateFormat
     *
     * @dataProvider dateFormatsProvider
     */
    public function testDataFunction($sDateFormat)
    {
        $oPredefinedFunc = new PredefinedFunc('<ph:date value="' . $sDateFormat . '" />');
        $this->assertAttributeSame(
            '<ph:date value="' . $sDateFormat . '" />',
            'sCode',
            $oPredefinedFunc
        );
        $this->assertSame(
            '<?php echo date(\'' . $sDateFormat . '\')?>',
            $oPredefinedFunc->assign()->get()
        );
    }

    /**
     * @return array
     */
    public function dateFormatsProvider()
    {
        return [
            ['Y/m/d'],
            ['Y'],
            ['F j, Y, g:i a'],
            ['\i\t \i\s \t\h\e jS \d\a\y'],
            ['h-i-s, j-m-y, it is w Day'],
            ['m.d.y']
        ];
    }
}

{'fraction_non_alphanumeric': 0.15608558400561207, 'fraction_numerical': 0.008418098912662224, 'mean_word_length': 1.869215291750503, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 25, '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': '4333958', 'n_tokens_mistral': 927, 'n_tokens_neox': 909, 'n_words': 193}