-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathTraitE.php
More file actions
78 lines (69 loc) · 3.23 KB
/
Copy pathTraitE.php
File metadata and controls
78 lines (69 loc) · 3.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?php
declare(strict_types=1);
namespace TestData;
use Test\Dep\ClassI;
// ^^^^^^^^^^^^^^^ reference scip-php composer davidrjenni/scip-php-test-dep 3e11662443768bf3887b227b8510bc789ed151c6 Test/Dep/ClassI#
trait TraitE
// ^^^^^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/TraitE#
// documentation
// > ```php
// > trait TraitE
// > ```
{
public int $e1;
// ^^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/TraitE#$e1.
// documentation
// > ```php
// > public int $e1
// > ```
/** @var ClassI */
public $e2;
// ^^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/TraitE#$e2.
// documentation
// > ```php
// > public $e2
// > ```
// documentation
// > @var ClassI
protected function e1(): bool
// ^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/TraitE#e1().
// documentation
// > ```php
// > protected function e1(): bool
// > ```
{
return $this->e2->i1;
// ^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/TraitE#$e2.
// ^^ reference scip-php composer davidrjenni/scip-php-test-dep 3e11662443768bf3887b227b8510bc789ed151c6 Test/Dep/ClassI#$i1.
}
public function e2(): int
// ^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/TraitE#e2().
// documentation
// > ```php
// > public function e2(): int
// > ```
{
$v1 = ClassI::I1;
// ^^^^^^ reference scip-php composer davidrjenni/scip-php-test-dep 3e11662443768bf3887b227b8510bc789ed151c6 Test/Dep/ClassI#
// ^^ reference scip-php composer davidrjenni/scip-php-test-dep 3e11662443768bf3887b227b8510bc789ed151c6 Test/Dep/ClassI#I1.
return $this->e2::I1 * $v1;
// ^^ reference scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/TraitE#$e2.
// ^^ reference scip-php composer davidrjenni/scip-php-test-dep 3e11662443768bf3887b227b8510bc789ed151c6 Test/Dep/ClassI#I1.
}
public function e3(): int
// ^^ definition scip-php composer davidrjenni/scip-php-test 2879a47ba00225b1d0cf31ebe8b9fc7f6cd28be5 TestData/TraitE#e3().
// documentation
// > ```php
// > public function e3(): int
// > ```
{
if (true) {
return 23 - count([0]);
// ^^^^^ reference scip-php composer php 8.4.19 count().
}
if (false) {
return 42;
}
return -1;
}
}