-
Notifications
You must be signed in to change notification settings - Fork 464
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix default trait method parameter mentioning constant from the using…
… class
- Loading branch information
1 parent
431905c
commit 8babba3
Showing
4 changed files
with
58 additions
and
8 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,28 @@ | ||
<?php | ||
|
||
namespace Bug4288; | ||
|
||
trait PaginationTrait | ||
{ | ||
|
||
/** @var int */ | ||
private $test = self::DEFAULT_SIZE; | ||
|
||
private function paginate(int $size = self::DEFAULT_SIZE): void | ||
{ | ||
echo $size; | ||
} | ||
} | ||
|
||
class MyClass | ||
{ | ||
use PaginationTrait; | ||
|
||
const DEFAULT_SIZE = 10; | ||
|
||
public function test(): void | ||
{ | ||
$this->paginate(); | ||
} | ||
} | ||
|