for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Codexshaper\WooCommerce;
use Automattic\WooCommerce\Client;
use Codexshaper\WooCommerce\Traits\WoocommerceTrait;
class WooCommerceApi
{
use WooCommerceTrait;
/**
*@var \Automattic\WooCommerce\Client
*/
protected $client;
* Build Woocommerce connection.
*
* @return void
@return
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.
public function __construct()
$this->client = new Client(
config('woocommerce.store_url'),
config('woocommerce.consumer_key'),
config('woocommerce.consumer_secret'),
[
'version' => 'wc/'.config('woocommerce.api_version'),
'wp_api' => config('woocommerce.wp_api_integration'),
'verify_ssl' => config('woocommerce.verify_ssl'),
'query_string_auth' => config('woocommerce.query_string_auth'),
'timeout' => config('woocommerce.timeout'),
]
);
}
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.