Skip to content
Browse files

[generator] Fix typos in new buildtime validation service

  • Loading branch information...
1 parent 8663103 commit 54b19413183e25ccf3f0e4ae271ec1f03fb7efbe @fzaninotto fzaninotto committed
View
11 generator/lib/util/PropelSchemaValidator.php
@@ -10,7 +10,7 @@
/**
* Service class for validating XML schemas.
- * Only impleme,ts validation rules that cannot be implemented in XSD.
+ * Only implements validation rules that cannot be implemented in XSD.
*
* @example Basic usage:
* <code>
@@ -20,6 +20,7 @@
* }
* </code>
*
+ * @package propel.generator.util
* @author François Zaninotto
*/
class PropelSchemaValidator
@@ -33,8 +34,6 @@ public function __construct(AppData $appData)
}
/**
- * Validate the database schema
- *
* @return boolean true if valid, false otherwise
*/
public function validate()
@@ -45,7 +44,7 @@ public function validate()
return count($this->errors) == 0;
}
- protected function validateDatabaseTables($database)
+ protected function validateDatabaseTables(Database $database)
{
$phpNames = array();
foreach ($database->getTables() as $table) {
@@ -81,10 +80,12 @@ protected function validateTableColumns(Table $table)
}
}
+ /**
+ * @return array A list of error messages
+ */
public function getErrors()
{
return $this->errors;
}
-
}
View
2 test/testsuite/generator/util/PropelSchemaValidatorTest.php
@@ -39,7 +39,7 @@ public function testValidateReturnsTrueForValidSchema()
$schema = <<<EOF
<database name="bookstore">
<table name="book">
-
+ <column name="id" required="true" primaryKey="true" autoIncrement="true" type="INTEGER" />
<column name="title" type="VARCHAR" size="100" primaryString="true" />
</table>
</database>

0 comments on commit 54b1941

Please sign in to comment.
Something went wrong with that request. Please try again.