8
0
Fork 0

add namespace

This commit is contained in:
Daniel Seifert 2020-06-05 14:18:24 +02:00
parent 2e882701af
commit a484657381
Signed by: DanielS
GPG Key ID: 8A7C4C6ED1915C6F
4 changed files with 9 additions and 6 deletions

View File

@ -1,6 +1,6 @@
<?php <?php
namespace D3\TaxRatesAdjustment\Model; namespace D3\TaxRatesAdjustment\Models;
class raiseTaxRate class raiseTaxRate
{ {

View File

@ -1,13 +1,13 @@
#!/usr/bin/env php #!/usr/bin/env php
<?php <?php
$filePath = '../d3/taxratesadjustment/bootstrap.php'; $filePath = '../bootstrap.php';
$currentDirectory = __DIR__ . '/'; $currentDirectory = __DIR__ . '/';
$filePath = $currentDirectory . $filePath; $filePath = $currentDirectory . $filePath;
require($filePath); require($filePath);
$change = new raiseTaxRate(); $change = new \D3\TaxRatesAdjustment\Models\raiseTaxRate();
try { try {
$change->run(); $change->run();
} catch ( \Exception $e) { } catch ( \Exception $e) {

View File

@ -1,13 +1,11 @@
<?php <?php
use OxidEsales\ComposerPlugin\Installer\Package\ShopPackageInstaller;
$bootstrapFileName = getenv('ESHOP_BOOTSTRAP_PATH'); $bootstrapFileName = getenv('ESHOP_BOOTSTRAP_PATH');
if (!empty($bootstrapFileName)) { if (!empty($bootstrapFileName)) {
$bootstrapFileName = realpath(trim(getenv('ESHOP_BOOTSTRAP_PATH'))); $bootstrapFileName = realpath(trim(getenv('ESHOP_BOOTSTRAP_PATH')));
} else { } else {
$count = 0; $count = 0;
$bootstrapFileName = '../../'. ShopPackageInstaller::SHOP_SOURCE_DIRECTORY .'/bootstrap.php'; $bootstrapFileName = '../../source/bootstrap.php';
$currentDirectory = __DIR__ . '/'; $currentDirectory = __DIR__ . '/';
while ($count < 5) { while ($count < 5) {
$count++; $count++;

View File

@ -13,6 +13,11 @@
"homepage": "http://www.d3data.de" "homepage": "http://www.d3data.de"
} }
], ],
"autoload": {
"psr-4": {
"D3\\TaxRatesAdjustment\\": ""
}
},
"bin": [ "bin": [
"bin/reduceTaxRate", "bin/reduceTaxRate",
"bin/raiseTaxRate" "bin/raiseTaxRate"