Skip to content

Commit

Permalink
pint
Browse files Browse the repository at this point in the history
  • Loading branch information
markhuot committed Sep 30, 2024
1 parent 981d5cf commit 62ac020
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 25 deletions.
3 changes: 1 addition & 2 deletions src/console/TestableResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ public function __construct(
protected int $exitCode,
protected string $stdout,
protected string $stderr,
) {
}
) {}

public function assertSuccesful()
{
Expand Down
4 changes: 1 addition & 3 deletions src/events/RollbackTransactionEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

use yii\base\Event;

class RollbackTransactionEvent extends Event
{
}
class RollbackTransactionEvent extends Event {}
4 changes: 1 addition & 3 deletions src/exceptions/AutoCommittingFieldsException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace markhuot\craftpest\exceptions;

class AutoCommittingFieldsException extends \Exception
{
}
class AutoCommittingFieldsException extends \Exception {}
2 changes: 1 addition & 1 deletion src/factories/Asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function source(string $source)

public function newElement()
{
return new \craft\elements\Asset();
return new \craft\elements\Asset;
}

public function definition(int $index = 0)
Expand Down
2 changes: 1 addition & 1 deletion src/factories/BlockType.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function inferences(array $definition = [])

public function newElement()
{
return new MatrixBlockType();
return new MatrixBlockType;
}

public function store($blockType)
Expand Down
2 changes: 1 addition & 1 deletion src/factories/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function group($handle)

public function newElement()
{
return new \craft\elements\Category();
return new \craft\elements\Category;
}

public function definition(int $index = 0)
Expand Down
2 changes: 1 addition & 1 deletion src/factories/Entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public function inferTypeId(?int $sectionid): ?int
*/
public function newElement()
{
return new \craft\elements\Entry();
return new \craft\elements\Entry;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/factories/EntryType.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function inferences(array $definition = [])

public function newElement()
{
return new EntryTypeModel();
return new EntryTypeModel;
}

public function store($entryType)
Expand Down
2 changes: 1 addition & 1 deletion src/factories/Fieldable.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function storeFields(FieldLayout $fieldLayout, $context = null)
->toArray();

if (empty($fieldLayout->getTabs()[0])) {
$fieldLayoutTab = new FieldLayoutTab();
$fieldLayoutTab = new FieldLayoutTab;
$fieldLayoutTab->name = 'Content';
$fieldLayoutTab->sortOrder = 1;
$fieldLayout->setTabs([$fieldLayoutTab]);
Expand Down
4 changes: 2 additions & 2 deletions src/factories/Section.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function template(string $template)
*/
public function newElement()
{
return new \craft\models\Section();
return new \craft\models\Section;
}

/**
Expand Down Expand Up @@ -94,7 +94,7 @@ public function inferences(array $definition = [])
$handle = $definition['handle'];
$definition['siteSettings'] = collect(Craft::$app->sites->getAllSites())
->mapWithkeys(function ($site) use ($name, $handle) {
$settings = new Section_SiteSettings();
$settings = new Section_SiteSettings;
$settings->siteId = $site->id;
$settings->hasUrls = $this->hasUrls;
$settings->uriFormat = $this->uriFormat;
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/Craft.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function createVolume()
function volumeDefinition(array $definition = [])
{
if (version_greater_than_or_equal_to(\Craft::$app->version, '4')) {
$fileSystem = new \craft\fs\Local(); // @phpstan-ignore-line
$fileSystem = new \craft\fs\Local; // @phpstan-ignore-line
$fileSystem->name = $definition['name'].' FS'; // @phpstan-ignore-line
$fileSystem->handle = $definition['handle'].'Fs'; // @phpstan-ignore-line
$fileSystem->path = \Craft::getAlias('@storage').'/volumes/'.$definition['handle'].'/'; // @phpstan-ignore-line
Expand Down
4 changes: 1 addition & 3 deletions src/http/requests/GetRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace markhuot\craftpest\http\requests;

class GetRequest extends WebRequest
{
}
class GetRequest extends WebRequest {}
4 changes: 1 addition & 3 deletions src/http/requests/PostRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace markhuot\craftpest\http\requests;

class PostRequest extends WebRequest
{
}
class PostRequest extends WebRequest {}
3 changes: 1 addition & 2 deletions src/web/BenchmarkResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ class BenchmarkResult
public function __construct(
public int $startProfileAt,
public int $endProfileAt,
) {
}
) {}

// function summary()
// {
Expand Down

0 comments on commit 62ac020

Please sign in to comment.