<commit_before><?php

namespace ArtLibs;


class Category
{
    /**
     * @param $app
     * @param null $state
     * @return mixed
     */
    public static function getCategories(Application $app, $state = null)
    {
        if (!isset($state)) {
            $query = $app->getDataManager()->getDataManager()->from("categories");
        } else {
            $query = $app->getDataManager()->getDataManager()->from("categories")->where(array("state" => $state));
        }

        try {
            $q = $query->fetchAll();
        } catch (\PDOException $ex) {
            $app->getErrorManager()->addMessage("Error : " . $ex->getMessage());
            return null;
        }

        return $q;
    }
<commit_msg>Minor Fixes<commit_after><?php

namespace ArtLibs;


class Category
{
    /**
     * @param Application $app
     * @param null $state
     * @return null
     */
    public static function getCategories(Application $app, $state = null)
    {
        if (!isset($state)) {
            $query = $app->getDataManager()->getDataManager()->from("categories");
        } else {
            $query = $app->getDataManager()->getDataManager()->from("categories")->where(array("state" => $state));
        }

        try {
            $q = $query->fetchAll();
        } catch (\PDOException $ex) {
            $app->getErrorManager()->addMessage("Error : " . $ex->getMessage());
            return null;
        }

        return $q;
    }

{'fraction_non_alphanumeric': 0.16930488644184447, 'fraction_numerical': 0.0, 'mean_word_length': 2.0739957716701904, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2715901', 'n_tokens_mistral': 411, 'n_tokens_neox': 414, 'n_words': 80}