-
Notifications
You must be signed in to change notification settings - Fork 472
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix access to uninitialized property via extension in additional cons…
…tructor
- Loading branch information
1 parent
8d5deb9
commit 218aad0
Showing
3 changed files
with
68 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php // lint >= 7.4 | ||
|
||
namespace Bug9619; | ||
|
||
interface User | ||
{ | ||
|
||
public function isLoggedIn(): bool; | ||
|
||
} | ||
|
||
class AdminPresenter | ||
{ | ||
/** @inject */ | ||
public User $user; | ||
|
||
public function startup() | ||
{ | ||
if (!$this->user->isLoggedIn()) { | ||
// do something | ||
} | ||
} | ||
} |