NOW MANAGED ON CODEBERG
PHPCS related fixes.
abijeet5ef0992d5b77
diff --git a/app/Auth/Access/LdapService.php b/app/Auth/Access/LdapService.phpindex 1e95ac513..654ea2f99 100644--- a/app/Auth/Access/LdapService.php+++ b/app/Auth/Access/LdapService.php@@ -176,8 +176,8 @@ class LdapService* the LDAP_OPT_X_TLS_REQUIRE_CERT option. It can only be set globally and not* per handle.*/- if($this->config['tls_insecure']) {- $this->ldap->setOption(NULL, LDAP_OPT_X_TLS_REQUIRE_CERT, LDAP_OPT_X_TLS_NEVER);+ if ($this->config['tls_insecure']) {+ $this->ldap->setOption(null, LDAP_OPT_X_TLS_REQUIRE_CERT, LDAP_OPT_X_TLS_NEVER);}$ldapConnection = $this->ldap->connect($hostName, count($ldapServer) > 2 ? intval($ldapServer[2]) : $defaultPort);diff --git a/app/Auth/Permissions/PermissionService.php b/app/Auth/Permissions/PermissionService.phpindex d0e6cccea..af2a5e1fd 100644--- a/app/Auth/Permissions/PermissionService.php+++ b/app/Auth/Permissions/PermissionService.php@@ -190,10 +190,10 @@ class PermissionService{return $this->entityProvider->book->newQuery()->select(['id', 'restricted', 'created_by'])->with(['chapters' => function ($query) {- $query->select(['id', 'restricted', 'created_by', 'book_id']);- }, 'pages' => function ($query) {- $query->select(['id', 'restricted', 'created_by', 'book_id', 'chapter_id']);- }]);+ $query->select(['id', 'restricted', 'created_by', 'book_id']);+ }, 'pages' => function ($query) {+ $query->select(['id', 'restricted', 'created_by', 'book_id', 'chapter_id']);+ }]);}/**@@ -612,13 +612,13 @@ class PermissionService$entities = $this->entityProvider;$pageSelect = $this->db->table('pages')->selectRaw($entities->page->entityRawQuery($fetchPageContent))->where('book_id', '=', $book_id)->where(function ($query) use ($filterDrafts) {- $query->where('draft', '=', 0);- if (!$filterDrafts) {- $query->orWhere(function ($query) {- $query->where('draft', '=', 1)->where('created_by', '=', $this->currentUser()->id);- });- }- });+ $query->where('draft', '=', 0);+ if (!$filterDrafts) {+ $query->orWhere(function ($query) {+ $query->where('draft', '=', 1)->where('created_by', '=', $this->currentUser()->id);+ });+ }+ });$chapterSelect = $this->db->table('chapters')->selectRaw($entities->chapter->entityRawQuery())->where('book_id', '=', $book_id);$query = $this->db->query()->select('*')->from($this->db->raw("({$pageSelect->toSql()} UNION {$chapterSelect->toSql()}) AS U"))->mergeBindings($pageSelect)->mergeBindings($chapterSelect);diff --git a/app/Entities/EntityProvider.php b/app/Entities/EntityProvider.phpindex 46a883ec4..04939a14a 100644--- a/app/Entities/EntityProvider.php+++ b/app/Entities/EntityProvider.php@@ -84,6 +84,4 @@ class EntityProvider$type = strtolower($type);return $this->all()[$type];}---}\ No newline at end of file+}diff --git a/app/Entities/Repos/PageRepo.php b/app/Entities/Repos/PageRepo.phpindex 3558b29b3..148ae8459 100644--- a/app/Entities/Repos/PageRepo.php+++ b/app/Entities/Repos/PageRepo.php@@ -505,4 +505,4 @@ class PageRepo extends EntityReporeturn $this->publishPageDraft($copyPage, $pageData);}-}\ No newline at end of file+}diff --git a/app/Exceptions/HttpFetchException.php b/app/Exceptions/HttpFetchException.phpindex 48e30e1e6..2a34bbc62 100644--- a/app/Exceptions/HttpFetchException.php+++ b/app/Exceptions/HttpFetchException.php@@ -2,4 +2,6 @@use Exception;-class HttpFetchException extends Exception {}+class HttpFetchException extends Exception+{+}diff --git a/app/Exceptions/UserUpdateException.php b/app/Exceptions/UserUpdateException.phpindex eb41dece6..81e95b16f 100644--- a/app/Exceptions/UserUpdateException.php+++ b/app/Exceptions/UserUpdateException.php@@ -1,3 +1,5 @@<?php namespace BookStack\Exceptions;-class UserUpdateException extends NotifyException {}+class UserUpdateException extends NotifyException+{+}diff --git a/app/Notifications/MailNotification.php b/app/Notifications/MailNotification.phpindex 413ac6d73..5aa9b1e4a 100644--- a/app/Notifications/MailNotification.php+++ b/app/Notifications/MailNotification.php@@ -31,5 +31,4 @@ class MailNotification extends Notification implements ShouldQueue'text' => 'vendor.notifications.email-plain']);}--}\ No newline at end of file+}diff --git a/app/Notifications/ResetPassword.php b/app/Notifications/ResetPassword.phpindex 282aa335a..305a7da72 100644--- a/app/Notifications/ResetPassword.php+++ b/app/Notifications/ResetPassword.php@@ -1,6 +1,5 @@<?php namespace BookStack\Notifications;-class ResetPassword extends MailNotification{/**diff --git a/app/Providers/TranslationServiceProvider.php b/app/Providers/TranslationServiceProvider.phpindex 0e628c7da..7d51cc73d 100644--- a/app/Providers/TranslationServiceProvider.php+++ b/app/Providers/TranslationServiceProvider.php@@ -1,6 +1,5 @@<?php namespace BookStack\Providers;-use BookStack\Translation\Translator;class TranslationServiceProvider extends \Illuminate\Translation\TranslationServiceProvider@@ -29,4 +28,4 @@ class TranslationServiceProvider extends \Illuminate\Translation\TranslationServreturn $trans;});}-}\ No newline at end of file+}diff --git a/app/Translation/Translator.php b/app/Translation/Translator.phpindex 2edfecf73..032f43ff7 100644--- a/app/Translation/Translator.php+++ b/app/Translation/Translator.php@@ -1,6 +1,5 @@<?php namespace BookStack\Translation;-class Translator extends \Illuminate\Translation\Translator{@@ -70,5 +69,4 @@ class Translator extends \Illuminate\Translation\Translator{return $this->baseLocaleMap[$locale] ?? null;}--}\ No newline at end of file+}diff --git a/app/Uploads/HttpFetcher.php b/app/Uploads/HttpFetcher.phpindex 3ebe17eee..5e8115637 100644--- a/app/Uploads/HttpFetcher.php+++ b/app/Uploads/HttpFetcher.php@@ -30,5 +30,4 @@ class HttpFetcherreturn $data;}--}\ No newline at end of file+}