Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
Traineratwot committed Jan 18, 2024
2 parents c6a7214 + 6515d33 commit 0811c86
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
10 changes: 5 additions & 5 deletions src/FilamentOpenStreetMapServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php /** @noinspection PhpMultipleClassDeclarationsInspection */
<?php

/** @noinspection PhpMultipleClassDeclarationsInspection */

namespace Traineratwot\FilamentOpenStreetMap;

Expand All @@ -7,7 +9,6 @@
use Filament\Support\Assets\Js;
use Filament\Support\Facades\FilamentAsset;
use Filament\Support\Facades\FilamentIcon;
use Illuminate\Filesystem\Filesystem;
use Livewire\Features\SupportTesting\Testable;
use ReflectionException;
use Spatie\LaravelPackageTools\Commands\InstallCommand;
Expand Down Expand Up @@ -84,7 +85,6 @@ public function packageBooted(): void
Testable::mixin(new TestsFilamentOpenStreetMap());
}


protected function getAssetPackageName(): ?string
{
return 'traineratwot/filament-openstreetmap';
Expand All @@ -97,8 +97,8 @@ protected function getAssets(): array
{
return [
// AlpineComponent::make('filament-openstreetmap', __DIR__ . '/../resources/dist/components/filament-openstreetmap.js'),
Css::make('filament-openstreetmap-styles', __DIR__ . '/../resources/dist/filament-openstreetmap.css'),
Js::make('filament-openstreetmap-scripts', __DIR__ . '/../resources/dist/filament-openstreetmap.js'),
Css::make('filament-openstreetmap-styles', __DIR__.'/../resources/dist/filament-openstreetmap.css'),
Js::make('filament-openstreetmap-scripts', __DIR__.'/../resources/dist/filament-openstreetmap.js'),
];
}

Expand Down
11 changes: 7 additions & 4 deletions src/Forms/Components/MapInput.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php /** @noinspection ClassMethodNameMatchesFieldNameInspection */
<?php

/** @noinspection ClassMethodNameMatchesFieldNameInspection */

namespace Traineratwot\FilamentOpenStreetMap\Forms\Components;

Expand All @@ -9,7 +11,6 @@

class MapInput extends Textarea
{

protected string $view = 'filament-openstreetmap::forms.components.map';

protected int|Closure|null $rows = 15;
Expand Down Expand Up @@ -54,13 +55,12 @@ protected function setUp(): void
/**
* latitude
* широта
* @var float|int| Closure
*/
protected float|int|Closure $latitude = 0;

/**
* longitude
* долгота
* @var float|int| Closure
*/
protected float|int|Closure $longitude = 0;

Expand Down Expand Up @@ -129,19 +129,22 @@ protected function parseInput(mixed $state): array
public function latitude(float|int|Closure $latitude): static
{
$this->latitude = $latitude;

return $this;
}

public function longitude(float|int|Closure $longitude): static
{
$this->longitude = $longitude;

return $this;
}

public function coordinates(float|int|Closure $latitude, float|int|Closure $longitude): static
{
$this->latitude = $latitude;
$this->longitude = $longitude;

return $this;
}

Expand Down
7 changes: 1 addition & 6 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,10 @@
use BladeUI\Heroicons\BladeHeroiconsServiceProvider;
use BladeUI\Icons\BladeIconsServiceProvider;
use Filament\Actions\ActionsServiceProvider;
use Filament\FilamentServiceProvider;
use Filament\Forms\FormsServiceProvider;
use Filament\Infolists\InfolistsServiceProvider;
use Filament\Notifications\NotificationsServiceProvider;
use Filament\SpatieLaravelSettingsPluginServiceProvider;
use Filament\SpatieLaravelTranslatablePluginServiceProvider;
use Filament\Support\SupportServiceProvider;
use Filament\Tables\TablesServiceProvider;
use Filament\Widgets\WidgetsServiceProvider;
use Illuminate\Database\Eloquent\Factories\Factory;
use Livewire\LivewireServiceProvider;
use Orchestra\Testbench\TestCase as Orchestra;
Expand All @@ -27,7 +22,7 @@ protected function setUp(): void
parent::setUp();

Factory::guessFactoryNamesUsing(
fn (string $modelName) => 'Traineratwot\\FilamentOpenStreetMap\\Database\\Factories\\' . class_basename($modelName) . 'Factory'
fn (string $modelName) => 'Traineratwot\\FilamentOpenStreetMap\\Database\\Factories\\'.class_basename($modelName).'Factory'
);
}

Expand Down

0 comments on commit 0811c86

Please sign in to comment.