for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is a part of Woketo package.
*
* (c) Nekland <[email protected]>
* For the full license, take a look to the LICENSE file
* on the root directory of this project
*/
namespace Nekland\Woketo\Rfc6455\Handshake;
use Nekland\Woketo\Http\Request;
use Nekland\Woketo\Http\Response;
class ClientHandshake implements HandshakeInterface
{
public function sign($key, Response $response = null)
// TODO: Implement sign() method.
}
public function verify(Request $request)
// TODO: Implement verify() method.
public function createRequest(string $uri)
$uri
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
$request = Request::create('');
$request
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
$myVar = 'Value'; $higher = false; if (rand(1, 6) > 3) { $higher = true; } else { $higher = false; }
Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.
$myVar
$higher
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.