<commit_before><?php
/**
 *  * NumbersToWordsHelper
 *   * Convert numbers to words with an without an ordinal suffix
 *    *
 *     * User: <NAME> <<EMAIL>>
 *      * Date: 30/10/14
 *       * Time: 10:47
 *        */

namespace App\View\Helper;

use Cake\View\Helper;
use Cake\View\View;
use NumberFormatter;

class NumbersToWordsHelper extends Helper {

	protected $_defaultConfig = [
		'locale' => 'en_GB'
	];

	public function __construct(View $view, array $config = []) {
		parent::__construct($view, $config);
	}

/**
 *  * Convert a number into a word
 *   *
 *    * @param $number An integer number to convert
 *     * @return string
 *      */
	public function spell($number) {
		$formatter = new NumberFormatter($this->config['locale'], NumberFormatter::SPELLOUT);
		return $formatter->format($number);
	}

/**
 *  * Convert a number into it's ordinal type
 *   * eg, 1 -> 1st, 2 -> 2nd
 *    *
 *     * @param $number An integer number to convert
 *      * @return string
 *       */
	public function ordinal($number) {
		$formatter = new NumberFormatter($this->config['locale'], NumberFormatter::ORDINAL);
		return $formatter->format($number);
	}

} <commit_msg>Fixed the namespace and the comments<commit_after><?php
/**
 * NumbersToWordsHelper
 * Convert numbers to words with an without an ordinal suffix
 *
 * User: <NAME> <<EMAIL>>
 * Date: 30/10/14
 * Time: 10:47
*/

namespace NumbersToWords\View\Helper;

use Cake\View\Helper;
use Cake\View\View;
use NumberFormatter;

class NumbersToWordsHelper extends Helper {

	protected $_defaultConfig = [
		'locale' => 'en_GB'
	];

	public function __construct(View $view, array $config = []) {
		parent::__construct($view, $config);
	}

/**
 * Convert a number into a word
 *
 * @param $number An integer number to convert
 * @return string
 */
	public function spell($number) {
		$formatter = new NumberFormatter($this->config['locale'], NumberFormatter::SPELLOUT);
		return $formatter->format($number);
	}

/**
 * Convert a number into it's ordinal type
 * eg, 1 -> 1st, 2 -> 2nd
 *
 * @param $number An integer number to convert
 * @return string
*/
	public function ordinal($number) {
		$formatter = new NumberFormatter($this->config['locale'], NumberFormatter::ORDINAL);
		return $formatter->format($number);
	}
} 
{'fraction_non_alphanumeric': 0.1437965804471723, 'fraction_numerical': 0.012275317843051293, 'mean_word_length': 3.6666666666666665, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 23, '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': '1547236', 'n_tokens_mistral': 764, 'n_tokens_neox': 695, 'n_words': 199}