forked from bjsmasth/php-salesforce-rest-api
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from adrian-enspired/56-alpha
Version 56
- Loading branch information
Showing
32 changed files
with
1,681 additions
and
526 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
<?php | ||
|
||
return [ | ||
'allow_method_param_type_widening' => true, | ||
'prefer_narrowed_phpdoc_param_type' => false, | ||
'prefer_narrowed_phpdoc_return_type' => false, | ||
'dead_code_detection' => true, | ||
'directory_list' => ['src', 'vendor'], | ||
'exclude_analysis_directory_list' => ['vendor'], | ||
'suppress_issue_types' => [ | ||
"allow_method_param_type_widening" => true, | ||
"prefer_narrowed_phpdoc_param_type" => false, | ||
"prefer_narrowed_phpdoc_return_type" => false, | ||
"dead_code_detection" => true, | ||
"directory_list" => ["src", "tests", "vendor"], | ||
"exclude_analysis_directory_list" => ["vendor"], | ||
"suppress_issue_types" => [ | ||
// false positives | ||
'PhanReadOnlyPublicProperty', | ||
'PhanUnreferencedClass', | ||
'PhanUnreferencedPublicMethod', | ||
// this is a stupid warning (be careful! this might do exactly what it's supposed to do!) | ||
'PhanSuspiciousBinaryAddLists' | ||
"PhanReadOnlyPublicProperty", | ||
"PhanUnreferencedClass", | ||
"PhanUnreferencedPublicClassConstant", | ||
"PhanUnreferencedPublicMethod", | ||
// this is a stupid warning (be careful! this might do exactly what it's supposed to do) | ||
"PhanSuspiciousBinaryAddLists" | ||
] | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit colors="true" bootstrap="vendor/autoload.php"> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" colors="true" bootstrap="vendor/autoload.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"> | ||
<coverage processUncoveredFiles="true"> | ||
<include> | ||
<directory suffix=".php">./src</directory> | ||
</include> | ||
</coverage> | ||
<testsuites> | ||
<testsuite name="unit"> | ||
<directory>./tests/unit</directory> | ||
<directory>./tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
<filter> | ||
<whitelist processUncoveredFilesFromWhitelist="true"> | ||
<directory suffix=".php">./src</directory> | ||
</whitelist> | ||
</filter> | ||
</phpunit> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
/** | ||
* @package Nexcess/Salesforce | ||
* @author Nexcess.net <[email protected]> | ||
* @copyright 2021 LiquidWeb Inc. | ||
* @license MIT | ||
*/ | ||
|
||
namespace Nexcess\Salesforce\Authenticator; | ||
|
||
use GuzzleHttp\Client as HttpClient; | ||
|
||
use Nexcess\Salesforce\Error\Authentication as AuthenticationException; | ||
|
||
/** | ||
* Handles Authenticating an HTTP Client with Salesforce. | ||
*/ | ||
interface Authenticator { | ||
|
||
/** | ||
* Factory: builds a new Authenticator instance. | ||
* | ||
* Note, because Guzzle Clients are immutable (i.e., we cannot change the base_uri, etc.), | ||
* we take default options here instead of injecting an actual Client instance. | ||
* | ||
* @param array $options Default options for the HTTP Client to authenticate with | ||
* @return Authenticator The new instance | ||
*/ | ||
public static function create(array $options = []) : Authenticator; | ||
|
||
/** | ||
* Authenticates with the Salesforce Api. | ||
* | ||
* @param array $parameters Authenticator parameters | ||
* @throws AuthenticationException FAILED on failure | ||
* @return HttpClient An authenticated HTTP Client | ||
*/ | ||
public function authenticate(array $parameters) : HttpClient; | ||
} |
Oops, something went wrong.