Completed
Push — master ( 10f2f0...60887f )
by Marcel
15s queued 10s
created

src/Ratchet/Http/DashboardController.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace BeyondCode\DuskDashboard\Ratchet\Http;
4
5
use GuzzleHttp\Psr7\Response;
6
use function GuzzleHttp\Psr7\str;
7
use Psr\Http\Message\RequestInterface;
8
use Ratchet\ConnectionInterface;
9
10
class DashboardController extends Controller
11
{
12
    public function onOpen(ConnectionInterface $connection, RequestInterface $request = null)
13
    {
14
        $connection->send(
15
            str(new Response(
0 ignored issues
show
Deprecated Code introduced by
The function GuzzleHttp\Psr7\str() has been deprecated with message: str will be removed in guzzlehttp/psr7:2.0. Use Message::toString instead.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
16
                200,
17
                ['Content-Type' => 'text/html'],
18
                file_get_contents(__DIR__.'/../../../resources/views/index.html')
19
            ))
20
        );
21
22
        $connection->close();
23
    }
24
}
25