fixed various typos

This commit is contained in:
Fabien Potencier 2013-12-27 16:08:19 +01:00
parent e9f67a7246
commit 2f15ac7507
24 changed files with 50 additions and 50 deletions

View File

@ -20,7 +20,7 @@ use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\DumperInterface; use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\DumperInterface;
/** /**
* Generates dumped php code of proxies via reflection. * Generates dumped PHP code of proxies via reflection.
* *
* @author Marco Pivetta <ocramius@gmail.com> * @author Marco Pivetta <ocramius@gmail.com>
*/ */

View File

@ -84,7 +84,7 @@ EOF
$filesystem->rename($realCacheDir, $oldCacheDir); $filesystem->rename($realCacheDir, $oldCacheDir);
if (defined('PHP_WINDOWS_VERSION_BUILD')) { if (defined('PHP_WINDOWS_VERSION_BUILD')) {
sleep(1); // workaround for windows php rename bug sleep(1); // workaround for Windows PHP rename bug
} }
$filesystem->rename($warmupDir, $realCacheDir); $filesystem->rename($warmupDir, $realCacheDir);
} }

View File

@ -16,7 +16,7 @@ use Symfony\Component\Translation\MessageCatalogue;
use Symfony\Component\Translation\Extractor\ExtractorInterface; use Symfony\Component\Translation\Extractor\ExtractorInterface;
/** /**
* PhpExtractor extracts translation messages from a php template. * PhpExtractor extracts translation messages from a PHP template.
* *
* @author Michel Salib <michelsalib@hotmail.com> * @author Michel Salib <michelsalib@hotmail.com>
*/ */
@ -88,7 +88,7 @@ class PhpExtractor implements ExtractorInterface
} }
/** /**
* Extracts trans message from php tokens. * Extracts trans message from PHP tokens.
* *
* @param array $tokens * @param array $tokens
* @param MessageCatalogue $catalog * @param MessageCatalogue $catalog

View File

@ -168,7 +168,7 @@ class XmlUtils
} }
/** /**
* Converts an xml value to a php type. * Converts an xml value to a PHP type.
* *
* @param mixed $value * @param mixed $value
* *

View File

@ -401,7 +401,7 @@ class DialogHelper extends Helper
} }
/** /**
* Return a valid unix shell * Return a valid Unix shell
* *
* @return string|Boolean The valid shell name, false in case no valid shell is found * @return string|Boolean The valid shell name, false in case no valid shell is found
*/ */

View File

@ -89,7 +89,7 @@ class StreamOutput extends Output
* *
* Colorization is disabled if not supported by the stream: * Colorization is disabled if not supported by the stream:
* *
* - windows without ansicon and ConEmu * - Windows without Ansicon and ConEmu
* - non tty consoles * - non tty consoles
* *
* @return Boolean true if the stream supports colorization, false otherwise * @return Boolean true if the stream supports colorization, false otherwise

View File

@ -14,7 +14,7 @@ namespace Symfony\Component\DependencyInjection\LazyProxy\PhpDumper;
use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Definition;
/** /**
* Lazy proxy dumper capable of generating the instantiation logic php code for proxied services. * Lazy proxy dumper capable of generating the instantiation logic PHP code for proxied services.
* *
* @author Marco Pivetta <ocramius@gmail.com> * @author Marco Pivetta <ocramius@gmail.com>
*/ */

View File

