Skip to content

Commit

Permalink
Fix typos.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Feb 25, 2018
1 parent 1bd3fd8 commit d8c3405
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/Database/FieldTypeConverter.php
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Query.php
Expand Up @@ -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
*/
Expand Down
6 changes: 3 additions & 3 deletions src/Database/Type/DateTimeType.php
Expand Up @@ -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
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Database/Type/DecimalType.php
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/Database/Type/FloatType.php
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/Database/Type/IntegerType.php
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/Database/QueryTest.php
Expand Up @@ -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);
}

Expand Down

0 comments on commit d8c3405

Please sign in to comment.