<commit_before><?php declare(strict_types=1);
/**
 * Uthando CMS (http://www.shaunfreeman.co.uk/)
 *
 * @author      <NAME> <<EMAIL>>
 * @link        https://github.com/uthando-cms for the canonical source repository
 * @copyright   Copyright (c) 27/12/17 <NAME>. (http://www.shaunfreeman.co.uk)
 * @license     see LICENSE
 */

namespace UthandoThemeManager\Model;


trait WidgetParamsTrait
{
    /**
     * @var string
     */
    protected $params;

    /**
     * @return array|bool
     */
    public function parseParams()
    {
        $params = parse_ini_string((string) $this->getParams(), true);
        return $params;
    }

    /**
     * @return string<commit_msg>add support for multidimensional params<commit_after><?php declare(strict_types=1);
/**
 * Uthando CMS (http://www.shaunfreeman.co.uk/)
 *
 * @author      <NAME> <<EMAIL>>
 * @link        https://github.com/uthando-cms for the canonical source repository
 * @copyright   Copyright (c) 27/12/17 Sh<NAME>. (http://www.shaunfreeman.co.uk)
 * @license     see LICENSE
 */

namespace UthandoThemeManager\Model;


use Zend\Config\Reader\Ini;

trait WidgetParamsTrait
{
    /**
     * @var string
     */
    protected $params;

    /**
     * @return array|bool
     */
    public function parseParams()
    {
        $params = new Ini();
        return $params->fromString($this->getParams());
    }

    /**
     * @return string
{'fraction_non_alphanumeric': 0.1518175338560228, 'fraction_numerical': 0.009978617248752673, 'mean_word_length': 2.572519083969466, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 14, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, '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': '6883383', 'n_tokens_mistral': 464, 'n_tokens_neox': 448, 'n_words': 94}