<commit_before><?php
/**
 * @author         <NAME> <<EMAIL>>
 * @copyright      (c) 2013-2018, <NAME>. All Rights Reserved.
 * @license        GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
 * @package        PH7 / App / System / Core / Model / Design
 */

namespace PH7;

use PH7\Framework\Mvc\Router\Uri;

abstract class WriteDesignCoreModel
{
    /**
     * Generate the categories links.
     *
     * @param object $oCategories Categories queries.
     * @param string $sMod Module name. Choose between 'blog' and 'note'.
     * @return void Output the categories list.
     */
    public static function categories($oCategories, $sMod)
    {
        WriteCore::checkMod($sMod);

        $sContents = '';

        echo '<p class="small">', t('Categories:'), ' <span class="italic">';

        foreach ($oCategories as $oCategory)
            $sContents .= '<a href="' . Uri::get($sMod, 'main', 'category', $oCategory->name, ',title,asc') . '" data-load="ajax">' . $oCategory->name . '</a> &bull; ';

        unset($oCategories);

        // Remove the last " &bull; " since not needed for the last category
        $sContents = rtrim($sContents, ' &bull; ');

        echo $sContents;
        echo '</span></p>';
    }
}
<commit_msg>Declare stdClass argument type<commit_after><?php
/**
 * @author         <NAME> <<EMAIL>>
 * @copyright      (c) 2013-2018, <NAME>. All Rights Reserved.
 * @license        GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
 * @package        PH7 / App / System / Core / Model / Design
 */

namespace PH7;

use PH7\Framework\Mvc\Router\Uri;
use stdClass;

abstract class WriteDesignCoreModel
{
    /**
     * Generate the categories links.
     *
     * @param stdClass $oCategories Categories queries.
     * @param string $sMod Module name. Choose between 'blog' and 'note'.
     *
     * @return void Output the categories list.
     */
    public static function categories(stdClass $oCategories, $sMod)
    {
        WriteCore::checkMod($sMod);

        $sContents = '';

        echo '<p class="small">', t('Categories:'), ' <span class="italic">';

        foreach ($oCategories as $oCategory)
            $sContents .= '<a href="' . Uri::get($sMod, 'main', 'category', $oCategory->name, ',title,asc') . '" data-load="ajax">' . $oCategory->name . '</a> &bull; ';

        unset($oCategories);

        // Remove the last " &bull; " since not needed for the last category
        $sContents = rtrim($sContents, ' &bull; ');

        echo $sContents;
        echo '</span></p>';
    }
}

{'fraction_non_alphanumeric': 0.15513947267863967, 'fraction_numerical': 0.009935040122277417, 'mean_word_length': 2.5813953488372094, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 27, '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': '4332691', 'n_tokens_mistral': 818, 'n_tokens_neox': 775, 'n_words': 228}