@ -21,7 +21,7 @@ use Symfony\Component\Config\Util\XmlUtils;
class SimpleXMLElement extends \SimpleXMLElement class SimpleXMLElement extends \SimpleXMLElement
{ {
/** /**
* Converts an attribute as a php type. * Converts an attribute as a PHP type.
* *
* @param string $name * @param string $name
* *
@ -33,7 +33,7 @@ class SimpleXMLElement extends \SimpleXMLElement
} }
/** /**
* Returns arguments as valid php types. * Returns arguments as valid PHP types.
* *
* @param string $name * @param string $name
* @param Boolean $lowercase * @param Boolean $lowercase
@ -95,7 +95,7 @@ class SimpleXMLElement extends \SimpleXMLElement
} }
/** /**
* Converts an xml value to a php type. * Converts an xml value to a PHP type.
* *
* @param mixed $value * @param mixed $value
* *

View File

@ -105,8 +105,8 @@ class Filesystem
* Sets access and modification time of file. * Sets access and modification time of file.
* *
* @param string|array|\Traversable $files A filename, an array of files, or a \Traversable instance to create * @param string|array|\Traversable $files A filename, an array of files, or a \Traversable instance to create
* @param integer $time The touch time as a unix timestamp * @param integer $time The touch time as a Unix timestamp
* @param integer $atime The access time as a unix timestamp * @param integer $atime The access time as a Unix timestamp
* *
* @throws IOException When touch fails * @throws IOException When touch fails
*/ */
@ -306,7 +306,7 @@ class Filesystem
*/ */
public function makePathRelative($endPath, $startPath) public function makePathRelative($endPath, $startPath)
{ {
// Normalize separators on windows // Normalize separators on Windows
if (defined('PHP_WINDOWS_VERSION_MAJOR')) { if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
$endPath = strtr($endPath, '\\', '/'); $endPath = strtr($endPath, '\\', '/');
$startPath = strtr($startPath, '\\', '/'); $startPath = strtr($startPath, '\\', '/');

View File

@ -906,7 +906,7 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
$this->assertFileExists($filename); $this->assertFileExists($filename);
$this->assertSame('bar', file_get_contents($filename)); $this->assertSame('bar', file_get_contents($filename));
// skip mode check on windows // skip mode check on Windows
if (!defined('PHP_WINDOWS_VERSION_MAJOR')) { if (!defined('PHP_WINDOWS_VERSION_MAJOR')) {
$this->assertEquals(753, $this->getFilePermissions($filename)); $this->assertEquals(753, $this->getFilePermissions($filename));
} }
@ -962,21 +962,21 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
} }
if (defined('PHP_WINDOWS_VERSION_MAJOR') && false === self::$symlinkOnWindows) { if (defined('PHP_WINDOWS_VERSION_MAJOR') && false === self::$symlinkOnWindows) {
$this->markTestSkipped('symlink requires "Create symbolic links" privilege on windows'); $this->markTestSkipped('symlink requires "Create symbolic links" privilege on Windows');
} }
} }
private function markAsSkippedIfChmodIsMissing() private function markAsSkippedIfChmodIsMissing()
{ {
if (defined('PHP_WINDOWS_VERSION_MAJOR')) { if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
$this->markTestSkipped('chmod is not supported on windows'); $this->markTestSkipped('chmod is not supported on Windows');
} }
} }
private function markAsSkippedIfPosixIsMissing() private function markAsSkippedIfPosixIsMissing()
{ {
if (defined('PHP_WINDOWS_VERSION_MAJOR') || !function_exists('posix_isatty')) { if (defined('PHP_WINDOWS_VERSION_MAJOR') || !function_exists('posix_isatty')) {
$this->markTestSkipped('Posix is not supported'); $this->markTestSkipped('POSIX is not supported');
} }
} }
} }

View File

