mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-13 13:35:54 +00:00
Apply fixes from StyleCI
This commit is contained in:
committed by
StyleCI Bot
parent
2c8804cff3
commit
01ce0d09e3
@@ -22,7 +22,7 @@ class StoreSubdomainController extends AdminController
|
|||||||
/** @var Configuration */
|
/** @var Configuration */
|
||||||
protected $configuration;
|
protected $configuration;
|
||||||
|
|
||||||
public function __construct(UserRepository $userRepository, SubdomainRepository $subdomainRepository, Configuration $configuration)
|
public function __construct(UserRepository $userRepository, SubdomainRepository $subdomainRepository, Configuration $configuration)
|
||||||
{
|
{
|
||||||
$this->userRepository = $userRepository;
|
$this->userRepository = $userRepository;
|
||||||
$this->subdomainRepository = $subdomainRepository;
|
$this->subdomainRepository = $subdomainRepository;
|
||||||
|
|||||||
@@ -275,7 +275,7 @@ class ControlMessageController implements MessageComponentInterface
|
|||||||
|
|
||||||
$this->domainRepository
|
$this->domainRepository
|
||||||
->getDomainsByUserId($user['id'])
|
->getDomainsByUserId($user['id'])
|
||||||
->then(function ($domains) use ($connection, $deferred, $user, $serverHost) {
|
->then(function ($domains) use ($connection, $deferred , $serverHost) {
|
||||||
$userDomain = collect($domains)->first(function ($domain) use ($serverHost) {
|
$userDomain = collect($domains)->first(function ($domain) use ($serverHost) {
|
||||||
return strtolower($domain['domain']) === strtolower($serverHost);
|
return strtolower($domain['domain']) === strtolower($serverHost);
|
||||||
});
|
});
|
||||||
@@ -290,6 +290,7 @@ class ControlMessageController implements MessageComponentInterface
|
|||||||
$connection->close();
|
$connection->close();
|
||||||
|
|
||||||
$deferred->reject(null);
|
$deferred->reject(null);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -324,7 +325,7 @@ class ControlMessageController implements MessageComponentInterface
|
|||||||
if (! is_null($subdomain)) {
|
if (! is_null($subdomain)) {
|
||||||
return $this->subdomainRepository->getSubdomainByNameAndDomain($subdomain, $serverHost)
|
return $this->subdomainRepository->getSubdomainByNameAndDomain($subdomain, $serverHost)
|
||||||
->then(function ($foundSubdomain) use ($connection, $subdomain, $user, $serverHost) {
|
->then(function ($foundSubdomain) use ($connection, $subdomain, $user, $serverHost) {
|
||||||
if (! is_null($foundSubdomain) && ! is_null($user) && $foundSubdomain['user_id'] !== $user['id']){
|
if (! is_null($foundSubdomain) && ! is_null($user) && $foundSubdomain['user_id'] !== $user['id']) {
|
||||||
$message = config('expose.admin.messages.subdomain_reserved');
|
$message = config('expose.admin.messages.subdomain_reserved');
|
||||||
$message = str_replace(':subdomain', $subdomain, $message);
|
$message = str_replace(':subdomain', $subdomain, $message);
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ class DatabaseSubdomainRepository implements SubdomainRepository
|
|||||||
$this->database
|
$this->database
|
||||||
->query('SELECT * FROM subdomains WHERE subdomain = :name AND domain = :domain', [
|
->query('SELECT * FROM subdomains WHERE subdomain = :name AND domain = :domain', [
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
'domain' => $domain
|
'domain' => $domain,
|
||||||
])
|
])
|
||||||
->then(function (Result $result) use ($deferred) {
|
->then(function (Result $result) use ($deferred) {
|
||||||
$deferred->resolve($result->rows[0] ?? null);
|
$deferred->resolve($result->rows[0] ?? null);
|
||||||
|
|||||||
Reference in New Issue
Block a user