Skip to content

Commit

Permalink
Fix phpstan error
Browse files Browse the repository at this point in the history
  • Loading branch information
mckenziearts committed Feb 26, 2024
1 parent 81c9251 commit 74b3634
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 17 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ jobs:
php: [8.2, 8.1]
laravel: [10.*, 9.*]
dependency-version: [prefer-stable]
include:
- laravel: 10.*
testbench: 8.*
- laravel: 9.*
testbench: 7.*
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
steps:
- uses: actions/checkout@v3
Expand All @@ -35,7 +30,7 @@ jobs:
coverage: none
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
- name: Run PHPStan
run: ./vendor/bin/phpstan analyse
4 changes: 2 additions & 2 deletions packages/admin/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
"pragmarx/google2fa": "^8.0",
"psr/simple-cache": "^3.0",
"rappasoft/laravel-livewire-tables": "^2.12",
"shopper/core": "^2.1",
"shopper/sidebar": "^2.1",
"shopper/core": "self.version",
"shopper/sidebar": "self.version",
"spatie/laravel-package-tools": "^1.15",
"stevebauman/location": "^6.3.1",
"wire-elements/modal": "^1.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
use Illuminate\Contracts\View\View;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Hash;
use Shopper\Core\Models\Address;
use Shopper\Core\Models\Country;
use Shopper\Core\Models\User;
use Shopper\Core\Repositories\UserRepository;
use Shopper\Core\Rules\Phone;
use Shopper\Core\Traits\Attributes\WithAddress;
use Shopper\Http\Livewire\AbstractBaseComponent;
use Shopper\Models\Address;
use Shopper\Notifications\CustomerSendCredentials;

class Create extends AbstractBaseComponent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
use Shopper\Core\Events\Orders\Completed;
use Shopper\Core\Events\Orders\Paid;
use Shopper\Core\Events\Orders\Registered;
use Shopper\Core\Models\Address;
use Shopper\Core\Models\Order;
use Shopper\Models\Address;

class Show extends Component
{
Expand Down
1 change: 1 addition & 0 deletions packages/core/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"license": "MIT",
"require": {
"php": "^8.1",
"ext-intl": "*",
"spatie/laravel-medialibrary": "^10.4.1",
"spatie/laravel-permission": "^5.5.2",
"staudenmeir/laravel-adjacency-list": "^1.0"
Expand Down
6 changes: 6 additions & 0 deletions packages/core/src/Models/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

/**
* @property-read int $id
* @property string $last_name
* @property string|null $first_name
* @property bool $is_default
*/
class Address extends Model
{
use HasFactory;
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/Models/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use Illuminate\Database\Eloquent\SoftDeletes;
use Shopper\Core\Enum\OrderStatus;
use Shopper\Core\Traits\HasPrice;
use Shopper\Models\Address;

/**
* @property-read int $id
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Illuminate\Notifications\Notifiable;
use Shopper\Core\Traits\CanHaveDiscount;
use Shopper\Core\Traits\HasProfilePhoto;
use Shopper\Models\Address;
use Shopper\Traits\TwoFactorAuthenticatable;
use Spatie\Permission\Traits\HasRoles;

Expand Down
7 changes: 0 additions & 7 deletions packages/core/src/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,6 @@ function generate_number(): string
}
}

if (! function_exists('shopper_version')) {
function shopper_version(): string
{
return Shopper::version();
}
}

if (! function_exists('shopper_table')) {
function shopper_table(string $table): string
{
Expand Down

0 comments on commit 74b3634

Please sign in to comment.