1 | <?php |
||
15 | class ClassPattern implements PatternInterface { |
||
16 | |||
17 | /** |
||
18 | * Result of this pattern will be body of the class |
||
19 | */ |
||
20 | const OUTPUT_BODY = 1; |
||
21 | |||
22 | /** |
||
23 | * Result of this pattern will be full class |
||
24 | */ |
||
25 | const OUTPUT_FULL = 2; |
||
26 | |||
27 | |||
28 | /** |
||
29 | * @var QueryStrategy |
||
30 | */ |
||
31 | private $nameQuery = null; |
||
32 | |||
33 | /** |
||
34 | * @var callable |
||
35 | */ |
||
36 | private $docCommentQuery; |
||
37 | |||
38 | /** |
||
39 | * @var int |
||
40 | */ |
||
41 | private $outputType = self::OUTPUT_BODY; |
||
42 | |||
43 | |||
44 | /** |
||
45 | * By default we search for classes with any name |
||
46 | */ |
||
47 | 50 | public function __construct() { |
|
51 | |||
52 | |||
53 | /** |
||
54 | * @codeCoverageIgnore |
||
55 | * @deprecated |
||
56 | * @param string $name |
||
57 | * @return $this |
||
58 | */ |
||
59 | public function nameIs($name) { |
||
63 | |||
64 | |||
65 | /** |
||
66 | * @param QueryStrategy|string $name |
||
67 | * @return $this |
||
68 | */ |
||
69 | 14 | public function withName($name) { |
|
80 | |||
81 | |||
82 | /** |
||
83 | * @return $this |
||
84 | */ |
||
85 | 3 | public function withDocComment() { |
|
93 | |||
94 | |||
95 | /** |
||
96 | * @return $this |
||
97 | */ |
||
98 | 50 | public function withPossibleDocComment() { |
|
104 | |||
105 | |||
106 | /** |
||
107 | * @return $this |
||
108 | */ |
||
109 | public function withoutDocComment() { |
||
117 | |||
118 | |||
119 | /** |
||
120 | * @return $this |
||
121 | */ |
||
122 | 3 | public function outputBody() { |
|
126 | |||
127 | |||
128 | /** |
||
129 | * @return $this |
||
130 | */ |
||
131 | 15 | public function outputFull() { |
|
135 | |||
136 | |||
137 | /** |
||
138 | * @codeCoverageIgnore |
||
139 | * @deprecated |
||
140 | * @param QueryStrategy $strategy |
||
141 | * @return $this |
||
142 | */ |
||
143 | public function whereName(QueryStrategy $strategy) { |
||
147 | |||
148 | |||
149 | /** |
||
150 | * @inheritdoc |
||
151 | */ |
||
152 | 47 | public function __invoke(QuerySequence $querySequence) { |
|
194 | |||
195 | } |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.