Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonvarga authored and github-actions[bot] committed Sep 11, 2024
1 parent f86fcb5 commit 66b1c76
Show file tree
Hide file tree
Showing 171 changed files with 469 additions and 674 deletions.
4 changes: 1 addition & 3 deletions src/Assets/AssetCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

use Statamic\Data\DataCollection;

class AssetCollection extends DataCollection
{
}
class AssetCollection extends DataCollection {}
2 changes: 1 addition & 1 deletion src/Auth/Protect/Protectors/Authenticated.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function protect()
}

if (! $this->getLoginUrl()) {
throw new ForbiddenHttpException();
throw new ForbiddenHttpException;
}

abort(redirect($this->getLoginUrl()));
Expand Down
2 changes: 1 addition & 1 deletion src/Auth/Protect/Protectors/Fallback.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ class Fallback extends Protector
{
public function protect()
{
throw new ForbiddenHttpException();
throw new ForbiddenHttpException;
}
}
2 changes: 1 addition & 1 deletion src/Auth/Protect/Protectors/IpAddress.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public function protect()
$ips = array_get($this->config, 'allowed', []);

if (! in_array(request()->ip(), $ips)) {
throw new ForbiddenHttpException();
throw new ForbiddenHttpException;
}
}
}
2 changes: 1 addition & 1 deletion src/Auth/Protect/Protectors/Password/PasswordProtector.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class PasswordProtector extends Protector
public function protect()
{
if (empty(array_get($this->config, 'allowed', []))) {
throw new ForbiddenHttpException();
throw new ForbiddenHttpException;
}

if (request()->isLivePreview()) {
Expand Down
2 changes: 1 addition & 1 deletion src/Console/Commands/MakeAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function handle()
*/
protected function updateServiceProvider()
{
$factory = new BuilderFactory();
$factory = new BuilderFactory;

$actionClassValue = $factory->classConstFetch('Actions\\'.$this->getNameInput(), 'class');

Expand Down
2 changes: 1 addition & 1 deletion src/Console/Commands/MakeFieldtype.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ protected function wireUpAddonJs($addon)
*/
protected function updateServiceProvider()
{
$factory = new BuilderFactory();
$factory = new BuilderFactory;

$fieldtypeClassValue = $factory->classConstFetch('Fieldtypes\\'.$this->getNameInput(), 'class');

Expand Down
2 changes: 1 addition & 1 deletion src/Console/Commands/MakeFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function handle()
*/
protected function updateServiceProvider()
{
$factory = new BuilderFactory();
$factory = new BuilderFactory;

$filterClassValue = $factory->classConstFetch('Filters\\'.$this->getNameInput(), 'class');

Expand Down
2 changes: 1 addition & 1 deletion src/Console/Commands/MakeModifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function handle()
*/
protected function updateServiceProvider()
{
$factory = new BuilderFactory();
$factory = new BuilderFactory;

$modifierClassValue = $factory->classConstFetch('Modifiers\\'.$this->getNameInput(), 'class');

Expand Down
2 changes: 1 addition & 1 deletion src/Console/Commands/MakeScope.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function handle()
*/
protected function updateServiceProvider()
{
$factory = new BuilderFactory();
$factory = new BuilderFactory;

$scopeClassValue = $factory->classConstFetch('Scopes\\'.$this->getNameInput(), 'class');

Expand Down
2 changes: 1 addition & 1 deletion src/Console/Commands/MakeTag.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function handle()
*/
protected function updateServiceProvider()
{
$factory = new BuilderFactory();
$factory = new BuilderFactory;

$tagsClassValue = $factory->classConstFetch('Tags\\'.$this->getNameInput(), 'class');

Expand Down
2 changes: 1 addition & 1 deletion src/Console/Commands/MakeWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ protected function generateWidgetView()
*/
protected function updateServiceProvider()
{
$factory = new BuilderFactory();
$factory = new BuilderFactory;

$widgetClassValue = $factory->classConstFetch('Widgets\\'.$this->getNameInput(), 'class');

Expand Down
2 changes: 1 addition & 1 deletion src/Console/Commands/SupportZipBlueprint.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ protected function createZip($blueprint)
{
$filename = $blueprint->handle().'-blueprint.zip';

$zip = new ZipArchive();
$zip = new ZipArchive;

if ($zip->open($filename, ZipArchive::CREATE | ZipArchive::OVERWRITE) !== true) {
$this->error("Unable to create zip file \"$filename\"");
Expand Down
4 changes: 1 addition & 3 deletions src/Contracts/Assets/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

use Statamic\Contracts\Query\Builder;

interface QueryBuilder extends Builder
{
}
interface QueryBuilder extends Builder {}
4 changes: 1 addition & 3 deletions src/Contracts/Data/Localizable.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace Statamic\Contracts\Data;

interface Localizable
{
}
interface Localizable {}
4 changes: 1 addition & 3 deletions src/Contracts/Entries/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace Statamic\Contracts\Entries;

interface Collection
{
}
interface Collection {}
4 changes: 1 addition & 3 deletions src/Contracts/Entries/Entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

use Statamic\Contracts\Data\Localizable;

interface Entry extends Localizable
{
}
interface Entry extends Localizable {}
4 changes: 1 addition & 3 deletions src/Contracts/Forms/FormRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace Statamic\Contracts\Forms;

interface FormRepository
{
}
interface FormRepository {}
4 changes: 1 addition & 3 deletions src/Contracts/Routing/UrlBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace Statamic\Contracts\Routing;

interface UrlBuilder
{
}
interface UrlBuilder {}
4 changes: 1 addition & 3 deletions src/Contracts/Structures/CollectionTree.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace Statamic\Contracts\Structures;

interface CollectionTree
{
}
interface CollectionTree {}
4 changes: 1 addition & 3 deletions src/Contracts/Structures/Nav.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace Statamic\Contracts\Structures;

interface Nav
{
}
interface Nav {}
4 changes: 1 addition & 3 deletions src/Contracts/Structures/NavTree.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace Statamic\Contracts\Structures;

interface NavTree
{
}
interface NavTree {}
4 changes: 1 addition & 3 deletions src/Contracts/Structures/Structure.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace Statamic\Contracts\Structures;

interface Structure
{
}
interface Structure {}
4 changes: 1 addition & 3 deletions src/Contracts/Structures/Tree.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace Statamic\Contracts\Structures;

interface Tree
{
}
interface Tree {}
4 changes: 1 addition & 3 deletions src/Contracts/Taxonomies/Taxonomy.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace Statamic\Contracts\Taxonomies;

interface Taxonomy
{
}
interface Taxonomy {}
4 changes: 1 addition & 3 deletions src/Contracts/Taxonomies/Term.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace Statamic\Contracts\Taxonomies;

interface Term
{
}
interface Term {}
4 changes: 1 addition & 3 deletions src/Exceptions/ApiNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace Statamic\Exceptions;

class ApiNotFoundException extends \Exception
{
}
class ApiNotFoundException extends \Exception {}
4 changes: 1 addition & 3 deletions src/Exceptions/FatalException.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,4 @@
/**
* Bad. Stops the application in its tracks.
*/
class FatalException extends \Exception
{
}
class FatalException extends \Exception {}
4 changes: 1 addition & 3 deletions src/Exceptions/FileNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,4 @@
/**
* When a file is not found.
*/
class FileNotFoundException extends \Exception
{
}
class FileNotFoundException extends \Exception {}
4 changes: 1 addition & 3 deletions src/Exceptions/InvalidEntryTypeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@
* When an action for one type of entry is performed on another.
* For example, trying to access the date of an entry when it is ordered numerically.
*/
class InvalidEntryTypeException extends \Exception
{
}
class InvalidEntryTypeException extends \Exception {}
4 changes: 1 addition & 3 deletions src/Exceptions/MethodNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,4 @@
/**
* A called method doesn't exist.
*/
class MethodNotFoundException extends \Exception
{
}
class MethodNotFoundException extends \Exception {}
4 changes: 1 addition & 3 deletions src/Exceptions/UrlNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,4 @@
/**
* Trigger a 404.
*/
class UrlNotFoundException extends \Exception
{
}
class UrlNotFoundException extends \Exception {}
4 changes: 1 addition & 3 deletions src/Exceptions/UuidExistsException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace Statamic\Exceptions;

class UuidExistsException extends \Exception
{
}
class UuidExistsException extends \Exception {}
2 changes: 1 addition & 1 deletion src/Fields/Value.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function antlersValue(Parser $parser, $variables)

if ($shouldParseAntlers) {
if (config('statamic.antlers.version') === 'runtime') {
$value = (new DocumentTransformer())->correct($value);
$value = (new DocumentTransformer)->correct($value);
}

return $parser->parse($value, $variables);
Expand Down
2 changes: 1 addition & 1 deletion src/Forms/Fieldtype.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ protected function toItemArray($id, $site = null)

public function getIndexItems($request)
{
$query = (new ItemQueryBuilder())
$query = (new ItemQueryBuilder)
->withItems(new DataCollection(Facades\Form::all()));

if ($search = $request->search) {
Expand Down
4 changes: 1 addition & 3 deletions src/Git/CommitJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ class CommitJob implements ShouldQueue
/**
* Create a new job instance.
*/
public function __construct(public $message = null, public $committer = null)
{
}
public function __construct(public $message = null, public $committer = null) {}

/**
* Execute the job.
Expand Down
4 changes: 1 addition & 3 deletions src/Globals/GlobalCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

use Statamic\Data\DataCollection;

class GlobalCollection extends DataCollection
{
}
class GlobalCollection extends DataCollection {}
4 changes: 1 addition & 3 deletions src/Globals/VariablesCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

use Statamic\Data\DataCollection;

class VariablesCollection extends DataCollection
{
}
class VariablesCollection extends DataCollection {}
2 changes: 1 addition & 1 deletion src/GraphQL/Types/ArrayType.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ public function parseLiteral(Node $valueNode, ?array $variables = null)

public function toType(): Type
{
return new static();
return new static;
}
}
4 changes: 1 addition & 3 deletions src/Imaging/AssetNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace Statamic\Imaging;

class AssetNotFoundException extends \Exception
{
}
class AssetNotFoundException extends \Exception {}
2 changes: 1 addition & 1 deletion src/Imaging/GuzzleAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class GuzzleAdapter implements FilesystemAdapter
public function __construct($base, ?ClientInterface $client = null)
{
$this->base = rtrim($base, '/').'/';
$this->client = $client ?: new Client();
$this->client = $client ?: new Client;
}

public function fileExists(string $location): bool
Expand Down
2 changes: 1 addition & 1 deletion src/Imaging/ResponseFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function create($cache, $path)
{
$stream = $cache->readStream($path);

$response = new StreamedResponse();
$response = new StreamedResponse;
$response->headers->set('Content-Type', $cache->mimeType($path));
$response->headers->set('Content-Length', $cache->fileSize($path));
$response->setPublic();
Expand Down
2 changes: 1 addition & 1 deletion src/Modifiers/CoreModifiers.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public function bardHtml($value)

$items = array_values(Arr::where($value, fn ($item) => $item['type'] !== 'set'));

return (new Augmentor(new Bard()))->augment($items);
return (new Augmentor(new Bard))->augment($items);
}

public function boolString($value)
Expand Down
3 changes: 1 addition & 2 deletions src/OAuth/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ class Provider
public function __construct(
protected string $name,
protected array $config = []
) {
}
) {}

public function getSocialiteUser()
{
Expand Down
Loading

0 comments on commit 66b1c76

Please sign in to comment.