File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
lib/commercetools-base/src/Client Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -32,13 +32,13 @@ class ClientCredentials
3232 * The client id.
3333 * @param string $clientSecret
3434 * The client secret.
35- * @param string $scope
35+ * @param ? string $scope
3636 * Provide the scope when you want to request a specific ones for the client.
3737 * Can be omitted to use all scopes of the oauth client.
3838 * Format: `<the scope name>:<the project key>`.
3939 * Example: `manage_products:project1`.
4040 */
41- public function __construct (string $ clientId , string $ clientSecret , ?string $ scope )
41+ public function __construct (string $ clientId , string $ clientSecret , ?string $ scope = null )
4242 {
4343 $ this ->clientId = $ clientId ;
4444 $ this ->clientSecret = $ clientSecret ;
Original file line number Diff line number Diff line change 3737use Commercetools \Api \Models \Type \TypeReferenceBuilder ;
3838use Commercetools \Api \Models \Type \TypeResourceIdentifierBuilder ;
3939use Commercetools \Base \JsonObject ;
40+ use Commercetools \Client \ClientCredentials ;
4041use Commercetools \Client \ClientFactory ;
4142use GuzzleHttp \Psr7 \Response ;
4243use PHPUnit \Framework \TestCase ;
@@ -289,4 +290,11 @@ public function testAddressDraft()
289290 json_encode ($ cart )
290291 );
291292 }
293+
294+
295+ public function testCredentials ()
296+ {
297+ $ credentials = new ClientCredentials ("clientId " , "clientSecret " );
298+ $ this ->assertInstanceOf (ClientCredentials::class, $ credentials );
299+ }
292300}
You can’t perform that action at this time.
0 commit comments