From e07658ef50d737f60c3234222d17fe1a9a46659c Mon Sep 17 00:00:00 2001 From: Christopher Joe Date: Thu, 5 Oct 2017 15:28:58 +1300 Subject: [PATCH] Fix linting issues and fix doc --- .../GridField/GridFieldVersionedState.php | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/Forms/GridField/GridFieldVersionedState.php b/src/Forms/GridField/GridFieldVersionedState.php index 6801a8bd7..d36a1e0d1 100644 --- a/src/Forms/GridField/GridFieldVersionedState.php +++ b/src/Forms/GridField/GridFieldVersionedState.php @@ -1,8 +1,6 @@ versionedLabelFields = $versionedLabelFields; } } @@ -37,7 +36,7 @@ class GridFieldVersionedState implements GridField_ColumnProvider $model = $gridField->getModelClass(); $isModelVersioned = $model::has_extension(Versioned::class); - if(!$isModelVersioned) { + if (!$isModelVersioned) { return; } @@ -48,9 +47,8 @@ class GridFieldVersionedState implements GridField_ColumnProvider if (count($matchedVersionedFields) > 0) { $this->column = array_values($matchedVersionedFields)[0]; - } - // Use first column - else if ($columns) { + } elseif ($columns) { + // Use first column $this->column = $columns[0]; } } @@ -142,11 +140,11 @@ class GridFieldVersionedState implements GridField_ColumnProvider * ) * ``` * - * @param bool $cached Whether to serve the fields from cache; false - * regenerate them + * @param DataObject $record - the record to check status for * @return array */ - protected function getStatusFlags($record) { + protected function getStatusFlags($record) + { $flags = array(); if ($record->isOnLiveOnly()) {