mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-30 04:23:11 +03:00
Set /app PHP code to PSR-2 standard
Also adde draw.io to attribution list. Closes #649
This commit is contained in:
@ -1,4 +1,6 @@
|
||||
<?php namespace BookStack\Exceptions;
|
||||
|
||||
class AuthException extends PrettyException
|
||||
{
|
||||
|
||||
class AuthException extends PrettyException {}
|
||||
}
|
||||
|
@ -1,4 +1,6 @@
|
||||
<?php namespace BookStack\Exceptions;
|
||||
|
||||
class ConfirmationEmailException extends NotifyException
|
||||
{
|
||||
|
||||
class ConfirmationEmailException extends NotifyException {}
|
||||
}
|
||||
|
@ -1,4 +1,6 @@
|
||||
<?php namespace BookStack\Exceptions;
|
||||
|
||||
class FileUploadException extends PrettyException
|
||||
{
|
||||
|
||||
class FileUploadException extends PrettyException {}
|
||||
}
|
||||
|
@ -95,9 +95,12 @@ class Handler extends ExceptionHandler
|
||||
* @param $type
|
||||
* @return bool
|
||||
*/
|
||||
protected function isExceptionType(Exception $e, $type) {
|
||||
protected function isExceptionType(Exception $e, $type)
|
||||
{
|
||||
do {
|
||||
if (is_a($e, $type)) return true;
|
||||
if (is_a($e, $type)) {
|
||||
return true;
|
||||
}
|
||||
} while ($e = $e->getPrevious());
|
||||
return false;
|
||||
}
|
||||
@ -107,7 +110,8 @@ class Handler extends ExceptionHandler
|
||||
* @param Exception $e
|
||||
* @return string
|
||||
*/
|
||||
protected function getOriginalMessage(Exception $e) {
|
||||
protected function getOriginalMessage(Exception $e)
|
||||
{
|
||||
do {
|
||||
$message = $e->getMessage();
|
||||
} while ($e = $e->getPrevious());
|
||||
|
@ -1,3 +1,6 @@
|
||||
<?php namespace BookStack\Exceptions;
|
||||
|
||||
class ImageUploadException extends PrettyException {}
|
||||
class ImageUploadException extends PrettyException
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -1,3 +1,6 @@
|
||||
<?php namespace BookStack\Exceptions;
|
||||
|
||||
class LdapException extends PrettyException {}
|
||||
class LdapException extends PrettyException
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php namespace BookStack\Exceptions;
|
||||
|
||||
|
||||
class NotFoundException extends PrettyException {
|
||||
class NotFoundException extends PrettyException
|
||||
{
|
||||
|
||||
/**
|
||||
* NotFoundException constructor.
|
||||
@ -11,4 +11,4 @@ class NotFoundException extends PrettyException {
|
||||
{
|
||||
parent::__construct($message, 404);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?php namespace BookStack\Exceptions;
|
||||
|
||||
|
||||
class NotifyException extends \Exception
|
||||
{
|
||||
|
||||
@ -18,4 +17,4 @@ class NotifyException extends \Exception
|
||||
$this->redirectLocation = $redirectLocation;
|
||||
parent::__construct();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
<?php namespace BookStack\Exceptions;
|
||||
|
||||
|
||||
use Exception;
|
||||
|
||||
class PermissionsException extends Exception {}
|
||||
class PermissionsException extends Exception
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -1,3 +1,6 @@
|
||||
<?php namespace BookStack\Exceptions;
|
||||
|
||||
class PrettyException extends \Exception {}
|
||||
class PrettyException extends \Exception
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,6 @@
|
||||
<?php namespace BookStack\Exceptions;
|
||||
|
||||
class SocialDriverNotConfigured extends PrettyException
|
||||
{
|
||||
|
||||
class SocialDriverNotConfigured extends PrettyException {}
|
||||
}
|
||||
|
@ -1,4 +1,6 @@
|
||||
<?php namespace BookStack\Exceptions;
|
||||
|
||||
class SocialSignInException extends NotifyException
|
||||
{
|
||||
|
||||
class SocialSignInException extends NotifyException {}
|
||||
}
|
||||
|
@ -1,4 +1,6 @@
|
||||
<?php namespace BookStack\Exceptions;
|
||||
|
||||
class UserRegistrationException extends NotifyException
|
||||
{
|
||||
|
||||
class UserRegistrationException extends NotifyException {}
|
||||
}
|
||||
|
Reference in New Issue
Block a user