Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various typo and wording fixes in the codebase #897

Merged
merged 3 commits into from
Aug 24, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Powerful database abstraction layer with many features for database schema intro
* [Website](http://www.doctrine-project.org/projects/dbal.html)
* [Documentation](http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/)
* [Issue Tracker](http://www.doctrine-project.org/jira/browse/DBAL)
* [Downloads](http://github.com/doctrine/dbal/downloads)


[Master image]: https://img.shields.io/travis/doctrine/dbal/master.svg?style=flat-square
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/DBAL/Driver/AbstractDriverException.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ abstract class AbstractDriverException extends \Exception implements DriverExcep
* Constructor.
*
* @param string $message The driver error message.
* @param string|null $sqlState The SQLSTATE the driver is in at the time the error occured, if any.
* @param string|null $sqlState The SQLSTATE the driver is in at the time the error occurred, if any.
* @param integer|string|null $errorCode The driver specific error code if any.
*/
public function __construct($message, $sqlState = null, $errorCode = null)
Expand Down
4 changes: 2 additions & 2 deletions lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
*/
public function __construct(array $params, $username, $password, $driverOptions = array())
{
$isPersistant = (isset($params['persistent']) && $params['persistent'] == true);
$isPersistent = (isset($params['persistent']) && $params['persistent'] == true);

if ($isPersistant) {
if ($isPersistent) {
$this->_conn = db2_pconnect($params['dbname'], $username, $password, $driverOptions);
} else {
$this->_conn = db2_connect($params['dbname'], $username, $password, $driverOptions);
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public function listSequences($database = null)
*
* In contrast to other libraries and to the old version of Doctrine,
* this column definition does try to contain the 'primary' field for
* the reason that it is not portable accross different RDBMS. Use
* the reason that it is not portable across different RDBMS. Use
* {@see listTableIndexes($tableName)} to retrieve the primary key
* of a table. We're a RDBMS specifies more details these are held
* in the platformDetails array.
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/DBAL/Schema/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ public function isFullfilledBy(Index $other)
}

if ( ! $this->isUnique() && ! $this->isPrimary()) {
// this is a special case: If the current key is neither primary or unique, any uniqe or
// this is a special case: If the current key is neither primary or unique, any unique or
// primary key will always have the same effect for the index and there cannot be any constraint
// overlaps. This means a primary or unique index can always fulfill the requirements of just an
// index that has no constraints.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
* - You always have to work with `filtering=On` when using federations with this
* multi-tenant approach.
* - Primary keys are either using globally unique ids (GUID, Table Generator)
* or you explicitly add the tenent_id in every UPDATE or DELETE statement
* (otherwise they will affect the same-id rows from other tenents as well).
* or you explicitly add the tenant_id in every UPDATE or DELETE statement
* (otherwise they will affect the same-id rows from other tenants as well).
* SQLAzure throws errors when you try to create IDENTIY columns on federated
* tables.
*
Expand Down
6 changes: 3 additions & 3 deletions tests/Doctrine/Tests/DBAL/Functional/DataAccessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -533,11 +533,11 @@ public function testDateArithmetics()
$this->assertEquals('2010-01-08', date('Y-m-d', strtotime($row['add_weeks'])), "Adding week should end up on 2010-01-08");
$this->assertEquals('2009-12-25', date('Y-m-d', strtotime($row['sub_weeks'])), "Subtracting week should end up on 2009-12-25");
$this->assertEquals('2010-03-01', date('Y-m-d', strtotime($row['add_month'])), "Adding month should end up on 2010-03-01");
$this->assertEquals('2009-11-01', date('Y-m-d', strtotime($row['sub_month'])), "Substracting month should end up on 2009-11-01");
$this->assertEquals('2009-11-01', date('Y-m-d', strtotime($row['sub_month'])), "Subtracting month should end up on 2009-11-01");
$this->assertEquals('2010-10-01', date('Y-m-d', strtotime($row['add_quarters'])), "Adding quarters should end up on 2010-04-01");
$this->assertEquals('2009-04-01', date('Y-m-d', strtotime($row['sub_quarters'])), "Substracting quarters should end up on 2009-10-01");
$this->assertEquals('2009-04-01', date('Y-m-d', strtotime($row['sub_quarters'])), "Subtracting quarters should end up on 2009-10-01");
$this->assertEquals('2016-01-01', date('Y-m-d', strtotime($row['add_years'])), "Adding years should end up on 2016-01-01");
$this->assertEquals('2004-01-01', date('Y-m-d', strtotime($row['sub_years'])), "Substracting years should end up on 2004-01-01");
$this->assertEquals('2004-01-01', date('Y-m-d', strtotime($row['sub_years'])), "Subtracting years should end up on 2004-01-01");
}

public function testLocateExpression()
Expand Down
8 changes: 4 additions & 4 deletions tests/Doctrine/Tests/DBAL/Functional/ExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function testTableExistsException()
}
}

public function testForeignKeyContraintViolationExceptionOnInsert()
public function testForeignKeyConstraintViolationExceptionOnInsert()
{
if ( ! $this->_conn->getDatabasePlatform()->supportsForeignKeyConstraints()) {
$this->markTestSkipped("Only fails on platforms with foreign key constraints.");
Expand All @@ -80,7 +80,7 @@ public function testForeignKeyContraintViolationExceptionOnInsert()
$this->tearDownForeignKeyConstraintViolationExceptionTest();
}

public function testForeignKeyContraintViolationExceptionOnUpdate()
public function testForeignKeyConstraintViolationExceptionOnUpdate()
{
if ( ! $this->_conn->getDatabasePlatform()->supportsForeignKeyConstraints()) {
$this->markTestSkipped("Only fails on platforms with foreign key constraints.");
Expand All @@ -104,7 +104,7 @@ public function testForeignKeyContraintViolationExceptionOnUpdate()
$this->tearDownForeignKeyConstraintViolationExceptionTest();
}

public function testForeignKeyContraintViolationExceptionOnDelete()
public function testForeignKeyConstraintViolationExceptionOnDelete()
{
if ( ! $this->_conn->getDatabasePlatform()->supportsForeignKeyConstraints()) {
$this->markTestSkipped("Only fails on platforms with foreign key constraints.");
Expand All @@ -128,7 +128,7 @@ public function testForeignKeyContraintViolationExceptionOnDelete()
$this->tearDownForeignKeyConstraintViolationExceptionTest();
}

public function testForeignKeyContraintViolationExceptionOnTruncate()
public function testForeignKeyConstraintViolationExceptionOnTruncate()
{
$platform = $this->_conn->getDatabasePlatform();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function testColumnCollation()
$this->assertEquals($collation, $columns[$columnName]->getPlatformOption('collation'));
}

public function testDefaultContraints()
public function testDefaultConstraints()
{
$table = new Table('sqlsrv_default_constraints');
$table->addColumn('no_default', 'string');
Expand Down Expand Up @@ -179,7 +179,7 @@ public function testColumnComments()
$table->addColumn('comment_float_0', 'integer', array('comment' => 0.0));
$table->addColumn('comment_string_0', 'integer', array('comment' => '0'));
$table->addColumn('comment', 'integer', array('comment' => 'Doctrine 0wnz you!'));
$table->addColumn('`comment_quoted`', 'integer', array('comment' => 'Doctrine 0wnz comments for explicitely quoted columns!'));
$table->addColumn('`comment_quoted`', 'integer', array('comment' => 'Doctrine 0wnz comments for explicitly quoted columns!'));
$table->addColumn('create', 'integer', array('comment' => 'Doctrine 0wnz comments for reserved keyword columns!'));
$table->addColumn('commented_type', 'object');
$table->addColumn('commented_type_with_comment', 'array', array('comment' => 'Doctrine array type.'));
Expand All @@ -197,7 +197,7 @@ public function testColumnComments()
$this->assertEquals('0', $columns['comment_float_0']->getComment());
$this->assertEquals('0', $columns['comment_string_0']->getComment());
$this->assertEquals('Doctrine 0wnz you!', $columns['comment']->getComment());
$this->assertEquals('Doctrine 0wnz comments for explicitely quoted columns!', $columns['comment_quoted']->getComment());
$this->assertEquals('Doctrine 0wnz comments for explicitly quoted columns!', $columns['comment_quoted']->getComment());
$this->assertEquals('Doctrine 0wnz comments for reserved keyword columns!', $columns['[create]']->getComment());
$this->assertNull($columns['commented_type']->getComment());
$this->assertEquals('Doctrine array type.', $columns['commented_type_with_comment']->getComment());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function getReturnsForeignKeyReferentialActionSQL()
);
}

public function testGetInvalidtForeignKeyReferentialActionSQL()
public function testGetInvalidForeignKeyReferentialActionSQL()
{
$this->setExpectedException('InvalidArgumentException');
$this->_platform->getForeignKeyReferentialActionSQL('unknown');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ protected function getQuotedColumnInForeignKeySQL()
* @dataProvider pgBooleanProvider
*
* @param string $databaseValue
* @param string $prepareStatementValue
* @param string $preparedStatementValue
* @param integer $integerValue
* @param boolean $booleanValue
*/
Expand Down Expand Up @@ -338,7 +338,7 @@ public function testConvertBooleanAsLiteralIntegers()
* @dataProvider pgBooleanProvider
*
* @param string $databaseValue
* @param string $prepareStatementValue
* @param string $preparedStatementValue
* @param integer $integerValue
* @param boolean $booleanValue
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ public function testGeneratesCreateTableSQLWithColumnComments()
$table->addColumn('comment_float_0', 'integer', array('comment' => 0.0));
$table->addColumn('comment_string_0', 'integer', array('comment' => '0'));
$table->addColumn('comment', 'integer', array('comment' => 'Doctrine 0wnz you!'));
$table->addColumn('`comment_quoted`', 'integer', array('comment' => 'Doctrine 0wnz comments for explicitely quoted columns!'));
$table->addColumn('`comment_quoted`', 'integer', array('comment' => 'Doctrine 0wnz comments for explicitly quoted columns!'));
$table->addColumn('create', 'integer', array('comment' => 'Doctrine 0wnz comments for reserved keyword columns!'));
$table->addColumn('commented_type', 'object');
$table->addColumn('commented_type_with_comment', 'array', array('comment' => 'Doctrine array type.'));
Expand All @@ -543,7 +543,7 @@ public function testGeneratesCreateTableSQLWithColumnComments()
"EXEC sp_addextendedproperty N'MS_Description', N'0', N'SCHEMA', dbo, N'TABLE', mytable, N'COLUMN', comment_float_0",
"EXEC sp_addextendedproperty N'MS_Description', N'0', N'SCHEMA', dbo, N'TABLE', mytable, N'COLUMN', comment_string_0",
"EXEC sp_addextendedproperty N'MS_Description', N'Doctrine 0wnz you!', N'SCHEMA', dbo, N'TABLE', mytable, N'COLUMN', comment",
"EXEC sp_addextendedproperty N'MS_Description', N'Doctrine 0wnz comments for explicitely quoted columns!', N'SCHEMA', dbo, N'TABLE', mytable, N'COLUMN', [comment_quoted]",
"EXEC sp_addextendedproperty N'MS_Description', N'Doctrine 0wnz comments for explicitly quoted columns!', N'SCHEMA', dbo, N'TABLE', mytable, N'COLUMN', [comment_quoted]",
"EXEC sp_addextendedproperty N'MS_Description', N'Doctrine 0wnz comments for reserved keyword columns!', N'SCHEMA', dbo, N'TABLE', mytable, N'COLUMN', [create]",
"EXEC sp_addextendedproperty N'MS_Description', N'(DC2Type:object)', N'SCHEMA', dbo, N'TABLE', mytable, N'COLUMN', commented_type",
"EXEC sp_addextendedproperty N'MS_Description', N'Doctrine array type.(DC2Type:array)', N'SCHEMA', dbo, N'TABLE', mytable, N'COLUMN', commented_type_with_comment",
Expand All @@ -568,7 +568,7 @@ public function testGeneratesAlterTableSQLWithColumnComments()
$table->addColumn('comment_float_0', 'integer', array('comment' => 0.0));
$table->addColumn('comment_string_0', 'integer', array('comment' => '0'));
$table->addColumn('comment', 'integer', array('comment' => 'Doctrine 0wnz you!'));
$table->addColumn('`comment_quoted`', 'integer', array('comment' => 'Doctrine 0wnz comments for explicitely quoted columns!'));
$table->addColumn('`comment_quoted`', 'integer', array('comment' => 'Doctrine 0wnz comments for explicitly quoted columns!'));
$table->addColumn('create', 'integer', array('comment' => 'Doctrine 0wnz comments for reserved keyword columns!'));
$table->addColumn('commented_type', 'object');
$table->addColumn('commented_type_with_comment', 'array', array('comment' => 'Doctrine array type.'));
Expand Down
16 changes: 8 additions & 8 deletions tests/Doctrine/Tests/DBAL/Schema/ComparatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ public function testTablesCaseInsensitive()
$this->assertSchemaTableChangeCount($diff, 1, 0, 1);
}

public function testSequencesCaseInsenstive()
public function testSequencesCaseInsensitive()
{
$schemaA = new Schema();
$schemaA->createSequence('foo');
Expand Down Expand Up @@ -680,7 +680,7 @@ public function testDetectRenameColumn()
}

/**
* You can easily have ambiguouties in the column renaming. If these
* You can easily have ambiguities in the column renaming. If these
* are detected no renaming should take place, instead adding and dropping
* should be used exclusively.
*
Expand All @@ -700,7 +700,7 @@ public function testDetectRenameColumnAmbiguous()

$this->assertEquals(1, count($tableDiff->addedColumns), "'baz' should be added, not created through renaming!");
$this->assertArrayHasKey('baz', $tableDiff->addedColumns, "'baz' should be added, not created through renaming!");
$this->assertEquals(2, count($tableDiff->removedColumns), "'foo' and 'bar' should both be dropped, an ambigouty exists which one could be renamed to 'baz'.");
$this->assertEquals(2, count($tableDiff->removedColumns), "'foo' and 'bar' should both be dropped, an ambiguity exists which one could be renamed to 'baz'.");
$this->assertArrayHasKey('foo', $tableDiff->removedColumns, "'foo' should be removed.");
$this->assertArrayHasKey('bar', $tableDiff->removedColumns, "'bar' should be removed.");
$this->assertEquals(0, count($tableDiff->renamedColumns), "no renamings should take place.");
Expand Down Expand Up @@ -840,7 +840,7 @@ public function testDiffDecimalWithNullPrecision()
/**
* @group DBAL-204
*/
public function testFqnSchemaComparision()
public function testFqnSchemaComparison()
{
$config = new SchemaConfig();
$config->setName("foo");
Expand Down Expand Up @@ -887,7 +887,7 @@ public function testNamespacesComparison()
/**
* @group DBAL-204
*/
public function testFqnSchemaComparisionDifferentSchemaNameButSameTableNoDiff()
public function testFqnSchemaComparisonDifferentSchemaNameButSameTableNoDiff()
{
$config = new SchemaConfig();
$config->setName("foo");
Expand All @@ -907,7 +907,7 @@ public function testFqnSchemaComparisionDifferentSchemaNameButSameTableNoDiff()
/**
* @group DBAL-204
*/
public function testFqnSchemaComparisionNoSchemaSame()
public function testFqnSchemaComparisonNoSchemaSame()
{
$config = new SchemaConfig();
$config->setName("foo");
Expand All @@ -926,7 +926,7 @@ public function testFqnSchemaComparisionNoSchemaSame()
/**
* @group DDC-1657
*/
public function testAutoIncremenetSequences()
public function testAutoIncrementSequences()
{
$oldSchema = new Schema();
$table = $oldSchema->createTable("foo");
Expand All @@ -950,7 +950,7 @@ public function testAutoIncremenetSequences()
* Check that added autoincrement sequence is not populated in newSequences
* @group DBAL-562
*/
public function testAutoIncremenetNoSequences()
public function testAutoIncrementNoSequences()
{
$oldSchema = new Schema();
$table = $oldSchema->createTable("foo");
Expand Down
8 changes: 4 additions & 4 deletions tests/Doctrine/Tests/DBAL/Schema/IndexTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function testCreateUnique()
/**
* @group DBAL-50
*/
public function testFullfilledByUnique()
public function testFulfilledByUnique()
{
$idx1 = $this->createIndex(true, false);
$idx2 = $this->createIndex(true, false);
Expand All @@ -52,7 +52,7 @@ public function testFullfilledByUnique()
/**
* @group DBAL-50
*/
public function testFullfilledByPrimary()
public function testFulfilledByPrimary()
{
$idx1 = $this->createIndex(true, true);
$idx2 = $this->createIndex(true, true);
Expand All @@ -65,7 +65,7 @@ public function testFullfilledByPrimary()
/**
* @group DBAL-50
*/
public function testFullfilledByIndex()
public function testFulfilledByIndex()
{
$idx1 = $this->createIndex();
$idx2 = $this->createIndex();
Expand All @@ -77,7 +77,7 @@ public function testFullfilledByIndex()
$this->assertTrue($idx1->isFullfilledBy($uniq));
}

public function testFullfilledWithPartial()
public function testFulfilledWithPartial()
{
$without = new Index('without', array('col1', 'col2'), true, false, array(), array());
$partial = new Index('partial', array('col1', 'col2'), true, false, array(), array('where' => 'col1 IS NULL'));
Expand Down
2 changes: 1 addition & 1 deletion tests/Doctrine/Tests/DBAL/Schema/SchemaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function testAddTable()
$this->assertTrue($schema->hasTable($tableName));
}

public function testTableMatchingCaseInsenstive()
public function testTableMatchingCaseInsensitive()
{
$table = new Table("Foo");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function testNoGlobalServerException()
));
}

public function testNoShardsServersExecption()
public function testNoShardsServersException()
{
$this->setExpectedException('InvalidArgumentException', "Connection Parameters require 'global' and 'shards' configurations.");

Expand All @@ -84,7 +84,7 @@ public function testNoShardsServersExecption()
));
}

public function testNoShardsChoserExecption()
public function testNoShardsChoserException()
{
$this->setExpectedException('InvalidArgumentException', "Missing Shard Choser configuration 'shardChoser'");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function testSelectShard()
$this->assertEquals(1234, $sm->getCurrentDistributionValue());
}

public function testSelectShardNoDistriubtionValue()
public function testSelectShardNoDistributionValue()
{
$conn = $this->createConnection(array('sharding' => array('federationName' => 'abc', 'distributionKey' => 'foo', 'distributionType' => 'integer')));
$conn->expects($this->at(1))->method('isTransactionActive')->will($this->returnValue(false));
Expand Down