mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-13 05:25:54 +00:00
Apply fixes from StyleCI
This commit is contained in:
@@ -127,7 +127,7 @@ class Client
|
||||
|
||||
$this->logger->info($data->message);
|
||||
$this->logger->info("Local-URL:\t\t<options=bold>{$sharedUrl}</>");
|
||||
$this->logger->info("Dashboard-URL:\t\t<options=bold>http://127.0.0.1:".config()->get('expose.dashboard_port')."</>");
|
||||
$this->logger->info("Dashboard-URL:\t\t<options=bold>http://127.0.0.1:".config()->get('expose.dashboard_port').'</>');
|
||||
$this->logger->info("Expose-URL:\t\t<options=bold>http://{$data->subdomain}.{$host}{$httpPort}</>");
|
||||
$this->logger->info("Expose-URL:\t\t<options=bold>https://{$data->subdomain}.{$host}</>");
|
||||
$this->logger->line('');
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
namespace App\Client\Support;
|
||||
|
||||
use Symfony\Component\Console\Output\StreamOutput;
|
||||
use Symfony\Component\Console\Formatter\OutputFormatterInterface;
|
||||
use Symfony\Component\Console\Helper\Helper;
|
||||
use Symfony\Component\Console\Output\StreamOutput;
|
||||
use Symfony\Component\Console\Terminal;
|
||||
|
||||
/**
|
||||
@@ -19,8 +19,8 @@ class ConsoleSectionOutput extends StreamOutput
|
||||
private $terminal;
|
||||
|
||||
/**
|
||||
* @param resource $stream
|
||||
* @param \Symfony\Component\Console\Output\ConsoleSectionOutput[] $sections
|
||||
* @param resource $stream
|
||||
* @param \Symfony\Component\Console\Output\ConsoleSectionOutput[] $sections
|
||||
*/
|
||||
public function __construct($stream, array &$sections, int $verbosity, bool $decorated, OutputFormatterInterface $formatter)
|
||||
{
|
||||
@@ -33,11 +33,11 @@ class ConsoleSectionOutput extends StreamOutput
|
||||
/**
|
||||
* Clears previous output for this section.
|
||||
*
|
||||
* @param int $lines Number of lines to clear. If null, then the entire output of this section is cleared
|
||||
* @param int $lines Number of lines to clear. If null, then the entire output of this section is cleared
|
||||
*/
|
||||
public function clear(int $lines = null)
|
||||
{
|
||||
if (empty($this->content) || !$this->isDecorated()) {
|
||||
if (empty($this->content) || ! $this->isDecorated()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ class ConsoleSectionOutput extends StreamOutput
|
||||
/**
|
||||
* Overwrites the previous output with a new message.
|
||||
*
|
||||
* @param array|string $message
|
||||
* @param array|string $message
|
||||
*/
|
||||
public function overwrite($message)
|
||||
{
|
||||
@@ -86,7 +86,7 @@ class ConsoleSectionOutput extends StreamOutput
|
||||
*/
|
||||
protected function doWrite(string $message, bool $newline)
|
||||
{
|
||||
if (!$this->isDecorated()) {
|
||||
if (! $this->isDecorated()) {
|
||||
parent::doWrite($message, $newline);
|
||||
|
||||
return;
|
||||
|
||||
@@ -12,7 +12,6 @@ use App\Server\Exceptions\NoFreePortAvailable;
|
||||
use Illuminate\Support\Arr;
|
||||
use Ratchet\ConnectionInterface;
|
||||
use Ratchet\WebSocket\MessageComponentInterface;
|
||||
use React\EventLoop\LoopInterface;
|
||||
use React\Promise\Deferred;
|
||||
use React\Promise\PromiseInterface;
|
||||
use function React\Promise\reject;
|
||||
@@ -151,7 +150,8 @@ class ControlMessageController implements MessageComponentInterface
|
||||
});
|
||||
}
|
||||
|
||||
protected function resolveConnectionMessage($connectionInfo, $user) {
|
||||
protected function resolveConnectionMessage($connectionInfo, $user)
|
||||
{
|
||||
$deferred = new Deferred();
|
||||
|
||||
$connectionMessageResolver = config('expose.admin.messages.resolve_connection_message')($connectionInfo, $user);
|
||||
@@ -163,6 +163,7 @@ class ControlMessageController implements MessageComponentInterface
|
||||
});
|
||||
} else {
|
||||
$connectionInfo->message = $connectionMessageResolver;
|
||||
|
||||
return \React\Promise\resolve($connectionInfo);
|
||||
}
|
||||
|
||||
@@ -188,7 +189,7 @@ class ControlMessageController implements MessageComponentInterface
|
||||
|
||||
return $this->resolveConnectionMessage($connectionInfo, $user);
|
||||
})
|
||||
->then(function ($connectionInfo) use ($data, $connection, $user) {
|
||||
->then(function ($connectionInfo) use ($connection, $user) {
|
||||
$connection->send(json_encode([
|
||||
'event' => 'authenticated',
|
||||
'data' => [
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
namespace App\Server\Support;
|
||||
|
||||
use Clue\React\Buzz\Browser;
|
||||
use Exception;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Clue\React\Buzz\Browser;
|
||||
|
||||
class RetrieveWelcomeMessageFromApi
|
||||
{
|
||||
@@ -24,7 +24,7 @@ class RetrieveWelcomeMessageFromApi
|
||||
public function forUser($user)
|
||||
{
|
||||
return $this->browser
|
||||
->get($this->url . '?' . http_build_query($user), [
|
||||
->get($this->url.'?'.http_build_query($user), [
|
||||
'Accept' => 'application/json',
|
||||
])
|
||||
->then(function (ResponseInterface $response) {
|
||||
|
||||
@@ -91,7 +91,6 @@ class ApiTest extends TestCase
|
||||
$this->assertSame('Marcel', $user->name);
|
||||
$this->assertSame(1, $user->can_specify_subdomains);
|
||||
|
||||
|
||||
$this->await($this->browser->post('http://127.0.0.1:8080/api/users', [
|
||||
'Host' => 'expose.localhost',
|
||||
'Authorization' => base64_encode('username:secret'),
|
||||
|
||||
Reference in New Issue
Block a user