PHPCS related fixes.
This commit is contained in:
		
							parent
							
								
									12be7d0086
								
							
						
					
					
						commit
						5ef0992d5b
					
				| 
						 | 
					@ -176,8 +176,8 @@ class LdapService
 | 
				
			||||||
         * the LDAP_OPT_X_TLS_REQUIRE_CERT option. It can only be set globally and not
 | 
					         * the LDAP_OPT_X_TLS_REQUIRE_CERT option. It can only be set globally and not
 | 
				
			||||||
         * per handle.
 | 
					         * per handle.
 | 
				
			||||||
         */
 | 
					         */
 | 
				
			||||||
        if($this->config['tls_insecure']) {
 | 
					        if ($this->config['tls_insecure']) {
 | 
				
			||||||
            $this->ldap->setOption(NULL, LDAP_OPT_X_TLS_REQUIRE_CERT, LDAP_OPT_X_TLS_NEVER);
 | 
					            $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);
 | 
					        $ldapConnection = $this->ldap->connect($hostName, count($ldapServer) > 2 ? intval($ldapServer[2]) : $defaultPort);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -190,10 +190,10 @@ class PermissionService
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        return $this->entityProvider->book->newQuery()
 | 
					        return $this->entityProvider->book->newQuery()
 | 
				
			||||||
            ->select(['id', 'restricted', 'created_by'])->with(['chapters' => function ($query) {
 | 
					            ->select(['id', 'restricted', 'created_by'])->with(['chapters' => function ($query) {
 | 
				
			||||||
            $query->select(['id', 'restricted', 'created_by', 'book_id']);
 | 
					                $query->select(['id', 'restricted', 'created_by', 'book_id']);
 | 
				
			||||||
        }, 'pages'  => function ($query) {
 | 
					            }, 'pages'  => function ($query) {
 | 
				
			||||||
            $query->select(['id', 'restricted', 'created_by', 'book_id', 'chapter_id']);
 | 
					                $query->select(['id', 'restricted', 'created_by', 'book_id', 'chapter_id']);
 | 
				
			||||||
        }]);
 | 
					            }]);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
| 
						 | 
					@ -612,13 +612,13 @@ class PermissionService
 | 
				
			||||||
        $entities = $this->entityProvider;
 | 
					        $entities = $this->entityProvider;
 | 
				
			||||||
        $pageSelect = $this->db->table('pages')->selectRaw($entities->page->entityRawQuery($fetchPageContent))
 | 
					        $pageSelect = $this->db->table('pages')->selectRaw($entities->page->entityRawQuery($fetchPageContent))
 | 
				
			||||||
            ->where('book_id', '=', $book_id)->where(function ($query) use ($filterDrafts) {
 | 
					            ->where('book_id', '=', $book_id)->where(function ($query) use ($filterDrafts) {
 | 
				
			||||||
            $query->where('draft', '=', 0);
 | 
					                $query->where('draft', '=', 0);
 | 
				
			||||||
            if (!$filterDrafts) {
 | 
					                if (!$filterDrafts) {
 | 
				
			||||||
                $query->orWhere(function ($query) {
 | 
					                    $query->orWhere(function ($query) {
 | 
				
			||||||
                    $query->where('draft', '=', 1)->where('created_by', '=', $this->currentUser()->id);
 | 
					                        $query->where('draft', '=', 1)->where('created_by', '=', $this->currentUser()->id);
 | 
				
			||||||
                });
 | 
					                    });
 | 
				
			||||||
            }
 | 
					                }
 | 
				
			||||||
        });
 | 
					            });
 | 
				
			||||||
        $chapterSelect = $this->db->table('chapters')->selectRaw($entities->chapter->entityRawQuery())->where('book_id', '=', $book_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"))
 | 
					        $query = $this->db->query()->select('*')->from($this->db->raw("({$pageSelect->toSql()} UNION {$chapterSelect->toSql()}) AS U"))
 | 
				
			||||||
            ->mergeBindings($pageSelect)->mergeBindings($chapterSelect);
 | 
					            ->mergeBindings($pageSelect)->mergeBindings($chapterSelect);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -84,6 +84,4 @@ class EntityProvider
 | 
				
			||||||
        $type = strtolower($type);
 | 
					        $type = strtolower($type);
 | 
				
			||||||
        return $this->all()[$type];
 | 
					        return $this->all()[$type];
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -2,4 +2,6 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use Exception;
 | 
					use Exception;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class HttpFetchException extends Exception {}
 | 
					class HttpFetchException extends Exception
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,5 @@
 | 
				
			||||||
<?php namespace BookStack\Exceptions;
 | 
					<?php namespace BookStack\Exceptions;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class UserUpdateException extends NotifyException {}
 | 
					class UserUpdateException extends NotifyException
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -31,5 +31,4 @@ class MailNotification extends Notification implements ShouldQueue
 | 
				
			||||||
            'text' => 'vendor.notifications.email-plain'
 | 
					            'text' => 'vendor.notifications.email-plain'
 | 
				
			||||||
        ]);
 | 
					        ]);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -1,6 +1,5 @@
 | 
				
			||||||
<?php namespace BookStack\Notifications;
 | 
					<?php namespace BookStack\Notifications;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
class ResetPassword extends MailNotification
 | 
					class ResetPassword extends MailNotification
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,6 +1,5 @@
 | 
				
			||||||
<?php namespace BookStack\Providers;
 | 
					<?php namespace BookStack\Providers;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
use BookStack\Translation\Translator;
 | 
					use BookStack\Translation\Translator;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class TranslationServiceProvider extends \Illuminate\Translation\TranslationServiceProvider
 | 
					class TranslationServiceProvider extends \Illuminate\Translation\TranslationServiceProvider
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,6 +1,5 @@
 | 
				
			||||||
<?php namespace BookStack\Translation;
 | 
					<?php namespace BookStack\Translation;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
class Translator extends \Illuminate\Translation\Translator
 | 
					class Translator extends \Illuminate\Translation\Translator
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -70,5 +69,4 @@ class Translator extends \Illuminate\Translation\Translator
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        return $this->baseLocaleMap[$locale] ?? null;
 | 
					        return $this->baseLocaleMap[$locale] ?? null;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -30,5 +30,4 @@ class HttpFetcher
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return $data;
 | 
					        return $data;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
		Loading…
	
		Reference in New Issue