Skip to content

Commit 62d0141

Browse files
Merge pull request #3 from imanghafoori1/main
Add import checker to github actions - update composer
2 parents b2ce4ed + f4cae2a commit 62d0141

File tree

3 files changed

+27
-7
lines changed

3 files changed

+27
-7
lines changed

.github/workflows/check_imports.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Check Imports
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Install dependencies
18+
run: composer install --prefer-dist --no-progress
19+
- name: Check Imports
20+
run: ./vendor/bin/check_imports

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
[![Latest Version on Packagist](https://img.shields.io/packagist/v/hpwebdeveloper/laravel-pay-pocket.svg?style=flat-square)](https://packagist.org/packages/hpwebdeveloper/laravel-pay-pocket)
66
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/hpwebdeveloper/laravel-pay-pocket/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/hpwebdeveloper/laravel-pay-pocket/actions?query=workflow%3Arun-tests+branch%3Amain)
77
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/hpwebdeveloper/laravel-pay-pocket/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/hpwebdeveloper/laravel-pay-pocket/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
8+
[![Imports](https://github.com/HPWebdeveloper/laravel-pay-pocket/actions/workflows/imports.yml/badge.svg?branch=main)](https://github.com/HPWebdeveloper/laravel-pay-pocket/actions/workflows/imports.yml)
9+
810

911
**Laravel Pay Pocket** is a package designed for Laravel applications, offering the flexibility to manage multiple wallet types within two dedicated database tables, `wallets` and `wallets_logs`.
1012

11-
**Note:** This package does not handle payments from payment platforms, but instead offers the concept of virtual money, deposit and withdraw.
13+
**Note:** This package does not handle payments from payment platforms, but instead offers the concept of virtual money, deposit, and withdrawal.
1214

1315
* **Author**: Hamed Panjeh
1416
* **Vendor**: hpwebdeveloper
@@ -27,9 +29,7 @@
2729
| x.x | | | | | | |
2830

2931

30-
## Installation
31-
32-
32+
## Installation:
3333

3434
- **Step 1:** You can install the package via composer:
3535

@@ -57,7 +57,7 @@ This command will automatically publish the `WalletEnums.php` file into your app
5757

5858
### Prepare User Model
5959

60-
To use this package you need to implements the `WalletOperations` into `User` model and utlize the `ManagesWallet` trait.
60+
To use this package you need to implement the `WalletOperations` into `User` model and utilize the `ManagesWallet` trait.
6161

6262
```php
6363

@@ -74,7 +74,7 @@ class User extends Authenticatable implements WalletOperations
7474

7575
In Laravel Pay Pocket, you have the flexibility to define the order in which wallets are prioritized for payments through the use of Enums. The order of wallets in the Enum file determines their priority level. The first wallet listed has the highest priority and will be used first for deducting order values.
7676

77-
For example, consider the following wallet types defined in the Enum class (published in the step 3 of installation):
77+
For example, consider the following wallet types defined in the Enum class (published in step 3 of installation):
7878
```php
7979
namespace App\Enums;
8080

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131
"phpstan/extension-installer": "^1.1",
3232
"phpstan/phpstan-deprecation-rules": "^1.0",
3333
"phpstan/phpstan-phpunit": "^1.0",
34+
"imanghafoori/php-imports-analyzer": "1.0.*",
3435
"spatie/laravel-ray": "^1.26"
3536
},
3637
"autoload": {
3738
"psr-4": {
38-
"HPWebdeveloper\\LaravelPayPocket\\": "src/",
3939
"HPWebdeveloper\\LaravelPayPocket\\": "src/",
4040
"HPWebdeveloper\\LaravelPayPocket\\Database\\Factories\\": "database/factories/",
4141
"HPWebdeveloper\\LaravelPayPocket\\Tests\\Database\\Factories\\": "tests/database/factories"

0 commit comments

Comments
 (0)