Skip to content
Permalink
Browse files

Fix typos.

  • Loading branch information...
markstory committed Feb 25, 2018
1 parent 1bd3fd8 commit d8c3405934a6dd8af04960f1b167ee15f8a1a167
@@ -87,7 +87,7 @@ public function __construct(TypeMap $typeMap, Driver $driver)
}
}
// Using batching when there is onl a couple for the type is actually slower,
// Using batching when there is only a couple for the type is actually slower,
// so, let's check for that case here.
foreach ($batchingResult as $type => $fields) {
if (count($fields) > 2) {
@@ -2035,7 +2035,7 @@ public function getSelectTypeMap()
}
/**
* Disables the automatic casting of fields to their corresponding type
* Disables the automatic casting of fields to their corresponding PHP data type
*
* @return $this
*/
@@ -52,10 +52,10 @@ class DateTimeType extends Type implements TypeInterface, BatchCastingInterface
public static $dateTimeClass = 'Cake\I18n\Time';
/**
* Whether or not we want to override the time of the converted Time objets
* so the point to the start of the day.
* Whether or not we want to override the time of the converted Time objects
* so it points to the start of the day.
*
* This is mainly there to avoid subclasses re-implement the same functionality.
* This is primarily to avoid subclasses needing to re-implement the same functionality.
*
* @var bool
*/
@@ -104,7 +104,7 @@ public function toPHP($value, Driver $driver)
return $value;
}
// Using coersion is faster than casting
// Using coercion is faster than casting
// @codingStandardsIgnoreStart
return (float)+$value;
// @codingStandardsIgnoreEnd
@@ -122,7 +122,7 @@ public function manyToPHP(array $values, array $fields, Driver $driver)
continue;
}
// Using coersion is faster than casting
// Using coercion is faster than casting
// @codingStandardsIgnoreStart
$values[$field] = (float)+$values[$field];
// @codingStandardsIgnoreEnd
@@ -96,7 +96,7 @@ public function toPHP($value, Driver $driver)
return null;
}
// Using coersion is faster than casting
// Using coercion is faster than casting
// @codingStandardsIgnoreStart
return (float)+$value;
// @codingStandardsIgnoreEnd
@@ -114,7 +114,7 @@ public function manyToPHP(array $values, array $fields, Driver $driver)
continue;
}
// Using coersion is faster than casting
// Using coercion is faster than casting
// @codingStandardsIgnoreStart
$values[$field] = (float)+$values[$field];
// @codingStandardsIgnoreEnd
@@ -84,7 +84,7 @@ public function toPHP($value, Driver $driver)
return $value;
}
// Using coersion is faster than casting
// Using coercion is faster than casting
// @codingStandardsIgnoreStart
return (int)+$value;
// @codingStandardsIgnoreEnd
@@ -101,7 +101,7 @@ public function manyToPHP(array $values, array $fields, Driver $driver)
if (!isset($values[$field])) {
continue;
}
// Using coersion is faster than casting
// Using coercion is faster than casting
// @codingStandardsIgnoreStart
$values[$field] = (int)+$values[$field];
// @codingStandardsIgnoreEnd
@@ -4528,8 +4528,8 @@ public function testAllNoDuplicateTypeCasting()
// Get results a second time.
$result = $query->execute()->fetchAll('assoc');
// Had the type casting being rememberd from the first time,
// The valuewould be a truncated float (1.0)
// Had the type casting being remembered from the first time,
// The value would be a truncated float (1.0)
$this->assertEquals([['a' => 1.5]], $result);
}

0 comments on commit d8c3405

Please sign in to comment.
You can’t perform that action at this time.