From 41fbdc4c76d35bda5cace03407abe79117579100 Mon Sep 17 00:00:00 2001 From: mark_story Date: Mon, 17 Mar 2014 22:41:54 -0400 Subject: [PATCH] Fix typo in method name. It should be 'marshal' not 'marshall'. --- src/Database/Type.php | 2 +- src/Database/Type/DateTimeType.php | 2 +- src/Database/Type/DateType.php | 2 +- src/ORM/Marshaller.php | 2 +- tests/TestCase/Database/Type/DateTimeTypeTest.php | 10 +++++----- tests/TestCase/Database/Type/DateTypeTest.php | 12 ++++++------ 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/Database/Type.php b/src/Database/Type.php index dab1d936578..2bc25df71c2 100644 --- a/src/Database/Type.php +++ b/src/Database/Type.php @@ -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; } diff --git a/src/Database/Type/DateTimeType.php b/src/Database/Type/DateTimeType.php index 2b51d92fea6..bc5a258b5b1 100644 --- a/src/Database/Type/DateTimeType.php +++ b/src/Database/Type/DateTimeType.php @@ -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; diff --git a/src/Database/Type/DateType.php b/src/Database/Type/DateType.php index 3f8a52dffb0..36e4d3a8645 100644 --- a/src/Database/Type/DateType.php +++ b/src/Database/Type/DateType.php @@ -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; diff --git a/src/ORM/Marshaller.php b/src/ORM/Marshaller.php index 5c3c60ee9d4..6186a3f44b2 100644 --- a/src/ORM/Marshaller.php +++ b/src/ORM/Marshaller.php @@ -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; } diff --git a/tests/TestCase/Database/Type/DateTimeTypeTest.php b/tests/TestCase/Database/Type/DateTimeTypeTest.php index 1b15a6d8dce..13c8dfb0f29 100644 --- a/tests/TestCase/Database/Type/DateTimeTypeTest.php +++ b/tests/TestCase/Database/Type/DateTimeTypeTest.php @@ -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], @@ -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); } diff --git a/tests/TestCase/Database/Type/DateTypeTest.php b/tests/TestCase/Database/Type/DateTypeTest.php index f6f4fcb4b8c..c5100f91b9c 100644 --- a/tests/TestCase/Database/Type/DateTypeTest.php +++ b/tests/TestCase/Database/Type/DateTypeTest.php @@ -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); @@ -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); }