@ -51,7 +51,7 @@ class Shell
public function testCommand($command) public function testCommand($command)
{ {
if (self::TYPE_WINDOWS === $this->type) { if (self::TYPE_WINDOWS === $this->type) {
// todo: find a way to test if windows command exists // todo: find a way to test if Windows command exists
return false; return false;
} }

View File

@ -723,7 +723,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
public function testAccessDeniedException(Adapter\AdapterInterface $adapter) public function testAccessDeniedException(Adapter\AdapterInterface $adapter)
{ {
if (defined('PHP_WINDOWS_VERSION_MAJOR')) { if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
$this->markTestSkipped('chmod is not supported on windows'); $this->markTestSkipped('chmod is not supported on Windows');
} }
$finder = $this->buildFinder($adapter); $finder = $this->buildFinder($adapter);
@ -749,7 +749,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
public function testIgnoredAccessDeniedException(Adapter\AdapterInterface $adapter) public function testIgnoredAccessDeniedException(Adapter\AdapterInterface $adapter)
{ {
if (defined('PHP_WINDOWS_VERSION_MAJOR')) { if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
$this->markTestSkipped('chmod is not supported on windows'); $this->markTestSkipped('chmod is not supported on Windows');
} }
$finder = $this->buildFinder($adapter); $finder = $this->buildFinder($adapter);

View File

@ -36,9 +36,9 @@ class DateTimeToStringTransformerTest extends DateTimeTestCase
array('z', '33', '1970-02-03 00:00:00 UTC'), array('z', '33', '1970-02-03 00:00:00 UTC'),
// not bijective // not bijective
// this will not work as php will use actual date to replace missing info // this will not work as PHP will use actual date to replace missing info
// and after change of date will lookup for closest Wednesday // and after change of date will lookup for closest Wednesday
// i.e. value: 2010-02, php value: 2010-02-(today i.e. 20), parsed date: 2010-02-24 // i.e. value: 2010-02, PHP value: 2010-02-(today i.e. 20), parsed date: 2010-02-24
//array('Y-m-D', '2010-02-Wed', '2010-02-03 00:00:00 UTC'), //array('Y-m-D', '2010-02-Wed', '2010-02-03 00:00:00 UTC'),
//array('Y-m-l', '2010-02-Wednesday', '2010-02-03 00:00:00 UTC'), //array('Y-m-l', '2010-02-Wednesday', '2010-02-03 00:00:00 UTC'),
@ -55,7 +55,7 @@ class DateTimeToStringTransformerTest extends DateTimeTestCase
array('g:i:s a', '4:05:06 pm', '1970-01-01 16:05:06 UTC'), array('g:i:s a', '4:05:06 pm', '1970-01-01 16:05:06 UTC'),
array('h:i:s a', '04:05:06 pm', '1970-01-01 16:05:06 UTC'), array('h:i:s a', '04:05:06 pm', '1970-01-01 16:05:06 UTC'),
// seconds since unix // seconds since Unix
array('U', '1265213106', '2010-02-03 16:05:06 UTC'), array('U', '1265213106', '2010-02-03 16:05:06 UTC'),
); );

View File

@ -303,7 +303,7 @@ class UploadedFile extends File
UPLOAD_ERR_NO_FILE => 'No file was uploaded.', UPLOAD_ERR_NO_FILE => 'No file was uploaded.',
UPLOAD_ERR_CANT_WRITE => 'The file "%s" could not be written on disk.', UPLOAD_ERR_CANT_WRITE => 'The file "%s" could not be written on disk.',
UPLOAD_ERR_NO_TMP_DIR => 'File could not be uploaded: missing temporary directory.', UPLOAD_ERR_NO_TMP_DIR => 'File could not be uploaded: missing temporary directory.',
UPLOAD_ERR_EXTENSION => 'File upload was stopped by a php extension.', UPLOAD_ERR_EXTENSION => 'File upload was stopped by a PHP extension.',
); );
$maxFilesize = $errorCode === UPLOAD_ERR_INI_SIZE ? self::getMaxFilesize() / 1024 : 0; $maxFilesize = $errorCode === UPLOAD_ERR_INI_SIZE ? self::getMaxFilesize() / 1024 : 0;

View File

@ -334,8 +334,8 @@ EOF;
$output = Kernel::stripComments($source); $output = Kernel::stripComments($source);
// Heredocs are preserved, making the output mixing unix and windows line // Heredocs are preserved, making the output mixing Unix and Windows line
// endings, switching to "\n" everywhere on windows to avoid failure. // endings, switching to "\n" everywhere on Windows to avoid failure.
if (defined('PHP_WINDOWS_VERSION_MAJOR')) { if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
$expected = str_replace("\r\n", "\n", $expected); $expected = str_replace("\r\n", "\n", $expected);
$output = str_replace("\r\n", "\n", $output); $output = str_replace("\r\n", "\n", $output);

View File

@ -201,8 +201,8 @@ class IntlDateFormatter
// intl allows timestamps to be passed as arrays - we don't // intl allows timestamps to be passed as arrays - we don't
if (is_array($timestamp)) { if (is_array($timestamp)) {
$message = version_compare(PHP_VERSION, '5.3.4', '>=') ? $message = version_compare(PHP_VERSION, '5.3.4', '>=') ?
'Only integer unix timestamps and DateTime objects are supported' : 'Only integer Unix timestamps and DateTime objects are supported' :
'Only integer unix timestamps are supported'; 'Only integer Unix timestamps are supported';
throw new MethodArgumentValueNotImplementedException(__METHOD__, 'timestamp', $timestamp, $message); throw new MethodArgumentValueNotImplementedException(__METHOD__, 'timestamp', $timestamp, $message);
} }

View File

@ -58,9 +58,9 @@ class IntlDateFormatterTest extends AbstractIntlDateFormatterTest
$this->assertInstanceOf('Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException', $e); $this->assertInstanceOf('Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException', $e);
if (version_compare(PHP_VERSION, '5.3.4', '>=')) { if (version_compare(PHP_VERSION, '5.3.4', '>=')) {
$this->assertStringEndsWith('Only integer unix timestamps and DateTime objects are supported. Please install the "intl" extension for full localization capabilities.', $e->getMessage()); $this->assertStringEndsWith('Only integer Unix timestamps and DateTime objects are supported. Please install the "intl" extension for full localization capabilities.', $e->getMessage());
} else { } else {
$this->assertStringEndsWith('Only integer unix timestamps are supported. Please install the "intl" extension for full localization capabilities.', $e->getMessage()); $this->assertStringEndsWith('Only integer Unix timestamps are supported. Please install the "intl" extension for full localization capabilities.', $e->getMessage());
} }
} }
} }

