<commit_before><?php

namespace League\Container;

trait ArgumentResolverTrait
{
    /**
     * Uses the container to resolve arguments
     *
     * @param  array $args
     * @return array
     */
    public function resolveArguments(array $args)
    {
        $resolved = [];

        foreach ($args as $arg) {
            $resolved[] = (
                is_string($arg) && (
                    isset($this->getContainer()[$arg]) ||
                    class_exists($arg)
                )
            ) ? $this->getContainer()->get($arg) : $arg;
        }

        return $resolved;
    }

    /**
     * Ensure that ContainerAwareTrait is implemented
     *<commit_msg>Revert conflicts<commit_after><?php

namespace League\Container;

trait ArgumentResolverTrait
{
    /**
     * Uses the container to resolve arguments
     *
     * @param  array $args
     * @return array
     */
    public function resolveArguments(array $args)
    {
        $resolved = [];

        foreach ($args as $arg) {
            $resolved[] = (
                is_string($arg) && (
                    $this->getContainer()->isRegistered($arg)        ||
                    $this->getContainer()->isSingleton($arg)         ||
                    $this->getContainer()->isInServiceProvider($arg) ||
                    class_exists($arg)
                )
            ) ? $this->getContainer()->get($arg) : $arg;
        }

        return $resolved;
    }

    /**
     * Ensure that ContainerAwareTrait is implemented
     *
{'fraction_non_alphanumeric': 0.128391793514229, 'fraction_numerical': 0.0, 'mean_word_length': 1.597938144329897, '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': '7123971', 'n_tokens_mistral': 411, 'n_tokens_neox': 400, 'n_words': 79}