diff --git a/composer.json b/composer.json index 3a6f7d0e..7f8dae9c 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "keywords": ["api", "http", "rest", "quickbooks", "smallbusiness"], "homepage": "http://developer.intuit.com", "require": { - "php": ">=5.6.0", + "php": ">=7.2.5", "ext-mbstring": "*", "ext-dom": "*", "guzzlehttp/guzzle": "^7.9" diff --git a/src/Core/HttpClients/CurlHttpClient.php b/src/Core/HttpClients/CurlHttpClient.php index f5c66634..2c410f03 100644 --- a/src/Core/HttpClients/CurlHttpClient.php +++ b/src/Core/HttpClients/CurlHttpClient.php @@ -26,9 +26,9 @@ class CurlHttpClient implements HttpClientInterface{ /** * The constructor for constructing the cURL http client for making API calls - * @param BaseCurl $curl A predefined BaseCurl instance to be used in this client + * @param BaseCurl|null $curl A predefined BaseCurl instance to be used in this client */ - public function __construct(BaseCurl $curl = null) + public function __construct(?BaseCurl $curl = null) { if(isset($curl)){ $this->basecURL = $curl; diff --git a/src/Core/HttpClients/GuzzleHttpClient.php b/src/Core/HttpClients/GuzzleHttpClient.php index 2e92e912..f30e4bb7 100644 --- a/src/Core/HttpClients/GuzzleHttpClient.php +++ b/src/Core/HttpClients/GuzzleHttpClient.php @@ -35,9 +35,9 @@ class GuzzleHttpClient implements HttpClientInterface /** * Constructor for GuzzleHttpClient - * @param Client guzzleClient passed to the constructor + * @param Client|null guzzleClient passed to the constructor */ - public function __construct(Client $guzzleClient = null){ + public function __construct(?Client $guzzleClient = null){ if(isset($guzzleClient)){ $this->guzzleClient = $guzzleClient; }else{ diff --git a/src/Core/HttpClients/SyncRestHandler.php b/src/Core/HttpClients/SyncRestHandler.php index 9db38d7d..e825da50 100644 --- a/src/Core/HttpClients/SyncRestHandler.php +++ b/src/Core/HttpClients/SyncRestHandler.php @@ -48,9 +48,9 @@ class SyncRestHandler extends RestHandler * Initializes a new instance of the SyncRestHandler class. * * @param ServiceContext $context The service context used for the request - * @param HttpClientInterface $client The http client used for the request + * @param HttpClientInterface|null $client The http client used for the request */ - public function __construct($context, HttpClientInterface $client = null) + public function __construct($context, ?HttpClientInterface $client = null) { parent::__construct($context); $this->context = $context; diff --git a/src/Core/OAuth/OAuth1/OAuth1.php b/src/Core/OAuth/OAuth1/OAuth1.php index 448827e7..41598a45 100644 --- a/src/Core/OAuth/OAuth1/OAuth1.php +++ b/src/Core/OAuth/OAuth1/OAuth1.php @@ -253,10 +253,10 @@ private function setOAuthTimeStamp(){ /** * Add all OAuth query paraemters to the signature string string - * @param Array $queryParameters The queryParameters to be included - * @return Array $queryParameters The complete query parameters + * @param array|null $queryParameters The queryParameters to be included + * @return array $queryParameters The complete query parameters */ - private function appendOAuthPartsTo(array $queryParameters = null){ + private function appendOAuthPartsTo(?array $queryParameters = null){ if($queryParameters == null){ $queryParameters = array(); } diff --git a/src/Core/OAuth/OAuth2/OAuth2LoginHelper.php b/src/Core/OAuth/OAuth2/OAuth2LoginHelper.php index eda072d8..603108e3 100644 --- a/src/Core/OAuth/OAuth2/OAuth2LoginHelper.php +++ b/src/Core/OAuth/OAuth2/OAuth2LoginHelper.php @@ -101,9 +101,9 @@ class OAuth2LoginHelper * @param String $redirectUri The redirect URI specified for the App * @param String $scope The scope of the app * @param String $state The string to verify the request is not compromised - * @param ServiceContext $serviceContext The serviceContext for the request, only passed for making refresh token API call + * @param ServiceContext|null $serviceContext The serviceContext for the request, only passed for making refresh token API call */ - public function __construct($clientID, $clientSecret, $redirectUri = null, $scope = null, $state = null, ServiceContext $serviceContext = null){ + public function __construct($clientID, $clientSecret, $redirectUri = null, $scope = null, $state = null, ?ServiceContext $serviceContext = null){ //used for refresh token if(isset($serviceContext)){ $accessTokenObj = $serviceContext->requestValidator; diff --git a/src/XSD2PHP/lib/ZF/1.10.7/Zend/Exception.php b/src/XSD2PHP/lib/ZF/1.10.7/Zend/Exception.php index c059ed47..be773b35 100644 --- a/src/XSD2PHP/lib/ZF/1.10.7/Zend/Exception.php +++ b/src/XSD2PHP/lib/ZF/1.10.7/Zend/Exception.php @@ -36,10 +36,10 @@ class Zend_Exception extends Exception * * @param string $msg * @param int $code - * @param Exception $previous + * @param Exception|null $previous * @return void */ - public function __construct($msg = '', $code = 0, Exception $previous = null) + public function __construct($msg = '', $code = 0, ?Exception $previous = null) { if (version_compare(PHP_VERSION, '5.3.0', '<')) { parent::__construct($msg, (int) $code); diff --git a/src/XSD2PHP/lib/ZF/1.10.7/Zend/Soap/Server.php b/src/XSD2PHP/lib/ZF/1.10.7/Zend/Soap/Server.php index 23114ab6..4efe51b6 100644 --- a/src/XSD2PHP/lib/ZF/1.10.7/Zend/Soap/Server.php +++ b/src/XSD2PHP/lib/ZF/1.10.7/Zend/Soap/Server.php @@ -154,10 +154,10 @@ class Zend_Soap_Server implements Zend_Server_Interface * options are specified, they are passed on to {@link setOptions()}. * * @param string $wsdl - * @param array $options + * @param array|null $options * @return void */ - public function __construct($wsdl = null, array $options = null) + public function __construct($wsdl = null, ?array $options = null) { if (!extension_loaded('soap')) { require_once 'Zend/Soap/Server/Exception.php'; @@ -948,11 +948,11 @@ public function fault($fault = null, $code = "Receiver") * @param string $errstr * @param string $errfile * @param int $errline - * @param array $errcontext + * @param array|null $errcontext * @return void * @throws SoapFault */ - public function handlePhpErrors($errno, $errstr, $errfile = null, $errline = null, array $errcontext = null) + public function handlePhpErrors($errno, $errstr, $errfile = null, $errline = null, ?array $errcontext = null) { throw $this->fault($errstr, "Receiver"); }