Browse Source

Fix typo in method name.

It should be 'marshal' not 'marshall'.
mark_story 12 years ago
parent
commit
41fbdc4c76

+ 1 - 1
src/Database/Type.php

@@ -246,7 +246,7 @@ class Type {
  * @param mixed $value The value to convert.
  * @return mixed Converted value.
  */
-	public function marshall($value) {
+	public function marshal($value) {
 		return $value;
 	}
 

+ 1 - 1
src/Database/Type/DateTimeType.php

@@ -61,7 +61,7 @@ class DateTimeType extends \Cake\Database\Type {
  * @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;

+ 1 - 1
src/Database/Type/DateType.php

@@ -55,7 +55,7 @@ class DateType extends \Cake\Database\Type {
  * @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;

+ 1 - 1
src/ORM/Marshaller.php

@@ -113,7 +113,7 @@ class Marshaller {
 				$value = $this->_marshalAssociation($assoc, $value, $nested);
 			} elseif ($columnType) {
 				$converter = Type::build($columnType);
-				$value = $converter->marshall($value);
+				$value = $converter->marshal($value);
 			}
 			$properties[$key] = $value;
 		}

+ 5 - 5
tests/TestCase/Database/Type/DateTimeTypeTest.php

@@ -70,11 +70,11 @@ class DateTimeTypeTest extends TestCase {
 	}
 
 /**
- * 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 @@ class DateTimeTypeTest extends TestCase {
 /**
  * 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);
 	}
 

+ 6 - 6
tests/TestCase/Database/Type/DateTypeTest.php

@@ -74,11 +74,11 @@ class DateTypeTest extends TestCase {
 	}
 
 /**
- * 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 @@ class DateTypeTest extends TestCase {
 	}
 
 /**
- * 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);
 	}