Cast all to (int)

This commit is contained in:
Andrey
2015-07-20 11:19:39 -03:00
parent 6419531178
commit dfe45c0ff2
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -40,9 +40,9 @@ class RetentionPolicy
*/
public function __construct($name, $duration = '1d', $replication = 1, $default = false)
{
$this->name = $name;
$this->name = (string) $name;
$this->duration = $duration;
$this->replication = $replication;
$this->replication = (int) $replication;
$this->default = (bool) $default;
}
}
+2 -2
View File
@@ -187,8 +187,8 @@ class Builder
*/
public function setTimeRange($from, $to)
{
$fromDate = date('Y-m-d H:i:s', $from);
$toDate = date('Y-m-d H:i:s', $to);
$fromDate = date('Y-m-d H:i:s', (int) $from);
$toDate = date('Y-m-d H:i:s', (int) $to);
$this->where(array("time > '$fromDate'", "time < '$toDate'"));