diff --git a/README.md b/README.md index a8b1cd1..1e8986a 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ $note['person_id'] = $person['data']['id']; $pipedrive->notes()->add($note); //add deal to user -deal['title'] = 'example title'; +$deal['title'] = 'example title'; $deal['stage_id'] = 8; $deal['person_id'] = $person['data']['id']; diff --git a/src/Benhawker/Pipedrive/Library/Activities.php b/src/Benhawker/Pipedrive/Library/Activities.php index cf93df3..f3796b5 100644 --- a/src/Benhawker/Pipedrive/Library/Activities.php +++ b/src/Benhawker/Pipedrive/Library/Activities.php @@ -30,10 +30,10 @@ public function __construct(\Benhawker\Pipedrive\Pipedrive $master) } /** - * Adds a activity + * Adds an activity * - * @param array $data activity detials - * @return array returns detials of the activity + * @param array $data details of the activity + * @return array details of the activity */ public function add(array $data) { diff --git a/src/Benhawker/Pipedrive/Library/Curl.php b/src/Benhawker/Pipedrive/Library/Curl.php index 8ed21fc..391ef7b 100644 --- a/src/Benhawker/Pipedrive/Library/Curl.php +++ b/src/Benhawker/Pipedrive/Library/Curl.php @@ -62,7 +62,7 @@ public function __destruct() * Makes cURL get Request * * @param string $method Pipedrive method - * @return array decoded Json Output + * @return array decoded JSON Output */ public function get($method, $data = array()) { @@ -78,7 +78,7 @@ public function get($method, $data = array()) * Makes cURL get Request * * @param string $method Pipedrive method - * @return array decoded Json Output + * @return array decoded JSON Output */ public function post($method, array $data) { @@ -95,7 +95,7 @@ public function post($method, array $data) * Makes cURL get Request * * @param string $method Pipedrive method - * @return array decoded Json Output + * @return array decoded JSON Output */ public function put($method, array $data) { @@ -111,7 +111,7 @@ public function put($method, array $data) * Makes cURL get Request * * @param string $method Pipedrive method - * @return array decoded Json Output + * @return array decoded JSON Output */ public function delete($method) { @@ -125,7 +125,7 @@ public function delete($method) /** * Execute current cURL session * - * @return array decoded json ouput + * @return array decoded JSON ouput */ protected function exec() { diff --git a/src/Benhawker/Pipedrive/Library/DealFields.php b/src/Benhawker/Pipedrive/Library/DealFields.php index 3c8f50e..859e88e 100644 --- a/src/Benhawker/Pipedrive/Library/DealFields.php +++ b/src/Benhawker/Pipedrive/Library/DealFields.php @@ -3,7 +3,7 @@ use Benhawker\Pipedrive\Exceptions\PipedriveMissingFieldError; /** - * Pipedrive Deals Methods + * Pipedrive DealFields Methods * * DealFields represent the near-complete schema for a Deal in the context of the company of the authorized user. * Each company can have a different schema for their Deals, with various custom fields. In the context of using @@ -34,9 +34,9 @@ public function __construct(\Benhawker\Pipedrive\Pipedrive $master) } /** - * Returns all deal fields + * Returns all dealFields * - * @return array returns all dealFields + * @return array all dealFields */ public function getAll() { @@ -44,21 +44,21 @@ public function getAll() } /** - * Returns a deal field + * Returns a dealField * - * @param int $id pipedrive dealField id - * @return array returns details of a dealField + * @param int $id ID of the field to fetch + * @return array details of the dealField */ - public function getById($id) + public function getById($dealFieldId) { - return $this->curl->get('dealFields/' . $id); + return $this->curl->get('dealFields/' . $dealFieldId); } /** * Adds a dealField * - * @param array $data deal field detials - * @return array returns details of the deal field + * @param array $data details of the dealField + * @return array details of the dealField */ public function add(array $data) { diff --git a/src/Benhawker/Pipedrive/Library/Deals.php b/src/Benhawker/Pipedrive/Library/Deals.php index 533c2d8..0a86525 100644 --- a/src/Benhawker/Pipedrive/Library/Deals.php +++ b/src/Benhawker/Pipedrive/Library/Deals.php @@ -34,19 +34,19 @@ public function __construct(\Benhawker\Pipedrive\Pipedrive $master) /** * Returns a deal * - * @param int $id pipedrive deals id - * @return array returns detials of a deal + * @param int $id ID of the deal + * @return array details of a deal */ - public function getById($id) + public function getById($dealId) { - return $this->curl->get('deals/' . $id); + return $this->curl->get('deals/' . $dealId); } /** - * Returns a deal / deals + * Find deals by name * - * @param string $name pipedrive deals title - * @return array returns detials of a deal + * @param string $name search term to look for + * @return array found deals */ public function getByName($name, $personId=null, $orgId=null) { @@ -64,7 +64,7 @@ public function getByName($name, $personId=null, $orgId=null) * Lists products associated with a deal. * * @param array $data (id, start, limit) - * @return array products + * @return array associated products */ public function products(array $data) { @@ -79,8 +79,8 @@ public function products(array $data) /** * Adds a deal * - * @param array $data deal detials - * @return array returns detials of the deal + * @param array $data details of the deal + * @return array details of the deal */ public function add(array $data) { @@ -95,16 +95,16 @@ public function add(array $data) /** * Adds a product to a deal * - * @param int $dealId deal id - * @param array $data deal and product detials - * @return array returns detials of the deal-product + * @param int $dealId ID of the deal + * @param array $data deal and product details + * @return array details of the deal-product * @throws PipedriveMissingFieldError */ public function addProduct($dealId, array $data) { //if there is no product_id set throw error as it is a required field if (!isset($data['product_id'])) { - throw new PipedriveMissingFieldError('You must include a "pdoruct_id" field when adding a product to a deal'); + throw new PipedriveMissingFieldError('You must include a "product_id" field when adding a product to a deal'); } //if there is no item_price set throw error as it is a required field if (!isset($data['item_price'])) { @@ -121,9 +121,9 @@ public function addProduct($dealId, array $data) /** * Updates a deal * - * @param int $dealId pipedrives deal Id - * @param array $data new detials of deal - * @return array returns detials of a deal + * @param int $dealId ID of the deal + * @param array $data new details of the deal + * @return array details of the deal */ public function update($dealId, array $data = array()) { @@ -133,9 +133,9 @@ public function update($dealId, array $data = array()) /** * Moves deal to a new stage * - * @param int $dealId deal id - * @param int $stageId stage id - * @return array returns detials of the deal + * @param int $dealId ID of the deal + * @param int $stageId ID of the stage + * @return array details of the deal */ public function moveStage($dealId, $stageId) { diff --git a/src/Benhawker/Pipedrive/Library/Notes.php b/src/Benhawker/Pipedrive/Library/Notes.php index 4034a99..d3412e4 100644 --- a/src/Benhawker/Pipedrive/Library/Notes.php +++ b/src/Benhawker/Pipedrive/Library/Notes.php @@ -31,8 +31,8 @@ public function __construct(\Benhawker\Pipedrive\Pipedrive $master) /** * Adds a note * - * @param array $data note detials - * @return array returns detials of the note + * @param array $data details of the note + * @return array details of the note */ public function add(array $data) { diff --git a/src/Benhawker/Pipedrive/Library/Organizations.php b/src/Benhawker/Pipedrive/Library/Organizations.php index ac21d59..061bc72 100644 --- a/src/Benhawker/Pipedrive/Library/Organizations.php +++ b/src/Benhawker/Pipedrive/Library/Organizations.php @@ -28,22 +28,22 @@ public function __construct(\Benhawker\Pipedrive\Pipedrive $master) } /** - * Returns a organization + * Returns an organization * - * @param int $id pipedrive organizations id - * @return array returns detials of a organization + * @param int $organizationId ID of the organization + * @return array details of the organization */ - public function getById($id) + public function getById($organizationId) { - return $this->curl->get('organizations/' . $id); + return $this->curl->get('organizations/' . $organizationId); } /** - * Returns an organization + * Find organizations by name * - * @param string $name pipedrive organizations name + * @param string $name search term to look for * @param array $data (start, limit) - * @return array returns detials of a organization + * @return array found organizations */ public function getByName($name, array $data = array()) { @@ -56,7 +56,7 @@ public function getByName($name, array $data = array()) * Returns all organizations * * @param array $data (filter_id, start, limit, sort_by, sort_mode) - * @return array returns detials of all organizations + * @return array all organizations */ public function getAll(array $data = array()) { @@ -64,10 +64,10 @@ public function getAll(array $data = array()) } /** - * Lists deals associated with a organization. + * Lists deals associated with an organization. * * @param array $data (id, start, limit) - * @return array deals + * @return array associated deals */ public function deals(array $data) { @@ -81,9 +81,9 @@ public function deals(array $data) /** * Updates an organization * - * @param int $organizationId pipedrives organization Id - * @param array $data new detials of organization - * @return array returns detials of a organization + * @param int $organizationId ID of the organization + * @param array $data new details for the organization + * @return array details of the organization */ public function update($organizationId, array $data = array()) { @@ -91,16 +91,16 @@ public function update($organizationId, array $data = array()) } /** - * Adds a organization + * Adds a new organization * - * @param array $data organizations detials - * @return array returns detials of a organization + * @param array $data details of the organization + * @return array details of the organization */ public function add(array $data) { //if there is no name set throw error as it is a required field if (!isset($data['name'])) { - throw new PipedriveMissingFieldError('You must include a "name" field when inserting a organization'); + throw new PipedriveMissingFieldError('You must include a "name" field when inserting an organization'); } return $this->curl->post('organizations', $data); @@ -109,8 +109,8 @@ public function add(array $data) /** * Deletes an organization * - * @param int $organizationId pipedrives organization Id - * @return array returns detials of a organization + * @param int $organizationId ID of the organization + * @return array details of the organization */ public function delete($organizationId) { diff --git a/src/Benhawker/Pipedrive/Library/Persons.php b/src/Benhawker/Pipedrive/Library/Persons.php index e87f39b..b728a7a 100644 --- a/src/Benhawker/Pipedrive/Library/Persons.php +++ b/src/Benhawker/Pipedrive/Library/Persons.php @@ -30,19 +30,19 @@ public function __construct(\Benhawker\Pipedrive\Pipedrive $master) /** * Returns a person * - * @param int $id pipedrive persons id - * @return array returns detials of a person + * @param int $id ID of the person + * @return array details of the person */ - public function getById($id) + public function getById($personId) { - return $this->curl->get('persons/' . $id); + return $this->curl->get('persons/' . $personId); } /** - * Returns a person / people + * Find persons by their name * - * @param string $name pipedrive persons name - * @return array returns detials of a person + * @param string $name Search term to look for + * @return array found persons */ public function getByName($name) { @@ -53,7 +53,7 @@ public function getByName($name) * Lists deals associated with a person. * * @param array $data (id, start, limit) - * @return array deals + * @return array associated deals */ public function deals(array $data) { @@ -69,7 +69,7 @@ public function deals(array $data) * Lists products associated with a person. * * @param array $data (id, start, limit) - * @return array products + * @return array associated products */ public function products(array $data) { @@ -84,9 +84,9 @@ public function products(array $data) /** * Updates a person * - * @param int $personId pipedrives person Id - * @param array $data new detials of person - * @return array returns detials of a person + * @param int $personId ID of the person + * @param array $data new details for the person + * @return array details of the person */ public function update($personId, array $data = array()) { @@ -96,8 +96,8 @@ public function update($personId, array $data = array()) /** * Adds a person * - * @param array $data persons detials - * @return array returns detials of a person + * @param array $data details for the person + * @return array details of the person */ public function add(array $data) { @@ -112,8 +112,8 @@ public function add(array $data) /** * Deletes a person * - * @param int $personId pipedrives person Id - * @return array returns detials of a person + * @param int $personId ID of the person + * @return array details of the person */ public function delete($personId) { diff --git a/src/Benhawker/Pipedrive/Library/Products.php b/src/Benhawker/Pipedrive/Library/Products.php index 8afca4b..0328d11 100644 --- a/src/Benhawker/Pipedrive/Library/Products.php +++ b/src/Benhawker/Pipedrive/Library/Products.php @@ -31,10 +31,10 @@ public function __construct(\Benhawker\Pipedrive\Pipedrive $master) } /** - * Returns a product / products + * Find products by name * - * @param string $name pipedrive prodeuct name - * @return array returns detials of a product + * @param string $name search term to look for, minimum 3 characters + * @return array found products */ public function getByName($name) { diff --git a/src/Benhawker/Pipedrive/Pipedrive.php b/src/Benhawker/Pipedrive/Pipedrive.php index 1fe7b18..4cd026d 100644 --- a/src/Benhawker/Pipedrive/Pipedrive.php +++ b/src/Benhawker/Pipedrive/Pipedrive.php @@ -1,6 +1,6 @@