Skip to content

Commit 36559bb

Browse files
committed
refactor: rename Tax namespace to Taxation for better clarity
Updated the namespace from Tax to Taxation across multiple files to improve consistency and better reflect its purpose. Adjusted all references accordingly.
1 parent 3b077a1 commit 36559bb

23 files changed

+60
-60
lines changed

readme.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -130,35 +130,35 @@ Taxes can be established in two ways.
130130

131131
- **Inclusive**: Taxes included in the unit price, and will be cleared during calculations
132132
```php
133-
use Vaened\PriceEngine\Adjustments\Tax;
133+
use Vaened\PriceEngine\Adjustments\Taxation;
134134

135135
$amount->impose([
136-
Tax\Inclusive::proportional(18, 'IGV'); // 18%
137-
Tax\Inclusive::fixed(2, 'ISC'); // 2 PEN
136+
Taxation\Inclusive::proportional(18, 'IGV'); // 18%
137+
Taxation\Inclusive::fixed(2, 'ISC'); // 2 PEN
138138
]);
139139
// or
140140
$cashier = new RegularCashier(
141141
...
142142
taxes : Taxes::from([
143-
Tax\Inclusive::proportional(18, 'IGV'); // 18%
144-
Tax\Inclusive::fixed(2, 'ISC'); // 2 PEN
143+
Taxation\Inclusive::proportional(18, 'IGV'); // 18%
144+
Taxation\Inclusive::fixed(2, 'ISC'); // 2 PEN
145145
])
146146
);
147147
```
148148
- **Exclusive**: Taxes not included in the unit price, and will be added for the final calculations.
149149
```php
150-
use Vaened\PriceEngine\Adjustments\Tax;
150+
use Vaened\PriceEngine\Adjustments\Taxation;
151151

152152
$amount->impose([
153-
Tax\Exclusive::proportional(18, 'IGV'); // 18%
154-
Tax\Exclusive::fixed(2, 'ISC'); // 2 PEN
153+
Taxation\Exclusive::proportional(18, 'IGV'); // 18%
154+
Taxation\Exclusive::fixed(2, 'ISC'); // 2 PEN
155155
]);
156156
// or
157157
$cashier = new RegularCashier(
158158
...
159159
taxes : Taxes::from([
160-
Tax\Exclusive::proportional(18, 'IGV'); // 18%
161-
Tax\Exclusive::fixed(2, 'ISC'); // 2 PEN
160+
Taxation\Exclusive::proportional(18, 'IGV'); // 18%
161+
Taxation\Exclusive::fixed(2, 'ISC'); // 2 PEN
162162
])
163163
);
164164
```

src/Adjustments/Tax/Exclusive.php renamed to src/Adjustments/Taxation/Exclusive.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
declare(strict_types=1);
77

8-
namespace Vaened\PriceEngine\Adjustments\Tax;
8+
namespace Vaened\PriceEngine\Adjustments\Taxation;
99

1010
use BackedEnum;
1111
use UnitEnum;

src/Adjustments/Tax/Inclusive.php renamed to src/Adjustments/Taxation/Inclusive.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
declare(strict_types=1);
77

8-
namespace Vaened\PriceEngine\Adjustments\Tax;
8+
namespace Vaened\PriceEngine\Adjustments\Taxation;
99

1010
use BackedEnum;
1111
use UnitEnum;

src/Adjustments/Tax/InvalidTaxEncoding.php renamed to src/Adjustments/Taxation/InvalidTaxEncoding.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
declare(strict_types=1);
77

8-
namespace Vaened\PriceEngine\Adjustments\Tax;
8+
namespace Vaened\PriceEngine\Adjustments\Taxation;
99

1010
use Throwable;
1111
use Vaened\PriceEngine\PriceException;

src/Adjustments/Tax/TaxCodes.php renamed to src/Adjustments/Taxation/TaxCodes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
declare(strict_types=1);
77

8-
namespace Vaened\PriceEngine\Adjustments\Tax;
8+
namespace Vaened\PriceEngine\Adjustments\Taxation;
99

1010
use BackedEnum;
1111
use UnitEnum;

src/Adjustments/Tax/TaxScheme.php renamed to src/Adjustments/Taxation/TaxScheme.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
declare(strict_types=1);
77

8-
namespace Vaened\PriceEngine\Adjustments\Tax;
8+
namespace Vaened\PriceEngine\Adjustments\Taxation;
99

1010
use BackedEnum;
1111
use UnitEnum;

src/Adjustments/Tax/TaxStripper.php renamed to src/Adjustments/Taxation/TaxStripper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
declare(strict_types=1);
77

8-
namespace Vaened\PriceEngine\Adjustments\Tax;
8+
namespace Vaened\PriceEngine\Adjustments\Taxation;
99

1010
use Brick\Money\Money;
1111
use Vaened\PriceEngine\Adjustments\AdjustmentType;

src/Adjustments/Tax/Taxes.php renamed to src/Adjustments/Taxation/Taxes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
declare(strict_types=1);
77

8-
namespace Vaened\PriceEngine\Adjustments\Tax;
8+
namespace Vaened\PriceEngine\Adjustments\Taxation;
99

1010
use Vaened\PriceEngine\Adjustments\Adjustments;
1111
use Vaened\Support\Types\SecureList;

src/Cashier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use Brick\Money\Money;
1212
use UnitEnum;
1313
use Vaened\PriceEngine\Adjustments\{Adjustments, Charge, Discount};
14-
use Vaened\PriceEngine\Adjustments\Tax\{TaxStripper, Taxes};
14+
use Vaened\PriceEngine\Adjustments\Taxation\{TaxStripper, Taxes};
1515
use Vaened\PriceEngine\Money\{Amount};
1616

1717
use function dd;

src/Money/Amount.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
namespace Vaened\PriceEngine\Money;
99

1010
use Brick\Money\Money;
11-
use Vaened\PriceEngine\Adjustments\Tax\TaxCodes;
12-
use Vaened\PriceEngine\Adjustments\Tax\Taxes;
11+
use Vaened\PriceEngine\Adjustments\Taxation\TaxCodes;
12+
use Vaened\PriceEngine\Adjustments\Taxation\Taxes;
1313

1414
use function count;
1515

0 commit comments

Comments
 (0)