Fix codestyle

This commit is contained in:
George Wilson 2022-10-25 11:52:42 +01:00 committed by GitHub
parent 8b9a3e8865
commit 220d75558a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 8 deletions

View File

@ -34,14 +34,14 @@ class PullsModel extends ListModel
* @since 2.0 * @since 2.0
*/ */
protected $context; protected $context;
/** /**
* Array of fields the list can be sorted on * Array of fields the list can be sorted on
* *
* @var array * @var array
* @since 2.0 * @since 2.0
*/ */
protected $sortFields = array('pulls.pull_id', 'pulls.title'); protected $sortFields = array('pulls.pull_id', 'pulls.title');
/** /**
* Constructor. * Constructor.
* *
* @param array $config An optional associative array of configuration settings. * @param array $config An optional associative array of configuration settings.
@ -155,9 +155,9 @@ class PullsModel extends ListModel
{ {
// Capture the last store id used. // Capture the last store id used.
static $lastStoreId; static $lastStoreId;
// Compute the current store id. // Compute the current store id.
$currentStoreId = $this->getStoreId(); $currentStoreId = $this->getStoreId();
// If the last store id is different from the current, refresh the query. // If the last store id is different from the current, refresh the query.
if ($lastStoreId != $currentStoreId || empty($this->query)) { if ($lastStoreId != $currentStoreId || empty($this->query)) {
$lastStoreId = $currentStoreId; $lastStoreId = $currentStoreId;
$this->query = $this->getListQuery(); $this->query = $this->getListQuery();
@ -293,7 +293,7 @@ class PullsModel extends ListModel
} }
try { try {
// TODO - Option to configure the batch size // TODO - Option to configure the batch size
$batchSize = 100; $batchSize = 100;
$pullsResponse = Helper::initializeGithub()->getOpenPulls($this->getState()->get('github_user'), $this->getState()->get('github_repo'), $page, $batchSize); $pullsResponse = Helper::initializeGithub()->getOpenPulls($this->getState()->get('github_user'), $this->getState()->get('github_repo'), $page, $batchSize);
$pulls = json_decode($pullsResponse->body); $pulls = json_decode($pullsResponse->body);
@ -303,7 +303,7 @@ class PullsModel extends ListModel
// If this is page 1, let's check to see if we need to paginate // If this is page 1, let's check to see if we need to paginate
if ($page === 1) { if ($page === 1) {
// Default this to being a single page of results // Default this to being a single page of results
$lastPage = 1; $lastPage = 1;
if (isset($pullsResponse->headers['link'])) { if (isset($pullsResponse->headers['link'])) {
$linkHeader = $pullsResponse->headers['link']; $linkHeader = $pullsResponse->headers['link'];