<commit_before><?php declare(strict_types=1);

use PHPUnit\Framework\TestCase;
use Monomelodies\Reflex\ReflectionFunction;

final class FunctionTest extends TestCase
{
    public function testWeCanGetAllPossibleCalls() : void
    {
        $fn = new ReflectionFunction(fn (string $foo, int $bar = 0, bool $baz = false) => false);
        $calls = $fn->getPossibleCalls(...$fn->getParameters());
        $this->assertEquals(count($calls), 3);
    }
}
<commit_msg>add test to get all possible return types<commit_after><?php declare(strict_types=1);

use PHPUnit\Framework\TestCase;
use Monomelodies\Reflex\ReflectionFunction;

final class FunctionTest extends TestCase
{
    public function testWeCanGetAllPossibleCalls() : void
    {
        $fn = new ReflectionFunction(fn (string $foo, int $bar = 0, bool $baz = false) => false);
        $calls = $fn->getPossibleCalls(...$fn->getParameters());
        $this->assertEquals(count($calls), 3);
    }

    public function testWeCanGetAllPossibleReturnTypes() : void
    {
        $fn = new ReflectionFunction(fn (string $foo, int $bar = 0, bool $baz = false) :? bool => false);
        $returnTypes = $fn->getPossibleReturnTypes();
        $this->assertEquals(count($returnTypes), 2);
    }
}

{'fraction_non_alphanumeric': 0.1360708534621578, 'fraction_numerical': 0.00644122383252818, 'mean_word_length': 3.8745098039215686, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 14, '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': '775323', 'n_tokens_mistral': 393, 'n_tokens_neox': 380, 'n_words': 90}