test.php 420B

1234567891011121314151617181920212223242526
  1. <?php declare(strict_types = 1);
  2. namespace foo;
  3. class bar {
  4. const x = 'abc';
  5. /** @var int */
  6. private $y = 1;
  7. public function __construct() {
  8. // do something
  9. }
  10. public function getY(): int {
  11. return $this->y;
  12. }
  13. public function getSomeX(): string {
  14. return self::x;
  15. }
  16. public function some(bar $b): string {
  17. return $b->getSomeX() . '-def';
  18. }
  19. }