mirror of
https://github.com/Karaka-Management/oms-Billing.git
synced 2026-02-17 00:38:40 +00:00
phpcs autofixes
This commit is contained in:
parent
9590395067
commit
295d7c9d5a
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
|
|
@ -26,7 +26,7 @@ jobs:
|
||||||
- name: Setup Composer
|
- name: Setup Composer
|
||||||
run: composer install
|
run: composer install
|
||||||
- name: Autoformat
|
- name: Autoformat
|
||||||
run: 'vendor/bin/php-cs-fixer fix ./ --rules=''{"array_syntax": {"syntax": "short"}, "blank_line_after_namespace": true, "global_namespace_import": {"import_classes": false, "import_constants": false, "import_functions": false}, "binary_operator_spaces": {"operators": {"=": "align", ".=": "align", "+=": "align", "-=": "align", "*=": "align", "/=": "align", "|=": "align", "&=": "align", "=>": "align", "??=": "align"}}, "cast_spaces": {"space": "single"}, "class_attributes_separation": { "elements": {"const": "one", "method": "one", "property": "one"} }, "combine_consecutive_issets": true, "compact_nullable_typehint": true, "declare_strict_types": true, "declare_equal_normalize": {"space": "none"}, "elseif": true, "encoding": true, "explicit_indirect_variable": true, "explicit_string_variable": true, "function_to_constant": true, "implode_call": true, "increment_style": {"style": "pre"}, "is_null": true, "yoda_style": {"equal": false, "identical": false, "less_and_greater": false}, "line_ending": true, "logical_operators": true, "lowercase_cast": true, "constant_case": {"case": "lower"}, "lowercase_keywords": true, "modernize_types_casting": true, "native_constant_invocation": true, "native_function_casing": true, "native_function_invocation": {"include": ["@all"]}, "new_with_braces": true, "no_extra_blank_lines": {"tokens": ["break", "case", "continue", "curly_brace_block", "extra", "return", "switch", "throw", "use"]}, "no_spaces_after_function_name": true, "no_alias_functions": true, "no_closing_tag": true, "no_empty_comment": true, "no_empty_phpdoc": true, "no_empty_statement": true, "no_homoglyph_names": true, "no_mixed_echo_print": {"use": "echo"}, "no_php4_constructor": true, "no_singleline_whitespace_before_semicolons": true, "no_spaces_inside_parenthesis": true, "no_trailing_whitespace": true, "no_unneeded_final_method": true, "no_unused_imports": true, "no_useless_return": true, "no_whitespace_before_comma_in_array": true, "no_whitespace_in_blank_line": true, "non_printable_character": true, "normalize_index_brace": true, "ordered_imports": {"sort_algorithm": "alpha"}, "ordered_interfaces": {"order": "alpha"}, "php_unit_construct": true, "php_unit_internal_class": true, "php_unit_set_up_tear_down_visibility": true, "phpdoc_indent": true, "phpdoc_align": {"align": "vertical"}, "phpdoc_annotation_without_dot": true, "phpdoc_scalar": true, "phpdoc_return_self_reference": {"replacements": {"this": "self"}}, "phpdoc_trim": true, "phpdoc_trim_consecutive_blank_line_separation": true, "random_api_migration": true, "self_accessor": true, "return_type_declaration": {"space_before": "one"}, "semicolon_after_instruction": true, "set_type_to_cast": true, "short_scalar_cast": true, "single_blank_line_at_eof": true, "single_line_after_imports": true, "standardize_increment": true, "trailing_comma_in_multiline": true, "trim_array_spaces": true, "visibility_required": true, "void_return": true}'' --allow-risky=yes'
|
run: 'vendor/bin/php-cs-fixer fix ./ --rules=''{"array_syntax": {"syntax": "short"}, "blank_line_after_namespace": true, "global_namespace_import": {"import_classes": false, "import_constants": false, "import_functions": false}, "binary_operator_spaces": {"operators": {"=": "align", ".=": "align", "+=": "align", "-=": "align", "*=": "align", "/=": "align", "|=": "align", "&=": "align", "=>": "align", "??=": "align", ">>=": "align", "<<=": "align"}}, "cast_spaces": {"space": "single"}, "class_attributes_separation": { "elements": {"const": "one", "method": "one", "property": "one"} }, "combine_consecutive_issets": true, "compact_nullable_typehint": true, "declare_strict_types": true, "declare_equal_normalize": {"space": "none"}, "elseif": true, "encoding": true, "explicit_indirect_variable": true, "explicit_string_variable": true, "function_to_constant": true, "implode_call": true, "increment_style": {"style": "pre"}, "is_null": true, "yoda_style": {"equal": false, "identical": false, "less_and_greater": false}, "line_ending": true, "logical_operators": true, "lowercase_cast": true, "constant_case": {"case": "lower"}, "lowercase_keywords": true, "modernize_types_casting": true, "native_constant_invocation": true, "native_function_casing": true, "native_function_invocation": {"include": ["@all"]}, "new_with_braces": true, "no_extra_blank_lines": {"tokens": ["break", "case", "continue", "curly_brace_block", "extra", "return", "switch", "throw", "use"]}, "no_spaces_after_function_name": true, "no_alias_functions": true, "no_closing_tag": true, "no_empty_comment": true, "no_empty_phpdoc": true, "no_empty_statement": true, "no_homoglyph_names": true, "no_mixed_echo_print": {"use": "echo"}, "no_php4_constructor": true, "no_singleline_whitespace_before_semicolons": true, "no_spaces_inside_parenthesis": true, "no_trailing_whitespace": true, "no_unneeded_final_method": true, "no_unused_imports": true, "no_useless_return": true, "no_whitespace_before_comma_in_array": true, "no_whitespace_in_blank_line": true, "non_printable_character": true, "normalize_index_brace": true, "ordered_imports": {"sort_algorithm": "alpha"}, "ordered_interfaces": {"order": "alpha"}, "php_unit_construct": true, "php_unit_internal_class": true, "php_unit_set_up_tear_down_visibility": true, "phpdoc_indent": true, "phpdoc_align": {"align": "vertical"}, "phpdoc_annotation_without_dot": true, "phpdoc_scalar": true, "phpdoc_return_self_reference": {"replacements": {"this": "self"}}, "phpdoc_trim": true, "phpdoc_trim_consecutive_blank_line_separation": true, "random_api_migration": true, "self_accessor": true, "return_type_declaration": {"space_before": "one"}, "semicolon_after_instruction": true, "set_type_to_cast": true, "short_scalar_cast": true, "single_blank_line_at_eof": true, "single_line_after_imports": true, "standardize_increment": true, "trailing_comma_in_multiline": true, "trim_array_spaces": true, "visibility_required": true, "void_return": true}'' --allow-risky=yes'
|
||||||
- name: Check for modified files
|
- name: Check for modified files
|
||||||
id: git-check
|
id: git-check
|
||||||
run: echo ::set-output name=modified::$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi)
|
run: echo ::set-output name=modified::$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi)
|
||||||
|
|
|
||||||
|
|
@ -50,16 +50,16 @@ class Media
|
||||||
'name' => SettingsEnum::PREVIEW_MEDIA_TYPE,
|
'name' => SettingsEnum::PREVIEW_MEDIA_TYPE,
|
||||||
'content' => (string) $media['type'][0]['id'],
|
'content' => (string) $media['type'][0]['id'],
|
||||||
'pattern' => '\\d+',
|
'pattern' => '\\d+',
|
||||||
'module' => 'Billing'
|
'module' => 'Billing',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'type' => 'setting',
|
'type' => 'setting',
|
||||||
'name' => SettingsEnum::ORIGINAL_MEDIA_TYPE,
|
'name' => SettingsEnum::ORIGINAL_MEDIA_TYPE,
|
||||||
'content' => (string) $media['type'][1]['id'],
|
'content' => (string) $media['type'][1]['id'],
|
||||||
'pattern' => '\\d+',
|
'pattern' => '\\d+',
|
||||||
'module' => 'Billing'
|
'module' => 'Billing',
|
||||||
]
|
],
|
||||||
]
|
],
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -162,7 +162,7 @@ $header = [
|
||||||
$lang[$pdf->language]['Item'],
|
$lang[$pdf->language]['Item'],
|
||||||
$lang[$pdf->language]['Quantity'],
|
$lang[$pdf->language]['Quantity'],
|
||||||
$lang[$pdf->language]['UnitPrice'],
|
$lang[$pdf->language]['UnitPrice'],
|
||||||
$lang[$pdf->language]['Total']
|
$lang[$pdf->language]['Total'],
|
||||||
];
|
];
|
||||||
|
|
||||||
$lines = $bill->getElements();
|
$lines = $bill->getElements();
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Modules\Billing\Admin;
|
namespace Modules\Billing\Admin;
|
||||||
|
|
||||||
use Modules\Attribute\Models\AttributeTypeMapper;
|
|
||||||
use Modules\Billing\Models\BillTransferType;
|
use Modules\Billing\Models\BillTransferType;
|
||||||
use Modules\ClientManagement\Models\ClientAttributeTypeMapper;
|
use Modules\ClientManagement\Models\ClientAttributeTypeMapper;
|
||||||
use Modules\ItemManagement\Models\ItemAttributeTypeMapper;
|
use Modules\ItemManagement\Models\ItemAttributeTypeMapper;
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,7 @@ final class ApiPriceController extends Controller
|
||||||
$queryMapper->where('supplier', \array_unique([$request->getData('price_supplier', 'int'), null]), 'IN');
|
$queryMapper->where('supplier', \array_unique([$request->getData('price_supplier', 'int'), null]), 'IN');
|
||||||
$queryMapper->where('unit', \array_unique([$request->getData('price_unit', 'int'), null]), 'IN');
|
$queryMapper->where('unit', \array_unique([$request->getData('price_unit', 'int'), null]), 'IN');
|
||||||
$queryMapper->where('type', $request->getData('price_type', 'int') ?? PriceType::SALES);
|
$queryMapper->where('type', $request->getData('price_type', 'int') ?? PriceType::SALES);
|
||||||
$queryMapper->where('currency', array_unique([$request->getData('price_currency', 'int'), null]), 'IN');
|
$queryMapper->where('currency', \array_unique([$request->getData('price_currency', 'int'), null]), 'IN');
|
||||||
|
|
||||||
// @todo: implement start and end
|
// @todo: implement start and end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ use Modules\Billing\Models\Tax\TaxCombination;
|
||||||
use Modules\Billing\Models\Tax\TaxCombinationMapper;
|
use Modules\Billing\Models\Tax\TaxCombinationMapper;
|
||||||
use Modules\ClientManagement\Models\Client;
|
use Modules\ClientManagement\Models\Client;
|
||||||
use Modules\ClientManagement\Models\ClientAttributeTypeMapper;
|
use Modules\ClientManagement\Models\ClientAttributeTypeMapper;
|
||||||
use Modules\Finance\Models\NullTaxCode;
|
|
||||||
use Modules\Finance\Models\TaxCode;
|
use Modules\Finance\Models\TaxCode;
|
||||||
use Modules\Finance\Models\TaxCodeMapper;
|
use Modules\Finance\Models\TaxCodeMapper;
|
||||||
use Modules\ItemManagement\Models\Item;
|
use Modules\ItemManagement\Models\Item;
|
||||||
|
|
@ -50,7 +49,7 @@ final class ApiTaxController extends Controller
|
||||||
*
|
*
|
||||||
* @param Client $client Client to get tax code from
|
* @param Client $client Client to get tax code from
|
||||||
* @param Item $item Item toget tax code from
|
* @param Item $item Item toget tax code from
|
||||||
* @param string $defaultCountry Default country to use if no valid tax code could be found and if the unit country code shouldn't be used.
|
* @param string $defaultCountry default country to use if no valid tax code could be found and if the unit country code shouldn't be used
|
||||||
*
|
*
|
||||||
* @return TaxCode
|
* @return TaxCode
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -23,9 +23,7 @@ use Modules\SupplierManagement\Models\NullSupplier;
|
||||||
use Modules\SupplierManagement\Models\Supplier;
|
use Modules\SupplierManagement\Models\Supplier;
|
||||||
use Modules\SupplierManagement\Models\SupplierMapper;
|
use Modules\SupplierManagement\Models\SupplierMapper;
|
||||||
use phpOMS\Contract\RenderableInterface;
|
use phpOMS\Contract\RenderableInterface;
|
||||||
use phpOMS\Localization\ISO639x1Enum;
|
|
||||||
use phpOMS\Localization\LanguageDetection\Language;
|
use phpOMS\Localization\LanguageDetection\Language;
|
||||||
use phpOMS\Localization\Money;
|
|
||||||
use phpOMS\Message\RequestAbstract;
|
use phpOMS\Message\RequestAbstract;
|
||||||
use phpOMS\Message\ResponseAbstract;
|
use phpOMS\Message\ResponseAbstract;
|
||||||
use phpOMS\Stdlib\Base\FloatInt;
|
use phpOMS\Stdlib\Base\FloatInt;
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,6 @@ use Modules\Admin\Models\NullAccount;
|
||||||
use Modules\ClientManagement\Models\Client;
|
use Modules\ClientManagement\Models\Client;
|
||||||
use Modules\Editor\Models\EditorDoc;
|
use Modules\Editor\Models\EditorDoc;
|
||||||
use Modules\Media\Models\Collection;
|
use Modules\Media\Models\Collection;
|
||||||
use Modules\Media\Models\Media;
|
|
||||||
use Modules\Media\Models\NullMedia;
|
|
||||||
use Modules\SupplierManagement\Models\Supplier;
|
use Modules\SupplierManagement\Models\Supplier;
|
||||||
use phpOMS\Localization\ISO4217CharEnum;
|
use phpOMS\Localization\ISO4217CharEnum;
|
||||||
use phpOMS\Localization\ISO639x1Enum;
|
use phpOMS\Localization\ISO639x1Enum;
|
||||||
|
|
|
||||||
|
|
@ -169,22 +169,22 @@ echo $this->getData('nav')->render(); ?>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="iRecipientBill"><?= $this->getHtml('Recipient'); ?></label>
|
<label for="iRecipientBill"><?= $this->getHtml('Recipient'); ?></label>
|
||||||
<input type="text" id="iRecipientBill" name="bill_recipient_bill" value="<?= $this->printHtml($bill->billTo) ?>"<?= $disabled; ?>>
|
<input type="text" id="iRecipientBill" name="bill_recipient_bill" value="<?= $this->printHtml($bill->billTo); ?>"<?= $disabled; ?>>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="iAddressBill"><?= $this->getHtml('Address'); ?></label>
|
<label for="iAddressBill"><?= $this->getHtml('Address'); ?></label>
|
||||||
<input type="text" id="iAddressBill" name="bill_address_bill" value="<?= $this->printHtml($bill->billAddress) ?>"<?= $disabled; ?>>
|
<input type="text" id="iAddressBill" name="bill_address_bill" value="<?= $this->printHtml($bill->billAddress); ?>"<?= $disabled; ?>>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="iZipBill"><?= $this->getHtml('Zip'); ?></label>
|
<label for="iZipBill"><?= $this->getHtml('Zip'); ?></label>
|
||||||
<input type="text" id="iZipBill" name="bill_address_bill" value="<?= $this->printHtml($bill->billZip) ?>"<?= $disabled; ?>>
|
<input type="text" id="iZipBill" name="bill_address_bill" value="<?= $this->printHtml($bill->billZip); ?>"<?= $disabled; ?>>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="iCityBill"><?= $this->getHtml('City'); ?></label>
|
<label for="iCityBill"><?= $this->getHtml('City'); ?></label>
|
||||||
<input type="text" id="iCityBill" name="bill_city_bill" value="<?= $this->printHtml($bill->billCity) ?>"<?= $disabled; ?>>
|
<input type="text" id="iCityBill" name="bill_city_bill" value="<?= $this->printHtml($bill->billCity); ?>"<?= $disabled; ?>>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
@ -198,7 +198,7 @@ echo $this->getData('nav')->render(); ?>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="iEmailBill"><?= $this->getHtml('Email'); ?></label>
|
<label for="iEmailBill"><?= $this->getHtml('Email'); ?></label>
|
||||||
<input type="text" id="iEmailBill" name="bill_email_bill" value="<?= $this->printHtml($bill->billEmail) ?>"<?= $disabled; ?>>
|
<input type="text" id="iEmailBill" name="bill_email_bill" value="<?= $this->printHtml($bill->billEmail); ?>"<?= $disabled; ?>>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -219,22 +219,22 @@ echo $this->getData('nav')->render(); ?>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="iRecipientDelivery"><?= $this->getHtml('Recipient'); ?></label>
|
<label for="iRecipientDelivery"><?= $this->getHtml('Recipient'); ?></label>
|
||||||
<input type="text" id="iRecipientDelivery" name="bill_recipient_delivery" value="<?= $this->printHtml($bill->shipTo) ?>"<?= $disabled; ?>>
|
<input type="text" id="iRecipientDelivery" name="bill_recipient_delivery" value="<?= $this->printHtml($bill->shipTo); ?>"<?= $disabled; ?>>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="iAddressDelivery"><?= $this->getHtml('Address'); ?></label>
|
<label for="iAddressDelivery"><?= $this->getHtml('Address'); ?></label>
|
||||||
<input type="text" id="iAddressDelivery" name="bill_address_delivery" value="<?= $this->printHtml($bill->shipAddress) ?>"<?= $disabled; ?>>
|
<input type="text" id="iAddressDelivery" name="bill_address_delivery" value="<?= $this->printHtml($bill->shipAddress); ?>"<?= $disabled; ?>>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="iZipDelivery"><?= $this->getHtml('Zip'); ?></label>
|
<label for="iZipDelivery"><?= $this->getHtml('Zip'); ?></label>
|
||||||
<input type="text" id="iZipDelivery" name="bill_zip_delivery" value="<?= $this->printHtml($bill->shipZip) ?>"<?= $disabled; ?>>
|
<input type="text" id="iZipDelivery" name="bill_zip_delivery" value="<?= $this->printHtml($bill->shipZip); ?>"<?= $disabled; ?>>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="iCityDelivery"><?= $this->getHtml('City'); ?></label>
|
<label for="iCityDelivery"><?= $this->getHtml('City'); ?></label>
|
||||||
<input type="text" id="iCityDelivery" name="bill_city_delivery" value="<?= $this->printHtml($bill->shipCity) ?>"<?= $disabled; ?>>
|
<input type="text" id="iCityDelivery" name="bill_city_delivery" value="<?= $this->printHtml($bill->shipCity); ?>"<?= $disabled; ?>>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
use Modules\Media\Models\NullMedia;
|
|
||||||
use phpOMS\System\File\FileUtils;
|
use phpOMS\System\File\FileUtils;
|
||||||
use phpOMS\Uri\UriFactory;
|
use phpOMS\Uri\UriFactory;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
use Modules\Media\Models\NullMedia;
|
|
||||||
use phpOMS\System\File\FileUtils;
|
use phpOMS\System\File\FileUtils;
|
||||||
use phpOMS\Uri\UriFactory;
|
use phpOMS\Uri\UriFactory;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
echo \json_encode($this->getData('bill') ?? null, \JSON_PRETTY_PRINT);
|
echo \json_encode($this->getData('bill') ?? null, \JSON_PRETTY_PRINT);
|
||||||
Loading…
Reference in New Issue
Block a user