Browse Source

Merge branch 'batch-cast' of github.com:cakephp/cakephp into batch-cast

Jose Lorenzo Rodriguez 8 years ago
parent
commit
2bf6980192

+ 1 - 1
src/Database/FieldTypeConverter.php

@@ -103,7 +103,7 @@ class FieldTypeConverter
             }
         }
 
-        // 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) {

+ 1 - 1
src/Database/Query.php

@@ -2035,7 +2035,7 @@ class Query implements ExpressionInterface, IteratorAggregate
     }
 
     /**
-     * Disables the automatic casting of fields to their corresponding type
+     * Disables the automatic casting of fields to their corresponding PHP data type
      *
      * @return $this
      */

+ 3 - 3
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
      */

+ 2 - 2
src/Database/Type/DecimalType.php

@@ -104,7 +104,7 @@ class DecimalType extends Type implements TypeInterface, BatchCastingInterface
             return $value;
         }
 
-        // Using coersion is faster than casting
+        // Using coercion is faster than casting
         // @codingStandardsIgnoreStart
         return (float)+$value;
         // @codingStandardsIgnoreEnd
@@ -122,7 +122,7 @@ class DecimalType extends Type implements TypeInterface, BatchCastingInterface
                 continue;
             }
 
-            // Using coersion is faster than casting
+            // Using coercion is faster than casting
             // @codingStandardsIgnoreStart
             $values[$field] = (float)+$values[$field];
             // @codingStandardsIgnoreEnd

+ 2 - 2
src/Database/Type/IntegerType.php

@@ -84,7 +84,7 @@ class IntegerType extends Type implements TypeInterface, BatchCastingInterface
             return $value;
         }
 
-        // Using coersion is faster than casting
+        // Using coercion is faster than casting
         // @codingStandardsIgnoreStart
         return (int)+$value;
         // @codingStandardsIgnoreEnd
@@ -101,7 +101,7 @@ class IntegerType extends Type implements TypeInterface, BatchCastingInterface
             if (!isset($values[$field])) {
                 continue;
             }
-            // Using coersion is faster than casting
+            // Using coercion is faster than casting
             // @codingStandardsIgnoreStart
             $values[$field] = (int)+$values[$field];
             // @codingStandardsIgnoreEnd

+ 2 - 2
tests/TestCase/Database/QueryTest.php

@@ -4528,8 +4528,8 @@ class QueryTest extends TestCase
         // 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);
     }