<commit_before><?php

/*
 * This file is part of the Disco package.
 *
 * (c) bitExpert AG
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace bitExpert\Disco\Config;

use bitExpert\Disco\Annotations\Bean;
use bitExpert\Disco\Annotations\Configuration;
use bitExpert\Disco\Annotations\Parameter;
use bitExpert\Disco\Annotations\Parameters;
use bitExpert\Disco\Helper\SampleService;

/**
 * @Configuration
 */
class BeanConfigurationWithParameters
{
    /**
     * @Bean({"singleton"=false})
     * @Parameters({
     *  @Parameter({"name" = "test"})
     * })
     * @return SampleService
     */
    public function sampleServiceWithParam($test)
    {
        $service = new SampleService();
        $service->setTest($test);
        return $service;
    }

    /**
     * @Bean({"singleton"=false})
     * @Parameters({
     *  @Parameter({"name" = "test.nested.key"})
     * })
     * @return SampleService
     */
    public function sampleServiceWithNestedParamKey($test)
    {
        $service = new SampleService();
        $service->setTest($test);
        return $service;
    }

    /**
     * @Bean({"singleton"=false})
     * @Parameters({
     *  @Parameter({"name" = "test", "default" = "myDefaultValue"})
     * })
     * @return SampleService
     */
    public function sampleServiceWithParamDefaultValue($test)
    {
        $service = new SampleService();
        $service->setTest($test);
        return $service;
    }

    /**
     * @Bean({"singleton"=false})
     * @Parameters({
     *  @Parameter({"name" = "test", "required" = false})
     * })
     * @return SampleService
     */
    public function sampleServiceWithoutRequiredParam($test)
    {
        $service = new SampleService();
        $service->setTest($test);
        return $service;
    }
}<commit_msg>Added default value to method parameters to make the tests more consistent.<commit_after><?php

/*
 * This file is part of the Disco package.
 *
 * (c) bitExpert AG
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace bitExpert\Disco\Config;

use bitExpert\Disco\Annotations\Bean;
use bitExpert\Disco\Annotations\Configuration;
use bitExpert\Disco\Annotations\Parameter;
use bitExpert\Disco\Annotations\Parameters;
use bitExpert\Disco\Helper\SampleService;

/**
 * @Configuration
 */
class BeanConfigurationWithParameters
{
    /**
     * @Bean({"singleton"=false})
     * @Parameters({
     *  @Parameter({"name" = "test"})
     * })
     * @return SampleService
     */
    public function sampleServiceWithParam($test = '')
    {
        $service = new SampleService();
        $service->setTest($test);
        return $service;
    }

    /**
     * @Bean({"singleton"=false})
     * @Parameters({
     *  @Parameter({"name" = "test.nested.key"})
     * })
     * @return SampleService
     */
    public function sampleServiceWithNestedParamKey($test = '')
    {
        $service = new SampleService();
        $service->setTest($test);
        return $service;
    }

    /**
     * @Bean({"singleton"=false})
     * @Parameters({
     *  @Parameter({"name" = "test", "default" = "myDefaultValue"})
     * })
     * @return SampleService
     */
    public function sampleServiceWithParamDefaultValue($test = '')
    {
        $service = new SampleService();
        $service->setTest($test);
        return $service;
    }

    /**
     * @Bean({"singleton"=false})
     * @Parameters({
     *  @Parameter({"name" = "test", "required" = false})
     * })
     * @return SampleService
     */
    public function sampleServiceWithoutRequiredParam($test = '')
    {
        $service = new SampleService();
        $service->setTest($test);
        return $service;
    }
}
{'fraction_non_alphanumeric': 0.14660093409444733, 'fraction_numerical': 0.0, 'mean_word_length': 2.7174541947926714, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '4895705', 'n_tokens_mistral': 1146, 'n_tokens_neox': 1132, 'n_words': 231}