Merge remote-tracking branch 'upstream/4.5' into 4.5-master-2015-01-26-14-28-00
[civicrm-core.git] / Civi / API / Request.php
index 28b2bf2a8034ff3cb74b03ebb99189628ac7bcee..1cf29d2369694a8e65b79b8b9c861b073b3f371b 100644 (file)
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 namespace Civi\API;
 
 /**
@@ -37,12 +37,17 @@ class Request {
    * Create a formatted/normalized request object.
    *
    * @param string $entity
+   *   API entity name.
    * @param string $action
+   *   API action name.
    * @param array $params
+   *   API parameters.
    * @param mixed $extra
+   *   Who knows? ...
    *
    * @throws \API_Exception
-   * @return array the request descriptor; keys:
+   * @return array
+   *   the request descriptor; keys:
    *   - version: int
    *   - entity: string
    *   - action: string
@@ -145,11 +150,12 @@ class Request {
    * We must be sure that every request uses only one version of the API.
    *
    * @param array $params
+   *   API parameters.
    * @return int
    */
   protected static function parseVersion($params) {
     $desired_version = empty($params['version']) ? NULL : (int) $params['version'];
-    if (isset($desired_version) && is_integer($desired_version)) {
+    if (isset($desired_version) && is_int($desired_version)) {
       return $desired_version;
     }
     else {