Procházet zdrojové kódy

refactor: 统一代码风格

runphp před 2 týdny
rodič
revize
5083298e8c

+ 2 - 1
config.php

@@ -1,5 +1,6 @@
 <?php
+
 declare(strict_types=1);
 
 return [
-];
+];

+ 3 - 2
database/migrations/20251004000001_create_member_card_table.php

@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 use Phinx\Migration\AbstractMigration;
@@ -19,7 +20,7 @@ final class CreateMemberCardTable extends AbstractMigration
     public function change(): void
     {
         $table = $this->table('mcard_member_card', ['id' => false, 'primary_key' => ['id'], 'comment' => '会员卡定义表']);
-        
+
         $table->addColumn('id', 'integer', ['limit' => 11, 'null' => false, 'signed' => false, 'identity' => true, 'comment' => '主键ID'])
               ->addColumn('name', 'string', ['limit' => 100, 'null' => false, 'comment' => '会员卡名称'])
               ->addColumn('description', 'text', ['null' => true, 'comment' => '会员卡描述'])
@@ -38,4 +39,4 @@ final class CreateMemberCardTable extends AbstractMigration
 
         $table->create();
     }
-}
+}

+ 3 - 2
database/migrations/20251004000002_create_member_card_order_table.php

@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 use Phinx\Migration\AbstractMigration;
@@ -19,7 +20,7 @@ final class CreateMemberCardOrderTable extends AbstractMigration
     public function change(): void
     {
         $table = $this->table('mcard_member_card_order', ['id' => false, 'primary_key' => ['id'], 'comment' => '会员卡订单表']);
-        
+
         $table->addColumn('id', 'integer', ['limit' => 11, 'null' => false, 'signed' => false, 'identity' => true, 'comment' => '主键ID'])
               ->addColumn('order_no', 'string', ['limit' => 32, 'null' => false, 'comment' => '订单编号'])
               ->addColumn('user_id', 'integer', ['limit' => 11, 'null' => false, 'signed' => false, 'comment' => '用户ID'])
@@ -46,4 +47,4 @@ final class CreateMemberCardOrderTable extends AbstractMigration
 
         $table->create();
     }
-}
+}

+ 3 - 2
database/migrations/20251004000003_create_member_table.php

@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 use Phinx\Migration\AbstractMigration;
@@ -19,7 +20,7 @@ final class CreateMemberTable extends AbstractMigration
     public function change(): void
     {
         $table = $this->table('mcard_member', ['id' => false, 'primary_key' => ['id'], 'comment' => '会员表']);
-        
+
         $table->addColumn('id', 'integer', ['limit' => 11, 'null' => false, 'signed' => false, 'identity' => true, 'comment' => '主键ID'])
               ->addColumn('user_id', 'integer', ['limit' => 11, 'null' => false, 'signed' => false, 'comment' => '用户ID'])
               ->addColumn('member_card_id', 'integer', ['limit' => 11, 'null' => false, 'signed' => false, 'comment' => '会员卡ID'])
@@ -43,4 +44,4 @@ final class CreateMemberTable extends AbstractMigration
 
         $table->create();
     }
-}
+}

+ 2 - 1
info.php

@@ -1,7 +1,8 @@
 <?php
+
 declare(strict_types=1);
 
 return [
     'id' => 'six-shop-member-card',
     'name' => '会员卡包',
-];
+];

+ 1 - 1
route/admin.php

@@ -1,8 +1,8 @@
 <?php
+
 declare(strict_types=1);
 
 
-use think\facade\Route;
 
 // Admin路由
 // 路由前缀: /admin/six-shop-member-card//

+ 2 - 2
route/api.php

@@ -1,10 +1,10 @@
 <?php
+
 declare(strict_types=1);
 
 
-use think\facade\Route;
 
 // API路由
 // 路由前缀: /api/six-shop-member-card//
 // 如果需要登录请添加认证中间件auth
-// ->middleware(['auth'])
+// ->middleware(['auth'])

+ 2 - 1
src/Extension.php

@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace SixShop\MemberCard;
@@ -13,4 +14,4 @@ class Extension extends ExtensionAbstract
     {
         return dirname(__DIR__);
     }
-}
+}