Friendica Communications Platform (please note that this is a clone of the repository at github, issues are handled there) https://friendi.ca
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

68 строки
1.4KB

  1. <?php
  2. // Tired of chasing typos and finding them after a commit.
  3. // Run this from cmdline in basedir and quickly see if we've
  4. // got any parse errors in our application files.
  5. use Friendica\App;
  6. error_reporting(E_ERROR | E_WARNING | E_PARSE);
  7. ini_set('display_errors', '1');
  8. ini_set('log_errors', '0');
  9. include 'boot.php';
  10. $a = new App(dirname(__DIR__));
  11. if (x($a->config, 'php_path')) {
  12. $phpath = $a->config['php_path'];
  13. } else {
  14. $phpath = 'php';
  15. }
  16. echo "Directory: mod\n";
  17. $files = glob('mod/*.php');
  18. foreach ($files as $file) {
  19. passthru("$phpath -l $file", $ret);
  20. $ret === 0 or die();
  21. }
  22. echo "Directory: include\n";
  23. $files = glob('include/*.php');
  24. foreach ($files as $file) {
  25. passthru("$phpath -l $file", $ret);
  26. $ret === 0 or die();
  27. }
  28. echo "Directory: object\n";
  29. $files = glob('object/*.php');
  30. foreach ($files as $file) {
  31. passthru("$phpath -l $file", $ret);
  32. $ret === 0 or die();
  33. }
  34. echo "Directory: addon\n";
  35. $dirs = glob('addon/*');
  36. foreach ($dirs as $dir) {
  37. $addon = basename($dir);
  38. $files = glob($dir . '/' . $addon . '.php');
  39. foreach ($files as $file) {
  40. passthru("$phpath -l $file", $ret);
  41. $ret === 0 or die();
  42. }
  43. }
  44. echo "String files\n";
  45. echo 'util/strings.php' . "\n";
  46. passthru("$phpath -l util/strings.php", $ret);
  47. $ret === 0 or die();
  48. $files = glob('view/lang/*/strings.php');
  49. foreach ($files as $file) {
  50. passthru("$phpath -l $file", $ret);
  51. $ret === 0 or die();
  52. }