<commit_before><?php
// Copyright (c) 2013 - 2017 by <NAME>. All rights reserved.

declare(strict_types=1);

namespace LiTE\DesignPatterns;

class Singleton
{
    private static $instance = null;

    public static function getInstance()
    {
        if (is_null(self::$instance))
        {
            self::$instance = new static();
        }
        return self::$instance;
    }
    
    /**
     * @return void
     */
    private function __construct()
    {
    }
    
        /**
     * @return void
     * @codeCoverageIgnore
     */
    private function __clone()
    {
    }<commit_msg>Update Singleton.php<commit_after><?php
// Copyright (c) 2013 - 2017 by <NAME>. All rights reserved.

declare(strict_types=1);

namespace LiTE\DesignPatterns;

class Singleton
{
    private static $instance = null;

    public static function getInstance()
    {
        if (is_null(self::$instance))
        {
            self::$instance = new static();
        }
        return self::$instance;
    }
    
    /**
     * @return void
     */
    private function __construct()
    {
    }
    
    public function setInstance($instance): void
    {
        self::$instance = $instance;
    }
    
    /**
     * @return void
     * @codeCoverageIgnore
     */
    private function __clone()
    {
    }
{'fraction_non_alphanumeric': 0.1205837173579109, 'fraction_numerical': 0.013824884792626729, 'mean_word_length': 1.9413092550790068, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '906508', 'n_tokens_mistral': 398, 'n_tokens_neox': 383, 'n_words': 89}