Code Duplication    Length = 7-13 lines in 4 locations

doc/check_namespace.php 1 location

@@ 137-143 (lines=7) @@
134
 *
135
 * @param string $error =null
136
 */
137
function usage($error=null)
138
{
139
	global $prog;
140
	echo "Usage: $prog [-h|--help] file or dir\n\n";
141
	if ($error) echo $error."\n\n";
142
	exit($error ? 1 : 0);
143
}
144
145
$args = $_SERVER['argv'];
146
$prog = basename(array_shift($args));

doc/fix_api.php 1 location

@@ 277-283 (lines=7) @@
274
 *
275
 * @param string $error =null
276
 */
277
function usage($error=null)
278
{
279
	global $prog;
280
	echo "Usage: $prog [-h|--help] [-d|--dry-run] file(s) or dir(s)\n\n";
281
	if ($error) echo $error."\n\n";
282
	exit($error ? 1 : 0);
283
}
284
285
$args = $_SERVER['argv'];
286
$prog = basename(array_shift($args));

doc/fix_depricated.php 1 location

@@ 179-185 (lines=7) @@
176
 *
177
 * @param string $error=null
178
 */
179
function usage($error=null)
180
{
181
	global $prog;
182
	echo "Usage: $prog [--replace] [-h|--help] file or dir\n\n";
183
	if ($error) echo $error."\n\n";
184
	exit($error ? 1 : 0);
185
}
186
187
$args = $_SERVER['argv'];
188
$prog = basename(array_shift($args));

install-cli.php 1 location

@@ 96-108 (lines=13) @@
93
94
if (!$run_git && count($argv) > 1) usage("Too many arguments!");
95
96
function usage($err=null)
97
{
98
	global $cmd;
99
100
	if ($err)
101
	{
102
		echo "$err\n\n";
103
	}
104
	die("Usage:\t$cmd [-v|--verbose] [--use-prerelease] [<composer-args>] (master|bugfix|release|<branch>|<tag>)\n".
105
		"\t\nyou can use composer install arguments like: --ignore-platform-reqs --no-dev\n".
106
		"\t$cmd --git(-apps) <arguments>\n".
107
		"\truns git with given arguments (in main- and) all app-dirs, e.g. tag -a 17.1.20190214 -m 'tagging release'\n\n");
108
}
109
110
$bins = array(
111
	'php'      => PHP_BINARY,