Skip to content

Commit

Permalink
pint
Browse files Browse the repository at this point in the history
  • Loading branch information
markhuot committed Nov 29, 2023
1 parent 16408fd commit 8cc1349
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/base/SlotDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function defaults(array $componentConfig): self
return $this;
}

public function collapsed(bool $collapsed=true): self
public function collapsed(bool $collapsed = true): self
{
$this->collapsed = $collapsed;

Expand Down
3 changes: 1 addition & 2 deletions src/controllers/ComponentsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ public function actionToggleDisclosure()

if ($newState === $defaultState) {
$component->disclosure->delete();
}
else {
} else {
$component->disclosure->state = $newState;
$component->disclosure->save();
}
Expand Down
2 changes: 2 additions & 0 deletions src/db/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
class Table
{
const COMPONENTS = '{{%keystone_components}}';

const COMPONENT_DATA = '{{%keystone_component_data}}';

const COMPONENT_DISCLOSURES = '{{%keystone_component_disclosure}}';
}
2 changes: 1 addition & 1 deletion src/models/Component.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function getDisclosure(): ActiveQuery
return $query;
}

public function withDisclosures(bool $withDisclosures=true): self
public function withDisclosures(bool $withDisclosures = true): self
{
$this->withDisclosures = $withDisclosures;

Expand Down
13 changes: 0 additions & 13 deletions src/models/ComponentDisclosure.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,9 @@

namespace markhuot\keystone\models;

use ArrayAccess;
use Closure;
use craft\helpers\DateTimeHelper;
use craft\helpers\Db;
use craft\helpers\StringHelper;
use Illuminate\Support\Collection;
use markhuot\keystone\base\Attribute;
use markhuot\keystone\base\FieldDefinition;
use markhuot\keystone\db\ActiveRecord;
use markhuot\keystone\db\Table;

use function markhuot\keystone\helpers\base\throw_if;
use function markhuot\keystone\helpers\data\data_forget;

/**
*/
class ComponentDisclosure extends ActiveRecord
{
public static function tableName()
Expand Down

0 comments on commit 8cc1349

Please sign in to comment.