From 93d6b468ce84ca0225ad609127ec6a2aa833a42e Mon Sep 17 00:00:00 2001 From: Ilya Sviridenko Date: Mon, 27 Jul 2015 21:46:26 +0300 Subject: [PATCH 1/9] detials => details --- src/Benhawker/Pipedrive/Library/Activities.php | 4 ++-- src/Benhawker/Pipedrive/Library/DealFields.php | 2 +- src/Benhawker/Pipedrive/Library/Deals.php | 18 +++++++++--------- src/Benhawker/Pipedrive/Library/Notes.php | 4 ++-- .../Pipedrive/Library/Organizations.php | 16 ++++++++-------- src/Benhawker/Pipedrive/Library/Persons.php | 14 +++++++------- src/Benhawker/Pipedrive/Library/Products.php | 2 +- 7 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/Benhawker/Pipedrive/Library/Activities.php b/src/Benhawker/Pipedrive/Library/Activities.php index cf93df3..4c413cf 100644 --- a/src/Benhawker/Pipedrive/Library/Activities.php +++ b/src/Benhawker/Pipedrive/Library/Activities.php @@ -32,8 +32,8 @@ public function __construct(\Benhawker\Pipedrive\Pipedrive $master) /** * Adds a activity * - * @param array $data activity detials - * @return array returns detials of the activity + * @param array $data activity details + * @return array returns details of the activity */ public function add(array $data) { diff --git a/src/Benhawker/Pipedrive/Library/DealFields.php b/src/Benhawker/Pipedrive/Library/DealFields.php index 3c8f50e..f9af554 100644 --- a/src/Benhawker/Pipedrive/Library/DealFields.php +++ b/src/Benhawker/Pipedrive/Library/DealFields.php @@ -57,7 +57,7 @@ public function getById($id) /** * Adds a dealField * - * @param array $data deal field detials + * @param array $data deal field details * @return array returns details of the deal field */ public function add(array $data) diff --git a/src/Benhawker/Pipedrive/Library/Deals.php b/src/Benhawker/Pipedrive/Library/Deals.php index 533c2d8..96e73f1 100644 --- a/src/Benhawker/Pipedrive/Library/Deals.php +++ b/src/Benhawker/Pipedrive/Library/Deals.php @@ -35,7 +35,7 @@ public function __construct(\Benhawker\Pipedrive\Pipedrive $master) * Returns a deal * * @param int $id pipedrive deals id - * @return array returns detials of a deal + * @return array returns details of a deal */ public function getById($id) { @@ -46,7 +46,7 @@ public function getById($id) * Returns a deal / deals * * @param string $name pipedrive deals title - * @return array returns detials of a deal + * @return array returns details of a deal */ public function getByName($name, $personId=null, $orgId=null) { @@ -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 deal details + * @return array returns details of the deal */ public function add(array $data) { @@ -96,8 +96,8 @@ 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 array $data deal and product details + * @return array returns details of the deal-product * @throws PipedriveMissingFieldError */ public function addProduct($dealId, array $data) @@ -122,8 +122,8 @@ 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 array $data new details of deal + * @return array returns details of a deal */ public function update($dealId, array $data = array()) { @@ -135,7 +135,7 @@ public function update($dealId, array $data = array()) * * @param int $dealId deal id * @param int $stageId stage id - * @return array returns detials of the deal + * @return array returns 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..60374b6 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 note details + * @return array returns 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..49a0a31 100644 --- a/src/Benhawker/Pipedrive/Library/Organizations.php +++ b/src/Benhawker/Pipedrive/Library/Organizations.php @@ -31,7 +31,7 @@ public function __construct(\Benhawker\Pipedrive\Pipedrive $master) * Returns a organization * * @param int $id pipedrive organizations id - * @return array returns detials of a organization + * @return array returns details of a organization */ public function getById($id) { @@ -43,7 +43,7 @@ public function getById($id) * * @param string $name pipedrive organizations name * @param array $data (start, limit) - * @return array returns detials of a organization + * @return array returns details of a organization */ 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 returns details of all organizations */ public function getAll(array $data = array()) { @@ -82,8 +82,8 @@ 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 array $data new details of organization + * @return array returns details of a organization */ public function update($organizationId, array $data = array()) { @@ -93,8 +93,8 @@ public function update($organizationId, array $data = array()) /** * Adds a organization * - * @param array $data organizations detials - * @return array returns detials of a organization + * @param array $data organizations details + * @return array returns details of a organization */ public function add(array $data) { @@ -110,7 +110,7 @@ public function add(array $data) * Deletes an organization * * @param int $organizationId pipedrives organization Id - * @return array returns detials of a organization + * @return array returns details of a organization */ public function delete($organizationId) { diff --git a/src/Benhawker/Pipedrive/Library/Persons.php b/src/Benhawker/Pipedrive/Library/Persons.php index e87f39b..caf5b11 100644 --- a/src/Benhawker/Pipedrive/Library/Persons.php +++ b/src/Benhawker/Pipedrive/Library/Persons.php @@ -31,7 +31,7 @@ public function __construct(\Benhawker\Pipedrive\Pipedrive $master) * Returns a person * * @param int $id pipedrive persons id - * @return array returns detials of a person + * @return array returns details of a person */ public function getById($id) { @@ -42,7 +42,7 @@ public function getById($id) * Returns a person / people * * @param string $name pipedrive persons name - * @return array returns detials of a person + * @return array returns details of a person */ public function getByName($name) { @@ -85,8 +85,8 @@ 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 array $data new details of person + * @return array returns details of a 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 persons details + * @return array returns details of a person */ public function add(array $data) { @@ -113,7 +113,7 @@ public function add(array $data) * Deletes a person * * @param int $personId pipedrives person Id - * @return array returns detials of a person + * @return array returns details of a person */ public function delete($personId) { diff --git a/src/Benhawker/Pipedrive/Library/Products.php b/src/Benhawker/Pipedrive/Library/Products.php index 8afca4b..168d7b5 100644 --- a/src/Benhawker/Pipedrive/Library/Products.php +++ b/src/Benhawker/Pipedrive/Library/Products.php @@ -34,7 +34,7 @@ public function __construct(\Benhawker\Pipedrive\Pipedrive $master) * Returns a product / products * * @param string $name pipedrive prodeuct name - * @return array returns detials of a product + * @return array returns details of a product */ public function getByName($name) { From e2543bdcfcad00aad2b5b93baf77db29211dc133 Mon Sep 17 00:00:00 2001 From: Ilya Sviridenko Date: Mon, 27 Jul 2015 21:47:26 +0300 Subject: [PATCH 2/9] lost $ --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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']; From 31f74afff12a09abe30694bdc5f150744190a431 Mon Sep 17 00:00:00 2001 From: Ilya Sviridenko Date: Mon, 27 Jul 2015 21:48:37 +0300 Subject: [PATCH 3/9] pdoruct => product --- src/Benhawker/Pipedrive/Library/Deals.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Benhawker/Pipedrive/Library/Deals.php b/src/Benhawker/Pipedrive/Library/Deals.php index 96e73f1..58e9dd9 100644 --- a/src/Benhawker/Pipedrive/Library/Deals.php +++ b/src/Benhawker/Pipedrive/Library/Deals.php @@ -104,7 +104,7 @@ 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'])) { From 4518ff60338162209aed81aae071431dca61312d Mon Sep 17 00:00:00 2001 From: Ilya Sviridenko Date: Mon, 27 Jul 2015 22:39:35 +0300 Subject: [PATCH 4/9] Organizations: $id => $organizationId, comments --- .../Pipedrive/Library/Organizations.php | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/Benhawker/Pipedrive/Library/Organizations.php b/src/Benhawker/Pipedrive/Library/Organizations.php index 49a0a31..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 details 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 details 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 details 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 details of organization - * @return array returns details 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 details - * @return array returns details 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 details of a organization + * @param int $organizationId ID of the organization + * @return array details of the organization */ public function delete($organizationId) { From c3e5b2c330a7dc35d7c167ab11081678cee2452e Mon Sep 17 00:00:00 2001 From: Ilya Sviridenko Date: Mon, 27 Jul 2015 22:52:43 +0300 Subject: [PATCH 5/9] Persons: $id => $personId, comments --- src/Benhawker/Pipedrive/Library/Persons.php | 32 ++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/Benhawker/Pipedrive/Library/Persons.php b/src/Benhawker/Pipedrive/Library/Persons.php index caf5b11..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 details 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 details 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 details of person - * @return array returns details 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 details - * @return array returns details 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 details of a person + * @param int $personId ID of the person + * @return array details of the person */ public function delete($personId) { From 4be5e7a571c3760f412e2b50921f373faf829f81 Mon Sep 17 00:00:00 2001 From: Ilya Sviridenko Date: Mon, 27 Jul 2015 22:56:17 +0300 Subject: [PATCH 6/9] Products, Notes, Activities: comments --- src/Benhawker/Pipedrive/Library/Activities.php | 6 +++--- src/Benhawker/Pipedrive/Library/Notes.php | 4 ++-- src/Benhawker/Pipedrive/Library/Products.php | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Benhawker/Pipedrive/Library/Activities.php b/src/Benhawker/Pipedrive/Library/Activities.php index 4c413cf..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 details - * @return array returns details 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/Notes.php b/src/Benhawker/Pipedrive/Library/Notes.php index 60374b6..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 details - * @return array returns details 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/Products.php b/src/Benhawker/Pipedrive/Library/Products.php index 168d7b5..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 details of a product + * @param string $name search term to look for, minimum 3 characters + * @return array found products */ public function getByName($name) { From a886fc4d7a18ee16d6f40b43f3b39a03ae61f57b Mon Sep 17 00:00:00 2001 From: Ilya Sviridenko Date: Tue, 28 Jul 2015 01:15:59 +0300 Subject: [PATCH 7/9] DealFields: $id => $dealFieldId, comments --- .../Pipedrive/Library/DealFields.php | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Benhawker/Pipedrive/Library/DealFields.php b/src/Benhawker/Pipedrive/Library/DealFields.php index f9af554..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 details - * @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) { From b133393be9a467be5b63ed31cb67544d228d1f92 Mon Sep 17 00:00:00 2001 From: Ilya Sviridenko Date: Tue, 28 Jul 2015 01:26:02 +0300 Subject: [PATCH 8/9] Deals: $id => $dealId, comments --- src/Benhawker/Pipedrive/Library/Deals.php | 36 +++++++++++------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/Benhawker/Pipedrive/Library/Deals.php b/src/Benhawker/Pipedrive/Library/Deals.php index 58e9dd9..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 details 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 details 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 details - * @return array returns details of the deal + * @param array $data details of the deal + * @return array details of the deal */ public function add(array $data) { @@ -95,9 +95,9 @@ public function add(array $data) /** * Adds a product to a deal * - * @param int $dealId deal id + * @param int $dealId ID of the deal * @param array $data deal and product details - * @return array returns details of the deal-product + * @return array details of the deal-product * @throws PipedriveMissingFieldError */ public function addProduct($dealId, array $data) @@ -121,9 +121,9 @@ public function addProduct($dealId, array $data) /** * Updates a deal * - * @param int $dealId pipedrives deal Id - * @param array $data new details of deal - * @return array returns details 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 details 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) { From e60638eb57b69f240dd88931f90998fd8a3825c5 Mon Sep 17 00:00:00 2001 From: Ilya Sviridenko Date: Tue, 28 Jul 2015 01:34:30 +0300 Subject: [PATCH 9/9] Pipedrive, Curl: comments --- src/Benhawker/Pipedrive/Library/Curl.php | 10 +++++----- src/Benhawker/Pipedrive/Pipedrive.php | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) 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/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 @@