Platform.php 628 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. * This file is part of Composer.
  4. *
  5. * (c) Nils Adermann <naderman@naderman.de>
  6. * Jordi Boggiano <j.boggiano@seld.be>
  7. *
  8. * For the full copyright and license information, please view the LICENSE
  9. * file that was distributed with this source code.
  10. */
  11. namespace Composer\Util;
  12. /**
  13. * Platform helper for uniform platform-specific tests.
  14. *
  15. * @author Niels Keurentjes <niels.keurentjes@omines.com>
  16. */
  17. class Platform
  18. {
  19. /**
  20. * @return bool Whether the host machine is running a Windows OS
  21. */
  22. public static function isWindows()
  23. {
  24. return defined('PHP_WINDOWS_VERSION_BUILD');
  25. }
  26. }