Code Duplication    Length = 8-8 lines in 3 locations

SwaggerGen/Parser/AbstractPreprocessor.php 1 location

@@ 55-62 (lines=8) @@
52
	 * @param string $data
53
	 * @return boolean|string
54
	 */
55
	private static function wordShift(&$data)
56
	{
57
		if (preg_match('~^(\S+)\s*(.*)$~', $data, $matches) === 1) {
58
			$data = $matches[2];
59
			return $matches[1];
60
		}
61
		return false;
62
	}
63
64
	protected function handle($command, $expression)
65
	{

SwaggerGen/Swagger/AbstractObject.php 1 location

@@ 148-155 (lines=8) @@
145
	 * @param string $data
146
	 * @return string|bool Either the first word or false if no more words available
147
	 */
148
	public static function wordShift(&$data)
149
	{
150
		if (preg_match('~^\s*(\S+)\s*(.*)$~s', $data, $matches) === 1) {
151
			$data = $matches[2];
152
			return $matches[1];
153
		}
154
		return false;
155
	}
156
157
	/**
158
	 * Splits a text line in all it's words

SwaggerGen/Parser/Text/Parser.php 1 location

@@ 108-115 (lines=8) @@
105
	 * @param string $data
106
	 * @return boolean|string
107
	 */
108
	private static function wordShift(&$data)
109
	{
110
		if (preg_match('~^(\S+)\s*(.*)$~', $data, $matches) === 1) {
111
			$data = $matches[2];
112
			return $matches[1];
113
		}
114
		return false;
115
	}
116
117
}
118