Coding standards

This commit is contained in:
Romain Neutron
2012-03-09 12:49:13 +01:00
parent 20a771ae37
commit 82d9eeef7b
64 changed files with 217 additions and 175 deletions

View File

@@ -53,12 +53,12 @@ class API_OAuth2_Form_DevAppDesktop
/**
*
* @var string
* @var string
*/
public $type;
public $scheme_website;
public $urlwebsite;
/**
*
* @param Request $request
@@ -116,7 +116,7 @@ class API_OAuth2_Form_DevAppDesktop
/**
*
* @return string
* @return string
*/
public function getType()
{
@@ -132,7 +132,7 @@ class API_OAuth2_Form_DevAppDesktop
{
return $this->urlwebsite;
}
public function getSchemeCallback()
{
return '';
@@ -152,7 +152,8 @@ class API_OAuth2_Form_DevAppDesktop
$metadata->addPropertyConstraint('description', new Constraints\NotBlank($blank));
$metadata->addPropertyConstraint('urlwebsite', new Constraints\NotBlank($blank));
$metadata->addPropertyConstraint('urlwebsite', new Constraints\Url($url));
return;
}
}
}

View File

@@ -50,10 +50,10 @@ class API_OAuth2_Form_DevAppInternet
* @var string
*/
public $callback;
public $scheme_website;
public $scheme_callback;
public $urlwebsite;
public $urlcallback;
@@ -71,10 +71,10 @@ class API_OAuth2_Form_DevAppInternet
$this->scheme_website = $request->get('scheme-website', 'http://');
$this->scheme_callback = $request->get('scheme-callback', 'http://');
$this->type = API_OAuth2_Application::WEB_TYPE;
$this->urlwebsite = $this->scheme_website.$this->website;
$this->urlcallback = $this->scheme_callback.$this->callback;
return $this;
}
@@ -116,7 +116,7 @@ class API_OAuth2_Form_DevAppInternet
/**
*
* @return string
* @return string
*/
public function getType()
{
@@ -159,6 +159,7 @@ class API_OAuth2_Form_DevAppInternet
$metadata->addPropertyConstraint('urlwebsite', new Constraints\Url($url));
$metadata->addPropertyConstraint('urlcallback', new Constraints\NotBlank($blank));
$metadata->addPropertyConstraint('urlcallback', new Constraints\Url($url));
return;
}

View File

@@ -207,7 +207,7 @@ class API_V1_adapter extends API_V1_Abstract
public function caption_records(Request $request, $databox_id, $record_id)
{
$result = new API_V1_result($request, $this);
$record = $this->appbox->get_databox($databox_id)->get_record($record_id);
$fields = $record->get_caption()->get_fields();
$ret = array();
@@ -220,9 +220,10 @@ class API_V1_adapter extends API_V1_Abstract
);
}
$result->set_datas($ret);
return $result;
}
/**
* Get an API_V1_result containing the results of a records search
*