MockExtractor::getMethod()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 20
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 20
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 5
nc 1
nop 1
1
<?php
2
3
/**
4
 * This software package is licensed under `AGPL, Commercial` license[s].
5
 *
6
 * @package maslosoft/zamm
7
 * @license AGPL, Commercial
8
 *
9
 * @copyright Copyright (c) Peter Maselkowski <[email protected]>
10
 * @link https://maslosoft.com/zamm/
11
 */
12
13
namespace Maslosoft\Zamm\Extractors;
14
15
use Maslosoft\Zamm\Interfaces\Extractors\ExtractorInterface;
16
17
/**
18
 * This extractor simulates extracting. It just return some predefined doc comments.
19
 *
20
 * @author Piotr Maselkowski <pmaselkowski at gmail.com>
21
 */
22
class MockExtractor extends BaseExtractor implements ExtractorInterface
23
{
24
25
	public function getClass()
26
	{
27
		return <<<COMMENT
28
		/**
29
		 * This is mock class comment.
30
		 * Normally it should contain general description.
31
		 * But this one contains only dummy tex and:
32
		 * <ul>
33
		 *		<li>some php doc</li>
34
		 *		<li>some html</li>
35
		 *		<li>some annotation</li>
36
		 * </ul>
37
		 * @author Piotr Maselkowski <pmaselkowski at gmail.com>
38
		 * @since 1.0.2
39
		 * @Target('class')
40
		 */
41
COMMENT;
42
	}
43
44
	public function getMethod($name)
45
	{
46
		return <<<COMMENT
47
		/**
48
		 * This is mock method $name comment.
49
		 * Normally it should contain method description.
50
		 * But this one contains only dummy tex and:
51
		 * <ul>
52
		 *		<li>some method php doc</li>
53
		 *		<li>some html</li>
54
		 *		<li>some method annotations</li>
55
		 * </ul>
56
		 * @author Piotr Maselkowski <pmaselkowski at gmail.com>
57
		 * @since 1.0.2
58
		 * @Target('method')
59
		 * @param int \$id Identifier of user in mock method
60
		 * @param string \$name Name of user in mock method
61
		 */
62
COMMENT;
63
	}
64
65
	public function getProperty($name)
66
	{
67
		return <<<COMMENT
68
		/**
69
		 * This is mock property $name comment.
70
		 * Normally it should contain property description.
71
		 * But this one contains only dummy tex and:
72
		 * <ul>
73
		 *		<li>some property php doc</li>
74
		 *		<li>some html</li>
75
		 *		<li>some property annotations</li>
76
		 * </ul>
77
		 * @author Piotr Maselkowski <pmaselkowski at gmail.com>
78
		 * @since 1.0.2
79
		 * @Target('field')
80
		 * @var int Identifier of user in mock property
81
		 */
82
COMMENT;
83
	}
84
85
}
86