for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace SumoCoders\FrameworkMultiUserBundle\User;
/**
* Class InMemoryUserRepository
*/
class InMemoryUserRepository implements UserRepository
{
/** @var array */
private $user = [];
$user
This check marks private properties in classes that are never used. Those properties can be removed.
public function __construct()
$this->users[] = new User(
users
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
class MyClass { } $x = new MyClass(); $x->foo = true;
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:
class MyClass { public $foo; } $x = new MyClass(); $x->foo = true;
'wouter',
'test',
'Wouter Sioen'
);
}
* {@inheritDoc}
public function findByUsername($username)
foreach ($this->users as $user) {
if ($user->getUsername() === $username) {
return $user;
public function supportsClass($class)
return $class === User::class;
This check marks private properties in classes that are never used. Those properties can be removed.