@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | if (file_exists(dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php')) { |
| 4 | - require dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php'; |
|
| 4 | + require dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php'; |
|
| 5 | 5 | } |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -if (file_exists(dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php')) { |
|
| 4 | - require dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php'; |
|
| 3 | +if ( file_exists( dirname( __DIR__ ) . '/var/cache/prod/App_KernelProdContainer.preload.php' ) ) { |
|
| 4 | + require dirname( __DIR__ ) . '/var/cache/prod/App_KernelProdContainer.preload.php'; |
|
| 5 | 5 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare( strict_types = 1 ); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | return [ |
| 6 | 6 | Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true], |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare( strict_types = 1 ); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace WMDE\Fundraising\Frontend\App\Controllers\StaticContent; |
| 6 | 6 | |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | try { |
| 32 | - return new Response( $this->getPageTemplate( $pageId )->render( [ 'page_id' => $pageId ] ) ); |
|
| 32 | + return new Response( $this->getPageTemplate( $pageId )->render( ['page_id' => $pageId] ) ); |
|
| 33 | 33 | } |
| 34 | 34 | catch ( RuntimeError $exception ) { |
| 35 | 35 | if ( $exception->getPrevious() instanceof ContentNotFoundException ) { |
@@ -23,15 +23,13 @@ |
||
| 23 | 23 | |
| 24 | 24 | try { |
| 25 | 25 | $pageId = $pageSelector->getPageId( $pageName ); |
| 26 | - } |
|
| 27 | - catch ( PageNotFoundException $exception ) { |
|
| 26 | + } catch ( PageNotFoundException $exception ) { |
|
| 28 | 27 | throw new NotFoundHttpException( "Page page name '$pageName' not found." ); |
| 29 | 28 | } |
| 30 | 29 | |
| 31 | 30 | try { |
| 32 | 31 | return new Response( $this->getPageTemplate( $pageId )->render( [ 'page_id' => $pageId ] ) ); |
| 33 | - } |
|
| 34 | - catch ( RuntimeError $exception ) { |
|
| 32 | + } catch ( RuntimeError $exception ) { |
|
| 35 | 33 | if ( $exception->getPrevious() instanceof ContentNotFoundException ) { |
| 36 | 34 | throw new NotFoundHttpException( "Content for page id '$pageId' not found." ); |
| 37 | 35 | } |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare( strict_types=1 ); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | |
| 4 | 4 | namespace WMDE\Fundraising\Frontend\Factories; |
| 5 | 5 | |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | private static function checkIfPathsExist( string ...$paths ): void { |
| 41 | 41 | array_map( |
| 42 | - function ( $path ) { |
|
| 42 | + function( $path ) { |
|
| 43 | 43 | if ( !is_readable( $path ) ) { |
| 44 | 44 | throw new \RuntimeException( 'Configuration file "' . $path . '" not found' ); |
| 45 | 45 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare( strict_types = 1 ); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace WMDE\Fundraising\Frontend\Infrastructure; |
| 6 | 6 | |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare( strict_types=1 ); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | |
| 4 | 4 | namespace WMDE\Fundraising\Frontend\Factories; |
| 5 | 5 | |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | // Wrap errbit handler in SupportHandler to avoid logception (logger trying to log logging errors) when errbit throws an error |
| 24 | 24 | return new SupportHandler( |
| 25 | 25 | new AirbrakeHandler( $notifier, Logger::toMonologLevel( $level ?? LogLevel::DEBUG ), $bubble ), |
| 26 | - new Logger( 'errbit errors', [ new ErrorLogHandler( ErrorLogHandler::OPERATING_SYSTEM, LogLevel::ERROR ), ] ), |
|
| 26 | + new Logger( 'errbit errors', [new ErrorLogHandler( ErrorLogHandler::OPERATING_SYSTEM, LogLevel::ERROR ), ] ), |
|
| 27 | 27 | ); |
| 28 | 28 | } |
| 29 | 29 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare( strict_types = 1 ); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | use Symfony\Component\Dotenv\Dotenv; |
| 6 | 6 | use Symfony\Component\ErrorHandler\Debug; |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare( strict_types = 1 ); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace WMDE\Fundraising\Frontend\App\EventHandlers; |
| 6 | 6 | |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | public static function getSubscribedEvents(): array { |
| 32 | 32 | return [ |
| 33 | - KernelEvents::EXCEPTION => [ 'onKernelException', self::PRIORITY ] |
|
| 33 | + KernelEvents::EXCEPTION => ['onKernelException', self::PRIORITY] |
|
| 34 | 34 | ]; |
| 35 | 35 | } |
| 36 | 36 | |
@@ -54,16 +54,16 @@ discard block |
||
| 54 | 54 | $event->getThrowable()->getMessage() |
| 55 | 55 | ), |
| 56 | 56 | 403, |
| 57 | - [ 'X-Status-Code' => 403 ] |
|
| 57 | + ['X-Status-Code' => 403] |
|
| 58 | 58 | ) ); |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | private function createNotFoundResponse( ExceptionEvent $event ): void { |
| 62 | 62 | if ( $this->isJsonRequest( $event ) ) { |
| 63 | 63 | $event->setResponse( JsonResponse::create( |
| 64 | - [ 'ERR' => $event->getThrowable()->getMessage() ], |
|
| 64 | + ['ERR' => $event->getThrowable()->getMessage()], |
|
| 65 | 65 | 404, |
| 66 | - [ 'X-Status-Code' => 404 ] |
|
| 66 | + ['X-Status-Code' => 404] |
|
| 67 | 67 | ) ); |
| 68 | 68 | return; |
| 69 | 69 | } |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | $event->setResponse( new Response( |
| 72 | 72 | $this->presenterFactory->newPageNotFoundHtmlPresenter()->present(), |
| 73 | 73 | 404, |
| 74 | - [ 'X-Status-Code' => 404 ] |
|
| 74 | + ['X-Status-Code' => 404] |
|
| 75 | 75 | ) ); |
| 76 | 76 | } |
| 77 | 77 | |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | $exception = $event->getThrowable(); |
| 80 | 80 | if ( $this->isJsonRequest( $event ) ) { |
| 81 | 81 | $event->setResponse( JsonResponse::create( |
| 82 | - [ 'ERR' => $exception->getMessage() ] |
|
| 82 | + ['ERR' => $exception->getMessage()] |
|
| 83 | 83 | ) ); |
| 84 | 84 | return; |
| 85 | 85 | } |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare( strict_types = 1 ); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace WMDE\Fundraising\Frontend\App\Controllers\Subscription; |
| 6 | 6 | |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | $request, |
| 33 | 33 | $responseModel, |
| 34 | 34 | $ffFactory->newAddSubscriptionHtmlPresenter(), |
| 35 | - $ffFactory->getUrlGenerator()->generateRelativeUrl( 'page', [ 'pageName' => 'Subscription_Success' ] ) |
|
| 35 | + $ffFactory->getUrlGenerator()->generateRelativeUrl( 'page', ['pageName' => 'Subscription_Success'] ) |
|
| 36 | 36 | ); |
| 37 | 37 | } |
| 38 | 38 | |