Skip to content

Commit

Permalink
fix spacing around colon in return type declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
reykjalin committed Mar 21, 2024
1 parent 3671304 commit 5b65096
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions includes/admin/class-wc-rest-payments-orders-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ public function create_terminal_intent( $request ) {
* @return array|null
* @throws \Exception
*/
public function get_terminal_intent_payment_method( $request, array $default_value = [ Payment_Method::CARD_PRESENT ] ) :array {
public function get_terminal_intent_payment_method( $request, array $default_value = [ Payment_Method::CARD_PRESENT ] ): array {
$payment_methods = $request->get_param( 'payment_methods' );
if ( null === $payment_methods ) {
return $default_value;
Expand Down Expand Up @@ -446,7 +446,7 @@ public function get_terminal_intent_payment_method( $request, array $default_val
* @return string|null
* @throws \Exception
*/
public function get_terminal_intent_capture_method( $request, string $default_value = 'manual' ) : string {
public function get_terminal_intent_capture_method( $request, string $default_value = 'manual' ): string {
$capture_method = $request->get_param( 'capture_method' );
if ( null === $capture_method ) {
return $default_value;
Expand Down
2 changes: 1 addition & 1 deletion includes/class-wc-payments-webhook-processing-service.php
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ private function get_order_from_event_body_intent_id( $event_body ) {
*
* @return string The failure message.
*/
private function get_failure_message_from_error( $error ):string {
private function get_failure_message_from_error( $error ): string {
$code = $error['code'] ?? '';
$decline_code = $error['decline_code'] ?? '';
$message = $error['message'] ?? '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class WC_Payments_In_Person_Payments_Receipts_Service {
*
* @return string
*/
public function get_receipt_markup( array $settings, WC_Order $order, array $charge ) :string {
public function get_receipt_markup( array $settings, WC_Order $order, array $charge ): string {
$this->validate_settings( $settings );
$this->validate_charge( $charge );

Expand Down Expand Up @@ -90,7 +90,7 @@ public function send_customer_ipp_receipt_email( WC_Order $order, array $merchan
* @param array $order the order.
* @return array
*/
private function format_line_items( array $order ) :array {
private function format_line_items( array $order ): array {
$line_items_data = [];

foreach ( $order['line_items'] as $item ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class WC_Payments_Notes_Set_Up_StripeLink {
*
* @return bool
*/
public static function should_display_note():bool {
public static function should_display_note(): bool {
// Check if Link payment is available.
$available_upe_payment_methods = self::$gateway->get_upe_available_payment_methods();
if ( ! in_array( Link_Payment_Method::PAYMENT_METHOD_STRIPE_ID, $available_upe_payment_methods, true ) ) {
Expand Down
14 changes: 7 additions & 7 deletions includes/wc-payment-api/class-wc-payments-api-client.php
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ function ( $result ) {
* @return array
* @throws API_Exception - Exception thrown on request failure.
*/
public function get_disputes_summary( array $filters = [] ):array {
public function get_disputes_summary( array $filters = [] ): array {
return $this->request( [ $filters ], self::DISPUTES_API . '/summary', self::GET );
}

Expand Down Expand Up @@ -681,7 +681,7 @@ public function upload_file( $request ) {
* @return array
* @throws API_Exception
*/
public function get_file_contents( string $file_id, bool $as_account = true ) : array {
public function get_file_contents( string $file_id, bool $as_account = true ): array {
try {
return $this->request( [ 'as_account' => $as_account ], self::FILES_API . '/' . $file_id . '/contents', self::GET );
} catch ( API_Exception $e ) {
Expand All @@ -699,7 +699,7 @@ public function get_file_contents( string $file_id, bool $as_account = true ) :
* @return array
* @throws API_Exception
*/
public function get_file( string $file_id, bool $as_account = true ) : array {
public function get_file( string $file_id, bool $as_account = true ): array {
return $this->request( [ 'as_account' => $as_account ], self::FILES_API . '/' . $file_id, self::GET );
}

Expand Down Expand Up @@ -1077,7 +1077,7 @@ public function create_product( array $product_data ): array {
*
* @throws API_Exception Error updating product.
*/
public function update_product( string $product_id, array $product_data = [] ) : array {
public function update_product( string $product_id, array $product_data = [] ): array {
if ( null === $product_id || '' === trim( $product_id ) ) {
throw new API_Exception(
__( 'Product ID is required', 'woocommerce-payments' ),
Expand Down Expand Up @@ -2102,7 +2102,7 @@ protected function is_json_response( $response ) {
*
* @return array
*/
public function add_additional_info_to_charge( array $charge ) : array {
public function add_additional_info_to_charge( array $charge ): array {
$charge = $this->add_order_info_to_charge_object( $charge['id'], $charge );
$charge = $this->add_formatted_address_to_charge_object( $charge );

Expand All @@ -2116,7 +2116,7 @@ public function add_additional_info_to_charge( array $charge ) : array {
*
* @return array
*/
public function add_formatted_address_to_charge_object( array $charge ) : array {
public function add_formatted_address_to_charge_object( array $charge ): array {
$has_billing_details = isset( $charge['billing_details'] );

if ( $has_billing_details ) {
Expand Down Expand Up @@ -2422,7 +2422,7 @@ private function uuid() {
*
* @return array reader objects.
*/
public function get_readers_charge_summary( string $charge_date ) : array {
public function get_readers_charge_summary( string $charge_date ): array {
return $this->request( [ 'charge_date' => $charge_date ], self::READERS_CHARGE_SUMMARY, self::GET );
}

Expand Down

0 comments on commit 5b65096

Please sign in to comment.