PluginProbe
Packeta / 2.1
Packeta v2.1
2.3.2 2.3.1 trunk 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.3.0 1.3.1 1.3.2 1.4 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 All 56 releases
← All changes | src/Packetery/Module/WpdbAdapterFactory.php +14 -11 trunk2.1 View file →
@@ -1,27 +1,30 @@
1 1 <?php
2 +/**
3 + * Class WpdbAdapterFactory
4 + *
5 + * @package Packetery
6 + */
2 7
3 8 declare( strict_types=1 );
4 9
5 10 namespace Packetery\Module;
6 11
7 -use Packetery\Module\Framework\WcAdapter;
8 -
12 +/**
13 + * Class WpdbAdapterFactory
14 + *
15 + * @package Packetery
16 + */
9 17 class WpdbAdapterFactory {
10 -
11 18 /**
12 - * @var WcAdapter
19 + * Creates WpdbAdapter instance
20 + *
21 + * @return WpdbAdapter
13 22 */
14 - private $wcAdapter;
15 -
16 - public function __construct( WcAdapter $wcAdapter ) {
17 - $this->wcAdapter = $wcAdapter;
18 - }
19 -
20 23 public function create(): WpdbAdapter {
21 24 global $wpdb;
22 25
23 - $instance = new WpdbAdapter( $wpdb, $this->wcAdapter );
26 + $instance = new WpdbAdapter( $wpdb );
24 27 $instance->packeteryCarrier = sprintf( '%scarrier', $instance->getPacketeryPrefix() );
25 28 $instance->packeteryOrder = sprintf( '%sorder', $instance->getPacketeryPrefix() );
26 29 $instance->packeteryLog = sprintf( '%slog', $instance->getPacketeryPrefix() );
27 30 $instance->packeteryCustomsDeclaration = sprintf( '%scustoms_declaration', $instance->getPacketeryPrefix() );