Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Commit

Permalink
Merge 1531590 into 6834458
Browse files Browse the repository at this point in the history
  • Loading branch information
mavimo committed Apr 21, 2018
2 parents 6834458 + 1531590 commit 16fce30
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ script:
- mkdir -p build/logs
- vendor/bin/phpunit
- if [ "$TRAVIS_PHP_VERSION" != "5.6" && "$dependencies" = "highest" ]; then composer require --dev phpstan/phpstan; fi;
- if [ "$TRAVIS_PHP_VERSION" != "5.6" && "$dependencies" = "highest" ]; then php vendor/bin/phpstan analyze --level=2 src tests; fi;
- if [ "$TRAVIS_PHP_VERSION" != "5.6" && "$dependencies" = "highest" ]; then php vendor/bin/phpstan analyze --level=3 src tests; fi;

after_script:
- php vendor/bin/php-coveralls -v
Expand Down
42 changes: 33 additions & 9 deletions src/LooplineSystems/CloseIoApiWrapper/CloseIoApiWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ protected function initApiHandler(CloseIoConfig $config)
*/
public function getLeadApi()
{
return $this->apiHandler->getApi(LeadApi::NAME);
/** @var LeadApi $api */
$api = $this->apiHandler->getApi(LeadApi::NAME);

return $api;
}

/**
Expand All @@ -76,7 +79,10 @@ public function getLeadApi()
*/
public function getCustomFieldApi()
{
return $this->apiHandler->getApi(CustomFieldApi::NAME);
/** @var CustomFieldApi $api */
$api = $this->apiHandler->getApi(CustomFieldApi::NAME);

return $api;
}

/**
Expand All @@ -85,7 +91,10 @@ public function getCustomFieldApi()
*/
public function getOpportunityApi()
{
return $this->apiHandler->getApi(OpportunityApi::NAME);
/** @var OpportunityApi $api */
$api = $this->apiHandler->getApi(OpportunityApi::NAME);

return $api;
}

/**
Expand All @@ -94,7 +103,10 @@ public function getOpportunityApi()
*/
public function getLeadStatusesApi()
{
return $this->apiHandler->getApi(LeadStatusApi::NAME);
/** @var LeadStatusApi $api */
$api = $this->apiHandler->getApi(LeadStatusApi::NAME);

return $api;
}

/**
Expand All @@ -103,16 +115,22 @@ public function getLeadStatusesApi()
*/
public function getOpportunityStatusesApi()
{
return $this->apiHandler->getApi(OpportunityStatusApi::NAME);
/** @var OpportunityStatusApi $api */
$api = $this->apiHandler->getApi(OpportunityStatusApi::NAME);

return $api;
}

/**
* @return Library\Api\AbstractApi
* @return ContactApi
* @throws Library\Exception\ApiNotFoundException
*/
public function getContactApi()
{
return $this->apiHandler->getApi(ContactApi::NAME);
/** @var ContactApi $api */
$api = $this->apiHandler->getApi(ContactApi::NAME);

return $api;
}

/**
Expand All @@ -121,7 +139,10 @@ public function getContactApi()
*/
public function getActivitiesApi()
{
return $this->apiHandler->getApi(ActivityApi::NAME);
/** @var ActivityApi $api */
$api = $this->apiHandler->getApi(ActivityApi::NAME);

return $api;
}

/**
Expand All @@ -130,7 +151,10 @@ public function getActivitiesApi()
*/
public function getTaskApi()
{
return $this->apiHandler->getApi(TaskApi::NAME);
/** @var TaskApi $api */
$api = $this->apiHandler->getApi(TaskApi::NAME);

return $api;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public function setCreatedBy($created_by)
}

/**
* @return \DateTime
* @return string
*/
public function getDateCreated()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ private function getActivityApi()
private function getMockResponderCurl($expectedResponse)
{
// create stub
/** @var PHPUnit_Framework_MockObject_MockObject<Curl> $mockCurl */
$mockCurl = $this->getMockBuilder('Curl')
->setMethods(['getResponse'])
->getMock();
Expand Down

0 comments on commit 16fce30

Please sign in to comment.