Check src folder in util/typo.php + make it executable
This commit is contained in:
parent
4d12f1b014
commit
87b513dd03
12
util/typo.php
Normal file → Executable file
12
util/typo.php
Normal file → Executable file
|
@ -1,3 +1,4 @@
|
||||||
|
#!/usr/bin/env php
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Tired of chasing typos and finding them after a commit.
|
// Tired of chasing typos and finding them after a commit.
|
||||||
|
@ -20,6 +21,16 @@ if (x($a->config, 'php_path')) {
|
||||||
$phpath = 'php';
|
$phpath = 'php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo 'Directory: src' . PHP_EOL;
|
||||||
|
$Iterator = new RecursiveDirectoryIterator('src');
|
||||||
|
|
||||||
|
foreach (new RecursiveIteratorIterator($Iterator) as $file) {
|
||||||
|
if (substr($file, -4) === '.php') {
|
||||||
|
passthru("$phpath -l $file", $ret);
|
||||||
|
$ret === 0 or die();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
echo "Directory: mod\n";
|
echo "Directory: mod\n";
|
||||||
$files = glob('mod/*.php');
|
$files = glob('mod/*.php');
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
|
@ -53,7 +64,6 @@ foreach ($dirs as $dir) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
echo "String files\n";
|
echo "String files\n";
|
||||||
|
|
||||||
echo 'util/strings.php' . "\n";
|
echo 'util/strings.php' . "\n";
|
||||||
|
|
Loading…
Reference in a new issue