diff --git a/parse.php b/parse.php index 554d687..f74e07b 100644 --- a/parse.php +++ b/parse.php @@ -160,13 +160,13 @@ public function dataType($type,$params){ case 'increment': $return = array( "__op" => "Increment", - "amount" => $params[0] + "amount" => $params ); break; case 'decrement': $return = array( "__op" => "Decrement", - "amount" => $params[0] + "amount" => $params ); break; default: diff --git a/parseObject.php b/parseObject.php index b6b8f39..b27e062 100644 --- a/parseObject.php +++ b/parseObject.php @@ -59,11 +59,11 @@ public function update($id){ } } - public function increment($field,$amount){ + public function increment($field, $amount){ $this->data[$field] = $this->dataType('increment', $amount); } - public function decrement($id){ + public function decrement($field, $amount){ $this->data[$field] = $this->dataType('decrement', $amount); }