Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
Settings
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
2 / 2
4
100.00% covered (success)
100.00%
1 / 1
 get_plugin_version
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
2
 get_plugin_basename
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
2
1<?php
2/**
3 * The plugin settings.
4 *
5 * @package brianhenryie/bh-wc-postcode-address-autofill
6 */
7
8namespace BrianHenryIE\WC_Postcode_Address_Autofill\API;
9
10use BrianHenryIE\WC_Postcode_Address_Autofill\Settings_Interface;
11
12/**
13 * Plain old object for plugin settings.
14 */
15class Settings implements Settings_Interface {
16
17    /**
18     * Used to cache assets.
19     */
20    public function get_plugin_version(): string {
21        return defined( 'BH_WC_POSTCODE_ADDRESS_AUTOFILL_VERSION' )
22            ? constant( 'BH_WC_POSTCODE_ADDRESS_AUTOFILL_VERSION' )
23            : '1.5.0';
24    }
25
26    /**
27     * Used to determine the plugin dir path and URL.
28     */
29    public function get_plugin_basename(): string {
30        return defined( 'BH_WC_POSTCODE_ADDRESS_AUTOFILL_BASENAME' )
31            ? constant( 'BH_WC_POSTCODE_ADDRESS_AUTOFILL_BASENAME' )
32            : 'bh-wc-postcode-address-autofill/bh-wc-postcode-address-autofill.php';
33    }
34}