<commit_before><?php

/*
 * This file is part of Jedisjeux.
 *
 * (c) <NAME>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace App\Behat\Page\Backend\Dealer;

use App\Behat\Behaviour\NamesIt;
use App\Behat\Behaviour\SpecifiesItsCode;
use App\Behat\Page\Backend\Crud\CreatePage as BaseCreatePage;
use Behat\Mink\Exception\ElementNotFoundException;

/**
 * @author <NAME> <<EMAIL>>
 */
class CreatePage extends BaseCreatePage
{
    use SpecifiesItsCode,
        NamesIt;

    /**
     * @param string $path
     *
     * @throws ElementNotFoundException
     */
    public function attachImage(string $path): void
    {
        $filesPath = $this->getParameter('files_path');

        $imageForm = $this->getElement('image');

        $imageForm->find('css', 'input[type="file"]')->attachFile($filesPath.$path);
    }

    /**
     * {@inheritdoc}
     */
    protected function getDefinedElements(): array
    {
        return array_merge(parent::getDefinedElements(), [
            'image' => '#app_dealer_image',
        ]);
    }
}
<commit_msg>fix behat tests<commit_after><?php

/*
 * This file is part of Jedisjeux.
 *
 * (c) <NAME>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace App\Behat\Page\Backend\Dealer;

use App\Behat\Behaviour\NamesIt;
use App\Behat\Behaviour\SpecifiesItsCode;
use App\Behat\Page\Backend\Crud\CreatePage as BaseCreatePage;
use Behat\Mink\Exception\ElementNotFoundException;

/**
 * @author <NAME> <<EMAIL>>
 */
class CreatePage extends BaseCreatePage
{
    use SpecifiesItsCode,
        NamesIt;

    /**
     * @param string $path
     *
     * @throws ElementNotFoundException
     */
    public function attachImage(string $path): void
    {
        $filesPath = $this->getParameter('files_path');

        $imageForm = $this->getElement('image');

        $imageForm->find('css', 'input[type="file"]')->attachFile($filesPath.$path);
    }

    /**
     * {@inheritdoc}
     */
    protected function getDefinedElements(): array
    {
        return array_merge(parent::getDefinedElements(), [
            'image' => '#app_dealer_image',
            'name' => '#app_dealer_name',
        ]);
    }
}

{'fraction_non_alphanumeric': 0.1358555460017197, 'fraction_numerical': 0.0, 'mean_word_length': 3.0120689655172415, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 22, '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': '2130555', 'n_tokens_mistral': 720, 'n_tokens_neox': 709, 'n_words': 154}