Skip to content

Commit

Permalink
fixes declaration warning in php5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
nojimage committed Jun 14, 2013
1 parent 748d802 commit 09bb14a
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions Model/Datasource/RestSource.php
Expand Up @@ -90,45 +90,47 @@ public function __construct($config, $Http = null) {
/**
* Sets method = POST in request if not already set
*
* @param AppModel $model
* @param Model $model
* @param array $fields Unused
* @param array $values Unused
*/
public function create($model, $fields = null, $values = null) {
public function create(Model $model, $fields = null, $values = null) {
$model->request = array_merge(array('method' => 'POST'), $model->request);
return $this->request($model);
}

/**
* Sets method = GET in request if not already set
*
* @param AppModel $model
* @param Model $model
* @param array $queryData Unused
* @param integer $recursive Unused
*/
public function read($model, $queryData = array()) {
public function read(Model $model, $queryData = array(), $recursive = null) {
$model->request = array_merge(array('method' => 'GET'), $model->request);
return $this->request($model);
}

/**
* Sets method = PUT in request if not already set
*
* @param AppModel $model
* @param Model $model
* @param array $fields Unused
* @param array $values Unused
* @param mixed $conditions Unused
*/
public function update($model, $fields = null, $values = null) {
public function update(Model $model, $fields = null, $values = null, $conditions = null) {
$model->request = array_merge(array('method' => 'PUT'), $model->request);
return $this->request($model);
}

/**
* Sets method = DELETE in request if not already set
*
* @param AppModel $model
* @param Model $model
* @param mixed $id Unused
*/
public function delete($model, $id = null) {
public function delete(Model $model, $id = null) {
$model->request = array_merge(array('method' => 'DELETE'), $model->request);
return $this->request($model);
}
Expand Down

0 comments on commit 09bb14a

Please sign in to comment.