Skip to content

Commit

Permalink
Fix typo in method name.
Browse files Browse the repository at this point in the history
It should be 'marshal' not 'marshall'.
  • Loading branch information
markstory committed Mar 18, 2014
1 parent 2ab9feb commit 41fbdc4
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/Database/Type.php
Expand Up @@ -246,7 +246,7 @@ public function newId() {
* @param mixed $value The value to convert.
* @return mixed Converted value.
*/
public function marshall($value) {
public function marshal($value) {
return $value;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Database/Type/DateTimeType.php
Expand Up @@ -61,7 +61,7 @@ public function toPHP($value, Driver $driver) {
* @param mixed $value Request data
* @return \DateTime
*/
public function marshall($value) {
public function marshal($value) {
try {
if ($value === '' || $value === null || $value === false || $value === true) {
return $value;
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Type/DateType.php
Expand Up @@ -55,7 +55,7 @@ public function toPHP($value, Driver $driver) {
* @param mixed $value Request data
* @return \DateTime
*/
public function marshall($value) {
public function marshal($value) {
try {
if ($value === '' || $value === null || $value === false || $value === true) {
return $value;
Expand Down
2 changes: 1 addition & 1 deletion src/ORM/Marshaller.php
Expand Up @@ -113,7 +113,7 @@ public function one(array $data, $include = []) {
$value = $this->_marshalAssociation($assoc, $value, $nested);
} elseif ($columnType) {
$converter = Type::build($columnType);
$value = $converter->marshall($value);
$value = $converter->marshal($value);
}
$properties[$key] = $value;
}
Expand Down
10 changes: 5 additions & 5 deletions tests/TestCase/Database/Type/DateTimeTypeTest.php
Expand Up @@ -70,11 +70,11 @@ public function testToDatabase() {
}

/**
* Data provider for marshall()
* Data provider for marshal()
*
* @return array
*/
public function marshallProvider() {
public function marshalProvider() {
return [
// invalid types.
[null, null],
Expand Down Expand Up @@ -140,11 +140,11 @@ public function marshallProvider() {
/**
* test marshalling data.
*
* @dataProvider marshallProvider
* @dataProvider marshalProvider
* @return void
*/
public function testMarshall($value, $expected) {
$result = $this->type->marshall($value);
public function testMarshal($value, $expected) {
$result = $this->type->marshal($value);
$this->assertEquals($expected, $result);
}

Expand Down
12 changes: 6 additions & 6 deletions tests/TestCase/Database/Type/DateTypeTest.php
Expand Up @@ -74,11 +74,11 @@ public function testToDatabase() {
}

/**
* Data provider for marshall()
* Data provider for marshal()
*
* @return array
*/
public function marshallProvider() {
public function marshalProvider() {
$date = new \DateTime('@1392387900');
$date->setTime(0, 0, 0);

Expand Down Expand Up @@ -145,13 +145,13 @@ public function marshallProvider() {
}

/**
* test marshalling data.
* test marshaling data.
*
* @dataProvider marshallProvider
* @dataProvider marshalProvider
* @return void
*/
public function testMarshall($value, $expected) {
$result = $this->type->marshall($value);
public function testMarshal($value, $expected) {
$result = $this->type->marshal($value);
$this->assertEquals($expected, $result);
}

Expand Down

0 comments on commit 41fbdc4

Please sign in to comment.