Merge pull request #6206 from mlutfy/4.6-crm16839
[civicrm-core.git] / Civi / API / Provider / AdhocProvider.php
index 7bb62be87ffd173c69cbc0b5c670acda2d2e4694..195cd60dd73ac68519fbeeed9dd1c31cf511684e 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -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\Provider;
 
@@ -124,6 +124,8 @@ class AdhocProvider implements EventSubscriberInterface, ProviderInterface {
 
   /**
    * {inheritdoc}
+   * @param array $apiRequest
+   * @return array|mixed
    */
   public function invoke($apiRequest) {
     return call_user_func($this->actions[strtolower($apiRequest['action'])]['callback'], $apiRequest);
@@ -131,6 +133,8 @@ class AdhocProvider implements EventSubscriberInterface, ProviderInterface {
 
   /**
    * {inheritdoc}
+   * @param int $version
+   * @return array
    */
   public function getEntityNames($version) {
     return array($this->entity);
@@ -138,6 +142,9 @@ class AdhocProvider implements EventSubscriberInterface, ProviderInterface {
 
   /**
    * {inheritdoc}
+   * @param int $version
+   * @param string $entity
+   * @return array
    */
   public function getActionNames($version, $entity) {
     if ($version == $this->version && $entity == $this->entity) {
@@ -157,4 +164,5 @@ class AdhocProvider implements EventSubscriberInterface, ProviderInterface {
   public function matchesRequest($apiRequest) {
     return $apiRequest['entity'] == $this->entity && $apiRequest['version'] == $this->version && isset($this->actions[strtolower($apiRequest['action'])]);
   }
+
 }