mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 08:24:05 +00:00
Apply fixes from StyleCI
This commit is contained in:
parent
e872139c88
commit
d2931530bd
3 changed files with 13 additions and 4 deletions
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Stancl\Tenancy\StorageDrivers\Database;
|
namespace Stancl\Tenancy\StorageDrivers\Database;
|
||||||
|
|
||||||
use Illuminate\Config\Repository as ConfigRepository;
|
use Illuminate\Config\Repository as ConfigRepository;
|
||||||
|
|
@ -20,6 +22,7 @@ class DomainRepository extends Repository
|
||||||
public function getTenantDomains($tenant)
|
public function getTenantDomains($tenant)
|
||||||
{
|
{
|
||||||
$id = $tenant instanceof Tenant ? $tenant->id : $tenant;
|
$id = $tenant instanceof Tenant ? $tenant->id : $tenant;
|
||||||
|
|
||||||
return $this->where('tenant_id', $id)->get('domain')->toArray();
|
return $this->where('tenant_id', $id)->get('domain')->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Stancl\Tenancy\StorageDrivers\Database;
|
namespace Stancl\Tenancy\StorageDrivers\Database;
|
||||||
|
|
||||||
use Illuminate\Config\Repository as ConfigRepository;
|
use Illuminate\Config\Repository as ConfigRepository;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Stancl\Tenancy\StorageDrivers\Database;
|
namespace Stancl\Tenancy\StorageDrivers\Database;
|
||||||
|
|
||||||
use Illuminate\Config\Repository as ConfigRepository;
|
use Illuminate\Config\Repository as ConfigRepository;
|
||||||
|
|
@ -74,6 +76,7 @@ class TenantRepository extends Repository
|
||||||
foreach ($kvPairs as $key => $value) {
|
foreach ($kvPairs as $key => $value) {
|
||||||
if (in_array($key, static::customColumns())) {
|
if (in_array($key, static::customColumns())) {
|
||||||
$data[$key] = $value;
|
$data[$key] = $value;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
$jsonData[$key] = $value;
|
$jsonData[$key] = $value;
|
||||||
|
|
@ -94,6 +97,7 @@ class TenantRepository extends Repository
|
||||||
foreach ($keys as $key => $key) {
|
foreach ($keys as $key => $key) {
|
||||||
if (in_array($key, static::customColumns())) {
|
if (in_array($key, static::customColumns())) {
|
||||||
$data[$key] = null;
|
$data[$key] = null;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
unset($jsonData[$key]);
|
unset($jsonData[$key]);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue