Commit 73c09df6 authored by Derick Rethans's avatar Derick Rethans

PHPLIB-356: Audit documentation for possible BSON 64-bit integer return values

parent b6320a09
......@@ -71,7 +71,7 @@ class MapReduceResult implements IteratorAggregate
*/
public function getExecutionTimeMS()
{
return $this->executionTimeMS;
return (integer) $this->executionTimeMS;
}
/**
......
......@@ -63,6 +63,7 @@ class CollectionInfo implements ArrayAccess
*/
public function getCappedMax()
{
/* The MongoDB server might return this number as an integer or float */
return isset($this->info['options']['max']) ? (integer) $this->info['options']['max'] : null;
}
......@@ -73,6 +74,7 @@ class CollectionInfo implements ArrayAccess
*/
public function getCappedSize()
{
/* The MongoDB server might return this number as an integer or float */
return isset($this->info['options']['size']) ? (integer) $this->info['options']['size'] : null;
}
......
......@@ -71,6 +71,7 @@ class DatabaseInfo implements ArrayAccess
*/
public function getSizeOnDisk()
{
/* The MongoDB server might return this number as an integer or float */
return (integer) $this->info['sizeOnDisk'];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment