Completed
Pull Request — master (#14)
by
unknown
15:00
created

WooCommerceApi::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 9.7666
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Codexshaper\WooCommerce;
4
5
use Automattic\WooCommerce\Client;
6
use Codexshaper\WooCommerce\Traits\WoocommerceTrait;
7
8
class WooCommerceApi
9
{
10
    use WooCommerceTrait;
11
12
    /**
13
     *@var \Automattic\WooCommerce\Client
14
     */
15
    protected $client;
16
17
    /**
18
     * Build Woocommerce connection.
19
     *
20
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
21
     */
22
    public function __construct()
23
    {
24
        $this->client = new Client(
25
            config('woocommerce.store_url'),
26
            config('woocommerce.consumer_key'),
27
            config('woocommerce.consumer_secret'),
28
            [
29
                'version'           => 'wc/'.config('woocommerce.api_version'),
30
                'wp_api'            => config('woocommerce.wp_api_integration'),
31
                'verify_ssl'        => config('woocommerce.verify_ssl'),
32
                'query_string_auth' => config('woocommerce.query_string_auth'),
33
                'timeout'           => config('woocommerce.timeout'),
34
            ]
35
        );
36
    }
37
}
38