jenkins-bot has submitted this change and it was merged. Change subject: Make MediaWiki-compatible style changes ......................................................................
Make MediaWiki-compatible style changes Note that this only addresses some easy issues, we still don't pass phpcs. Change-Id: Icd531ade53a9442587e98228a0536e55b79f78e0 --- M Core/Actions/IListenerMessageAction.php M Core/Configuration.php M Core/Context.php M Core/DataFiles/CsvReader.php M Core/DataFiles/DataFileException.php M Core/DataFiles/HeadedCsvReader.php M Core/DataStores/DiskFileDataStore.php M Core/DataStores/KeyedOpaqueDataStore.php M Core/DataStores/NullDataStore.php M Core/DataStores/StompDataStore.php M Core/Http/RequestHandler.php M Core/Http/Response.php M Core/Jobs/RunnableJob.php M Core/Listeners/RestListener.php M Core/Logging/LogContextHandler.php M Core/Logging/LogEvent.php M Core/Logging/LogStreams/ConsoleLogStream.php M Core/Logging/LogStreams/FailmailLogStream.php M Core/Logging/LogStreams/ILogStream.php M Core/Logging/LogStreams/SyslogLogStream.php M Core/Logging/LogStreams/TaggedFileLogStream.php M Core/Logging/TaggedLogger.php M Core/Messages/ListenerMessage.php M Core/UtcDate.php M Maintenance/EmptyQueueToDump.php M Maintenance/ExampleScript.php M Maintenance/MaintenanceBase.php M Maintenance/PopulateQueueFromDump.php M Maintenance/StompJobRunner.php M Maintenance/TestDatastore.php M Maintenance/TestFailMail.php M Maintenance/doMaintenance.php M PaymentProviders/Adyen/Actions/PaymentCaptureAction.php M PaymentProviders/Adyen/AdyenListener.php M PaymentProviders/Adyen/AdyenPaymentsAPI.php M PaymentProviders/Adyen/Audit/AdyenAudit.php M PaymentProviders/Adyen/ExpatriatedMessages/Authorisation.php M PaymentProviders/Adyen/ExpatriatedMessages/Capture.php M PaymentProviders/Adyen/ExpatriatedMessages/Chargeback.php M PaymentProviders/Adyen/ExpatriatedMessages/NotificationOfChargeback.php M PaymentProviders/Adyen/ExpatriatedMessages/RequestForInformation.php M PaymentProviders/Adyen/Jobs/DownloadReportJob.php M PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php M PaymentProviders/Adyen/ReferenceData.php M PaymentProviders/Adyen/WSDL/Payment.php M PaymentProviders/Amazon/Actions/AddMessageToQueue.php M PaymentProviders/Amazon/Actions/AssociateRefundParent.php M PaymentProviders/Amazon/AmazonApi.php M PaymentProviders/Amazon/AmazonListener.php M PaymentProviders/Amazon/Audit/DownloadReports.php M PaymentProviders/Amazon/ExpatriatedMessages/AmazonMessage.php M PaymentProviders/AstroPay/AstroPayListener.php M PaymentProviders/AstroPay/Audit/AstroPayAudit.php M PaymentProviders/AstroPay/ExpatriatedMessages/AstroPayMessage.php M PaymentProviders/GlobalCollect/ExpatriatedMessages/GlobalCollectMessage.php M PaymentProviders/GlobalCollect/ExpatriatedMessages/PaymentMessage.php M PaymentProviders/Worldpay/Audit/LynkReconciliationFile.php M PaymentProviders/Worldpay/Audit/TransactionReconciliationFile.php M PaymentProviders/Worldpay/Audit/WorldpayAudit.php M PaymentProviders/Worldpay/Audit/WpgReconciliationFile.php M PublicHttp/smashpig_http_handler.php M Tests/MessageTest.php M Tests/MockDataStore.php M Tests/bootstrap-phpunit.php M config_defaults.php 65 files changed, 261 insertions(+), 224 deletions(-) Approvals: Ejegg: Looks good to me, approved jenkins-bot: Verified diff --git a/Core/Actions/IListenerMessageAction.php b/Core/Actions/IListenerMessageAction.php index 8457a7c..167a005 100644 --- a/Core/Actions/IListenerMessageAction.php +++ b/Core/Actions/IListenerMessageAction.php @@ -13,4 +13,4 @@ * @return bool True if action was successful */ public function execute( ListenerMessage $msg ); -} \ No newline at end of file +} diff --git a/Core/Configuration.php b/Core/Configuration.php index 0c06644..53631bf 100644 --- a/Core/Configuration.php +++ b/Core/Configuration.php @@ -71,9 +71,9 @@ // Attempt to load the configuration files from disk global $config_defaults, $config; - require( $defaultFile ); + require ( $defaultFile ); if ( $overrideFile && file_exists( $overrideFile ) ) { - include( $overrideFile ); + include ( $overrideFile ); } // Now that we have the files we must merge four things in the following order: diff --git a/Core/Context.php b/Core/Context.php index ec0bafd..bc7a906 100644 --- a/Core/Context.php +++ b/Core/Context.php @@ -1,5 +1,6 @@ <?php namespace SmashPig\Core; + use SmashPig\Core\Logging\Logger; /** diff --git a/Core/DataFiles/CsvReader.php b/Core/DataFiles/CsvReader.php index d3affad..8f3f963 100644 --- a/Core/DataFiles/CsvReader.php +++ b/Core/DataFiles/CsvReader.php @@ -5,7 +5,7 @@ * @var int Maximum length of line to read from the CSV file. */ protected $maxRowLength = 4096; - + /** * @var resource The pointer to the cvs file. */ diff --git a/Core/DataFiles/DataFileException.php b/Core/DataFiles/DataFileException.php index 061d9c4..6217fca 100644 --- a/Core/DataFiles/DataFileException.php +++ b/Core/DataFiles/DataFileException.php @@ -4,4 +4,4 @@ class DataFileException extends SmashPigException { -} \ No newline at end of file +} diff --git a/Core/DataFiles/HeadedCsvReader.php b/Core/DataFiles/HeadedCsvReader.php index 58ef42e..396009f 100644 --- a/Core/DataFiles/HeadedCsvReader.php +++ b/Core/DataFiles/HeadedCsvReader.php @@ -19,7 +19,7 @@ } // Extract the header information $this->colNames = parent::current(); - foreach( $this->colNames as $index => $name ) { + foreach ( $this->colNames as $index => $name ) { if ( isset( $this->colIndexes[$name] ) ) { throw new DataFileException( "Duplicate column name {$name}!" ); } diff --git a/Core/DataStores/DiskFileDataStore.php b/Core/DataStores/DiskFileDataStore.php index 1d2ab77..878c54a 100644 --- a/Core/DataStores/DiskFileDataStore.php +++ b/Core/DataStores/DiskFileDataStore.php @@ -76,7 +76,7 @@ $this->addKeyedLinkingFile( 'class', get_class( $obj ), $objFileName, $objFsPath ); /* --- Everything else --- */ - foreach( $keys as $key => $value ) { + foreach ( $keys as $key => $value ) { $this->addKeyedLinkingFile( $key, $value, $objFileName, $objFsPath ); } } @@ -110,7 +110,7 @@ // It's a match! DELETE IT ALL! unlink( $this->objectsPath . '/' . $filename ); $this->removeKeyedLinkingFile( 'class', $className, $filename ); - foreach( explode( '.', $filename ) as $key ) { + foreach ( explode( '.', $filename ) as $key ) { $parts = explode( '=', $key ); if ( count( $parts ) === 2 ) { $this->removeKeyedLinkingFile( $parts[0], $parts[1], $filename ); @@ -158,7 +158,7 @@ // Now delete everything unlink( $objPath ); $this->removeKeyedLinkingFile( 'class', $className, $filename ); - foreach( explode( '.', $filename ) as $key ) { + foreach ( explode( '.', $filename ) as $key ) { $parts = explode( '=', $key ); if ( count( $parts ) === 2 ) { $this->removeKeyedLinkingFile( $parts[0], $parts[1], $filename ); diff --git a/Core/DataStores/KeyedOpaqueDataStore.php b/Core/DataStores/KeyedOpaqueDataStore.php index ab049f6..f3adc59 100644 --- a/Core/DataStores/KeyedOpaqueDataStore.php +++ b/Core/DataStores/KeyedOpaqueDataStore.php @@ -67,4 +67,4 @@ * Acknowledges and replaces into the backing data store the current queue object */ abstract public function queueIgnoreObject(); -} \ No newline at end of file +} diff --git a/Core/DataStores/NullDataStore.php b/Core/DataStores/NullDataStore.php index d8ad558..36d3068 100644 --- a/Core/DataStores/NullDataStore.php +++ b/Core/DataStores/NullDataStore.php @@ -67,4 +67,4 @@ */ public function queueIgnoreObject() { } -} \ No newline at end of file +} diff --git a/Core/DataStores/StompDataStore.php b/Core/DataStores/StompDataStore.php index f5147f0..4d145df 100644 --- a/Core/DataStores/StompDataStore.php +++ b/Core/DataStores/StompDataStore.php @@ -128,7 +128,7 @@ $bodyJson = $obj->toJson(); try { $this->addObjectRaw( $bodyJson, $headers ); - } catch ( DataStoreException $ex ) { + } catch ( DataStoreException $ex ) { Logger::error( "Could not queue message ({$objClass}) with id '{$objKeys[ 'correlationId' ]}' to '{$this->queue_id}' on '{$this->uri}'", $bodyJson @@ -282,7 +282,7 @@ } return $classObj; - } else if ( $msgObj && !$deserialize ) { + } elseif ( $msgObj && !$deserialize ) { return array( 'headers' => $msgObj->headers, 'body' => $msgObj->body, diff --git a/Core/Http/RequestHandler.php b/Core/Http/RequestHandler.php index 4dbb0b0..eeef336 100644 --- a/Core/Http/RequestHandler.php +++ b/Core/Http/RequestHandler.php @@ -76,7 +76,7 @@ set_error_handler( '\SmashPig\Core\Http\RequestHandler::lastChanceErrorHandler' ); set_exception_handler( '\SmashPig\Core\Http\RequestHandler::lastChanceExceptionHandler' ); - register_shutdown_function('\SmashPig\Core\Http\RequestHandler::shutdownHandler'); + register_shutdown_function( '\SmashPig\Core\Http\RequestHandler::shutdownHandler' ); // Check to make sure there's even a point to continuing Logger::info( "Starting processing for request, configuration view: '$view', action: '$action'" ); @@ -116,7 +116,7 @@ public static function shutdownHandler() { $lastError = error_get_last(); if ( $lastError and $lastError['type'] === E_ERROR ) { - Logger::alert("Fatal error caught by shutdown handler. ({$lastError['type']}) {$lastError['message']} @ {$lastError['file']}:{$lastError['line']}"); + Logger::alert( "Fatal error caught by shutdown handler. ({$lastError['type']}) {$lastError['message']} @ {$lastError['file']}:{$lastError['line']}" ); } } diff --git a/Core/Http/Response.php b/Core/Http/Response.php index 06b3f7b..09a3428 100644 --- a/Core/Http/Response.php +++ b/Core/Http/Response.php @@ -20,4 +20,4 @@ public function getOutputDisabled() { return $this->outputDisabled; } -} \ No newline at end of file +} diff --git a/Core/Jobs/RunnableJob.php b/Core/Jobs/RunnableJob.php index 4635806..920ace2 100644 --- a/Core/Jobs/RunnableJob.php +++ b/Core/Jobs/RunnableJob.php @@ -3,5 +3,5 @@ use \SmashPig\Core\DataStores\KeyedOpaqueStorableObject; abstract class RunnableJob extends KeyedOpaqueStorableObject { - public abstract function execute(); + abstract public function execute(); } diff --git a/Core/Listeners/RestListener.php b/Core/Listeners/RestListener.php index f8e5a7d..5068ef5 100644 --- a/Core/Listeners/RestListener.php +++ b/Core/Listeners/RestListener.php @@ -17,9 +17,9 @@ if ( is_array( $msgs ) ) { foreach ( $msgs as $msg ) { - //FIXME: this looks like an elaborate try-catch. If there's - //a fatal exception, the remaining messages are toast anyway, - //so we should... do something different here. + // FIXME: this looks like an elaborate try-catch. If there's + // a fatal exception, the remaining messages are toast anyway, + // so we should... do something different here. $this->inflightStore->addObject( $msg ); if ( $this->processMessage( $msg ) ) { $this->inflightStore->removeObjects( $msg ); diff --git a/Core/Logging/LogContextHandler.php b/Core/Logging/LogContextHandler.php index fa8374e..50fc794 100644 --- a/Core/Logging/LogContextHandler.php +++ b/Core/Logging/LogContextHandler.php @@ -19,7 +19,7 @@ $this->contextString = self::createQualifiedContextName( $this->contextNames ); $this->logStreams = $logStreams; - foreach( $this->logStreams as $stream ) { + foreach ( $this->logStreams as $stream ) { $stream->registerContextHandler( $this ); $stream->enterContext( $this->contextNames ); } @@ -32,7 +32,7 @@ // This acts as an implicit leaveContext() because it wont allow us to leave // the final context. - foreach( $this->logStreams as $stream ) { + foreach ( $this->logStreams as $stream ) { $stream->shutdown(); } } @@ -94,7 +94,7 @@ */ public function addEventToContext( LogEvent $event ) { $this->contextData[ 0 ][ ] = $event; - foreach( $this->logStreams as $stream ) { + foreach ( $this->logStreams as $stream ) { $stream->processEvent( $event ); } } @@ -110,7 +110,7 @@ */ public function leaveContext() { if ( count( $this->contextNames ) > 1 ) { - foreach( $this->logStreams as $stream ) { + foreach ( $this->logStreams as $stream ) { $stream->leaveContext( $this->contextNames ); } @@ -150,4 +150,4 @@ public static function createQualifiedContextName( $contextStack ) { return implode( '::', array_reverse( $contextStack ) ); } -} \ No newline at end of file +} diff --git a/Core/Logging/LogEvent.php b/Core/Logging/LogEvent.php index 34454d2..3d2e43b 100644 --- a/Core/Logging/LogEvent.php +++ b/Core/Logging/LogEvent.php @@ -54,7 +54,8 @@ try { $jdata = $data->toJson(); } - catch( DataSerializationException $ex ) {} + catch ( DataSerializationException $ex ) { + } } else { $jdata = json_encode( $data ); } diff --git a/Core/Logging/LogStreams/ConsoleLogStream.php b/Core/Logging/LogStreams/ConsoleLogStream.php index 8265c4a..f527840 100644 --- a/Core/Logging/LogStreams/ConsoleLogStream.php +++ b/Core/Logging/LogStreams/ConsoleLogStream.php @@ -32,11 +32,11 @@ public function processEvent( LogEvent $event ) { $name = $this->levelNames[ $event->level ]; - print( sprintf( "%s [%-7s] {%s} %s\n", $event->datestring, $name, $this->contextName, $event->message ) ); + print ( sprintf( "%s [%-7s] {%s} %s\n", $event->datestring, $name, $this->contextName, $event->message ) ); $expStr = implode( "\n\t", $event->getExceptionBlob() ); if ( $expStr ) { - print( $expStr . "\n" ); + print ( $expStr . "\n" ); } } @@ -67,7 +67,8 @@ * @param string[] $contextNames Stack of context names. $contextName[0] is * the new name of the current context */ - public function leaveContext( $contextNames ) { } + public function leaveContext( $contextNames ) { + } /** * Notification callback that the logging infrastructure is shutting down diff --git a/Core/Logging/LogStreams/FailmailLogStream.php b/Core/Logging/LogStreams/FailmailLogStream.php index df11b0a..fb74243 100644 --- a/Core/Logging/LogStreams/FailmailLogStream.php +++ b/Core/Logging/LogStreams/FailmailLogStream.php @@ -120,9 +120,9 @@ $body = array( "A problem has developed in SmashPig -- the available context is shown below. Data " . "objects are excluded for security but may be found in alternative log streams if configured.\n\n" . "NOTE: Additional errors may have occurred this session, but this email will only be sent " - . "once. Check log streams for additional errors in this session.\n"); + . "once. Check log streams for additional errors in this session.\n" ); - foreach( $events as $event ) { + foreach ( $events as $event ) { $name = $this->levels[ $event->level ]; if ( $event->tag ) { $body[] = sprintf( diff --git a/Core/Logging/LogStreams/ILogStream.php b/Core/Logging/LogStreams/ILogStream.php index 7a60d1f..8be7b98 100644 --- a/Core/Logging/LogStreams/ILogStream.php +++ b/Core/Logging/LogStreams/ILogStream.php @@ -49,4 +49,4 @@ * Notification callback that the logging infrastructure is shutting down */ public function shutdown(); -} \ No newline at end of file +} diff --git a/Core/Logging/LogStreams/SyslogLogStream.php b/Core/Logging/LogStreams/SyslogLogStream.php index 1bc0f84..aa0b145 100644 --- a/Core/Logging/LogStreams/SyslogLogStream.php +++ b/Core/Logging/LogStreams/SyslogLogStream.php @@ -25,7 +25,8 @@ * * @param LogContextHandler $ch Context handler object */ - public function registerContextHandler( LogContextHandler $ch ) { } + public function registerContextHandler( LogContextHandler $ch ) { + } /** * Process a new event into the log stream. @@ -54,7 +55,7 @@ public function enterContext( $contextNames ) { $this->rootContext = array_slice( $contextNames, -1 ); $this->additionalContext = LogContextHandler::createQualifiedContextName( - array_slice( $contextNames, 0, -1) + array_slice( $contextNames, 0, -1 ) ); } @@ -68,7 +69,7 @@ public function renameContext( $contextNames, $oldTopName ) { $this->rootContext = array_slice( $contextNames, -1 ); $this->additionalContext = LogContextHandler::createQualifiedContextName( - array_slice( $contextNames, 0, -1) + array_slice( $contextNames, 0, -1 ) ); } @@ -82,12 +83,13 @@ public function leaveContext( $contextNames ) { // We assume here that the root context will not have changed! $this->additionalContext = LogContextHandler::createQualifiedContextName( - array_slice( $contextNames, 1, -1) + array_slice( $contextNames, 1, -1 ) ); } /** * Notification callback that the logging infrastructure is shutting down */ - public function shutdown() { } + public function shutdown() { + } } diff --git a/Core/Logging/LogStreams/TaggedFileLogStream.php b/Core/Logging/LogStreams/TaggedFileLogStream.php index c723582..71f02e4 100644 --- a/Core/Logging/LogStreams/TaggedFileLogStream.php +++ b/Core/Logging/LogStreams/TaggedFileLogStream.php @@ -32,7 +32,8 @@ * * @param LogContextHandler $ch Context handler object */ - public function registerContextHandler( LogContextHandler $ch ) { } + public function registerContextHandler( LogContextHandler $ch ) { + } /** * Process a new event into the log stream. @@ -86,5 +87,6 @@ /** * Notification callback that the logging infrastructure is shutting down */ - public function shutdown() { } + public function shutdown() { + } } diff --git a/Core/Logging/TaggedLogger.php b/Core/Logging/TaggedLogger.php index 0b3c6f8..55aa740 100644 --- a/Core/Logging/TaggedLogger.php +++ b/Core/Logging/TaggedLogger.php @@ -139,4 +139,4 @@ public function debug( $msg, $data = null, $ex = null ) { $this->context->addEventToContext( new LogEvent( LOG_DEBUG, $msg, $this->tag, $data, $ex ) ); } -} \ No newline at end of file +} diff --git a/Core/Messages/ListenerMessage.php b/Core/Messages/ListenerMessage.php index f057120..810f9b9 100644 --- a/Core/Messages/ListenerMessage.php +++ b/Core/Messages/ListenerMessage.php @@ -17,7 +17,7 @@ * * @return bool True if the message was complete and can be processed */ - public abstract function validate(); + abstract public function validate(); /** * Will run all the actions that are loaded (from the 'actions' configuration @@ -55,4 +55,4 @@ return $retval; } -} \ No newline at end of file +} diff --git a/Core/UtcDate.php b/Core/UtcDate.php index b2ef976..ad18e80 100644 --- a/Core/UtcDate.php +++ b/Core/UtcDate.php @@ -11,7 +11,7 @@ $obj = new DateTime( $dateString, new DateTimeZone( $timeZone ) ); return $obj->getTimestamp(); } catch ( Exception $ex ) { - Logger::warning ( 'Caught date exception: ' . $ex->getMessage(), $dateString ); + Logger::warning( 'Caught date exception: ' . $ex->getMessage(), $dateString ); return null; } } diff --git a/Maintenance/EmptyQueueToDump.php b/Maintenance/EmptyQueueToDump.php index ea57bd6..6440a42 100644 --- a/Maintenance/EmptyQueueToDump.php +++ b/Maintenance/EmptyQueueToDump.php @@ -1,6 +1,6 @@ <?php namespace SmashPig\Maintenance; -require( 'MaintenanceBase.php' ); +require ( 'MaintenanceBase.php' ); use SmashPig\Core\DataStores\DataSerializationException; use SmashPig\Core\Logging\Logger; @@ -79,7 +79,7 @@ } else { fwrite( $f, get_class( $queueObj ) . "=" . $queueObj->toJson( false ) . "\n" ); } - } catch( DataSerializationException $ex ) { + } catch ( DataSerializationException $ex ) { // We probably caught an anti-message here; log the exception and continue on Logger::warning( "Possibly caught an antimessage. Not adding to file.", null, $ex ); } @@ -102,4 +102,4 @@ } -require( RUN_MAINTENANCE_IF_MAIN ); +require ( RUN_MAINTENANCE_IF_MAIN ); diff --git a/Maintenance/ExampleScript.php b/Maintenance/ExampleScript.php index 8c007a7..e6ec265 100644 --- a/Maintenance/ExampleScript.php +++ b/Maintenance/ExampleScript.php @@ -1,6 +1,6 @@ <?php namespace SmashPig\Maintenance; -require( 'MaintenanceBase.php' ); +require ( 'MaintenanceBase.php' ); use SmashPig\Core\Logging\Logger; @@ -32,4 +32,4 @@ } -require( RUN_MAINTENANCE_IF_MAIN ); \ No newline at end of file +require ( RUN_MAINTENANCE_IF_MAIN ); diff --git a/Maintenance/MaintenanceBase.php b/Maintenance/MaintenanceBase.php index 1ef902f..6b1d53d 100644 --- a/Maintenance/MaintenanceBase.php +++ b/Maintenance/MaintenanceBase.php @@ -1,4 +1,5 @@ <?php namespace SmashPig\Maintenance; + /** * Base include file for all PHP maintenance scripts. * @@ -21,7 +22,7 @@ define( "SMASHPIG_ENTRY_POINT", $argv[0] ); $root = __DIR__ . '/../'; - require_once( $root . 'vendor/autoload.php' ); + require_once ( $root . 'vendor/autoload.php' ); /** @var MaintenanceBase $maintClass Set this to the name of the class to execute */ $maintClass = false; @@ -35,7 +36,9 @@ /** Const for getStdin() **/ const STDIN_ALL = 'all'; - /** @var array Desired parameters. Keys are long names, values are arrays with keys 'desc', 'default', and 'alias' */ + /** @var array Desired parameters. Keys are long names, values are arrays + * with keys 'desc', 'default', and 'alias' + */ protected $desiredOptions = array(); /** @var array Map aliased parameter names to long ones, e.g. -h -> --help */ @@ -162,8 +165,10 @@ protected function addDefaultParams() { $this->addOption( 'help', 'Display this help message', null, 'h' ); $this->addOption( 'config-file', 'Path to additional configuration file', false ); - $this->addOption( 'config-node', 'Specific configuration node to load, if not default', 'default' ); - $this->addOption( 'memory-limit', 'Set a specific memory limit for the script, "max" for no limit', 'default' ); + $this->addOption( 'config-node', + 'Specific configuration node to load, if not default', 'default' ); + $this->addOption( 'memory-limit', + 'Set a specific memory limit for the script, "max" for no limit', 'default' ); } /** @@ -172,9 +177,12 @@ * * @param string $name Long name of the param, used with -- (ie help, version, etc) * @param string $description Description of the param to show on --help - * @param mixed $default Value given back to the script if no argument is given. If this remains null - * the option is treated as a boolean with no argument expected; returning true - * if the option is present in the command line string. + * @param mixed $default Value given back to the script if no + * argument is given. If this remains null the + * option is treated as a boolean with no + * argument expected; returning true if the + * option is present in the command line + * string. * @param string $alias Optional character to use as short name, used with - */ protected function addOption( $name, $description, $default = null, $alias = false ) { @@ -189,7 +197,8 @@ if ( $alias ) { if ( in_array( $alias, $this->aliasParamsMap ) ) { - throw new \SmashPig\Core\SmashPigException( "Option '$name' cannot take alias '$alias'. Already in use." ); + throw new SmashPigException( + "Option '$name' cannot take alias '$alias'. Already in use." ); } $this->aliasParamsMap[$alias] = $name; } @@ -234,8 +243,9 @@ * * @param string $arg Name of the argument, like 'start' * @param string $description Description of the argument - * @param bool $required If true and the argument is not provided, will not execute the script. Instead - * will display the help message. + * @param bool $required If true and the argument is not provided, + * will not execute the script. Instead will + * display the help message. * * @throws SmashPigException if an argument is required after an optional argument */ @@ -245,7 +255,8 @@ reset( $this->expectedArguments ); if ( ( $last !== false ) && ( $last['required'] == false ) && $required ) { - throw new SmashPigException( "May not add a required argument after optional arguments already in the stack." ); + throw new SmashPigException( + "May not add a required argument after optional arguments already in the stack." ); } $this->expectedArguments[] = array( @@ -282,7 +293,8 @@ if ( array_key_exists( $id, $this->expectedArgumentIdMap ) ) { $id = $this->expectedArgumentIdMap[$id]; } else { - throw new SmashPigException( "Requested named argument '{$id}' was not registered with addArgument()" ); + throw new SmashPigException( + "Requested named argument '{$id}' was not registered with addArgument()" ); } } return $this->hasArgument( $id ) ? $this->args[$id] : $default; @@ -317,7 +329,7 @@ if ( !array_key_exists( $option, $this->aliasParamsMap ) || !array_key_exists( $this->aliasParamsMap[$option], $this->desiredOptions ) ) { - print( "\nERROR: $option parameter was not expected\n" ); + print ( "\nERROR: $option parameter was not expected\n" ); $this->helpIfRequested( true ); } else { $option = $this->aliasParamsMap[$option]; @@ -325,7 +337,7 @@ } if ( array_key_exists( $option, $this->options ) ) { - print( "\nERROR: $option parameter given twice!\n" ); + print ( "\nERROR: $option parameter given twice!\n" ); $this->helpIfRequested( true ); } @@ -335,7 +347,7 @@ // Expecting parameter $param = next( $argv_local ); if ( $param === false ) { - print( "\nERROR: $option parameter requires a value\n" ); + print ( "\nERROR: $option parameter requires a value\n" ); $this->helpIfRequested( true ); } @@ -349,7 +361,7 @@ $this->options[$option] = $param; } else { - print( "\nERROR: $option parameter was not expected\n" ); + print ( "\nERROR: $option parameter was not expected\n" ); $this->helpIfRequested( true ); } } else { @@ -361,9 +373,11 @@ // Validate number of required arguments $count = 0; - array_walk( $this->expectedArguments, function($el) use (&$count) { $count += $el['required'] ? 1 : 0; } ); + array_walk( $this->expectedArguments, function( $el ) use ( &$count ) { + $count += $el['required'] ? 1 : 0; + } ); if ( count( $this->args ) < $count ) { - print( "\nERROR: Script expects $count arguments." ); + print ( "\nERROR: Script expects $count arguments." ); $this->helpIfRequested( true ); } @@ -444,7 +458,7 @@ * @param $force boolean Whether to force the help to show, default false */ protected function helpIfRequested( $force = false ) { - if( !$force && !$this->getOption( 'help' ) ) { + if ( !$force && !$this->getOption( 'help' ) ) { return; } @@ -458,23 +472,23 @@ // Print description if ( $this->description ) { - print( "\n" . $this->description . "\n" ); + print ( "\n" . $this->description . "\n" ); } // Usage string - print( "Usage {$this->scriptName} [OPTIONS] " ); + print ( "Usage {$this->scriptName} [OPTIONS] " ); foreach ( $this->expectedArguments as $arg ) { if ( $arg['required'] ) { - print( "<" . $arg['name'] ."> " ); + print ( "<" . $arg['name'] ."> " ); } else { - print( "[" . $arg['name'] . "] " ); + print ( "[" . $arg['name'] . "] " ); } } - print( "\n" ); + print ( "\n" ); // Describe arguments if ( count( $this->expectedArguments ) > 0 ) { - print( "\nArguments: \n" ); + print ( "\nArguments: \n" ); foreach ( $this->expectedArguments as $arg ) { $str = $tab . $arg['name']; $str = str_pad( $str, $nameWidth - count( $str ), ' ' ); @@ -482,13 +496,13 @@ $str .= "\n" . str_pad( '', $nameWidth, ' ' ); } $str .= wordwrap( $arg['desc'], $descWidth, "\n$namePad", true ); - print( $str . "\n" ); + print ( $str . "\n" ); } } // Describe options if ( count( $this->desiredOptions ) > 0 ) { - print( "\nOptions: \n" ); + print ( "\nOptions: \n" ); foreach ( $this->desiredOptions as $name => $opt ) { $str = $tab . '--' . $name; if ( $opt['alias'] ) { @@ -503,7 +517,7 @@ $str .= "\n" . str_pad( '', $nameWidth, ' ' ); } $str .= wordwrap( $opt['desc'], $descWidth, "\n$namePad", true ); - print( $str . "\n" ); + print ( $str . "\n" ); } } @@ -563,8 +577,8 @@ } /** - * Hook from set_exception_handler(). Will clear output data, set the HTTP status to 500: Internal Error - * and then die. + * Hook from set_exception_handler(). Will clear output data, set the HTTP + * status to 500: Internal Error and then die. * * @param \Exception $ex The uncaught exception */ diff --git a/Maintenance/PopulateQueueFromDump.php b/Maintenance/PopulateQueueFromDump.php index 93f79ad..4e78f96 100644 --- a/Maintenance/PopulateQueueFromDump.php +++ b/Maintenance/PopulateQueueFromDump.php @@ -1,6 +1,6 @@ <?php namespace SmashPig\Maintenance; -require( 'MaintenanceBase.php' ); +require ( 'MaintenanceBase.php' ); use SmashPig\Core\Logging\Logger; use SmashPig\Core\DataStores\StompDataStore; @@ -19,7 +19,8 @@ public function __construct() { parent::__construct(); $this->addOption( 'queue', 'queue name to inject into', 'test' ); - $this->addArgument( 'file', 'File, created by EmptyQueueToDump, with JSON format messages to inject', true ); + $this->addArgument( 'file', + 'File, created by EmptyQueueToDump, with JSON format messages to inject', true ); } /** @@ -56,10 +57,10 @@ $messageCount++; if ( $messageCount % 1000 == 0 ) { - print( '.' ); + print ( '.' ); } } - print( '\n' ); + print ( '\n' ); $elapsedTime = time() - $startTime; Logger::info( @@ -69,4 +70,4 @@ } -require( RUN_MAINTENANCE_IF_MAIN ); +require ( RUN_MAINTENANCE_IF_MAIN ); diff --git a/Maintenance/StompJobRunner.php b/Maintenance/StompJobRunner.php index 167c237..acf9c30 100644 --- a/Maintenance/StompJobRunner.php +++ b/Maintenance/StompJobRunner.php @@ -1,6 +1,6 @@ <?php namespace SmashPig\Maintenance; -require( 'MaintenanceBase.php' ); +require ( 'MaintenanceBase.php' ); use SmashPig\Core\Logging\Logger; use SmashPig\Core\DataStores\StompDataStore; @@ -52,14 +52,16 @@ if ( $jobObj->execute() ) { $success = true; } else { - Logger::info( "Job tells us that it did not successfully execute. Sending to damaged message queue." ); + Logger::info( "Job tells us that it did not successfully " + . "execute. Sending to damaged message queue." ); } } catch ( Exception $ex ) { Logger::error( "Job threw exception. Sending to damaged message queue.", null, $ex ); } } else { Logger::warning( - get_class( $jobObj ) . " is not an instance of RunnableJob. Could not execute and sending to damaged message queue." + get_class( $jobObj ) . " is not an instance of RunnableJob. " + . "Could not execute and sending to damaged message queue." ); } if ( $success ) { @@ -83,4 +85,4 @@ } -require( RUN_MAINTENANCE_IF_MAIN ); +require ( RUN_MAINTENANCE_IF_MAIN ); diff --git a/Maintenance/TestDatastore.php b/Maintenance/TestDatastore.php index 6f5c748..b5c2d55 100644 --- a/Maintenance/TestDatastore.php +++ b/Maintenance/TestDatastore.php @@ -1,6 +1,6 @@ <?php namespace SmashPig\Maintenance; -require( 'MaintenanceBase.php' ); +require ( 'MaintenanceBase.php' ); use SmashPig\Core\Configuration; use SmashPig\Core\Context; @@ -42,7 +42,7 @@ $this->testObjects[] = TestObject::factory(); } // And repeat the objects and inject so we have something else to find - foreach( $this->testObjects as $obj ) { + foreach ( $this->testObjects as $obj ) { $this->datastore->addObject( $obj ); $this->datastore->addObject( TestObject::factory( $obj->correlationId ) ); } @@ -55,19 +55,26 @@ 'data-store/' . $this->getArgument( 0, 'test' ), false ); - foreach( $this->testObjects as $obj ) { + foreach ( $this->testObjects as $obj ) { $obj1 = $this->datastore->queueGetObject( null, $obj->correlationId ); - if ( $obj1 !== null ) { $this->datastore->queueAckObject(); } - else { $this->error( "Could not find original object with id {$obj->correlationId}" ); continue; } + if ( $obj1 !== null ) { $this->datastore->queueAckObject(); + } + else { $this->error( "Could not find original object with id {$obj->correlationId}" ); +continue; + } $obj2 = $this->datastore->queueGetObject( null, $obj->correlationId ); - if ( $obj2 !== null ) { $this->datastore->queueAckObject(); } - else { $this->error( "Could not find secondary object with id {$obj->correlationId}" ); continue; } + if ( $obj2 !== null ) { $this->datastore->queueAckObject(); + } + else { $this->error( "Could not find secondary object with id {$obj->correlationId}" ); +continue; + } $obj3 = $this->datastore->queueGetObject( null, $obj->correlationId ); if ( $obj3 !== null ) { $this->datastore->queueAckObject(); - $this->error( "Found tertiary object with id {$obj3->correlationId} while looking for id {$obj->correlationId}" ); + $this->error( "Found tertiary object with id {$obj3->correlationId} " + . "while looking for id {$obj->correlationId}" ); continue; } @@ -83,7 +90,9 @@ } class TestObject extends KeyedOpaqueStorableObject { - /** @var array List of object properties that can be considered 'identifying' or 'filtering' properties */ + /** @var array List of object properties that can be considered + * 'identifying' or 'filtering' properties + */ protected $propertiesExportedAsKeys = array( 'correlationId', 'testkey1', 'testkey2' ); public $testkey1 = null; @@ -99,4 +108,4 @@ } } -require( RUN_MAINTENANCE_IF_MAIN ); +require ( RUN_MAINTENANCE_IF_MAIN ); diff --git a/Maintenance/TestFailMail.php b/Maintenance/TestFailMail.php index 62806ae..5c0b989 100644 --- a/Maintenance/TestFailMail.php +++ b/Maintenance/TestFailMail.php @@ -1,6 +1,6 @@ <?php namespace SmashPig\Maintenance; -require( 'MaintenanceBase.php' ); +require ( 'MaintenanceBase.php' ); use SmashPig\Core\Logging\Logger; use SmashPig\Core\DataStores\StompDataStore; @@ -35,4 +35,4 @@ } } -require( RUN_MAINTENANCE_IF_MAIN ); +require ( RUN_MAINTENANCE_IF_MAIN ); diff --git a/Maintenance/doMaintenance.php b/Maintenance/doMaintenance.php index a2b3791..d8507a4 100644 --- a/Maintenance/doMaintenance.php +++ b/Maintenance/doMaintenance.php @@ -1,18 +1,19 @@ <?php namespace SmashPig\Maintenance; + use SmashPig\Core\Context; if ( !defined( 'RUN_MAINTENANCE_IF_MAIN' ) ) { - print( "This file must be included after MaintenanceBase.php\n" ); + print ( "This file must be included after MaintenanceBase.php\n" ); exit( 1 ); } // Wasn't included from the file scope, halt execution (probably wanted the class) -if( !MaintenanceBase::shouldExecute() ) { +if ( !MaintenanceBase::shouldExecute() ) { return; } if ( !$maintClass || !class_exists( $maintClass ) ) { - print( "Cannot find maintenance class '$maintClass'; have you remembered to set it?\n" ); + print ( "Cannot find maintenance class '$maintClass'; have you remembered to set it?\n" ); exit( 1 ); } @@ -25,7 +26,7 @@ // Now that we have a config node, check for disablement $config = Context::get()->getConfiguration(); if ( $config->nodeExists( 'disabled' ) && $config->val( 'disabled' ) ) { - print( 'Processor disabled, will not execute.' ); + print ( 'Processor disabled, will not execute.' ); exit( 1 ); } @@ -35,6 +36,6 @@ exit( (int)$retval ); } } else { - print( "$maintClass is not a derivative of MaintenanceBase. Cannot execute.\n" ); + print ( "$maintClass is not a derivative of MaintenanceBase. Cannot execute.\n" ); exit( 1 ); } diff --git a/PaymentProviders/Adyen/Actions/PaymentCaptureAction.php b/PaymentProviders/Adyen/Actions/PaymentCaptureAction.php index 088b0df..e18d722 100644 --- a/PaymentProviders/Adyen/Actions/PaymentCaptureAction.php +++ b/PaymentProviders/Adyen/Actions/PaymentCaptureAction.php @@ -1,6 +1,6 @@ <?php namespace SmashPig\PaymentProviders\Adyen\Actions; -Use SmashPig\Core\Context; +use SmashPig\Core\Context; use SmashPig\Core\Logging\TaggedLogger; use SmashPig\Core\Messages\ListenerMessage; use SmashPig\Core\Actions\IListenerMessageAction; diff --git a/PaymentProviders/Adyen/AdyenListener.php b/PaymentProviders/Adyen/AdyenListener.php index 35da7a1..c41043e 100644 --- a/PaymentProviders/Adyen/AdyenListener.php +++ b/PaymentProviders/Adyen/AdyenListener.php @@ -24,7 +24,7 @@ ); public function __construct() { - require_once( 'WSDL/Notification.php' ); + require_once ( 'WSDL/Notification.php' ); parent::__construct(); } @@ -101,7 +101,7 @@ } } - Logger::info( 'Finished processing of IPN message, retuning accepted.'); + Logger::info( 'Finished processing of IPN message, retuning accepted.' ); $respstring = '[accepted]'; } else { diff --git a/PaymentProviders/Adyen/AdyenPaymentsAPI.php b/PaymentProviders/Adyen/AdyenPaymentsAPI.php index 74972a9..73d4072 100644 --- a/PaymentProviders/Adyen/AdyenPaymentsAPI.php +++ b/PaymentProviders/Adyen/AdyenPaymentsAPI.php @@ -13,7 +13,7 @@ protected $account = ''; public function setAccount( $account ) { - require_once( 'WSDL/Payment.php' ); + require_once ( 'WSDL/Payment.php' ); $this->account = $account; diff --git a/PaymentProviders/Adyen/Audit/AdyenAudit.php b/PaymentProviders/Adyen/Audit/AdyenAudit.php index e2b33f7..aa5063b 100644 --- a/PaymentProviders/Adyen/Audit/AdyenAudit.php +++ b/PaymentProviders/Adyen/Audit/AdyenAudit.php @@ -110,7 +110,7 @@ $parts = explode( '.', $row['Merchant Reference'] ); $msg['contribution_tracking_id'] = $parts[0]; - switch( $type ) { + switch ( $type ) { case 'settled': $this->parseDonation( $row, $msg ); break; diff --git a/PaymentProviders/Adyen/ExpatriatedMessages/Authorisation.php b/PaymentProviders/Adyen/ExpatriatedMessages/Authorisation.php index 3852e28..ba574c2 100644 --- a/PaymentProviders/Adyen/ExpatriatedMessages/Authorisation.php +++ b/PaymentProviders/Adyen/ExpatriatedMessages/Authorisation.php @@ -50,7 +50,7 @@ }; foreach ( $msgObj->additionalData->entry as $entry ) { - switch( $entry->key ) { + switch ( $entry->key ) { case 'cvcResult': $this->cvvResult = $firstSegment( $entry->value ); break; diff --git a/PaymentProviders/Adyen/ExpatriatedMessages/Capture.php b/PaymentProviders/Adyen/ExpatriatedMessages/Capture.php index 43c2afd..d23bca7 100644 --- a/PaymentProviders/Adyen/ExpatriatedMessages/Capture.php +++ b/PaymentProviders/Adyen/ExpatriatedMessages/Capture.php @@ -27,9 +27,9 @@ * * @param \SmashPig\PaymentProviders\Adyen\WSDL\NotificationRequestItem $msgObj */ - protected function constructFromWSDL( NotificationRequestItem $msgObj ) - { - parent::constructFromWSDL($msgObj); + protected function constructFromWSDL( NotificationRequestItem $msgObj ) { + + parent::constructFromWSDL( $msgObj ); $this->originalReference = $msgObj->originalReference; } @@ -53,4 +53,4 @@ return false; } } -} \ No newline at end of file +} diff --git a/PaymentProviders/Adyen/ExpatriatedMessages/Chargeback.php b/PaymentProviders/Adyen/ExpatriatedMessages/Chargeback.php index 3e5f2a4..4e20342 100644 --- a/PaymentProviders/Adyen/ExpatriatedMessages/Chargeback.php +++ b/PaymentProviders/Adyen/ExpatriatedMessages/Chargeback.php @@ -31,4 +31,4 @@ return false; } } -} \ No newline at end of file +} diff --git a/PaymentProviders/Adyen/ExpatriatedMessages/NotificationOfChargeback.php b/PaymentProviders/Adyen/ExpatriatedMessages/NotificationOfChargeback.php index a7267fd..12e8f6f 100644 --- a/PaymentProviders/Adyen/ExpatriatedMessages/NotificationOfChargeback.php +++ b/PaymentProviders/Adyen/ExpatriatedMessages/NotificationOfChargeback.php @@ -30,4 +30,4 @@ return false; } } -} \ No newline at end of file +} diff --git a/PaymentProviders/Adyen/ExpatriatedMessages/RequestForInformation.php b/PaymentProviders/Adyen/ExpatriatedMessages/RequestForInformation.php index 99d900f..2eb59d9 100644 --- a/PaymentProviders/Adyen/ExpatriatedMessages/RequestForInformation.php +++ b/PaymentProviders/Adyen/ExpatriatedMessages/RequestForInformation.php @@ -30,4 +30,4 @@ return false; } } -} \ No newline at end of file +} diff --git a/PaymentProviders/Adyen/Jobs/DownloadReportJob.php b/PaymentProviders/Adyen/Jobs/DownloadReportJob.php index afc33fe..0854899 100644 --- a/PaymentProviders/Adyen/Jobs/DownloadReportJob.php +++ b/PaymentProviders/Adyen/Jobs/DownloadReportJob.php @@ -57,19 +57,19 @@ } $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, $this->reportUrl); + curl_setopt( $ch, CURLOPT_URL, $this->reportUrl ); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, false); - curl_setopt($ch, CURLOPT_FILE, $fp ); + curl_setopt( $ch, CURLOPT_RETURNTRANSFER, false ); + curl_setopt( $ch, CURLOPT_FILE, $fp ); - curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); + curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1 ); - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); - curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); - curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY ); - curl_setopt($ch, CURLOPT_USERPWD, "{$user}:{$pass}" ); + curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, true ); + curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, 2 ); + curl_setopt( $ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY ); + curl_setopt( $ch, CURLOPT_USERPWD, "{$user}:{$pass}" ); - $result = curl_exec($ch); + $result = curl_exec( $ch ); $httpCode = curl_getinfo( $ch, CURLINFO_HTTP_CODE ); $error = curl_error( $ch ); curl_close( $ch ); diff --git a/PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php b/PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php index 7323071..c177634 100644 --- a/PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php +++ b/PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php @@ -68,7 +68,7 @@ $success = true; $action = $this->determineAction( $queueMessage ); - switch( $action ) { + switch ( $action ) { case self::ACTION_PROCESS: // Attempt to capture the payment $api = $this->getApi(); diff --git a/PaymentProviders/Adyen/ReferenceData.php b/PaymentProviders/Adyen/ReferenceData.php index 872dea7..fd5427f 100644 --- a/PaymentProviders/Adyen/ReferenceData.php +++ b/PaymentProviders/Adyen/ReferenceData.php @@ -101,4 +101,4 @@ } return array( $ourMethod, $ourSubmethod ); } -} \ No newline at end of file +} diff --git a/PaymentProviders/Adyen/WSDL/Payment.php b/PaymentProviders/Adyen/WSDL/Payment.php index 42c3316..4b58df8 100644 --- a/PaymentProviders/Adyen/WSDL/Payment.php +++ b/PaymentProviders/Adyen/WSDL/Payment.php @@ -496,13 +496,13 @@ 'Type' => 'Type', ); - public function Payment($wsdl = "https://pal-live.adyen.com/pal/Payment.wsdl", $options = array()) { - foreach(self::$classmap as $key => $value) { - if(!isset($options['classmap'][$key])) { + public function Payment( $wsdl = "https://pal-live.adyen.com/pal/Payment.wsdl", $options = array() ) { + foreach ( self::$classmap as $key => $value ) { + if ( !isset( $options['classmap'][$key] ) ) { $options['classmap'][$key] = $value; } } - parent::__construct($wsdl, $options); + parent::__construct( $wsdl, $options ); } /** @@ -511,8 +511,8 @@ * @param authorise $parameters * @return authoriseResponse */ - public function authorise(authorise $parameters) { - return $this->__soapCall('authorise', array($parameters), array( + public function authorise( authorise $parameters ) { + return $this->__soapCall( 'authorise', array( $parameters ), array( 'uri' => 'http://payment.services.adyen.com', 'soapaction' => '' ) @@ -525,8 +525,8 @@ * @param authorise3d $parameters * @return authorise3dResponse */ - public function authorise3d(authorise3d $parameters) { - return $this->__soapCall('authorise3d', array($parameters), array( + public function authorise3d( authorise3d $parameters ) { + return $this->__soapCall( 'authorise3d', array( $parameters ), array( 'uri' => 'http://payment.services.adyen.com', 'soapaction' => '' ) @@ -539,8 +539,8 @@ * @param authoriseReferral $parameters * @return authoriseReferralResponse */ - public function authoriseReferral(authoriseReferral $parameters) { - return $this->__soapCall('authoriseReferral', array($parameters), array( + public function authoriseReferral( authoriseReferral $parameters ) { + return $this->__soapCall( 'authoriseReferral', array( $parameters ), array( 'uri' => 'http://payment.services.adyen.com', 'soapaction' => '' ) @@ -553,8 +553,8 @@ * @param balanceCheck $parameters * @return balanceCheckResponse */ - public function balanceCheck(balanceCheck $parameters) { - return $this->__soapCall('balanceCheck', array($parameters), array( + public function balanceCheck( balanceCheck $parameters ) { + return $this->__soapCall( 'balanceCheck', array( $parameters ), array( 'uri' => 'http://payment.services.adyen.com', 'soapaction' => '' ) @@ -567,8 +567,8 @@ * @param cancel $parameters * @return cancelResponse */ - public function cancel(cancel $parameters) { - return $this->__soapCall('cancel', array($parameters), array( + public function cancel( cancel $parameters ) { + return $this->__soapCall( 'cancel', array( $parameters ), array( 'uri' => 'http://payment.services.adyen.com', 'soapaction' => '' ) @@ -581,8 +581,8 @@ * @param cancelOrRefund $parameters * @return cancelOrRefundResponse */ - public function cancelOrRefund(cancelOrRefund $parameters) { - return $this->__soapCall('cancelOrRefund', array($parameters), array( + public function cancelOrRefund( cancelOrRefund $parameters ) { + return $this->__soapCall( 'cancelOrRefund', array( $parameters ), array( 'uri' => 'http://payment.services.adyen.com', 'soapaction' => '' ) @@ -595,8 +595,8 @@ * @param capture $parameters * @return captureResponse */ - public function capture(capture $parameters) { - return $this->__soapCall('capture', array($parameters), array( + public function capture( capture $parameters ) { + return $this->__soapCall( 'capture', array( $parameters ), array( 'uri' => 'http://payment.services.adyen.com', 'soapaction' => '' ) @@ -609,8 +609,8 @@ * @param checkFraud $parameters * @return checkFraudResponse */ - public function checkFraud(checkFraud $parameters) { - return $this->__soapCall('checkFraud', array($parameters), array( + public function checkFraud( checkFraud $parameters ) { + return $this->__soapCall( 'checkFraud', array( $parameters ), array( 'uri' => 'http://payment.services.adyen.com', 'soapaction' => '' ) @@ -623,8 +623,8 @@ * @param directdebit $parameters * @return directdebitFuncResponse */ - public function directdebit(directdebit $parameters) { - return $this->__soapCall('directdebit', array($parameters), array( + public function directdebit( directdebit $parameters ) { + return $this->__soapCall( 'directdebit', array( $parameters ), array( 'uri' => 'http://payment.services.adyen.com', 'soapaction' => '' ) @@ -637,8 +637,8 @@ * @param fundTransfer $parameters * @return fundTransferResponse */ - public function fundTransfer(fundTransfer $parameters) { - return $this->__soapCall('fundTransfer', array($parameters), array( + public function fundTransfer( fundTransfer $parameters ) { + return $this->__soapCall( 'fundTransfer', array( $parameters ), array( 'uri' => 'http://payment.services.adyen.com', 'soapaction' => '' ) @@ -651,8 +651,8 @@ * @param refund $parameters * @return refundResponse */ - public function refund(refund $parameters) { - return $this->__soapCall('refund', array($parameters), array( + public function refund( refund $parameters ) { + return $this->__soapCall( 'refund', array( $parameters ), array( 'uri' => 'http://payment.services.adyen.com', 'soapaction' => '' ) @@ -665,8 +665,8 @@ * @param refundWithData $parameters * @return refundWithDataResponse */ - public function refundWithData(refundWithData $parameters) { - return $this->__soapCall('refundWithData', array($parameters), array( + public function refundWithData( refundWithData $parameters ) { + return $this->__soapCall( 'refundWithData', array( $parameters ), array( 'uri' => 'http://payment.services.adyen.com', 'soapaction' => '' ) diff --git a/PaymentProviders/Amazon/Actions/AddMessageToQueue.php b/PaymentProviders/Amazon/Actions/AddMessageToQueue.php index f392324..8803a6a 100644 --- a/PaymentProviders/Amazon/Actions/AddMessageToQueue.php +++ b/PaymentProviders/Amazon/Actions/AddMessageToQueue.php @@ -7,7 +7,7 @@ class AddMessageToQueue implements IListenerMessageAction { public function execute( ListenerMessage $msg ) { - //FIXME: I don't like this dispatch style + // FIXME: I don't like this dispatch style $destinationQueue = $msg->getDestinationQueue(); if ( $destinationQueue ) { diff --git a/PaymentProviders/Amazon/Actions/AssociateRefundParent.php b/PaymentProviders/Amazon/Actions/AssociateRefundParent.php index 0f5e83c..094ca66 100644 --- a/PaymentProviders/Amazon/Actions/AssociateRefundParent.php +++ b/PaymentProviders/Amazon/Actions/AssociateRefundParent.php @@ -23,7 +23,7 @@ $parentId = AmazonApi::findRefundParentId( $refundId ); $msg->setParentId( $parentId ); return true; - } catch( SmashPigException $ex ) { + } catch ( SmashPigException $ex ) { Logger::error( $ex->getMessage() ); return false; } diff --git a/PaymentProviders/Amazon/AmazonApi.php b/PaymentProviders/Amazon/AmazonApi.php index e7411b3..c028ed9 100644 --- a/PaymentProviders/Amazon/AmazonApi.php +++ b/PaymentProviders/Amazon/AmazonApi.php @@ -37,7 +37,7 @@ "No authorizations found for order reference $orderReferenceId!" ); } - $authorizationIds = ( array ) $details['IdList']['member']; + $authorizationIds = (array) $details['IdList']['member']; // Check the status of each authorization against the order reference foreach ( $authorizationIds as $id ) { $authResult = $client->getAuthorizationDetails( array( diff --git a/PaymentProviders/Amazon/AmazonListener.php b/PaymentProviders/Amazon/AmazonListener.php index 1f5994d..6d7a831 100644 --- a/PaymentProviders/Amazon/AmazonListener.php +++ b/PaymentProviders/Amazon/AmazonListener.php @@ -27,7 +27,7 @@ // (to account for potential repeated headers? // IpnHandler's constructor expects scalar values, so we flatten them $headers = array(); - foreach( $request->headers->all() as $header => $annoyingArray ) { + foreach ( $request->headers->all() as $header => $annoyingArray ) { if ( count( $annoyingArray ) !== 1 ) { throw new ListenerDataException( "header '$header' should have a single value" ); } @@ -107,6 +107,6 @@ } protected function ackEnvelope() { - //pass + // pass } } diff --git a/PaymentProviders/Amazon/Audit/DownloadReports.php b/PaymentProviders/Amazon/Audit/DownloadReports.php index 819dd91..f5f3bf6 100644 --- a/PaymentProviders/Amazon/Audit/DownloadReports.php +++ b/PaymentProviders/Amazon/Audit/DownloadReports.php @@ -1,6 +1,6 @@ <?php namespace SmashPig\PaymentProviders\Amazon\Audit; -require( __DIR__ . '/../../../Maintenance/MaintenanceBase.php' ); +require ( __DIR__ . '/../../../Maintenance/MaintenanceBase.php' ); use SmashPig\Maintenance\MaintenanceBase; @@ -30,4 +30,4 @@ } } -require( RUN_MAINTENANCE_IF_MAIN ); +require ( RUN_MAINTENANCE_IF_MAIN ); diff --git a/PaymentProviders/Amazon/ExpatriatedMessages/AmazonMessage.php b/PaymentProviders/Amazon/ExpatriatedMessages/AmazonMessage.php index 2a99c98..7a4abff 100644 --- a/PaymentProviders/Amazon/ExpatriatedMessages/AmazonMessage.php +++ b/PaymentProviders/Amazon/ExpatriatedMessages/AmazonMessage.php @@ -28,7 +28,7 @@ } public function getDestinationQueue() { - //stub + // stub return null; } diff --git a/PaymentProviders/AstroPay/AstroPayListener.php b/PaymentProviders/AstroPay/AstroPayListener.php index 2f0c80f..04cbb13 100644 --- a/PaymentProviders/AstroPay/AstroPayListener.php +++ b/PaymentProviders/AstroPay/AstroPayListener.php @@ -75,6 +75,6 @@ } protected function ackEnvelope() { - //pass + // pass } } diff --git a/PaymentProviders/AstroPay/Audit/AstroPayAudit.php b/PaymentProviders/AstroPay/Audit/AstroPayAudit.php index 03e896c..c6b7c08 100644 --- a/PaymentProviders/AstroPay/Audit/AstroPayAudit.php +++ b/PaymentProviders/AstroPay/Audit/AstroPayAudit.php @@ -81,7 +81,7 @@ $msg['gateway'] = 'astropay'; $msg['gross'] = $row['Net Amount (local)']; - switch( $row['Type'] ) { + switch ( $row['Type'] ) { case 'Payment': $this->parseDonation( $row, $msg ); break; diff --git a/PaymentProviders/AstroPay/ExpatriatedMessages/AstroPayMessage.php b/PaymentProviders/AstroPay/ExpatriatedMessages/AstroPayMessage.php index c7673f7..affe4b5 100644 --- a/PaymentProviders/AstroPay/ExpatriatedMessages/AstroPayMessage.php +++ b/PaymentProviders/AstroPay/ExpatriatedMessages/AstroPayMessage.php @@ -45,7 +45,7 @@ public function constructFromValues( array $values ) { foreach ( $this->fields as $key ) { - $this->$key = ( array_key_exists( $key, $values ) ? $values[$key] : ''); + $this->$key = ( array_key_exists( $key, $values ) ? $values[$key] : '' ); } // Need to set the correlationId during construction // or inflight message store will get confused diff --git a/PaymentProviders/GlobalCollect/ExpatriatedMessages/GlobalCollectMessage.php b/PaymentProviders/GlobalCollect/ExpatriatedMessages/GlobalCollectMessage.php index 0129d42..a861884 100644 --- a/PaymentProviders/GlobalCollect/ExpatriatedMessages/GlobalCollectMessage.php +++ b/PaymentProviders/GlobalCollect/ExpatriatedMessages/GlobalCollectMessage.php @@ -21,7 +21,7 @@ public function constructFromValues( array $values ) { foreach ( $this->getFieldInfo() as $key => $info ) { $upperKey = str_replace( '_', '', strtoupper( $key ) ); - $this->$key = (array_key_exists( $upperKey, $values ) ? $values[$upperKey] : ''); + $this->$key = ( array_key_exists( $upperKey, $values ) ? $values[$upperKey] : '' ); } } @@ -35,7 +35,7 @@ $queueMsg = new NormalizedMessage(); foreach ( $this->getFieldInfo() as $key => $info ) { - $destKey = (array_key_exists( 'map', $info ) ? $info['map'] : $key ); + $destKey = ( array_key_exists( 'map', $info ) ? $info['map'] : $key ); $queueMsg->$destKey = $this->$key; } diff --git a/PaymentProviders/GlobalCollect/ExpatriatedMessages/PaymentMessage.php b/PaymentProviders/GlobalCollect/ExpatriatedMessages/PaymentMessage.php index ddc5020..d0cba42 100644 --- a/PaymentProviders/GlobalCollect/ExpatriatedMessages/PaymentMessage.php +++ b/PaymentProviders/GlobalCollect/ExpatriatedMessages/PaymentMessage.php @@ -17,16 +17,16 @@ protected $fields = array( 'additional_reference', - 'amount' => array('map' => 'gross'), + 'amount' => array( 'map' => 'gross' ), 'attempt_id', - 'currency_code' => array('map' => 'currency'), + 'currency_code' => array( 'map' => 'currency' ), 'effort_id', 'merchant_id', - 'order_id' => array('map' => 'gateway_txn_id'), + 'order_id' => array( 'map' => 'gateway_txn_id' ), 'payment_method_id', - 'payment_product_id' => array('map' => 'payment_product'), + 'payment_product_id' => array( 'map' => 'payment_product' ), 'payment_reference', - 'received_date' => array('map' => 'date'), + 'received_date' => array( 'map' => 'date' ), 'status_date', 'status_id', ); diff --git a/PaymentProviders/Worldpay/Audit/LynkReconciliationFile.php b/PaymentProviders/Worldpay/Audit/LynkReconciliationFile.php index ac74ec3..584c229 100644 --- a/PaymentProviders/Worldpay/Audit/LynkReconciliationFile.php +++ b/PaymentProviders/Worldpay/Audit/LynkReconciliationFile.php @@ -13,7 +13,7 @@ const filenamePattern = '/^TranDetVer2_.*/'; protected $recordTypes; - protected $fileData = array( ); + protected $fileData = array(); function __construct() { $this->columnHeaders = array( @@ -135,7 +135,7 @@ * See https://wikitech.wikimedia.org/wiki/Fundraising/Queue_messages */ protected function normalize( $record ) { - $msg = array( ); + $msg = array(); switch ( $record['Transaction Type'] ) { case 'Credit Sale': @@ -170,7 +170,7 @@ return $msg; } - $msg['payment_method'] = 'cc'; //this one is okay, because WP only does cc at this point. Maybe forever? + $msg['payment_method'] = 'cc'; // this one is okay, because WP only does cc at this point. Maybe forever? $msg['payment_submethod'] = $this->lookupCardType( $record['Card Network Type'] ); return $msg; diff --git a/PaymentProviders/Worldpay/Audit/TransactionReconciliationFile.php b/PaymentProviders/Worldpay/Audit/TransactionReconciliationFile.php index 57cea28..2087de8 100644 --- a/PaymentProviders/Worldpay/Audit/TransactionReconciliationFile.php +++ b/PaymentProviders/Worldpay/Audit/TransactionReconciliationFile.php @@ -12,7 +12,7 @@ const filenamePattern = '/^MA\.PISCESSW\.#M\.RECON\..*/'; protected $recordTypes; - protected $fileData = array( ); + protected $fileData = array(); function __construct() { $this->row_header_segment = array( @@ -158,8 +158,8 @@ if ( !$record ) { // FIXME: correct Exception type, and get context (path) from log context // SUPERFIXME: This introduces an extreme degree of fragility into the system. One weird line can't blow up the whole thing; We'd get killed by the schrapnel on the daily. -// throw new \Exception( "Unknown record type {$row_info['record_type']} while processing {$this->path}, aborting!" ); - //for now... +// throw new \Exception( "Unknown record type {$row_info['record_type']} while processing {$this->path}, aborting!" ); + // for now... error_log( "Unknown record type {$row_info['record_type']} while processing {$this->path}. Rolling over it." ); } @@ -208,7 +208,7 @@ # Verify that the data and supplemental data are a pair if ( $this->pending_supplemental_data ) { - if ( ( int ) ($this->pending_supplemental_data['sequence_no']) !== ( $this->pending_data['sequence_no'] + 1 ) ) { + if ( (int) ( $this->pending_supplemental_data['sequence_no'] ) !== ( $this->pending_data['sequence_no'] + 1 ) ) { throw new \Exception( "Mismatched data and supplemental data! " . print_r( $this->pending_supplemental_data, true ) . " " . print_r( $this->pending_data, true ) ); } $record = array_merge( $record, $this->pending_supplemental_data ); @@ -231,20 +231,20 @@ * See https://wikitech.wikimedia.org/wiki/Fundraising/Queue_messages */ protected function normalize( $record ) { - $msg = array( ); + $msg = array(); if ( $record["transaction_type"] == "0" ) { $queue = "donations"; } elseif ( $record["transaction_type"] == "5" ) { $queue = "refund"; } else { - //FIXME: This also seems incredibly fragile. + // FIXME: This also seems incredibly fragile. throw new \Exception( "Don't know how to handle transaction type {$record["transaction_type"]}" ); } - //ARGH. - //transaction_date looks like ddmmyy. - //@TODO: Verify that the transaction_time is in fact UTC, and not some other weirdo country time. + // ARGH. + // transaction_date looks like ddmmyy. + // @TODO: Verify that the transaction_time is in fact UTC, and not some other weirdo country time. $datestring = '20' . substr( $record["transaction_date"], 4, 2 ) . substr( $record["transaction_date"], 2, 2 ) . substr( $record["transaction_date"], 0, 2 ); $datestring .= ' ' . $record["transaction_time"] . '-0000'; @@ -262,10 +262,10 @@ # comes from a different field when currency != GBP :( if ( trim( $record["local_currency_code"] ) ) { $msg["currency"] = $record["local_currency_code"]; - $msg["gross"] = ( int ) ( $record["local_value"] ) * self::exponent_to_multiplier( $record["local_exponent"] ); + $msg["gross"] = (int) ( $record["local_value"] ) * self::exponent_to_multiplier( $record["local_exponent"] ); } else { $msg["currency"] = "GBP"; - $msg["gross"] = ( int ) ( $record["transaction_value"] ) * self::exponent_to_multiplier( 2 ); + $msg["gross"] = (int) ( $record["transaction_value"] ) * self::exponent_to_multiplier( 2 ); } if ( $queue === "refund" ) { @@ -275,8 +275,8 @@ $msg["gateway_refund_id"] = $msg["gateway_txn_id"]; # FIXME: chargeback vs refund info is not available in this file. $msg["type"] = "refund"; - #log.info("+Sending\t{id}\t{date}\t{type}".format(id=msg["gateway_parent_id"], date=iso_date, type=msg["type"])) - #self.send(queue, msg) + # log.info("+Sending\t{id}\t{date}\t{type}".format(id=msg["gateway_parent_id"], date=iso_date, type=msg["type"])) + # self.send(queue, msg) return $msg; } @@ -289,10 +289,10 @@ # Switch behavior depending on the status. We only like "accepted" transactions. $status = trim( $record["status"] ); if ( $status == "P" ) { - #log.info("-Pending\t{id}\t{date}\t{type}".format(id=msg["gateway_txn_id"], date=iso_date, type=queue)) + # log.info("-Pending\t{id}\t{date}\t{type}".format(id=msg["gateway_txn_id"], date=iso_date, type=queue)) return; } elseif ( $status == "R" ) { - #log.info("-Rejection\t{id}\t{date}\t{type}".format(id=msg["gateway_txn_id"], date=iso_date, type=queue)) + # log.info("-Rejection\t{id}\t{date}\t{type}".format(id=msg["gateway_txn_id"], date=iso_date, type=queue)) return; } elseif ( $status != "A" ) { throw new \Exception( "Unknown gateway status: {$status}" ); @@ -305,10 +305,10 @@ } else { $msg["settlement_currency"] = "GBP"; } - $msg["settlement_amount"] = ( int ) ( $record["settlement_value"] ) * self::exponent_to_multiplier( $record["settlement_exponent"] ); + $msg["settlement_amount"] = (int) ( $record["settlement_value"] ) * self::exponent_to_multiplier( $record["settlement_exponent"] ); } - $msg["payment_method"] = "cc"; //this one is okay, because WP only does cc at this point. Maybe forever? + $msg["payment_method"] = "cc"; // this one is okay, because WP only does cc at this point. Maybe forever? $msg["payment_submethod"] = ReferenceData::decode_card_type( trim( $record["card_type"] ) ); # custom values @@ -334,7 +334,7 @@ $exponent = 2; } - return pow( 10, 0 - ( int ) ( $exponent ) ); + return pow( 10, 0 - (int) ( $exponent ) ); } } @@ -342,7 +342,7 @@ class FixedLengthRecordSpecification { public $prefix; - public $fields = array( ); + public $fields = array(); function __construct( $prefix, $fieldSegments ) { $this->prefix = $prefix; @@ -365,7 +365,7 @@ static function parse( $fields, $line ) { $pos = 0; - $out = array( ); + $out = array(); foreach ( $fields as $field ) { list( $fieldName, $length ) = $field; $out[$fieldName] = substr( $line, $pos, $length ); diff --git a/PaymentProviders/Worldpay/Audit/WorldpayAudit.php b/PaymentProviders/Worldpay/Audit/WorldpayAudit.php index 4cd2226..b7a99d6 100644 --- a/PaymentProviders/Worldpay/Audit/WorldpayAudit.php +++ b/PaymentProviders/Worldpay/Audit/WorldpayAudit.php @@ -19,7 +19,7 @@ $fileTypes = array( 'SmashPig\PaymentProviders\Worldpay\Audit\TransactionReconciliationFile', // FIXME: Disabled due to brokenness. - //'SmashPig\PaymentProviders\Worldpay\Audit\LynkReconciliationFile', + // 'SmashPig\PaymentProviders\Worldpay\Audit\LynkReconciliationFile', 'SmashPig\PaymentProviders\Worldpay\Audit\WpgReconciliationFile', ); diff --git a/PaymentProviders/Worldpay/Audit/WpgReconciliationFile.php b/PaymentProviders/Worldpay/Audit/WpgReconciliationFile.php index f32dbf7..75ae290 100644 --- a/PaymentProviders/Worldpay/Audit/WpgReconciliationFile.php +++ b/PaymentProviders/Worldpay/Audit/WpgReconciliationFile.php @@ -7,10 +7,10 @@ class WpgReconciliationFile { - const filenamePattern = '/WPG_AUDIT/'; + const FILENAME_PATTERN = '/WPG_AUDIT/'; protected $recordTypes; - protected $fileData = array( ); + protected $fileData = array(); function __construct() { $this->columnHeaders = array( @@ -27,7 +27,7 @@ static function isMine( $path ) { $filename = basename( $path ); - return preg_match( self::filenamePattern, $filename ); + return preg_match( self::FILENAME_PATTERN, $filename ); } function parse( $path ) { @@ -118,7 +118,8 @@ $msg['gateway_txn_id'] = $record['OrderCode']; $msg['currency'] = $record['CurrencyCode']; - $msg['payment_method'] = 'cc'; //this one is okay, because WP only does cc at this point. Maybe forever? + // this one is okay, because WP only does cc at this point. Maybe forever? + $msg['payment_method'] = 'cc'; $msg['payment_submethod'] = $this->lookupCardType( $record['PaymentMethod'] ); return $msg; @@ -140,4 +141,5 @@ } } -class JunkRowException extends Exception {} +class JunkRowException extends Exception { +} diff --git a/PublicHttp/smashpig_http_handler.php b/PublicHttp/smashpig_http_handler.php index 2bcc256..e55ec74 100644 --- a/PublicHttp/smashpig_http_handler.php +++ b/PublicHttp/smashpig_http_handler.php @@ -8,7 +8,7 @@ define( "SMASHPIG_ENTRY_POINT", $file ); $smashPigBaseDir = __DIR__ . '/../'; - require_once( $smashPigBaseDir . '/vendor/autoload.php' ); + require_once ( $smashPigBaseDir . '/vendor/autoload.php' ); RequestHandler::process()->send(); } else { @@ -16,6 +16,6 @@ SmashPig has detected that multiple execution entry points have been used in a single session. Execution of the {$file} entry point cannot continue at this time. EOT; - print( $str ); + print ( $str ); } diff --git a/Tests/MessageTest.php b/Tests/MessageTest.php index 64b3316..b4bbd05 100644 --- a/Tests/MessageTest.php +++ b/Tests/MessageTest.php @@ -11,10 +11,10 @@ public function testAntifraudFactory() { $diMessage = new DonationInterfaceMessage(); - $diMessage->contribution_tracking_id = mt_rand(0,1000000); + $diMessage->contribution_tracking_id = mt_rand( 0, 1000000 ); $diMessage->date = 1455128736; $diMessage->gateway = 'adyen'; - $diMessage->gateway_txn_id = mt_rand(0,10000000); + $diMessage->gateway_txn_id = mt_rand( 0, 10000000 ); $diMessage->payment_method = 'cc'; $diMessage->user_ip = '8.8.4.4'; @@ -27,15 +27,15 @@ $diMessage, $orderId, 12.5, $scoreBreakdown, 'process' ); - $this->assertEquals($diMessage->contribution_tracking_id, $afMessage->contribution_tracking_id); - $this->assertEquals(1455128736, $afMessage->date); - $this->assertEquals('adyen', $afMessage->gateway); - $this->assertEquals($diMessage->gateway_txn_id, $afMessage->gateway_txn_id); - $this->assertEquals($orderId, $afMessage->order_id); - $this->assertEquals('cc', $afMessage->payment_method); - $this->assertEquals(12.5, $afMessage->risk_score); - $this->assertEquals($scoreBreakdown, $afMessage->score_breakdown); - $this->assertEquals('8.8.4.4', $afMessage->user_ip); - $this->assertEquals('process', $afMessage->validation_action); + $this->assertEquals( $diMessage->contribution_tracking_id, $afMessage->contribution_tracking_id ); + $this->assertEquals( 1455128736, $afMessage->date ); + $this->assertEquals( 'adyen', $afMessage->gateway ); + $this->assertEquals( $diMessage->gateway_txn_id, $afMessage->gateway_txn_id ); + $this->assertEquals( $orderId, $afMessage->order_id ); + $this->assertEquals( 'cc', $afMessage->payment_method ); + $this->assertEquals( 12.5, $afMessage->risk_score ); + $this->assertEquals( $scoreBreakdown, $afMessage->score_breakdown ); + $this->assertEquals( '8.8.4.4', $afMessage->user_ip ); + $this->assertEquals( 'process', $afMessage->validation_action ); } } diff --git a/Tests/MockDataStore.php b/Tests/MockDataStore.php index d929db5..3789b8a 100644 --- a/Tests/MockDataStore.php +++ b/Tests/MockDataStore.php @@ -18,7 +18,8 @@ protected $currentQueue = null; - public function __construct() {} + public function __construct() { + } /** * Adds an object to the persistent data store. diff --git a/Tests/bootstrap-phpunit.php b/Tests/bootstrap-phpunit.php index aae4b9b..8744a40 100644 --- a/Tests/bootstrap-phpunit.php +++ b/Tests/bootstrap-phpunit.php @@ -1,3 +1,3 @@ <?php -require_once( 'vendor/autoload.php' ); +require_once ( 'vendor/autoload.php' ); diff --git a/config_defaults.php b/config_defaults.php index 5bbf536..933cbe8 100644 --- a/config_defaults.php +++ b/config_defaults.php @@ -97,7 +97,7 @@ 'actions' => array(), 'email' => array( - 'from-address' => array('sen...@contoso.com', 'Example Sender'), + 'from-address' => array( 'sen...@contoso.com', 'Example Sender' ), 'bounce-address' => 'bounce+$1...@contoso.com', 'archive-addresses' => array(), ), @@ -187,8 +187,8 @@ '24' => 25, // Both postal code and address matches, name doesn't match '25' => 50, // Address matches, name doesn't match '26' => 100, // Neither postal code, address nor name matches - ), - 'cvv-map' => array( + ), + 'cvv-map' => array( '0' => 100, // Unknown '1' => 0, // Matches '2' => 100, // Doesn't match @@ -199,7 +199,7 @@ ), ), - 'actions' => array( ), + 'actions' => array(), ), 'amazon' => array( @@ -238,7 +238,7 @@ ), 'ipn-handler-class' => 'PayWithAmazon\IpnHandler', - 'audit' => array ( + 'audit' => array( 'download-path' => '', 'archive-path' => '', 'file-types' => array( -- To view, visit https://gerrit.wikimedia.org/r/285222 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icd531ade53a9442587e98228a0536e55b79f78e0 Gerrit-PatchSet: 3 Gerrit-Project: wikimedia/fundraising/SmashPig Gerrit-Branch: master Gerrit-Owner: Awight <awi...@wikimedia.org> Gerrit-Reviewer: Awight <awi...@wikimedia.org> Gerrit-Reviewer: Cdentinger <cdentin...@wikimedia.org> Gerrit-Reviewer: Ejegg <eeggles...@wikimedia.org> Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits