mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
coding standards
This commit is contained in:
parent
42930b48be
commit
a6d3574a0e
2 changed files with 32 additions and 24 deletions
|
@ -1,8 +1,16 @@
|
|||
<?php
|
||||
/**
|
||||
* The custom autoloader functionality.
|
||||
*
|
||||
* @package Inpsyde\PayPalCommerce
|
||||
*/
|
||||
declare( strict_types=1 );
|
||||
|
||||
namespace Inpsyde\PayPalCommerce;
|
||||
|
||||
/**
|
||||
* The autoloader.
|
||||
*/
|
||||
function autoload() {
|
||||
|
||||
/**
|
||||
|
@ -16,16 +24,16 @@ function autoload() {
|
|||
) {
|
||||
return;
|
||||
}
|
||||
$class_parts = explode("\\", $class_name);
|
||||
$class_parts = explode( '\\', $class_name );
|
||||
$module_dir = dirname( __DIR__ ) . '/modules.local/';
|
||||
$modules = [
|
||||
$modules = array(
|
||||
'Button' => $module_dir . 'ppcp-button/src/',
|
||||
'Onboarding' => $module_dir . 'ppcp-onboarding/src/',
|
||||
'Subscription' => $module_dir . 'ppcp-subscription/src/',
|
||||
'WcGateway' => $module_dir . 'ppcp-wc-gateway/src/',
|
||||
'Webhooks' => $module_dir . 'ppcp-webhooks/src/',
|
||||
'Logging' => $module_dir . 'woocommerce-logging/src/',
|
||||
];
|
||||
);
|
||||
|
||||
if ( isset( $class_parts[2] ) && ! isset( $class_parts[3] ) ) {
|
||||
$file_path = dirname( __DIR__ ) . '/src/class-' . strtolower( $class_parts[2] ) . '.php';
|
||||
|
|
|
@ -29,7 +29,7 @@ class PluginModule implements ModuleInterface {
|
|||
/**
|
||||
* Runs the module.
|
||||
*
|
||||
* @param ContainerInterface $container
|
||||
* @param ContainerInterface $container The Container.
|
||||
*/
|
||||
public function run( ContainerInterface $container ) {
|
||||
// TODO: Implement run() method.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue