<commit_before><?php

namespace Orchid\Foundation\Http\Forms\Marketing\Advertising;

use Carbon\Carbon;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Orchid\Forms\Form;
use Orchid\Foundation\Core\Models\Adv;
use Orchid\Foundation\Core\Models\Post;
use Orchid\Foundation\Facades\Alert;

class AdvertisingMainForm extends Form
{
    /**
     * @var string
     */
    public $name = 'Общее';

    /**
     * Base Model.
     *
     * @var
     */
    protected $model = Post::class;

    /**
     * @return array
     */
    public function rules()
    {
        return [
        ];
    }

    /**
     * @param $post
     *
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
     */
    public function get(Post $post = null)
    {
        if (is_null($post)) {
            $post = new Post();
        }
        $adsCategory = collect(config('ads.category'));

        return view('dashboard::container.marketing.advertising.info', [
            'adv'        => $post,
            'categories' => $adsCategory,
        ]);
    }

    /**
     * @param Request|null $request
     * @param Post|null    $post
     */
    public function persist(Request $request = null, Post $post = null)
    {
        $parameters = $request->all();

        $parameters['type'] = 'advertising';
        $parameters['options']['startDate'] = Carbon::parse($parameters['options']['startDate'])->timestamp;
        $parameters['options']['endDate'] = Carbon::parse($parameters['options']['endDate'])->timestamp;<commit_msg>fast fix<commit_after><?php

namespace Orchid\Foundation\Http\Forms\Marketing\Advertising;

use Carbon\Carbon;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Orchid\Forms\Form;
use Orchid\Foundation\Core\Models\Adv;
use Orchid\Foundation\Core\Models\Post;
use Orchid\Foundation\Facades\Alert;

class AdvertisingMainForm extends Form
{
    /**
     * @var string
     */
    public $name = 'Общее';

    /**
     * Base Model.
     *
     * @var
     */
    protected $model = Post::class;

    /**
     * @return array
     */
    public function rules()
    {
        return [
        ];
    }

    /**
     * @param $post
     *
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
     */
    public function get(Post $post = null)
    {
        if (is_null($post)) {
            $post = new Post();
        }
        $adsCategory = collect(config('content.advertising'));

        return view('dashboard::container.marketing.advertising.info', [
            'adv'        => $post,
            'categories' => $adsCategory,
        ]);
    }

    /**
     * @param Request|null $request
     * @param Post|null    $post
     */
    public function persist(Request $request = null, Post $post = null)
    {
        $parameters = $request->all();

        $parameters['type'] = 'advertising';
        $parameters['options']['startDate'] = Carbon::parse($parameters['options']['startDate'])->timestamp;
        $parameters['options']['endDate'] = Carbon::parse($parameters['options']['endDate'])->timestamp;
{'fraction_non_alphanumeric': 0.15568475452196381, 'fraction_numerical': 0.0, 'mean_word_length': 2.41079295154185, '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': '5218865', 'n_tokens_mistral': 938, 'n_tokens_neox': 917, 'n_words': 164}