View File

@ -139,8 +139,8 @@ class Process
$this->commandline = $commandline; $this->commandline = $commandline;
$this->cwd = $cwd; $this->cwd = $cwd;
// on windows, if the cwd changed via chdir(), proc_open defaults to the dir where php was started // on Windows, if the cwd changed via chdir(), proc_open defaults to the dir where PHP was started
// on gnu/linux, PHP builds with --enable-maintainer-zts are also affected // on Gnu/Linux, PHP builds with --enable-maintainer-zts are also affected
// @see : https://bugs.php.net/bug.php?id=51800 // @see : https://bugs.php.net/bug.php?id=51800
// @see : https://bugs.php.net/bug.php?id=50524 // @see : https://bugs.php.net/bug.php?id=50524
@ -340,9 +340,9 @@ class Process
} }
/** /**
* Sends a posix signal to the process. * Sends a POSIX signal to the process.
* *
* @param integer $signal A valid posix signal (see http://www.php.net/manual/en/pcntl.constants.php) * @param integer $signal A valid POSIX signal (see http://www.php.net/manual/en/pcntl.constants.php)
* @return Process * @return Process
* *
* @throws LogicException In case the process is not running * @throws LogicException In case the process is not running
@ -613,7 +613,7 @@ class Process
* Stops the process. * Stops the process.
* *
* @param integer|float $timeout The timeout in seconds * @param integer|float $timeout The timeout in seconds
* @param integer $signal A posix signal to send in case the process has not stop at timeout, default is SIGKILL * @param integer $signal A POSIX signal to send in case the process has not stop at timeout, default is SIGKILL
* *
* @return integer The exit-code of the process * @return integer The exit-code of the process
* *
@ -1075,7 +1075,7 @@ class Process
if (-1 == $this->exitcode && null !== $this->fallbackExitcode) { if (-1 == $this->exitcode && null !== $this->fallbackExitcode) {
$this->exitcode = $this->fallbackExitcode; $this->exitcode = $this->fallbackExitcode;
} elseif (-1 === $this->exitcode && $this->processInformation['signaled'] && 0 < $this->processInformation['termsig']) { } elseif (-1 === $this->exitcode && $this->processInformation['signaled'] && 0 < $this->processInformation['termsig']) {
// if process has been signaled, no exitcode but a valid termsig, apply unix convention // if process has been signaled, no exitcode but a valid termsig, apply Unix convention
$this->exitcode = 128 + $this->processInformation['termsig']; $this->exitcode = 128 + $this->processInformation['termsig'];
} }

View File

@ -80,7 +80,7 @@ class ProcessPipes
} }
/** /**
* Closes unix pipes. * Closes Unix pipes.
* *
* Nothing happens in case file handles are used. * Nothing happens in case file handles are used.
*/ */

View File

