<commit_before><?php

namespace App\Importer;

use App\Models\Asset;
use App\Models\License;
use Illuminate\Support\Facades\Auth;

class LicenseImporter extends ItemImporter
{
    public function __construct($filename)
    {
        parent::__construct($filename);
    }

    protected function handle($row)
    {
        // ItemImporter handles the general fetching.
        parent::handle($row);
        $this->createLicenseIfNotExists($row);
    }

    /**
     * Create the license if it does not exist.
     *
     * @author <NAME>
     * @since 4.0
     * @param array $row
     * @return License|mixed|null
     */
    public function createLicenseIfNotExists(array $row)
    {
        $editingLicense = false;
        $license = License::where('name', $this->item['name'])
                    ->where('serial', $this->item['serial'])<commit_msg>Tweak query in the License Importer to not require a Product Key<commit_after><?php

namespace App\Importer;

use App\Models\Asset;
use App\Models\License;
use Illuminate\Support\Facades\Auth;

class LicenseImporter extends ItemImporter
{
    public function __construct($filename)
    {
        parent::__construct($filename);
    }

    protected function handle($row)
    {
        // ItemImporter handles the general fetching.
        parent::handle($row);
        $this->createLicenseIfNotExists($row);
    }

    /**
     * Create the license if it does not exist.
     *
     * @author <NAME>
     * @since 4.0
     * @param array $row
     * @return License|mixed|null
     */
    public function createLicenseIfNotExists(array $row)
    {
        $editingLicense = false;
        $license = License::where('name', $this->item['name'])
{'fraction_non_alphanumeric': 0.12028301886792453, 'fraction_numerical': 0.0023584905660377358, 'mean_word_length': 2.7214912280701755, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, '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': '4988925', 'n_tokens_mistral': 491, 'n_tokens_neox': 487, 'n_words': 118}