Code Duplication    Length = 11-12 lines in 2 locations

src/Source.php 2 locations

@@ 68-78 (lines=11) @@
65
	 * @param string $name
66
	 * @return Wrapper
67
	 */
68
	public function method($name)
69
	{
70
		$method = $this->info->getMethod($name);
71
		$code = $this->getMethodSource($method->getStartLine(), $method->getEndLine());
72
		$result = [];
73
		$comment = $method->getDocComment();
74
		Tabs::trim($comment);
75
		$result[] = $comment . PHP_EOL;
76
		$result[] = $code . PHP_EOL;
77
		return new Wrapper(implode('', $result));
78
	}
79
80
	/**
81
	 * Get source code of property
@@ 85-96 (lines=12) @@
82
	 * @param string $name
83
	 * @return Wrapper
84
	 */
85
	public function property($name)
86
	{
87
		$property = $this->info->getProperty($name);
88
		$code = $this->getPropertySource($property);
89
		$result = [];
90
		$comment = $property->getDocComment();
91
		Tabs::trim($comment);
92
		$result[] = $comment . PHP_EOL;
93
		$result[] = $code . PHP_EOL;
94
95
		return new Wrapper(implode('', $result));
96
	}
97
98
	private function getMethodSource($start, $end)
99
	{