mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-13 13:35:54 +00:00
Merge pull request #155 from beyondcode/analysis-5ZodB2
Apply fixes from StyleCI
This commit is contained in:
@@ -27,6 +27,7 @@ class ShareCommand extends Command
|
||||
{
|
||||
if (! empty($this->option('hostname')) && ! empty($this->option('subdomain'))) {
|
||||
$this->error('You can only specify one. Either a custom hostname or a subdomain.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
namespace App\Server\Http\Controllers\Admin;
|
||||
|
||||
use App\Contracts\HostnameRepository;
|
||||
use App\Contracts\SubdomainRepository;
|
||||
use App\Contracts\UserRepository;
|
||||
use Illuminate\Http\Request;
|
||||
use Ratchet\ConnectionInterface;
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
namespace App\Server\Http\Controllers\Admin;
|
||||
|
||||
use App\Contracts\HostnameRepository;
|
||||
use App\Contracts\SubdomainRepository;
|
||||
use App\Contracts\UserRepository;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
namespace App\Server\Http\Controllers;
|
||||
|
||||
use App\Contracts\ConnectionManager;
|
||||
use App\Contracts\SubdomainRepository;
|
||||
use App\Contracts\HostnameRepository;
|
||||
use App\Contracts\SubdomainRepository;
|
||||
use App\Contracts\UserRepository;
|
||||
use App\Http\QueryParameters;
|
||||
use App\Server\Connections\ConnectionConfiguration;
|
||||
@@ -14,9 +14,9 @@ use Ratchet\ConnectionInterface;
|
||||
use Ratchet\WebSocket\MessageComponentInterface;
|
||||
use React\Promise\Deferred;
|
||||
use React\Promise\PromiseInterface;
|
||||
use stdClass;
|
||||
use function React\Promise\reject;
|
||||
use function React\Promise\resolve as resolvePromise;
|
||||
use stdClass;
|
||||
|
||||
class ControlMessageController implements MessageComponentInterface
|
||||
{
|
||||
@@ -301,7 +301,7 @@ class ControlMessageController implements MessageComponentInterface
|
||||
* Check if the given hostname is reserved for a different user.
|
||||
*/
|
||||
return $this->hostnameRepository->getHostnamesByUserId($user['id'])
|
||||
->then(function ($foundHostnames) use ($connection, $hostname, $user) {
|
||||
->then(function ($foundHostnames) use ($connection, $hostname) {
|
||||
$foundHostname = collect($foundHostnames)->first(function ($foundHostname) use ($hostname) {
|
||||
return Str::is($foundHostname['hostname'], $hostname);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user