<commit_before><?php

/*
 * This file is part of the Arachne
 *
 * Copyright (c) <NAME> (<EMAIL>)
 *
 * For the full copyright and license information, please view the file license.md that was distributed with this source code.
 */

namespace Arachne\DIHelpers\DI;

use Nette\Utils\AssertionException;

/**
 * @author <NAME> <<EMAIL>>
 */
trait TagHelpersTrait
{
    /** @var string[] */
    private $tags = [];

    /** @var string[] */
    private $overrides = [];

    /** @var bool */
    private $freeze;

    /**
     * @param string $tag
     * @param string $type
     *
     * @return string
     */
    public function add($tag, $type = null)
    {
        if ($this->freeze) {
            throw new AssertionException('Usage of '.__CLASS__.'::add() is only allowed in loadConfiguration.');
        }
        $this->tags[$tag] = $type;
    }<commit_msg>Improve coding style<commit_after><?php

/*
 * This file is part of the Arachne
 *
 * Copyright (c) <NAME> (<EMAIL>)
 *
 * For the full copyright and license information, please view the file license.md that was distributed with this source code.
 */

namespace Arachne\DIHelpers\DI;

use Nette\Utils\AssertionException;

/**
 * @author <NAME> <<EMAIL>>
 */
trait TagHelpersTrait
{
    /**
     * @var string[]
     */
    private $tags = [];

    /**
     * @var string[]
     */
    private $overrides = [];

    /**
     * @var bool
     */
    private $freeze;

    /**
     * @param string      $tag
     * @param string|null $type
     *
     * @return string
     */
    public function add($tag, $type = null)
    {
        if ($this->freeze) {
            throw new AssertionException('Usage of '.__CLASS__.'::add() is only allowed in loadConfiguration.');
        }
        $this->tags[$tag] = $type;
    }
{'fraction_non_alphanumeric': 0.14952220348510398, 'fraction_numerical': 0.0, 'mean_word_length': 2.290203327171904, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 17, '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': '7456713', 'n_tokens_mistral': 553, 'n_tokens_neox': 554, 'n_words': 160}