@@ -62,8 +62,7 @@ |
||
| 62 | 62 | private function getFileContents( string $filePath ): string { |
| 63 | 63 | try { |
| 64 | 64 | return $this->fileFetcher->fetchFile( $filePath ); |
| 65 | - } |
|
| 66 | - catch ( FileFetchingException $ex ) { |
|
| 65 | + } catch ( FileFetchingException $ex ) { |
|
| 67 | 66 | throw new RuntimeException( 'Cannot read config file at path "' . $filePath . '"', 0, $ex ); |
| 68 | 67 | } |
| 69 | 68 | } |
@@ -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\Infrastructure; |
| 6 | 6 | |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | $configs = array_map( |
| 44 | - function ( string $path ) { |
|
| 44 | + function( string $path ) { |
|
| 45 | 45 | return $this->getFileConfig( $path ); |
| 46 | 46 | }, |
| 47 | 47 | $this->configPaths |
@@ -29,8 +29,7 @@ |
||
| 29 | 29 | |
| 30 | 30 | try { |
| 31 | 31 | $this->cachePurger->purgeCache(); |
| 32 | - } |
|
| 33 | - catch ( CachePurgingException $ex ) { |
|
| 32 | + } catch ( CachePurgingException $ex ) { |
|
| 34 | 33 | return self::RESULT_ERROR; |
| 35 | 34 | } |
| 36 | 35 | |
@@ -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\Cache; |
| 6 | 6 | |
@@ -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\Cli\ApplicationConfigValidation; |
| 6 | 6 | |
@@ -31,15 +31,13 @@ |
||
| 31 | 31 | |
| 32 | 32 | try { |
| 33 | 33 | $pageId = $pageSelector->getPageId( $pageName ); |
| 34 | - } |
|
| 35 | - catch ( PageNotFoundException $exception ) { |
|
| 34 | + } catch ( PageNotFoundException $exception ) { |
|
| 36 | 35 | throw new NotFoundHttpException( "Page page name '$pageName' not found." ); |
| 37 | 36 | } |
| 38 | 37 | |
| 39 | 38 | try { |
| 40 | 39 | return $this->getPageTemplate( $pageId )->render( [ 'page_id' => $pageId ] ); |
| 41 | - } |
|
| 42 | - catch ( \Twig_Error_Runtime $exception ) { |
|
| 40 | + } catch ( \Twig_Error_Runtime $exception ) { |
|
| 43 | 41 | if ( $exception->getPrevious() instanceof ContentNotFoundException ) { |
| 44 | 42 | throw new NotFoundHttpException( "Content for page id '$pageId' not found." ); |
| 45 | 43 | } |
@@ -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\RouteHandlers; |
| 6 | 6 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | try { |
| 40 | - return $this->getPageTemplate( $pageId )->render( [ 'page_id' => $pageId ] ); |
|
| 40 | + return $this->getPageTemplate( $pageId )->render( ['page_id' => $pageId] ); |
|
| 41 | 41 | } |
| 42 | 42 | catch ( \Twig_Error_Runtime $exception ) { |
| 43 | 43 | if ( $exception->getPrevious() instanceof ContentNotFoundException ) { |
@@ -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\Factories; |
| 6 | 6 | |
@@ -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\Presentation\ContentPage; |
| 6 | 6 | |
@@ -22,20 +22,15 @@ |
||
| 22 | 22 | public function loadCampaignConfiguration( string ...$configFiles ): array { |
| 23 | 23 | try { |
| 24 | 24 | return $this->actualCampaignConfigurationLoader->loadCampaignConfiguration( ...$configFiles ); |
| 25 | - } |
|
| 26 | - catch ( ParseException $e ) { |
|
| 25 | + } catch ( ParseException $e ) { |
|
| 27 | 26 | $this->errorLogger->addError( 'Failed to parse campaign YAML: ' . $e->getMessage() ); |
| 28 | - } |
|
| 29 | - catch ( FileFetchingException $e ) { |
|
| 27 | + } catch ( FileFetchingException $e ) { |
|
| 30 | 28 | $this->errorLogger->addError( 'YAML configuration file read error: ' . $e->getMessage() ); |
| 31 | - } |
|
| 32 | - catch ( InvalidConfigurationException $e ) { |
|
| 29 | + } catch ( InvalidConfigurationException $e ) { |
|
| 33 | 30 | $this->errorLogger->addError( 'Invalid campaign YAML configuration: ' . $e->getMessage() ); |
| 34 | - } |
|
| 35 | - catch ( \RuntimeException $e ) { |
|
| 31 | + } catch ( \RuntimeException $e ) { |
|
| 36 | 32 | $this->errorLogger->addError( 'Runtime error while parsing campaign YAML: ' . $e->getMessage() ); |
| 37 | - } |
|
| 38 | - catch ( \Throwable $e ) { |
|
| 33 | + } catch ( \Throwable $e ) { |
|
| 39 | 34 | $this->errorLogger->addError( get_class( $e ) . ': ' . $e->getMessage() ); |
| 40 | 35 | } |
| 41 | 36 | return []; |
@@ -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\BucketTesting\Validation; |
| 6 | 6 | |
@@ -39,8 +39,7 @@ discard block |
||
| 39 | 39 | public function getExpirationDate( string $customerId ): CreditCardExpiry { |
| 40 | 40 | try { |
| 41 | 41 | $customerData = $this->microPaymentDispatcher->creditcardDataGet( $this->accessKey, $this->useTestMode, $customerId ); |
| 42 | - } |
|
| 43 | - catch ( \Exception $ex ) { |
|
| 42 | + } catch ( \Exception $ex ) { |
|
| 44 | 43 | throw new CreditCardExpiryFetchingException( 'MCP-API: Request failed', $ex ); |
| 45 | 44 | } |
| 46 | 45 | |
@@ -49,8 +48,7 @@ discard block |
||
| 49 | 48 | (int)$customerData['expiryMonth'], |
| 50 | 49 | (int)$customerData['expiryYear'] |
| 51 | 50 | ); |
| 52 | - } |
|
| 53 | - catch ( \InvalidArgumentException $ex ) { |
|
| 51 | + } catch ( \InvalidArgumentException $ex ) { |
|
| 54 | 52 | throw new CreditCardExpiryFetchingException( 'Malformed expiry date', $ex ); |
| 55 | 53 | } |
| 56 | 54 | |
@@ -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\Payment; |
| 6 | 6 | |
@@ -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\Payment; |
| 6 | 6 | |