The call to the method MultiTenantLaravel\App\C...nant::createNewTenant() seems un-needed as the method has no side-effects.
PHP Analyzer performs a side-effects analysis of your code. A side-effect is
basically anything that might be visible after the scope of the method is left.
If we look at the getEmail() method, we can see that it has no side-effect.
Whether you call this method or not, no future calls to other methods are affected
by this. As such code as the following is useless:
$user=newUser();$user->getEmail();// This line could safely be removed as it has no effect.
On the hand, if we look at the setEmail(), this method _has_ side-effects.
In the following case, we could not remove the method call:
$user=newUser();$user->setEmail('email@domain');// This line has a side-effect (it changes an// instance variable).
Loading history...
45
} else {
46
$this->createFakeTenant();
47
}
48
49
$count--;
50
}
51
52
}
53
54
private function createFakeTenant()
55
{
56
// Start faker and create a fake tenant
57
$faker = new Faker\Generator();
58
59
dd($faker);
60
}
61
62
private function createNewTenant()
63
{
64
// Ask for some user input and create a new tenant
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.