Passed
Push — master ( f4d609...4b3aab )
by Dennis
05:11
created
src/Observers/CompanyObserver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function creating(Company $company): void
15 15
     {
16
-        if(!$company->uid)
16
+        if (!$company->uid)
17 17
         {
18 18
             $company->uid = CompanyUtil::makeNewUid(Company::class);
19 19
         }
Please login to merge, or discard this patch.
src/Packages/CompanyLogWrite.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
         }
45 45
     }
46 46
 
47
-    private static function makeSql(Request $request, string|null $name = null, bool $status = false, CompanyAccount $account = null): array
47
+    private static function makeSql(Request $request, string | null $name = null, bool $status = false, CompanyAccount $account = null): array
48 48
     {
49 49
         $account = empty($account) ? optional($request->user()) : optional($account);
50 50
         return [
Please login to merge, or discard this patch.
src/Listeners/LoginSuccessListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,6 +16,6 @@
 block discarded – undo
16 16
      */
17 17
     public function handle(LoginSuccess $event): void
18 18
     {
19
-        CompanyLogWrite::makeLog(true,$event->account);
19
+        CompanyLogWrite::makeLog(true, $event->account);
20 20
     }
21 21
 }
Please login to merge, or discard this patch.
src/Listeners/LoginFailedListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,6 +16,6 @@
 block discarded – undo
16 16
      */
17 17
     public function handle(LoginFailed $event): void
18 18
     {
19
-        CompanyLogWrite::makeLog(false,$event->account);
19
+        CompanyLogWrite::makeLog(false, $event->account);
20 20
     }
21 21
 }
Please login to merge, or discard this patch.
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.