@ -37,7 +37,7 @@ class ProcessUtils
public static function escapeArgument($argument) public static function escapeArgument($argument)
{ {
//Fix for PHP bug #43784 escapeshellarg removes % from given string //Fix for PHP bug #43784 escapeshellarg removes % from given string
//Fix for PHP bug #49446 escapeshellarg dosn`t work on windows //Fix for PHP bug #49446 escapeshellarg doesn't work on Windows
//@see https://bugs.php.net/bug.php?id=43784 //@see https://bugs.php.net/bug.php?id=43784
//@see https://bugs.php.net/bug.php?id=49446 //@see https://bugs.php.net/bug.php?id=49446
if (defined('PHP_WINDOWS_VERSION_BUILD')) { if (defined('PHP_WINDOWS_VERSION_BUILD')) {

View File

@ -440,7 +440,7 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase
public function testPhpDeadlock() public function testPhpDeadlock()
{ {
$this->markTestSkipped('Can course php to hang'); $this->markTestSkipped('Can course PHP to hang');
// Sleep doesn't work as it will allow the process to handle signals and close // Sleep doesn't work as it will allow the process to handle signals and close
// file handles from the other end. // file handles from the other end.
@ -575,7 +575,7 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase
private function verifyPosixIsEnabled() private function verifyPosixIsEnabled()
{ {
if (defined('PHP_WINDOWS_VERSION_BUILD')) { if (defined('PHP_WINDOWS_VERSION_BUILD')) {
$this->markTestSkipped('POSIX signals do not work on windows'); $this->markTestSkipped('POSIX signals do not work on Windows');
} }
if (!defined('SIGUSR1')) { if (!defined('SIGUSR1')) {
$this->markTestSkipped('The pcntl extension is not enabled'); $this->markTestSkipped('The pcntl extension is not enabled');
@ -588,7 +588,7 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase
public function testSignalWithWrongIntSignal() public function testSignalWithWrongIntSignal()
{ {
if (defined('PHP_WINDOWS_VERSION_BUILD')) { if (defined('PHP_WINDOWS_VERSION_BUILD')) {
$this->markTestSkipped('POSIX signals do not work on windows'); $this->markTestSkipped('POSIX signals do not work on Windows');
} }
$process = $this->getProcess('php -r "sleep(3);"'); $process = $this->getProcess('php -r "sleep(3);"');
@ -602,7 +602,7 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase
public function testSignalWithWrongNonIntSignal() public function testSignalWithWrongNonIntSignal()
{ {
if (defined('PHP_WINDOWS_VERSION_BUILD')) { if (defined('PHP_WINDOWS_VERSION_BUILD')) {
$this->markTestSkipped('POSIX signals do not work on windows'); $this->markTestSkipped('POSIX signals do not work on Windows');
} }
$process = $this->getProcess('php -r "sleep(3);"'); $process = $this->getProcess('php -r "sleep(3);"');

View File

@ -33,11 +33,11 @@ class PhpExecutableFinderTest extends \PHPUnit_Framework_TestCase
//not executable PHP_PATH //not executable PHP_PATH
putenv('PHP_PATH=/not/executable/php'); putenv('PHP_PATH=/not/executable/php');
$this->assertFalse($f->find(), '::find() returns false for not executable php'); $this->assertFalse($f->find(), '::find() returns false for not executable PHP');
//executable PHP_PATH //executable PHP_PATH
putenv('PHP_PATH='.$current); putenv('PHP_PATH='.$current);
$this->assertEquals($f->find(), $current, '::find() returns the executable php'); $this->assertEquals($f->find(), $current, '::find() returns the executable PHP');
} }
/** /**
@ -55,10 +55,10 @@ class PhpExecutableFinderTest extends \PHPUnit_Framework_TestCase
$current = $f->find(); $current = $f->find();
//TODO maybe php executable is custom or even windows //TODO maybe php executable is custom or even Windows
if (defined('PHP_WINDOWS_VERSION_BUILD')) { if (defined('PHP_WINDOWS_VERSION_BUILD')) {
$this->assertTrue(is_executable($current)); $this->assertTrue(is_executable($current));
$this->assertTrue((bool) preg_match('/'.addSlashes(DIRECTORY_SEPARATOR).'php\.(exe|bat|cmd|com)$/i', $current), '::find() returns the executable php with suffixes'); $this->assertTrue((bool) preg_match('/'.addSlashes(DIRECTORY_SEPARATOR).'php\.(exe|bat|cmd|com)$/i', $current), '::find() returns the executable PHP with suffixes');
} }
} }
} }

View File

@ -116,7 +116,7 @@ class TokenBasedRememberMeServices extends AbstractRememberMeServices
* *
* @param string $class * @param string $class
* @param string $username The username * @param string $username The username
* @param integer $expires The unixtime when the cookie expires * @param integer $expires The Unix timestamp when the cookie expires
* @param string $password The encoded password * @param string $password The encoded password
* *
* @throws \RuntimeException if username contains invalid chars * @throws \RuntimeException if username contains invalid chars
@ -138,7 +138,7 @@ class TokenBasedRememberMeServices extends AbstractRememberMeServices
* *
* @param string $class * @param string $class
* @param string $username The username * @param string $username The username
* @param integer $expires The unixtime when the cookie expires * @param integer $expires The Unix timestamp when the cookie expires
* @param string $password The encoded password * @param string $password The encoded password
* *
* @throws \RuntimeException when the private key is empty * @throws \RuntimeException when the private key is empty

View File

@ -14,7 +14,7 @@ namespace Symfony\Component\Translation\Dumper;
use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\MessageCatalogue;
/** /**
* PhpFileDumper generates php files from a message catalogue. * PhpFileDumper generates PHP files from a message catalogue.
* *
* @author Michel Salib <michelsalib@hotmail.com> * @author Michel Salib <michelsalib@hotmail.com>
*/ */