diff --git a/src/Database/FieldTypeConverter.php b/src/Database/FieldTypeConverter.php index cccfcd9af5c..68c4e4785a9 100644 --- a/src/Database/FieldTypeConverter.php +++ b/src/Database/FieldTypeConverter.php @@ -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) { diff --git a/src/Database/Query.php b/src/Database/Query.php index 57072f97b7e..fed020ccdfa 100644 --- a/src/Database/Query.php +++ b/src/Database/Query.php @@ -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 */ diff --git a/src/Database/Type/DateTimeType.php b/src/Database/Type/DateTimeType.php index f5fea02f24f..61aaf7c27a8 100644 --- a/src/Database/Type/DateTimeType.php +++ b/src/Database/Type/DateTimeType.php @@ -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 */ diff --git a/src/Database/Type/DecimalType.php b/src/Database/Type/DecimalType.php index 56146c54c15..8343d737c46 100644 --- a/src/Database/Type/DecimalType.php +++ b/src/Database/Type/DecimalType.php @@ -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 diff --git a/src/Database/Type/FloatType.php b/src/Database/Type/FloatType.php index a9b90f7b357..809d4f46c70 100644 --- a/src/Database/Type/FloatType.php +++ b/src/Database/Type/FloatType.php @@ -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 diff --git a/src/Database/Type/IntegerType.php b/src/Database/Type/IntegerType.php index b73ecaf7d3d..0be0fd20781 100644 --- a/src/Database/Type/IntegerType.php +++ b/src/Database/Type/IntegerType.php @@ -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 diff --git a/tests/TestCase/Database/QueryTest.php b/tests/TestCase/Database/QueryTest.php index 94d7c64209b..e662b5ef54f 100644 --- a/tests/TestCase/Database/QueryTest.php +++ b/tests/TestCase/Database/QueryTest.php @@ -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); }