for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
class FakeNewsletterList
{
public $kernel;
function __construct()
$this->kernel = new Stub_Kernel();
}
function get($key)
switch ($key) {
case 'reply_email':
return '[email protected]';
break;
break
The break statement is not necessary if it is preceded for example by a return statement:
switch ($x) { case 1: return 'foo'; break; // This break is not necessary and can be left off. }
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive.
default:
return 1;
function getIntranet()
return new Stub_Intranet();
class FakeNewsletterContact
public $address;
$this->address = new Stub_Address;
function get()
function getLoginUrl()
return 'loginurl';
class FakeNewsletterSubscriber
function load()
function getContact()
return new FakeNewsletterContact;
The break statement is not necessary if it is preceded for example by a return statement:
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive.