Skip to content

Oc 6126 add get person by email#19

Merged
killianherbunot merged 8 commits intomasterfrom
OC-6126_add_get_person_by_email
Nov 21, 2016
Merged

Oc 6126 add get person by email#19
killianherbunot merged 8 commits intomasterfrom
OC-6126_add_get_person_by_email

Conversation

@killianherbunot
Copy link
Contributor

No description provided.

@killianherbunot killianherbunot force-pushed the OC-6126_add_get_person_by_email branch from eb0eb2b to 7aaf204 Compare November 18, 2016 16:53
@killianherbunot killianherbunot force-pushed the OC-6126_add_get_person_by_email branch from 7aaf204 to 311816b Compare November 18, 2016 17:09
@killianherbunot killianherbunot force-pushed the OC-6126_add_get_person_by_email branch 4 times, most recently from 025bccc to 791d8fa Compare November 21, 2016 13:54
@killianherbunot killianherbunot force-pushed the OC-6126_add_get_person_by_email branch from 791d8fa to 15dfb43 Compare November 21, 2016 14:03
@coveralls
Copy link

coveralls commented Nov 21, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling 15dfb43 on OC-6126_add_get_person_by_email into edcf429 on master.


/**
* @param string $query
*

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

write explicit array

* {@inheritdoc}
*/
public function withCustomFields(array $customFields)
public function withCustomFields(array $customFields = null)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

must be empty array

* @param array $customFields
*/
public function setCustomFields(array $customFields)
public function setCustomFields(array $customFields = null)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

must be empty array

* @return PersonBuilder
*/
public function withCustomFields(array $customFields);
public function withCustomFields(array $customFields = null);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

must be empty array

{
const RESOURCE_NAME = ApiEndpoint::DESK.'/people/';

const SEARCH_NAME = 'search';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what 'search' represent ?

$result = json_decode($jsonResult, true);
$result = $result['people'];

return $this->buildPeople($result);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can write directly php return $this->buildPeople($result['people']);(you save 1 line of code ;) )

return $this->personGateway->findAll($page);
}

/**

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can rename this method by 'search'


/**
* @test
*/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you aren't oblige to write [0 => ...] because an array begin ever by 0


/**
* @test
*/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you put a array of person you should pluralize this variable PersonGatewayMock::$person

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 8354922 on OC-6126_add_get_person_by_email into edcf429 on master.

@coveralls
Copy link

coveralls commented Nov 21, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling d30e8a0 on OC-6126_add_get_person_by_email into edcf429 on master.

@killianherbunot killianherbunot merged commit 74bc0f0 into master Nov 21, 2016
@killianherbunot killianherbunot deleted the OC-6126_add_get_person_by_email branch November 21, 2016 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants