Failed Conditions
Push — master ( 4b3aab...98553a )
by Dennis
04:06
created
src/Packages/CompanyAuthenticatable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
      * @throws \SimpleCMS\Framework\Exceptions\SimpleException
52 52
      * @return bool|RedirectResponse
53 53
      */
54
-    public function guardLogin(string $guard, string $account, string $password, array $messages = []): bool|RedirectResponse
54
+    public function guardLogin(string $guard, string $account, string $password, array $messages = []): bool | RedirectResponse
55 55
     {
56 56
         $errorMessages = array_merge([
57 57
             'not_found' => 'The account or password is incorrect.',
Please login to merge, or discard this patch.
src/CompanyServiceProvider.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -79,18 +79,18 @@  discard block
 block discarded – undo
79 79
 
80 80
     private function relationUsing(mixed $modelClass):void
81 81
     {
82
-        if(method_exists($modelClass,'companyRelations'))
82
+        if (method_exists($modelClass, 'companyRelations'))
83 83
         {
84
-            foreach($modelClass::companyRelations() as $relationName => $key)
84
+            foreach ($modelClass::companyRelations() as $relationName => $key)
85 85
             {
86
-                Company::resolveRelationUsing($relationName, function (Company $company) use ($modelClass,$key) {
87
-                    return $company->hasMany($modelClass,$key);
86
+                Company::resolveRelationUsing($relationName, function(Company $company) use ($modelClass, $key) {
87
+                    return $company->hasMany($modelClass, $key);
88 88
                 });
89 89
             }
90
-        }else{
90
+        } else {
91 91
             $relationName = Str::plural(Str::camel(class_basename($modelClass)));
92 92
 
93
-            Company::resolveRelationUsing($relationName, function (Company $company) use ($modelClass) {
93
+            Company::resolveRelationUsing($relationName, function(Company $company) use ($modelClass) {
94 94
                 return $company->hasMany($modelClass);
95 95
             });
96 96
         }
@@ -101,16 +101,16 @@  discard block
 block discarded – undo
101 101
      */
102 102
     protected function registerEvents(): void
103 103
     {
104
-        $this->app->bind('simplecms.plugin.company.api_login', function (CompanyAccount $account) {
104
+        $this->app->bind('simplecms.plugin.company.api_login', function(CompanyAccount $account) {
105 105
             return new ApiLogin($account);
106 106
         });
107
-        $this->app->bind('simplecms.plugin.company.login_failed', function (CompanyAccount $account) {
107
+        $this->app->bind('simplecms.plugin.company.login_failed', function(CompanyAccount $account) {
108 108
             return new LoginFailed($account);
109 109
         });
110
-        $this->app->bind('simplecms.plugin.company.login_success', function (CompanyAccount $account) {
110
+        $this->app->bind('simplecms.plugin.company.login_success', function(CompanyAccount $account) {
111 111
             return new LoginSuccess($account);
112 112
         });
113
-        $this->app->bind('simplecms.plugin.company.company_request', function (Request $request, bool $status) {
113
+        $this->app->bind('simplecms.plugin.company.company_request', function(Request $request, bool $status) {
114 114
             return new CompanyRequest($request, $status);
115 115
         });
116 116
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
                     return $company->hasMany($modelClass,$key);
88 88
                 });
89 89
             }
90
-        }else{
90
+        } else{
91 91
             $relationName = Str::plural(Str::camel(class_basename($modelClass)));
92 92
 
93 93
             Company::resolveRelationUsing($relationName, function (Company $company) use ($modelClass) {
Please login to merge, or discard this patch.
database/migrations/2024_07_27_212557_create_company_profiles_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
      */
11 11
     public function up(): void
12 12
     {
13
-        Schema::create('company_profiles', function (Blueprint $table) {
13
+        Schema::create('company_profiles', function(Blueprint $table) {
14 14
             $table->id();
15 15
             $table->foreignUuid('company_id')->comment("企业ID");
16 16
             $table->string("id_number")->comment("企业注册号/身份证号码");
Please login to merge, or discard this patch.
database/migrations/2024_07_27_212037_create_company_logs_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
      */
11 11
     public function up(): void
12 12
     {
13
-        Schema::create('company_logs', function (Blueprint $table) {
13
+        Schema::create('company_logs', function(Blueprint $table) {
14 14
             $table->id()->comment("主键");
15 15
             $table->foreignUuid("company_id")->nullable()->comment("公司ID");
16 16
             $table->foreignUuid("company_account_id")->nullable()->comment("账号ID");
Please login to merge, or discard this patch.
database/migrations/2024_07_27_212009_create_company_accounts_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
      */
11 11
     public function up(): void
12 12
     {
13
-        Schema::create('company_accounts', function (Blueprint $table) {
13
+        Schema::create('company_accounts', function(Blueprint $table) {
14 14
             $table->uuid('id')->primary()->comment("主键");
15 15
             $table->foreignUuid('company_id')->nullable()->comment("公司ID");
16 16
             $table->string("account")->unique()->comment("登录账号");
Please login to merge, or discard this patch.
database/migrations/2024_07_27_212010_create_company_safes_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
      */
11 11
     public function up(): void
12 12
     {
13
-        Schema::create('company_safes', function (Blueprint $table) {
13
+        Schema::create('company_safes', function(Blueprint $table) {
14 14
             $table->id('id')->comment("主键");
15 15
             $table->foreignUuid('company_account_id')->nullable()->comment("账号ID");
16 16
             $table->enum('type', ['mobile', 'email'])->default('mobile')->comment("密保类型");
Please login to merge, or discard this patch.