INFRA-132 - Remove extra newlines from the bottom of docblocks
[civicrm-core.git] / Civi / API / Request.php
index e4ffa282c176b35431e54f894bb5e2e7b81e9da6..1d5f747402eed76c3b24970602442063b2dae1dd 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.4                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
 */
 namespace Civi\API;
 
+/**
+ * Class Request
+ * @package Civi\API
+ */
 class Request {
   private static $nextId = 1;
 
@@ -33,10 +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
-   * @return array the request descriptor; keys:
+   *   Who knows? ...
+   *
+   * @throws \API_Exception
+   * @return array
+   *   the request descriptor; keys:
    *   - version: int
    *   - entity: string
    *   - action: string
@@ -139,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 {
@@ -152,4 +164,4 @@ class Request {
     }
   }
 
-}
\ No newline at end of file
+}