<commit_before><?php

declare(strict_types=1);

namespace Orchid\Screen\Fields;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Crypt;
use Orchid\Screen\Concerns\Multipliable;
use Orchid\Screen\Field;
use Orchid\Support\Assert;

/**
 * Class Relation.
 *
 * @method Relation accesskey($value = true)
 * @method Relation autofocus($value = true)
 * @method Relation disabled($value = true)
 * @method Relation form($value = true)
 * @method Relation name(string $value = null)
 * @method Relation required(bool $value = true)
 * @method Relation size($value = true)
 * @method Relation tabindex($value = true)
 * @method Relation help(string $value = null)
 * @method Relation placeholder(string $placeholder = null)
 * @method Relation popover(string $value = null)
 * @method Relation title(string $value = null)
 */
class Relation extends Field
{
    use Multipliable;

    /**
     * @var string
     */
    protected $view = 'platform::fields.relation';

    /**
     * Default attributes value.
     *
     * @var array
     */
    protected $attributes = [
        'class'                 => 'form-control',
        'value'                 => [],
        'relationScope'         => null,
        'relationAppend'        => null,
        'relationSearchColumns' => null,
    ];

    /**
     * @var array
     */
    protected $required = [
        'name',
        'relationModel',
        'relationName',
        'relationKey',
        'relationScope',
        'relationAppend',
        'relationSearchColumns',
    ];

    /**
     * Attributes available for a particular tag.
     *
     * @var array
     */
    protected $inlineAttributes = [
        'accesskey',
        'autofocus',
        'disabled',
        'form',
        'placeholder',
        'name',
        'required',
        'size',
        'tabindex',
        'data-maximum-selection-length',
    ];

    /**
     * @param string|Model $model
     * @param string       $name
     * @param string|null  $key
     *
     * @return Relation
     *
     * @throws \Illuminate\Contracts\Container\BindingResolutionException
     */
    public function fromModel(string $model, string $name, string $key = null): self
    {<commit_msg>Fix styling<commit_after><?php

declare(strict_types=1);

namespace Orchid\Screen\Fields;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Crypt;
use Orchid\Screen\Concerns\Multipliable;
use Orchid\Screen\Field;
use Orchid\Support\Assert;

/**
 * Class Relation.
 *
 * @method Relation accesskey($value = true)
 * @method Relation autofocus($value = true)
 * @method Relation disabled($value = true)
 * @method Relation form($value = true)
 * @method Relation name(string $value = null)
 * @method Relation required(bool $value = true)
 * @method Relation size($value = true)
 * @method Relation tabindex($value = true)
 * @method Relation help(string $value = null)
 * @method Relation placeholder(string $placeholder = null)
 * @method Relation popover(string $value = null)
 * @method Relation title(string $value = null)
 */
class Relation extends Field
{
    use Multipliable;

    /**
     * @var string
     */
    protected $view = 'platform::fields.relation';

    /**
     * Default attributes value.
     *
     * @var array
     */
    protected $attributes = [
        'class'                 => 'form-control',
        'value'                 => [],
        'relationScope'         => null,
        'relationAppend'        => null,
        'relationSearchColumns' => null,
    ];

    /**
     * @var array
     */
    protected $required = [
        'name',
        'relationModel',
        'relationName',
        'relationKey',
        'relationScope',
        'relationAppend',
        'relationSearchColumns',
    ];

    /**
     * Attributes available for a particular tag.
     *
     * @var array
     */
    protected $inlineAttributes = [
        'accesskey',
        'autofocus',
        'disabled',
        'form',
        'placeholder',
        'name',
        'required',
        'size',
        'tabindex',
        'data-maximum-selection-length',
    ];

    /**
     * @param string|Model $model
     * @param string       $name
     * @param string|null  $key
     *
     * @throws \Illuminate\Contracts\Container\BindingResolutionException
     *
     * @return Relation
     *
     */
    public function fromModel(string $model, string $name, string $key = null): self
    {
{'fraction_non_alphanumeric': 0.1295107372149657, 'fraction_numerical': 0.00044277175116227583, 'mean_word_length': 2.3074670571010247, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '5807086', 'n_tokens_mistral': 1318, 'n_tokens_neox': 1310, 'n_words': 307}