Skip to content

Commit

Permalink
Merge branch '3.x' of g89:eighty9nine/filament-reports into 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
eighty9nine committed Jul 27, 2024
2 parents 0083150 + dab88de commit 6e6da6b
Show file tree
Hide file tree
Showing 20 changed files with 23 additions and 57 deletions.
4 changes: 1 addition & 3 deletions src/Components/Actions/ExcelAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace EightyNine\Reports\Components\Actions;

class ExcelAction
{
}
class ExcelAction {}
4 changes: 1 addition & 3 deletions src/Components/Actions/PdfAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace EightyNine\Reports\Components\Actions;

class PdfAction
{
}
class PdfAction {}
4 changes: 1 addition & 3 deletions src/Components/Actions/PrintAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace EightyNine\Reports\Components\Actions;

class PrintAction
{
}
class PrintAction {}
4 changes: 1 addition & 3 deletions src/Components/ActionsPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ class ActionsPanel extends Component
*/
protected string $view = 'filament-reports::components.actions-panel';

public function __construct()
{
}
public function __construct() {}

public static function make(): static
{
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Body/Concerns/HasExtraCellAttributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function extraCellAttributes(array|Closure $attributes, bool $merge = fal
*/
public function getExtraCellAttributes(): array
{
$temporaryAttributeBag = new ComponentAttributeBag();
$temporaryAttributeBag = new ComponentAttributeBag;

foreach ($this->extraCellAttributes as $extraCellAttributes) {
$temporaryAttributeBag = $temporaryAttributeBag->merge($this->evaluate($extraCellAttributes));
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Body/Concerns/HasExtraHeaderAttributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function extraHeaderAttributes(array|Closure $attributes, bool $merge = f
*/
public function getExtraHeaderAttributes(): array
{
$temporaryAttributeBag = new ComponentAttributeBag();
$temporaryAttributeBag = new ComponentAttributeBag;

foreach ($this->extraHeaderAttributes as $extraHeaderAttributes) {
$temporaryAttributeBag = $temporaryAttributeBag->merge($this->evaluate($extraHeaderAttributes));
Expand Down
4 changes: 1 addition & 3 deletions src/Components/Body/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ class Table extends Component

protected Collection $data;

public function __construct()
{
}
public function __construct() {}

public function data(Closure $dataClosure): static
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function relationship(string $name, bool|Closure $condition = true): stat
if ($translatableContentDriver) {
$record = $translatableContentDriver->makeRecord($relatedModel, $data);
} else {
$record = new $relatedModel();
$record = new $relatedModel;
$record->fill($data);
}

Expand Down Expand Up @@ -107,7 +107,7 @@ public function relationship(string $name, bool|Closure $condition = true): stat
if ($translatableContentDriver) {
$record = $translatableContentDriver->makeRecord($relatedModel, $data);
} else {
$record = new $relatedModel();
$record = new $relatedModel;
$record->fill($data);
}

Expand Down
4 changes: 1 addition & 3 deletions src/Components/Footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

use EightyNine\Reports\ComponentContainer;

class Footer extends ComponentContainer
{
}
class Footer extends ComponentContainer {}
4 changes: 1 addition & 3 deletions src/Components/Header.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

use EightyNine\Reports\ComponentContainer;

class Header extends ComponentContainer
{
}
class Header extends ComponentContainer {}
4 changes: 1 addition & 3 deletions src/Components/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ class Image extends Component
*/
protected string $view = 'filament-reports::components.image';

public function __construct(public ?string $path = null)
{
}
public function __construct(public ?string $path = null) {}

public function getPath(): ?string
{
Expand Down
4 changes: 1 addition & 3 deletions src/Components/Text.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ class Text extends Component
*/
protected string $view = 'filament-reports::components.text';

public function __construct(public ?string $text = null)
{
}
public function __construct(public ?string $text = null) {}

public function getText(): ?string
{
Expand Down
12 changes: 3 additions & 9 deletions src/Concerns/HasReportActions.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,9 @@

trait HasReportActions
{
public function print()
{
}
public function print() {}

public function exportToPdf()
{
}
public function exportToPdf() {}

public function exportToExcel()
{
}
public function exportToExcel() {}
}
4 changes: 1 addition & 3 deletions src/Concerns/InteractsWithForms.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,7 @@ public function validate($rules = null, $messages = [], $attributes = []): array
}
}

protected function onValidationError(ValidationException $exception): void
{
}
protected function onValidationError(ValidationException $exception): void {}

/**
* @param array<string, mixed> $attributes
Expand Down
4 changes: 1 addition & 3 deletions src/Contracts/HasActionsPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace EightyNine\Reports\Contracts;

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

namespace EightyNine\Reports\Contracts;

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

namespace EightyNine\Reports\Contracts;

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

namespace EightyNine\Reports\Contracts;

interface HasHeader
{
}
interface HasHeader {}
2 changes: 1 addition & 1 deletion src/ReportsManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ReportsManager
public static function getInstance()
{
if (! self::$instance) {
self::$instance = new self();
self::$instance = new self;
}

return self::$instance;
Expand Down
2 changes: 1 addition & 1 deletion src/ReportsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function packageBooted(): void
}

// Testing
Testable::mixin(new TestsReports());
Testable::mixin(new TestsReports);
}

protected function getAssetPackageName(): ?string
Expand Down

0 comments on commit 6e6da6b

Please sign in to comment.