Skip to content

Commit da9f696

Browse files
committed
Change Environment to System.
1 parent 95ac9ff commit da9f696

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

src/Models/Environment.php renamed to src/Models/System.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?php
22
/**
3-
* Environment.php
3+
* System.php
4+
*
5+
* Contains information about the current system (PHP version, etc.).
46
*
57
* @package edd-sl-sdk
68
* @copyright Copyright (c) 2021, Sandhills Development, LLC
@@ -12,7 +14,7 @@
1214

1315
use EDD_SL_SDK\Traits\Serializable;
1416

15-
class Environment {
17+
class System {
1618

1719
use Serializable;
1820

@@ -41,7 +43,7 @@ class Environment {
4143
public $environment;
4244

4345
/**
44-
* Environment constructor.
46+
* System constructor.
4547
*/
4648
public function __construct() {
4749
$this->php_version = phpversion();

src/Remote/ApiHandler.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
namespace EDD_SL_SDK\Remote;
1212

1313
use EDD_SL_SDK\Exceptions\ApiException;
14-
use EDD_SL_SDK\Models\Environment;
14+
use EDD_SL_SDK\Models\System;
1515
use EDD_SL_SDK\Models\Product;
1616

1717
class ApiHandler {
@@ -44,7 +44,7 @@ public function activateLicense( Product $product ) {
4444
throw new \Exception( 'A product ID is required to activate a license.' );
4545
}
4646

47-
$environment = new Environment();
47+
$environment = new System();
4848

4949
$this->apiRequester->makeRequest( sprintf( 'licenses/%s/activations', urlencode( $product->license ) ), array(
5050
'product_id' => $product->product_id,
@@ -79,7 +79,7 @@ public function deactivateLicense( Product $product ) {
7979
throw new \Exception( 'No license to deactivate.' );
8080
}
8181

82-
$environment = new Environment();
82+
$environment = new System();
8383

8484
$this->apiRequester->makeRequest( sprintf( 'licenses/%s/activations', urlencode( $product->license ) ), array(
8585
'product_id' => $product->product_id,
@@ -114,8 +114,8 @@ public function checkVersions( $storeProducts ) {
114114
}
115115

116116
$this->apiRequester->makeRequest( 'products/releases/latest', array(
117-
'environment' => ( new Environment() )->toArray(),
118-
'products' => $updateArray
117+
'system' => ( new System() )->toArray(),
118+
'products' => $updateArray
119119
) );
120120

121121
if ( 200 !== $this->apiRequester->lastResponseCode ) {

0 commit comments

Comments
 (0)