diff --git a/app/Config/Events.php b/app/Config/Events.php index b5a7fd774..e3a4e85f4 100644 --- a/app/Config/Events.php +++ b/app/Config/Events.php @@ -2,7 +2,9 @@ namespace Config; +use App\Events\Db_log; use App\Events\Load_config; +use App\Events\Method; use CodeIgniter\Events\Events; use CodeIgniter\Exceptions\FrameworkException; @@ -53,9 +55,9 @@ Events::on('pre_system', function () } }); -$config = new Load_config(); //TODO: Not 100% sure this is the best way to do this, but without instantiating the class, the event engine tries to run the function as if it were static. +$config = new Load_config(); Events::on('post_controller_constructor', [$config, 'load_config']); -Events::on('post_controller', ['\App\Events\Db_log', 'db_log_queries']); +Events::on('post_controller', [Db_log::class, 'db_log_queries']); -Events::on('pre_controller', ['\App\Events\Method', 'validate_method']); +Events::on('pre_controller', [Method::class, 'validate_method']); diff --git a/app/Config/Validation.php b/app/Config/Validation.php index aa7a5d236..7bfcea07e 100644 --- a/app/Config/Validation.php +++ b/app/Config/Validation.php @@ -6,7 +6,7 @@ use CodeIgniter\Validation\CreditCardRules; use CodeIgniter\Validation\FileRules; use CodeIgniter\Validation\FormatRules; use CodeIgniter\Validation\Rules; -use app\Libraries\MY_Validation; +use App\Libraries\MY_Validation; class Validation { diff --git a/app/Controllers/Attributes.php b/app/Controllers/Attributes.php index 22673c68e..f8c90e3ee 100644 --- a/app/Controllers/Attributes.php +++ b/app/Controllers/Attributes.php @@ -2,7 +2,7 @@ namespace App\Controllers; -use app\Models\Attribute; +use App\Models\Attribute; require_once('Secure_Controller.php'); diff --git a/app/Controllers/Cashups.php b/app/Controllers/Cashups.php index b645dddfc..490857994 100644 --- a/app/Controllers/Cashups.php +++ b/app/Controllers/Cashups.php @@ -2,9 +2,9 @@ namespace App\Controllers; -use app\Models\Cashup; -use app\Models\Expense; -use app\Models\Reports\Summary_payments; +use App\Models\Cashup; +use App\Models\Expense; +use App\Models\Reports\Summary_payments; /** * @property cashup cashup diff --git a/app/Controllers/Config.php b/app/Controllers/Config.php index 6b7dea100..06526fa06 100644 --- a/app/Controllers/Config.php +++ b/app/Controllers/Config.php @@ -2,20 +2,20 @@ namespace App\Controllers; -use app\Libraries\Barcode_lib; -use app\Libraries\Mailchimp_lib; -use app\Libraries\Receiving_lib; -use app\Libraries\Sale_lib; -use app\Libraries\Tax_lib; +use App\Libraries\Barcode_lib; +use App\Libraries\Mailchimp_lib; +use App\Libraries\Receiving_lib; +use App\Libraries\Sale_lib; +use App\Libraries\Tax_lib; -use app\Models\Appconfig; -use app\Models\Attribute; -use app\Models\Customer_rewards; -use app\Models\Dinner_table; -use app\Models\Module; -use app\Models\Enums\Rounding_mode; -use app\Models\Stock_location; -use app\Models\Tax; +use App\Models\Appconfig; +use App\Models\Attribute; +use App\Models\Customer_rewards; +use App\Models\Dinner_table; +use App\Models\Module; +use App\Models\Enums\Rounding_mode; +use App\Models\Stock_location; +use App\Models\Tax; use CodeIgniter\Encryption\Encryption; use CodeIgniter\Encryption\EncrypterInterface; diff --git a/app/Controllers/Customers.php b/app/Controllers/Customers.php index d21a27bfb..323088a10 100644 --- a/app/Controllers/Customers.php +++ b/app/Controllers/Customers.php @@ -2,11 +2,11 @@ namespace App\Controllers; -use app\Libraries\Mailchimp_lib; +use App\Libraries\Mailchimp_lib; -use app\Models\Customer; -use app\Models\Customer_rewards; -use app\Models\Tax_code; +use App\Models\Customer; +use App\Models\Customer_rewards; +use App\Models\Tax_code; use CodeIgniter\Encryption\Encryption; use CodeIgniter\Encryption\EncrypterInterface; diff --git a/app/Controllers/Employees.php b/app/Controllers/Employees.php index f37ed8bbe..814097122 100644 --- a/app/Controllers/Employees.php +++ b/app/Controllers/Employees.php @@ -2,7 +2,7 @@ namespace App\Controllers; -use app\Models\Module; +use App\Models\Module; /** * diff --git a/app/Controllers/Expenses.php b/app/Controllers/Expenses.php index 7bcc8fb4b..62b336b81 100644 --- a/app/Controllers/Expenses.php +++ b/app/Controllers/Expenses.php @@ -2,8 +2,8 @@ namespace App\Controllers; -use app\Models\Expense; -use app\Models\Expense_category; +use App\Models\Expense; +use App\Models\Expense_category; /** * @property expense expense diff --git a/app/Controllers/Expenses_categories.php b/app/Controllers/Expenses_categories.php index c2131f2c3..161a4a7d5 100644 --- a/app/Controllers/Expenses_categories.php +++ b/app/Controllers/Expenses_categories.php @@ -2,7 +2,7 @@ namespace App\Controllers; -use app\Models\Expense_category; +use App\Models\Expense_category; /** * @property expense_category expense_category diff --git a/app/Controllers/Giftcards.php b/app/Controllers/Giftcards.php index f350dcbd7..6432e878d 100644 --- a/app/Controllers/Giftcards.php +++ b/app/Controllers/Giftcards.php @@ -2,7 +2,7 @@ namespace App\Controllers; -use app\Models\Giftcard; +use App\Models\Giftcard; /** * @property giftcard giftcard diff --git a/app/Controllers/Item_kits.php b/app/Controllers/Item_kits.php index f82a50416..d86e6567f 100644 --- a/app/Controllers/Item_kits.php +++ b/app/Controllers/Item_kits.php @@ -2,11 +2,11 @@ namespace App\Controllers; -use app\Libraries\Barcode_lib; +use App\Libraries\Barcode_lib; -use app\Models\Item; -use app\Models\Item_kit; -use app\Models\Item_kit_items; +use App\Models\Item; +use App\Models\Item_kit; +use App\Models\Item_kit_items; /** * diff --git a/app/Controllers/Items.php b/app/Controllers/Items.php index ae45ec86a..3a60ae6d0 100644 --- a/app/Controllers/Items.php +++ b/app/Controllers/Items.php @@ -2,18 +2,18 @@ namespace App\Controllers; -use app\Libraries\Barcode_lib; -use app\Libraries\Item_lib; +use App\Libraries\Barcode_lib; +use App\Libraries\Item_lib; -use app\Models\Attribute; -use app\Models\Inventory; -use app\Models\Item; -use app\Models\Item_kit; -use app\Models\Item_quantity; -use app\Models\Item_taxes; -use app\Models\Stock_location; -use app\Models\Supplier; -use app\Models\Tax_category; +use App\Models\Attribute; +use App\Models\Inventory; +use App\Models\Item; +use App\Models\Item_kit; +use App\Models\Item_quantity; +use App\Models\Item_taxes; +use App\Models\Stock_location; +use App\Models\Supplier; +use App\Models\Tax_category; use Config\Services; use CodeIgniter\Files\File; diff --git a/app/Controllers/Messages.php b/app/Controllers/Messages.php index 6bb625185..c1f57e806 100644 --- a/app/Controllers/Messages.php +++ b/app/Controllers/Messages.php @@ -2,9 +2,9 @@ namespace App\Controllers; -use app\Libraries\Sms_lib; +use App\Libraries\Sms_lib; -use app\Models\Person; +use App\Models\Person; /** * diff --git a/app/Controllers/No_access.php b/app/Controllers/No_access.php index 4170d39da..95805c44f 100644 --- a/app/Controllers/No_access.php +++ b/app/Controllers/No_access.php @@ -2,7 +2,7 @@ namespace App\Controllers; -use app\Models\Module; +use App\Models\Module; /** * Part of the grants mechanism to restrict access to modules that the user doesn't have permission for. diff --git a/app/Controllers/Office.php b/app/Controllers/Office.php index 58a3bfbe9..1892baa9f 100644 --- a/app/Controllers/Office.php +++ b/app/Controllers/Office.php @@ -2,7 +2,7 @@ namespace App\Controllers; -use app\Models\Employee; +use App\Models\Employee; /** * @property employee employee diff --git a/app/Controllers/Persons.php b/app/Controllers/Persons.php index e8c9e490b..e2037ab22 100644 --- a/app/Controllers/Persons.php +++ b/app/Controllers/Persons.php @@ -2,7 +2,7 @@ namespace App\Controllers; -use app\Models\Person; +use App\Models\Person; /** * @property person person diff --git a/app/Controllers/Receivings.php b/app/Controllers/Receivings.php index c5fb4ed30..337cbc321 100644 --- a/app/Controllers/Receivings.php +++ b/app/Controllers/Receivings.php @@ -2,15 +2,15 @@ namespace App\Controllers; -use app\Libraries\Receiving_lib; -use app\Libraries\Token_lib; -use app\Libraries\Barcode_lib; -use app\Models\Inventory; -use app\Models\Item; -use app\Models\Item_kit; -use app\Models\Receiving; -use app\Models\Stock_location; -use app\Models\Supplier; +use App\Libraries\Receiving_lib; +use App\Libraries\Token_lib; +use App\Libraries\Barcode_lib; +use App\Models\Inventory; +use App\Models\Item; +use App\Models\Item_kit; +use App\Models\Receiving; +use App\Models\Stock_location; +use App\Models\Supplier; use ReflectionException; /** diff --git a/app/Controllers/Reports.php b/app/Controllers/Reports.php index 688f68aab..c0aa0ddf1 100644 --- a/app/Controllers/Reports.php +++ b/app/Controllers/Reports.php @@ -2,29 +2,29 @@ namespace App\Controllers; -use app\Models\Attribute; -use app\Models\Customer; -use app\Models\Stock_location; -use app\Models\Supplier; -use app\Models\Reports\Detailed_receivings; -use app\Models\Reports\Detailed_sales; -use app\Models\Reports\Inventory_low; -use app\Models\Reports\Inventory_summary; -use app\Models\Reports\Specific_customer; -use app\Models\Reports\Specific_discount; -use app\Models\Reports\Specific_employee; -use app\Models\Reports\Specific_supplier; -use app\Models\Reports\Summary_categories; -use app\Models\Reports\Summary_customers; -use app\Models\Reports\Summary_discounts; -use app\Models\Reports\Summary_employees; -use app\Models\Reports\Summary_expenses_categories; -use app\Models\Reports\Summary_items; -use app\Models\Reports\Summary_payments; -use app\Models\Reports\Summary_sales; -use app\Models\Reports\Summary_sales_taxes; -use app\Models\Reports\Summary_suppliers; -use app\Models\Reports\Summary_taxes; +use App\Models\Attribute; +use App\Models\Customer; +use App\Models\Stock_location; +use App\Models\Supplier; +use App\Models\Reports\Detailed_receivings; +use App\Models\Reports\Detailed_sales; +use App\Models\Reports\Inventory_low; +use App\Models\Reports\Inventory_summary; +use App\Models\Reports\Specific_customer; +use App\Models\Reports\Specific_discount; +use App\Models\Reports\Specific_employee; +use App\Models\Reports\Specific_supplier; +use App\Models\Reports\Summary_categories; +use App\Models\Reports\Summary_customers; +use App\Models\Reports\Summary_discounts; +use App\Models\Reports\Summary_employees; +use App\Models\Reports\Summary_expenses_categories; +use App\Models\Reports\Summary_items; +use App\Models\Reports\Summary_payments; +use App\Models\Reports\Summary_sales; +use App\Models\Reports\Summary_sales_taxes; +use App\Models\Reports\Summary_suppliers; +use App\Models\Reports\Summary_taxes; use CodeIgniter\HTTP\Uri; /** diff --git a/app/Controllers/Sales.php b/app/Controllers/Sales.php index c3a492354..14529cf9e 100644 --- a/app/Controllers/Sales.php +++ b/app/Controllers/Sales.php @@ -2,24 +2,24 @@ namespace App\Controllers; -use app\Libraries\Barcode_lib; -use app\Libraries\Email_lib; -use app\Libraries\Sale_lib; -use app\Libraries\Tax_lib; -use app\Libraries\Token_lib; -use app\Models\Customer; -use app\Models\Customer_rewards; -use app\Models\Dinner_table; -use app\Models\Employee; -use app\Models\Giftcard; -use app\Models\Inventory; -use app\Models\Item; -use app\Models\Item_kit; -use app\Models\Sale; -use app\Models\Stock_location; -use app\Models\Tokens\Token_invoice_count; -use app\Models\Tokens\Token_customer; -use app\Models\Tokens\Token_invoice_sequence; +use App\Libraries\Barcode_lib; +use App\Libraries\Email_lib; +use App\Libraries\Sale_lib; +use App\Libraries\Tax_lib; +use App\Libraries\Token_lib; +use App\Models\Customer; +use App\Models\Customer_rewards; +use App\Models\Dinner_table; +use App\Models\Employee; +use App\Models\Giftcard; +use App\Models\Inventory; +use App\Models\Item; +use App\Models\Item_kit; +use App\Models\Sale; +use App\Models\Stock_location; +use App\Models\Tokens\Token_invoice_count; +use App\Models\Tokens\Token_customer; +use App\Models\Tokens\Token_invoice_sequence; use CodeIgniter\Config\Services; use ReflectionException; diff --git a/app/Controllers/Secure_Controller.php b/app/Controllers/Secure_Controller.php index 4bff8c5b8..bd7511530 100644 --- a/app/Controllers/Secure_Controller.php +++ b/app/Controllers/Secure_Controller.php @@ -2,8 +2,8 @@ namespace App\Controllers; -use app\Models\Employee; -use app\Models\Module; +use App\Models\Employee; +use App\Models\Module; use CodeIgniter\Session\Session; diff --git a/app/Controllers/Suppliers.php b/app/Controllers/Suppliers.php index 0440b3b62..223a726fb 100644 --- a/app/Controllers/Suppliers.php +++ b/app/Controllers/Suppliers.php @@ -2,7 +2,7 @@ namespace App\Controllers; -use app\Models\Supplier; +use App\Models\Supplier; /** * diff --git a/app/Controllers/Tax_categories.php b/app/Controllers/Tax_categories.php index 591fc56d5..212e8a3cf 100644 --- a/app/Controllers/Tax_categories.php +++ b/app/Controllers/Tax_categories.php @@ -2,7 +2,7 @@ namespace App\Controllers; -use app\Models\Tax_category; +use App\Models\Tax_category; /** * @property tax_category tax_category diff --git a/app/Controllers/Tax_codes.php b/app/Controllers/Tax_codes.php index fd40fd851..21a30b167 100644 --- a/app/Controllers/Tax_codes.php +++ b/app/Controllers/Tax_codes.php @@ -2,7 +2,7 @@ namespace App\Controllers; -use app\Models\Tax_code; +use App\Models\Tax_code; /** * @property tax_code tax_code diff --git a/app/Controllers/Tax_jurisdictions.php b/app/Controllers/Tax_jurisdictions.php index ade86567f..5df28470f 100644 --- a/app/Controllers/Tax_jurisdictions.php +++ b/app/Controllers/Tax_jurisdictions.php @@ -2,7 +2,7 @@ namespace App\Controllers; -use app\Models\Tax_jurisdiction; +use App\Models\Tax_jurisdiction; /** * @property tax_jurisdiction tax_jurisdiction diff --git a/app/Controllers/Taxes.php b/app/Controllers/Taxes.php index 2aa63116a..fe8ee61a5 100644 --- a/app/Controllers/Taxes.php +++ b/app/Controllers/Taxes.php @@ -2,12 +2,12 @@ namespace App\Controllers; -use app\Libraries\Tax_lib; -use app\Models\enums\Rounding_mode; -use app\Models\Tax; -use app\Models\Tax_category; -use app\Models\Tax_code; -use app\Models\Tax_jurisdiction; +use App\Libraries\Tax_lib; +use App\Models\enums\Rounding_mode; +use App\Models\Tax; +use App\Models\Tax_category; +use App\Models\Tax_code; +use App\Models\Tax_jurisdiction; /** * @property tax_lib tax_lib diff --git a/app/Database/Migrations/20170502221506_sales_tax_data.php b/app/Database/Migrations/20170502221506_sales_tax_data.php index 5529dc3c9..07b8fcbcd 100644 --- a/app/Database/Migrations/20170502221506_sales_tax_data.php +++ b/app/Database/Migrations/20170502221506_sales_tax_data.php @@ -2,8 +2,8 @@ namespace App\Database\Migrations; -use app\Libraries\Tax_lib; -use app\Models\Appconfig; +use App\Libraries\Tax_lib; +use App\Models\Appconfig; use CodeIgniter\Database\Migration; use CodeIgniter\Database\ResultInterface; diff --git a/app/Database/Migrations/20200202000000_taxamount.php b/app/Database/Migrations/20200202000000_taxamount.php index fd5df0778..bbc77f866 100644 --- a/app/Database/Migrations/20200202000000_taxamount.php +++ b/app/Database/Migrations/20200202000000_taxamount.php @@ -3,8 +3,8 @@ namespace App\Database\Migrations; use CodeIgniter\Database\Migration; -use app\Libraries\Tax_lib; -use app\Models\Appconfig; +use App\Libraries\Tax_lib; +use App\Models\Appconfig; use CodeIgniter\Database\ResultInterface; /** diff --git a/app/Database/Migrations/20210422000000_database_optimizations.php b/app/Database/Migrations/20210422000000_database_optimizations.php index 9fad4feff..d329e29b2 100644 --- a/app/Database/Migrations/20210422000000_database_optimizations.php +++ b/app/Database/Migrations/20210422000000_database_optimizations.php @@ -4,7 +4,7 @@ namespace App\Database\Migrations; use CodeIgniter\Database\Migration; use CodeIgniter\Database\ResultInterface; -use app\Models\Attribute; +use App\Models\Attribute; use DateTime; class Migration_database_optimizations extends Migration diff --git a/app/Database/Migrations/20210422000001_remove_duplicate_links.php b/app/Database/Migrations/20210422000001_remove_duplicate_links.php index 555a1ab03..afeff0273 100644 --- a/app/Database/Migrations/20210422000001_remove_duplicate_links.php +++ b/app/Database/Migrations/20210422000001_remove_duplicate_links.php @@ -3,7 +3,7 @@ namespace App\Database\Migrations; use CodeIgniter\Database\Migration; -use app\Models\Attribute; +use App\Models\Attribute; class Migration_remove_duplicate_links extends Migration { diff --git a/app/Events/Load_config.php b/app/Events/Load_config.php index 65e68b84f..ce4eca59a 100644 --- a/app/Events/Load_config.php +++ b/app/Events/Load_config.php @@ -2,8 +2,8 @@ namespace App\Events; -use app\Libraries\MY_Migration; -use app\Models\Appconfig; +use App\Libraries\MY_Migration; +use App\Models\Appconfig; use CodeIgniter\Session\Session; use Config\Services; diff --git a/app/Helpers/locale_helper.php b/app/Helpers/locale_helper.php index 81c4ade51..6c33f3de2 100644 --- a/app/Helpers/locale_helper.php +++ b/app/Helpers/locale_helper.php @@ -1,5 +1,5 @@ 'item_form', 'class' => 'form-horizontal']) ?> diff --git a/app/Views/items/manage.php b/app/Views/items/manage.php index a3c267267..02409ff46 100644 --- a/app/Views/items/manage.php +++ b/app/Views/items/manage.php @@ -7,7 +7,7 @@ * @var int $stock_location */ -use app\Models\Employee; +use App\Models\Employee; ?> diff --git a/app/Views/reports/listing.php b/app/Views/reports/listing.php index e5d863d57..d7ec51493 100644 --- a/app/Views/reports/listing.php +++ b/app/Views/reports/listing.php @@ -3,7 +3,7 @@ * @var array $grants */ -use app\Models\Employee; +use App\Models\Employee; ?> diff --git a/app/Views/sales/receipt.php b/app/Views/sales/receipt.php index 0e60929c9..d4aa6048a 100644 --- a/app/Views/sales/receipt.php +++ b/app/Views/sales/receipt.php @@ -4,7 +4,7 @@ * @var bool $print_after_sale */ -use app\Models\Employee; +use App\Models\Employee; ?> diff --git a/app/Views/sales/register.php b/app/Views/sales/register.php index 8b42e4ff1..46227a2cd 100644 --- a/app/Views/sales/register.php +++ b/app/Views/sales/register.php @@ -38,7 +38,7 @@ * @var float $cash_amount_due */ -use app\Models\Employee; +use App\Models\Employee; ?> diff --git a/app/Views/sales/suspended.php b/app/Views/sales/suspended.php index 6b102ff62..0f08480c6 100644 --- a/app/Views/sales/suspended.php +++ b/app/Views/sales/suspended.php @@ -3,8 +3,8 @@ * @var array $suspended_sales */ -use app\Models\Employee; -use app\Models\Customer; +use App\Models\Employee; +use App\Models\Customer; ?>