My code was working correctly , until we merged to dev , then it started making conflicts ,
<code> private function findBanners(string $providedUUID, string $country, string $state, string $city): void
{
$patterns = [];
if (
$country === "_US"
) {
$patterns = [
$this->scriptsDirectory . $providedUUID . strtoupper($country) . strtoupper($state) . strtoupper($city) . "_BANNER*",
$this->scriptsDirectory . $providedUUID . strtoupper($country) . strtoupper($state) . "_BANNER*",
$this->scriptsDirectory . $providedUUID . strtoupper($country) . "_BANNER*",
];
} else {
$patterns = [
$this->scriptsDirectory . $providedUUID . strtoupper($country) . strtoupper($city) . "_BANNER*",
$this->scriptsDirectory . $providedUUID . strtoupper($country) . "_BANNER*",
$this->scriptsDirectory . $providedUUID . "_WORLDWIDE_BANNER*",
];
}
foreach ($patterns as $pattern) {
$this->foundBanners = array_merge($this->foundBanners, glob($pattern));
}
$this->foundBanners = array_unique($this->foundBanners);
var_dump($this->foundBanners);
foreach ($this->foundBanners as &$banner) {
$banner = basename($banner);
}
}
</code>
<code> private function findBanners(string $providedUUID, string $country, string $state, string $city): void
{
$patterns = [];
if (
$country === "_US"
) {
$patterns = [
$this->scriptsDirectory . $providedUUID . strtoupper($country) . strtoupper($state) . strtoupper($city) . "_BANNER*",
$this->scriptsDirectory . $providedUUID . strtoupper($country) . strtoupper($state) . "_BANNER*",
$this->scriptsDirectory . $providedUUID . strtoupper($country) . "_BANNER*",
];
} else {
$patterns = [
$this->scriptsDirectory . $providedUUID . strtoupper($country) . strtoupper($city) . "_BANNER*",
$this->scriptsDirectory . $providedUUID . strtoupper($country) . "_BANNER*",
$this->scriptsDirectory . $providedUUID . "_WORLDWIDE_BANNER*",
];
}
foreach ($patterns as $pattern) {
$this->foundBanners = array_merge($this->foundBanners, glob($pattern));
}
$this->foundBanners = array_unique($this->foundBanners);
var_dump($this->foundBanners);
foreach ($this->foundBanners as &$banner) {
$banner = basename($banner);
}
}
</code>
private function findBanners(string $providedUUID, string $country, string $state, string $city): void
{
$patterns = [];
if (
$country === "_US"
) {
$patterns = [
$this->scriptsDirectory . $providedUUID . strtoupper($country) . strtoupper($state) . strtoupper($city) . "_BANNER*",
$this->scriptsDirectory . $providedUUID . strtoupper($country) . strtoupper($state) . "_BANNER*",
$this->scriptsDirectory . $providedUUID . strtoupper($country) . "_BANNER*",
];
} else {
$patterns = [
$this->scriptsDirectory . $providedUUID . strtoupper($country) . strtoupper($city) . "_BANNER*",
$this->scriptsDirectory . $providedUUID . strtoupper($country) . "_BANNER*",
$this->scriptsDirectory . $providedUUID . "_WORLDWIDE_BANNER*",
];
}
foreach ($patterns as $pattern) {
$this->foundBanners = array_merge($this->foundBanners, glob($pattern));
}
$this->foundBanners = array_unique($this->foundBanners);
var_dump($this->foundBanners);
foreach ($this->foundBanners as &$banner) {
$banner = basename($banner);
}
}
This code is used to find specific banners and to store them in a array , example: uuid_country_banner01 , uuid_country_banner02. And it founded everything perfect , until we pushed to dev and now is this issue
Uncaught SyntaxError: Unexpected token '{'
<code>array(2) { <- marked red here
[0]=>
string(112) "C:laragonwwwmyprojectname/storage/app/public/scripts/ouruuid_WORLDWIDE_BANNER01"
[1]=>
string(112) "C:laragonwwwmyprojectname/storage/app/public/scripts/ouruuid_WORLDWIDE_BANNER02"
}
</code>
<code>array(2) { <- marked red here
[0]=>
string(112) "C:laragonwwwmyprojectname/storage/app/public/scripts/ouruuid_WORLDWIDE_BANNER01"
[1]=>
string(112) "C:laragonwwwmyprojectname/storage/app/public/scripts/ouruuid_WORLDWIDE_BANNER02"
}
</code>
array(2) { <- marked red here
[0]=>
string(112) "C:laragonwwwmyprojectname/storage/app/public/scripts/ouruuid_WORLDWIDE_BANNER01"
[1]=>
string(112) "C:laragonwwwmyprojectname/storage/app/public/scripts/ouruuid_WORLDWIDE_BANNER02"
}
As i said it was working , it is the same as it was working , on the working branch , but still now i have the error after merging into dev , why is that?
1