<commit_before><?php

namespace Patchwork;

use Silex\Application;

class App
{
    /**
     * @var string Default instance name
     */
    const DEFAULT_NAME = 'default';

    /**
     * @var array Instance collection
     */
    private static $instances = [];



    /**
     * Gets an instance by its name
     *
     * @param string|array $param Requested instance name or parameter array
     *
     * @return App Requested instance, created on-the-fly if it doesn't exist
     */
    public static function getInstance($param = self::DEFAULT_NAME)
    {
        if (is_array($param)) {
            $name = array_key_exists('name', $param) ? $param['name'] : self::DEFAULT_NAME;
        } else {
            $name = $param;
            $param = [];
        }

        if (! array_key_exists($name, self::$instances)) {
            self::$instances[$name] = new Application($param);
        }

        return self::$instances[$name];
    }
}<commit_msg>actual inheritance<commit_after><?php

namespace Patchwork;

use Silex\Application;

class App extends Application
{
    /**
     * @var string Default instance name
     */
    const DEFAULT_NAME = 'default';

    /**
     * @var array Instance collection
     */
    private static $instances = [];



    /**
     * Gets an instance by its name
     *
     * @param string|array $param Requested instance name or parameter array
     *
     * @return App Requested instance, created on-the-fly if it doesn't exist
     */
    public static function getInstance($param = self::DEFAULT_NAME)
    {
        if (is_array($param)) {
            $name = array_key_exists('name', $param) ? $param['name'] : self::DEFAULT_NAME;
        } else {
            $name = $param;
            $param = [];
        }

        if (! array_key_exists($name, self::$instances)) {
            self::$instances[$name] = new App($param);
        }

        return self::$instances[$name];
    }
}
{'fraction_non_alphanumeric': 0.12919896640826872, 'fraction_numerical': 0.0, 'mean_word_length': 2.1947194719471947, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '5120592', 'n_tokens_mistral': 559, 'n_tokens_neox': 550, 'n_words': 145}