<commit_before><?php

namespace League\FactoryMuffin\Kind;

use Exception;
use League\FactoryMuffin\Facade\FactoryMuffin;
use League\FactoryMuffin\Kind;

/**
 * Class Call.
 *
 * @package League\FactoryMuffin\Kind
 * @author  Zizaco <<EMAIL>>
 * @author  <NAME> <<EMAIL>>
 * @license <https://github.com/thephpleague/factory-muffin/blob/master/LICENSE> MIT
 */
class Call extends Kind
{
    /**
     * Generate, and return the attribute.
     *
     * @throws \Exception
     *
     * @return mixed
     */
    public function generate()
    {
        $callable = substr($this->kind, 5);
        $params = array();

        if (strstr($callable, '|')) {
            $parts = explode('|', $callable);
            $callable = array_shift($parts);

            if ($parts[0] === 'factory' && count($parts) > 1) {
                $params[] = FactoryMuffin::create($parts[1]);
            } else {
                $attr = implode('|', $parts);
                $params[] = FactoryMuffin::generateAttr($attr, $this->model);
            }
        }

        if (! method_exists($this->model, $callable)) {
            throw new Exception("$this->model does not have a static $callable method");<commit_msg>Fixed call cs<commit_after><?php

namespace League\FactoryMuffin\Kind;

use Exception;
use League\FactoryMuffin\Facade\FactoryMuffin;
use League\FactoryMuffin\Kind;

/**
 * Class Call.
 *
 * @package League\FactoryMuffin\Kind
 * @author  Zizaco <<EMAIL>>
 * @author  <NAME> <<EMAIL>>
 * @license <https://github.com/thephpleague/factory-muffin/blob/master/LICENSE> MIT
 */
class Call extends Kind
{
    /**
     * Generate, and return the attribute.
     *
     * @throws \Exception
     *
     * @return mixed
     */
    public function generate()
    {
        $callable = substr($this->kind, 5);
        $params = array();

        if (strstr($callable, '|')) {
            $parts = explode('|', $callable);
            $callable = array_shift($parts);

            if ($parts[0] === 'factory' && count($parts) > 1) {
                $params[] = FactoryMuffin::create($parts[1]);
            } else {
                $attr = implode('|', $parts);
                $params[] = FactoryMuffin::generateAttr($attr, $this->model);
            }
        }

        if (!method_exists($this->model, $callable)) {
            throw new Exception("$this->model does not have a static $callable method");
{'fraction_non_alphanumeric': 0.1603340292275574, 'fraction_numerical': 0.003340292275574113, 'mean_word_length': 2.3370473537604455, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 25, 'https://': 2, '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': '7104152', 'n_tokens_mistral': 743, 'n_tokens_neox': 728, 'n_words': 155}