From 3fbf652ab27bf4ec1b07b6349daea5b693c89b63 Mon Sep 17 00:00:00 2001 From: mark8-1 Date: Wed, 20 Nov 2024 11:44:53 +0200 Subject: [PATCH] fix lint --- .../Console/Commands/AccessRateChecker.php | 2 +- .../app/Console/Commands/DummyDataCreator.php | 2 +- .../app/Console/Commands/RoutesGenerator.php | 2 +- src/backend/app/Console/Kernel.php | 1 - src/backend/app/Exceptions/Handler.php | 6 +- src/backend/app/Helpers/MailHelper.php | 6 +- .../app/Helpers/MailHelperInterface.php | 2 +- src/backend/app/Helpers/MailHelperMock.php | 2 +- src/backend/app/Helpers/PowerConverter.php | 2 +- src/backend/app/Helpers/RelationsManager.php | 2 +- .../AgentAssignedApplianceWebController.php | 3 +- .../AgentAssignedAppliancesController.php | 1 - .../Http/Controllers/AgentAuthController.php | 5 +- .../AgentBalanceHistoryController.php | 3 - .../AgentCommissionWebController.php | 1 - .../Controllers/AgentCustomerController.php | 1 - .../Controllers/AgentReceiptWebController.php | 5 +- .../AgentSoldApplianceController.php | 1 - .../Controllers/AgentTicketController.php | 2 +- .../Controllers/AssetPersonController.php | 4 +- .../Http/Controllers/AssetRateController.php | 7 ++- .../Http/Controllers/AssetTypeController.php | 2 - .../app/Http/Controllers/AuthController.php | 5 +- .../Http/Controllers/CompanyController.php | 2 +- .../Controllers/ManufacturerController.php | 2 +- .../app/Http/Controllers/MeterController.php | 1 - ...MeterGeographicalInformationController.php | 4 +- .../Controllers/MeterTariffController.php | 2 +- .../Http/Controllers/MeterTypeController.php | 4 +- .../Http/Controllers/MiniGridController.php | 4 +- .../Controllers/PaymentHistoryController.php | 11 ++-- .../app/Http/Controllers/PersonController.php | 4 -- .../app/Http/Controllers/PluginController.php | 4 +- .../app/Http/Controllers/ReportController.php | 2 +- src/backend/app/Http/Controllers/Reports.php | 39 ++++++------- .../Http/Controllers/RevenueController.php | 3 +- .../app/Http/Controllers/SmsController.php | 2 +- .../SubConnectionTypeController.php | 2 +- .../Controllers/UserPasswordController.php | 2 +- .../Middleware/AgentBalanceMiddleware.php | 7 ++- .../Middleware/RedirectIfAuthenticated.php | 5 +- .../Http/Middleware/RestrictionMiddleware.php | 7 ++- .../Http/Middleware/TransactionRequest.php | 3 +- ...serDefaultDatabaseConnectionMiddleware.php | 4 +- .../app/Http/Resources/ApiResource.php | 3 +- .../app/Http/Resources/MeterResource.php | 3 +- .../app/Http/Resources/MeterTypeResource.php | 3 +- .../Resources/SmsSearchResultResource.php | 8 +-- .../app/Http/Resources/UserResource.php | 3 +- .../app/Jobs/EnergyTransactionProcessor.php | 2 +- src/backend/app/Jobs/ProcessPayment.php | 2 +- src/backend/app/Jobs/SmsProcessor.php | 6 +- src/backend/app/Jobs/TokenProcessor.php | 2 +- src/backend/app/Jobs/UpdatePiggyBankEntry.php | 2 +- src/backend/app/Lib/IMeterReader.php | 8 ++- src/backend/app/Lib/ISmsProvider.php | 1 - .../app/Listeners/AccessRateListener.php | 2 +- .../app/Listeners/ClusterGeoListener.php | 7 +-- src/backend/app/Listeners/HistoryListener.php | 4 +- src/backend/app/Listeners/PaymentListener.php | 8 +-- src/backend/app/Listeners/SmsListener.php | 4 +- .../app/ManufacturerApi/CalinReadMeter.php | 17 +++--- src/backend/app/Misc/LoanDataContainer.php | 4 +- src/backend/app/Models/Address/Address.php | 8 +-- src/backend/app/Models/Agent.php | 14 ++--- src/backend/app/Models/AgentCommission.php | 2 +- src/backend/app/Models/AssetRate.php | 6 +- src/backend/app/Models/City.php | 8 +-- src/backend/app/Models/Cluster.php | 2 +- src/backend/app/Models/Company.php | 2 +- src/backend/app/Models/History.php | 6 +- src/backend/app/Models/MainSettings.php | 6 +- src/backend/app/Models/MapSettings.php | 2 +- src/backend/app/Models/Meter/Meter.php | 4 +- .../app/Models/Meter/MeterConsumption.php | 10 ++-- src/backend/app/Models/Meter/MeterTariff.php | 10 ++-- src/backend/app/Models/Meter/MeterToken.php | 2 +- src/backend/app/Models/Meter/MeterType.php | 6 +- src/backend/app/Models/MiniGrid.php | 6 +- src/backend/app/Models/PaymentHistory.php | 4 +- src/backend/app/Models/Person/Person.php | 10 ++-- src/backend/app/Models/Report.php | 2 +- src/backend/app/Models/Restriction.php | 6 +- src/backend/app/Models/Sms.php | 12 ++-- .../app/Models/SocialTariffPiggyBank.php | 4 +- src/backend/app/Models/Subscription.php | 4 +- src/backend/app/Models/Target.php | 4 +- .../app/Models/TariffPricingComponent.php | 6 +- src/backend/app/Models/TicketSettings.php | 2 +- .../Models/Transaction/AirtelTransaction.php | 4 +- .../app/Models/Transaction/Transaction.php | 4 +- src/backend/app/Models/User.php | 6 +- .../Observers/AgentBalanceHistoryObserver.php | 1 - src/backend/app/PaymentHandler/AccessRate.php | 2 +- src/backend/app/Relations/BelongsToMorph.php | 25 ++++---- .../app/Services/AbstractExportService.php | 2 +- ...actPaymentAggregatorTransactionService.php | 8 +-- .../app/Services/AgentTransactionService.php | 2 +- .../app/Services/AppliancePaymentService.php | 2 +- .../app/Services/ClusterRevenueService.php | 10 ++-- .../app/Services/Interfaces/IAssociative.php | 2 +- .../app/Services/Interfaces/IBaseService.php | 3 +- .../Services/Interfaces/ISettingsService.php | 3 +- src/backend/app/Services/PeriodService.php | 2 +- src/backend/app/Services/PersonService.php | 7 ++- .../app/Services/RegistrationTailService.php | 6 +- src/backend/app/Services/SessionService.php | 2 +- src/backend/app/Services/SmsService.php | 6 +- src/backend/app/Services/TargetService.php | 2 +- .../app/Services/UserAddressService.php | 2 +- src/backend/app/Sms/AndroidGateway.php | 4 +- .../SmsResendInformationHeader.php | 2 +- .../Senders/ResendInformationNotification.php | 2 +- src/backend/app/Sms/Senders/SmsSender.php | 4 +- .../app/Traits/RestExceptionHandler.php | 23 ++++---- .../app/Utils/ApplianceInstallmentPayer.php | 2 +- .../Ecosys/CustomerDatabaseParser.php | 4 +- .../Services/AppliancePersonService.php | 2 +- .../Sharding/ApiCompanyResolverService.php | 4 +- .../Sharding/ApiResolvers/TestApiResolver.php | 2 +- .../Provider/AgentTransactionProvider.php | 2 +- .../Provider/AirtelVoltTerraProvider.php | 6 +- .../Provider/TransactionAdapter.php | 2 +- .../Provider/VodacomTransactionProvider.php | 19 +++--- ...22_03_10_120408_create_companies_table.php | 2 +- ..._134450_create_company_databases_table.php | 2 +- ...8_204649_create_database_proxies_table.php | 2 +- ..._06_21_102121_create_mpm_plugins_table.php | 2 +- ...21_122032_add_email_to_companies_table.php | 2 +- ...3903_add_tail_tag_to_mpm_plugins_table.php | 2 +- ...tallation_command_to_mpm_plugins_table.php | 2 +- ..._bulk_registration_to_mpm_plugin_table.php | 2 +- ...dd_viber_messaging_to_mpm_plugin_table.php | 2 +- ...email_field_for_database_proxies_table.php | 2 +- ...wave_money_payment_to_mpm_plugin_table.php | 2 +- .../2022_11_25_091725_create_company_jobs.php | 2 +- ...000_add_micro_star_to_mpm_plugin_table.php | 2 +- ...00_add_root_class_to_mpm_plugins_table.php | 2 +- ...00000_add_sun_king_to_mpm_plugin_table.php | 2 +- ...24_110414_create_protected_pages_table.php | 2 +- ...ected_page_password_to_companies_table.php | 2 +- ...0000_add_gome_long_to_mpm_plugin_table.php | 2 +- ...121811_add_wavecom_to_mpm_plugin_table.php | 2 +- ...escription_column_in_mpm_plugins_table.php | 2 +- ...00000_add_daly_bms_to_mpm_plugin_table.php | 2 +- ..._000000_add_angaza_to_mpm_plugin_table.php | 2 +- ..._02_07_100345_create_usage_types_table.php | 2 +- ...usage_type_column_to_mpm_plugins_table.php | 2 +- ...nd_trace_columns_to_company_jobs_table.php | 2 +- .../2014_10_12_000000_create_users_table.php | 2 +- ...12_100000_create_password_resets_table.php | 2 +- ...5615_create_vodacom_transactions_table.php | 2 +- ...05_24_201051_create_transactions_table.php | 2 +- ...13335_create_airtel_transactions_table.php | 2 +- ..._131106_create_payment_histories_table.php | 2 +- ...5_25_131119_create_meter_tariffs_table.php | 2 +- ...18_05_29_071453_create_addresses_table.php | 2 +- ...create_geographical_informations_table.php | 2 +- ..._05_29_140926_create_meter_types_table.php | 2 +- .../2018_05_30_124521_create_meters_table.php | 2 +- ...5_31_071601_create_manufacturers_table.php | 2 +- .../2018_05_31_075346_create_cities_table.php | 2 +- ...18_05_31_075353_create_countries_table.php | 2 +- .../2018_06_01_141845_create_people_table.php | 2 +- .../2018_06_04_124637_create__roles_table.php | 2 +- ...06_07_155444_create_meter_tokens_table.php | 2 +- ...8_102610_create_meter_parameters_table.php | 2 +- .../2018_06_11_131951_create_sms_table.php | 2 +- ...352_create_transaction_conflicts_table.php | 2 +- ...06_28_080905_create_access_rates_table.php | 2 +- ...0914_create_access_rate_payments_table.php | 2 +- ..._07_11_075002_create_permission_tables.php | 2 +- .../2018_07_12_133700_create_loans_table.php | 2 +- ...18_07_12_134253_create_customers_table.php | 2 +- ...18_10_04_195503_create_histories_table.php | 2 +- ...110924_create_meter_consumptions_table.php | 2 +- ...2_123911_create_payment_profiles_table.php | 2 +- ...018_11_29_090603_create_clusters_table.php | 2 +- ...018_12_05_144906_create_revenues_table.php | 2 +- ...1_083717_create_connection_types_table.php | 2 +- ...2018_12_13_083722_create_targets_table.php | 2 +- ..._12_13_100738_create_sub_targets_table.php | 2 +- .../2019_04_19_083645_customer_group.php | 2 +- ...2438_create_sub_connection_types_table.php | 2 +- ..._103123_create_connection_groups_table.php | 2 +- .../2019_05_15_122118_reports.php | 2 +- ...9_06_24_160040_create_mini_grids_table.php | 2 +- ..._133655_create_maintenance_users_table.php | 2 +- ...019_11_06_121116_create_energies_table.php | 2 +- .../2019_11_15_102431_create_solars_table.php | 2 +- ...19_11_26_063009_create_batteries_table.php | 2 +- .../2019_12_16_090907_create_assets_table.php | 2 +- ..._12_16_091934_create_asset_types_table.php | 2 +- ...12_16_092044_create_asset_people_table.php | 2 +- ..._12_16_093223_create_asset_rates_table.php | 2 +- .../2020_01_27_135206_create_logs_table.php | 2 +- .../2020_04_05_233604_create_p_v_s_table.php | 2 +- ...04_19_234527_create_restrictions_table.php | 2 +- ...020_04_19_235421_create_upgrades_table.php | 2 +- ...4_20_001454_create_subscriptions_table.php | 2 +- .../2020_06_20_085555_weather_data.php | 2 +- ...create_tariff_pricing_components_table.php | 2 +- ..._21_194542_create_social_tariffs_table.php | 2 +- ...create_social_tariff_piggy_banks_table.php | 2 +- ...15405_add_total_price_to_meter_tariffs.php | 2 +- .../2020_07_12_192802_create_agents_table.php | 2 +- ...130601_create_agent_transactions_table.php | 2 +- ...6_create_agent_balance_histories_table.php | 2 +- ...create_agent_assigned_appliances_table.php | 2 +- ...811_create_agent_sold_appliances_table.php | 2 +- ..._083600_create_agent_commissions_table.php | 2 +- ..._25_155837_create_agent_receipts_table.php | 2 +- ...8_03_081836_create_agent_charges_table.php | 2 +- ...748_create_agent_receipt_details_table.php | 2 +- ..._02_072509_create_time_of_usages_table.php | 2 +- ..._19_122517_create_sub_menu_items_table.php | 2 +- ...0_10_19_122649_create_menu_items_table.php | 2 +- ...2020_10_29_170007_create_plugins_table.php | 2 +- ...2_17_144527_create_main_settings_table.php | 2 +- ...12_23_165814_create_map_settings_table.php | 2 +- ...ransaction_to_agent_transactions_table.php | 2 +- ...130412_create_third_party_transactions.php | 2 +- ...nsaction_to_vodacom_transactions_table.php | 2 +- ...ansaction_to_airtel_transactions_table.php | 2 +- ...05_234039_create_ticket_settings_table.php | 2 +- ..._122556_add_columns_to_batteries_table.php | 2 +- ...1_18_123245_add_columns_to_p_v_s_table.php | 2 +- .../2021_02_18_153556_create_sms_bodies.php | 2 +- ...556_create_sms_resend_information_keys.php | 2 +- ...6421_create_sms_appliance_remind_rates.php | 2 +- ..._03_140758_create_sms_android_settings.php | 2 +- ...706_create_sms_variable_default_values.php | 2 +- .../2021_03_2_1561251_update_sms_table.php | 2 +- ...8_add_additional_json_column_to_people.php | 2 +- ...8_104840_create_person_documents_table.php | 2 +- ...085817_update_meter_consumptions_table.php | 4 +- ...add_down_payment_to_asset_people_table.php | 2 +- ...rst_payment_date_to_asset_people_table.php | 2 +- ..._092522_create_cash_transactions_table.php | 2 +- ...2021_10_18_220817_create_mail_settings.php | 2 +- ...5_10_093215_update_meter_tariffs_table.php | 4 +- ..._10_101348_update_social_tariffs_table.php | 4 +- ...update_tariff_pricing_components_table.php | 4 +- ...update_social_tariff_piggy_banks_table.php | 4 +- ...05_10_102047_update_access_rates_table.php | 4 +- ...2214_update_access_rate_payments_table.php | 4 +- ...05_10_102507_update_asset_people_table.php | 4 +- ...05_10_102649_update_transactions_table.php | 4 +- ..._102805_update_payment_histories_table.php | 4 +- ..._05_19_102938_update_asset_types_table.php | 4 +- ..._add_connection_column_to_agents_table.php | 2 +- .../2022_06_21_090125_create_calin_tables.php | 6 +- ...06_21_090327_create_calin_smart_tables.php | 6 +- .../2022_06_21_090338_create_kelin_tables.php | 20 +++---- ..._create_mesomb_payment_provider_tables.php | 4 +- .../2022_06_21_090351_create_spark_tables.php | 34 +++++------ ...2022_06_21_090402_create_steama_tables.php | 58 +++++++++---------- .../2022_06_21_090412_create_stron_tables.php | 6 +- ..._create_swifta_payment_provider_tables.php | 6 +- ..._092948_create_registration_tail_table.php | 2 +- ...000000_create_bulk_registration_tables.php | 4 +- ...0327_add_direction_column_to_sms_table.php | 2 +- ...945_add_gateway_id_column_to_sms_table.php | 2 +- ...123_add_dispatched_column_to_sms_table.php | 2 +- ...42319_add_attempts_column_to_sms_table.php | 2 +- ..._0000000_create_viber_messaging_tables.php | 8 +-- ...purchase_amount_to_meter_tariffs_table.php | 2 +- ...ate_wave_money_payment_provider_tables.php | 6 +- ..._11_29_000000_create_micro_star_tables.php | 6 +- ...000_update_swifta_authentication_table.php | 4 +- .../2022_14_12_create_sun_king_tables.php | 6 +- ...3_15_092048_add_colums_to_solars_table.php | 2 +- .../2023_03_16_105024_update_solars_table.php | 2 +- ...update_data_type_values_energies_table.php | 2 +- ...update_data_type_values_energies_table.php | 2 +- ...023_04_02_121811_create_wavecom_tables.php | 4 +- ...421_add_api_type_to_table_transactions.php | 2 +- .../2023_04_26_223352_update_sms_table.php | 2 +- .../2023_06_02_create_gome_long_tables.php | 8 +-- ...assets_asset_people_asset_types_tables.php | 4 +- ...pdate_sms_appliance_remind_rates_table.php | 2 +- ...074114_update_wavecom_wavemoney_tables.php | 2 +- ...2023_11_03_112202_create_devices_table.php | 2 +- ...120614_create_solar_home_systems_table.php | 2 +- ..._configuration_columns_to_meters_table.php | 2 +- ...07_update_action_field_type_logs_table.php | 2 +- ..._drop_geo_id_column_from_address_table.php | 2 +- ...add_type_column_to_manufacturers_table.php | 2 +- ..._id_column_to_solar_home_systems_table.php | 2 +- ...date_person_id_column_in_devices_table.php | 2 +- ..._device_serial_column_in_devices_table.php | 2 +- ...ber_column_in_solar_home_systems_table.php | 2 +- .../2023_11_17_095204_create_tokens_table.php | 2 +- ...ce_serial_column_to_asset_people_table.php | 2 +- ...ce_serial_column_in_asset_people_table.php | 2 +- .../2024_01_01_create_daly_bms_tables.php | 6 +- ...2024_01_02_124146_create_e_bikes_table.php | 2 +- .../2024_01_12_create_angaza_tables.php | 6 +- ...age_type_column_to_main_settings_table.php | 2 +- ..._usage_type_column_to_menu_items_table.php | 2 +- ...24_09_30_113302_remove_siderbar_tables.php | 2 +- ...0_23_153042_add_amount_to_agent_charge.php | 2 +- ...0_30_154625_create_notifications_table.php | 2 +- ...24_10_31_180458_remove_batteries_table.php | 2 +- ...024_10_31_180510_remove_energies_table.php | 2 +- ...524_remove_mini_grid_frequencies_table.php | 2 +- .../2024_10_31_180539_remove_pvs_table.php | 2 +- .../2024_10_31_180546_remove_solars_table.php | 2 +- ...10_31_180605_remove_weather_data_table.php | 2 +- ...2024_10_31_180852_remove_agent_tickets.php | 2 +- ...2024_10_31_181016_remove_city_clusters.php | 2 +- ...drop_data_stream_column_from_mini_grid.php | 2 +- .../seeders/SolarHomeSystemSeeder.php | 2 +- .../src/Http/Resources/AngazaResource.php | 3 +- .../src/Services/ManufacturerService.php | 2 +- .../create_bulk_registration_tables.php | 4 +- .../src/Console/Commands/UpdatePackage.php | 2 +- .../src/Exceptions/Handler.php | 4 +- .../src/Helpers/CsvDataProcessor.php | 2 +- .../src/Services/CityService.php | 4 +- .../src/Services/ClusterService.php | 4 +- .../src/Services/ManufacturerService.php | 2 +- .../src/Services/MiniGridService.php | 4 +- .../src/Console/Commands/UpdatePackage.php | 2 +- .../calin-meter/src/Helpers/ApiHelpers.php | 2 +- .../src/Http/Resources/CalinResource.php | 3 +- .../src/CalinSmartMeterApi.php | 2 +- .../src/Console/Commands/UpdatePackage.php | 2 +- .../src/Helpers/ApiHelpers.php | 2 +- .../src/Http/Resources/CalinSmartResource.php | 3 +- .../src/Console/Commands/CheckPayments.php | 2 +- .../src/Console/Commands/SyncBikes.php | 2 +- .../src/Http/Resources/DalyBmsResource.php | 3 +- .../daly-bms/src/Modules/Api/ApiRequests.php | 2 +- .../daly-bms/src/Modules/Api/DalyBmsApi.php | 6 +- .../src/Services/ManufacturerService.php | 2 +- .../src/Http/Resources/GomeLongResource.php | 3 +- .../src/Observers/MeterTariffObserver.php | 6 +- .../src/Services/GomeLongTariffService.php | 6 +- .../src/Services/ManufacturerService.php | 2 +- .../Console/Commands/AccessTokenRefresher.php | 2 +- .../src/Console/Commands/DataSynchronizer.php | 8 +-- .../Commands/ReadDailyMeterConsumptions.php | 2 +- .../ReadMinutelyMeterConsumptions.php | 2 +- .../src/Console/Commands/UpdatePackage.php | 2 +- .../kelin-meter/src/Helpers/ApiHelpers.php | 2 +- .../Resources/DailyConsumptionCollection.php | 3 +- .../Resources/KelinCustomerCollection.php | 3 +- .../Http/Resources/KelinMeterCollection.php | 3 +- .../src/Http/Resources/KelinResource.php | 3 +- .../Http/Resources/KelinSettingCollection.php | 3 +- .../MinutelyConsumptionCollection.php | 3 +- .../src/Services/DailyConsumptionService.php | 2 +- .../src/Services/KelinCredentialService.php | 2 +- .../src/Services/KelinMeterService.php | 8 +-- .../src/Services/KelinSyncActionService.php | 2 +- .../src/Services/KelinSyncSettingService.php | 4 +- .../Services/MinutelyConsumptionService.php | 2 +- .../src/Console/Commands/UpdatePackage.php | 2 +- .../MesombTransactionProcessingResource.php | 3 +- .../src/Services/MesomTransactionService.php | 2 +- .../src/Console/Commands/UpdatePackage.php | 2 +- .../src/Http/Resources/MicroStarResource.php | 3 +- .../src/Services/ManufacturerService.php | 2 +- .../Services/MicroStarCertificateService.php | 4 +- .../Commands/InstallSparkMeterPackage.php | 4 +- .../Commands/SparkMeterDataSynchronizer.php | 8 +-- .../Commands/SparkMeterSmsNotifier.php | 12 ++-- .../SparkMeterTransactionStatusCheck.php | 2 +- .../Commands/UpdateSparkMeterPackage.php | 2 +- .../src/Helpers/InsertSparkMeterApi.php | 2 +- .../SparkMeterCredentialResource.php | 3 +- .../src/Http/Resources/SparkResource.php | 3 +- .../src/Listeners/MeterParameterListener.php | 4 +- .../spark-meter/src/Listeners/SmsListener.php | 2 +- .../src/Services/CustomerService.php | 2 +- .../src/Services/OrganizationService.php | 2 +- .../src/Services/SmSmsSettingService.php | 4 +- .../src/Services/SmSyncActionService.php | 2 +- .../src/Services/SmSyncSettingService.php | 12 ++-- .../src/Services/TariffService.php | 2 +- .../src/Services/TransactionService.php | 20 +++---- .../SparkSmsMeterResetFeedbackHeader.php | 2 +- .../src/Sms/Senders/MeterResetFeedback.php | 2 +- .../src/Tests/Unit/SmsNotifyTest.php | 10 ++-- .../src/Console/Commands/InstallPackage.php | 2 +- .../Commands/ReadHourlyMeterReadings.php | 2 +- .../Commands/SteamaMeterDataSynchronizer.php | 8 +-- .../Console/Commands/SteamaSmsNotifier.php | 8 +-- .../src/Console/Commands/UpdatePackage.php | 2 +- .../steama-meter/src/Helpers/ApiHelpers.php | 2 +- .../Resources/SteamaCredentialResource.php | 3 +- .../src/Http/Resources/SteamaResource.php | 3 +- .../src/Listeners/MeterParameterListener.php | 6 +- .../src/Listeners/SmsListener.php | 2 +- .../src/Services/SteamaAgentService.php | 2 +- .../src/Services/SteamaMeterService.php | 2 +- .../SteamaSiteLevelPaymentPlanTypeService.php | 2 +- .../src/Services/SteamaSmsSettingService.php | 4 +- .../src/Services/SteamaSyncSettingService.php | 10 ++-- .../src/Services/SteamaTariffService.php | 2 +- .../src/Services/SteamaUserTypeService.php | 6 +- .../src/Services/StemaSyncActionService.php | 2 +- .../src/Tests/Unit/SmsNotifyTest.php | 10 ++-- .../src/Console/Commands/UpdatePackage.php | 2 +- .../stron-meter/src/Helpers/ApiHelpers.php | 2 +- .../Resources/StronCredentialResource.php | 3 +- .../src/Http/Resources/StronResource.php | 3 +- .../src/Http/Resources/SunKingResource.php | 3 +- .../src/Services/ManufacturerService.php | 2 +- .../src/Console/Commands/InstallPackage.php | 2 +- .../Commands/TransactionStatusChecker.php | 2 +- .../src/Console/Commands/UpdatePackage.php | 4 +- .../Controllers/TicketExportController.php | 2 - .../Http/Controllers/WatcherController.php | 6 +- .../src/Http/Resources/TicketResource.php | 3 +- .../src/Models/TicketOutsourceReport.php | 2 +- .../inensus/ticket/src/Models/TicketUser.php | 4 +- .../src/Providers/TicketServiceProvider.php | 2 +- .../src/Services/TicketCommentService.php | 4 +- .../Services/TicketOutsourceReportService.php | 4 +- .../src/Console/Commands/UpdatePackage.php | 2 +- .../Http/Controllers/WebhookController.php | 8 +-- .../src/Http/Resources/ViberResource.php | 3 +- .../src/Services/ViberCredentialService.php | 4 +- ...ate_wave_money_payment_provider_tables.php | 4 +- .../src/Console/Commands/InstallPackage.php | 2 +- .../src/Console/Commands/UpdatePackage.php | 2 +- .../src/Http/Resources/WaveMoneyResource.php | 3 +- .../src/Models/WaveComTransaction.php | 4 +- src/backend/tests/Feature/CityTest.php | 6 +- .../Feature/ClusterDashboardCacheTest.php | 6 +- .../tests/Feature/ClusterRevenueTest.php | 6 +- src/backend/tests/Feature/ClusterTest.php | 6 +- .../tests/Feature/ConnectionGroupTest.php | 2 +- .../tests/Feature/ConnectionTypeTest.php | 2 +- .../tests/Feature/CreateEnvironments.php | 58 +++++++++---------- src/backend/tests/Feature/MeterTest.php | 4 +- .../tests/Feature/MiniGridRevenueTest.php | 6 +- src/backend/tests/Feature/MiniGridTest.php | 4 +- .../Feature/SocialTariffPiggyBankTest.php | 2 +- .../tests/RefreshMultipleDatabases.php | 2 +- src/backend/tests/TestCase.php | 2 +- 443 files changed, 852 insertions(+), 830 deletions(-) diff --git a/src/backend/app/Console/Commands/AccessRateChecker.php b/src/backend/app/Console/Commands/AccessRateChecker.php index 76558600b..940cd571c 100644 --- a/src/backend/app/Console/Commands/AccessRateChecker.php +++ b/src/backend/app/Console/Commands/AccessRateChecker.php @@ -26,7 +26,7 @@ public function runInCompanyScope(): void // access-rate is defined if ($accessRate->amount > 0) { $accessRatePayment->debt += $accessRate->amount; - $accessRatePayment->unpaid_in_row++; + ++$accessRatePayment->unpaid_in_row; } $accessRatePayment->save(); diff --git a/src/backend/app/Console/Commands/DummyDataCreator.php b/src/backend/app/Console/Commands/DummyDataCreator.php index 05172ca62..904af260c 100644 --- a/src/backend/app/Console/Commands/DummyDataCreator.php +++ b/src/backend/app/Console/Commands/DummyDataCreator.php @@ -74,7 +74,7 @@ public function handle() return; } - for ($i = 1; $i <= $amount; $i++) { + for ($i = 1; $i <= $amount; ++$i) { echo "$type is generating number: $i \n"; try { DB::connection('shard')->beginTransaction(); diff --git a/src/backend/app/Console/Commands/RoutesGenerator.php b/src/backend/app/Console/Commands/RoutesGenerator.php index a06c31d17..844ceb047 100644 --- a/src/backend/app/Console/Commands/RoutesGenerator.php +++ b/src/backend/app/Console/Commands/RoutesGenerator.php @@ -69,7 +69,7 @@ private function appendLines(string $packageRoutesTmp, $coreRoutesTmp): void $newLine = str_pad($value, strlen($value) + 4, ' ', STR_PAD_LEFT); } fwrite($tmp, $newLine); - $counter++; + ++$counter; } fclose($tmp); } diff --git a/src/backend/app/Console/Kernel.php b/src/backend/app/Console/Kernel.php index 6e54c1655..79e49cc57 100644 --- a/src/backend/app/Console/Kernel.php +++ b/src/backend/app/Console/Kernel.php @@ -54,7 +54,6 @@ class Kernel extends ConsoleKernel /** * Define the application's command schedule. * - * * @return void */ protected function schedule(Schedule $schedule) diff --git a/src/backend/app/Exceptions/Handler.php b/src/backend/app/Exceptions/Handler.php index 426b70947..05b8317c0 100644 --- a/src/backend/app/Exceptions/Handler.php +++ b/src/backend/app/Exceptions/Handler.php @@ -34,7 +34,6 @@ class Handler extends ExceptionHandler /** * Report or log an exception. * - * * @return void */ public function report(\Throwable $exception) @@ -46,8 +45,9 @@ public function report(\Throwable $exception) /** * Render an exception into an HTTP response. * - * @param Request $request - * @param \Throwable $exception + * @param Request $request + * @param \Throwable $exception + * * @return \Illuminate\Http\JsonResponse */ public function render($request, \Exception|\Throwable $exception) diff --git a/src/backend/app/Helpers/MailHelper.php b/src/backend/app/Helpers/MailHelper.php index 70ed158b1..c9c92e998 100644 --- a/src/backend/app/Helpers/MailHelper.php +++ b/src/backend/app/Helpers/MailHelper.php @@ -35,7 +35,7 @@ private function configure(): void } /** - * @param null $attachment + * @param null $attachment * * @throws MailNotSentException * @throws PHPMailerException @@ -60,7 +60,7 @@ public function sendPlain($to, $title, $body, $attachment = null): void $this->mailer->AltBody = $this->mailSettings['default_message']; - if (! $this->mailer->send()) { + if (!$this->mailer->send()) { throw new MailNotSentException($this->mailer->ErrorInfo); } } @@ -84,7 +84,7 @@ public function sendViaTemplate(string $to, string $title, string $templatePath, $this->mailer->addAttachment($attachmentPath); } - if (! $this->mailer->send()) { + if (!$this->mailer->send()) { throw new MailNotSentException($this->mailer->ErrorInfo); } } diff --git a/src/backend/app/Helpers/MailHelperInterface.php b/src/backend/app/Helpers/MailHelperInterface.php index bd59bfe98..4817d0744 100644 --- a/src/backend/app/Helpers/MailHelperInterface.php +++ b/src/backend/app/Helpers/MailHelperInterface.php @@ -8,7 +8,7 @@ interface MailHelperInterface { /** - * @param null $attachment + * @param null $attachment * * @throws MailNotSentException * @throws PHPMailerException diff --git a/src/backend/app/Helpers/MailHelperMock.php b/src/backend/app/Helpers/MailHelperMock.php index 53ef2b8cf..0db3ea1a5 100644 --- a/src/backend/app/Helpers/MailHelperMock.php +++ b/src/backend/app/Helpers/MailHelperMock.php @@ -8,7 +8,7 @@ class MailHelperMock implements MailHelperInterface { /** - * @param null $attachment + * @param null $attachment * * @throws MailNotSentException * @throws PHPMailerException diff --git a/src/backend/app/Helpers/PowerConverter.php b/src/backend/app/Helpers/PowerConverter.php index 103f2dca5..181ba96ac 100644 --- a/src/backend/app/Helpers/PowerConverter.php +++ b/src/backend/app/Helpers/PowerConverter.php @@ -14,7 +14,7 @@ class PowerConverter ]; /** - * @param int|string $power + * @param int|string $power */ public static function convert($power, $powerUnit, string $expectedUnit = 'Wh') { diff --git a/src/backend/app/Helpers/RelationsManager.php b/src/backend/app/Helpers/RelationsManager.php index 23f2ee172..a9ee86ac7 100644 --- a/src/backend/app/Helpers/RelationsManager.php +++ b/src/backend/app/Helpers/RelationsManager.php @@ -30,7 +30,7 @@ trait RelationsManager public static function getAllRelations($type = null): array { - if (! self::$relationsInitialized) { + if (!self::$relationsInitialized) { self::initAllRelations(); } if ($type) { diff --git a/src/backend/app/Http/Controllers/AgentAssignedApplianceWebController.php b/src/backend/app/Http/Controllers/AgentAssignedApplianceWebController.php index 8478fe623..ebc4a6f3a 100644 --- a/src/backend/app/Http/Controllers/AgentAssignedApplianceWebController.php +++ b/src/backend/app/Http/Controllers/AgentAssignedApplianceWebController.php @@ -40,7 +40,8 @@ public function store(CreateAgentAssignedApplianceRequest $request) /** * List for Web interface. * - * @param Agent $agent + * @param Agent $agent + * * @return ApiResource */ public function index($agentId, Request $request) diff --git a/src/backend/app/Http/Controllers/AgentAssignedAppliancesController.php b/src/backend/app/Http/Controllers/AgentAssignedAppliancesController.php index 924aa762b..7dc39a7bc 100644 --- a/src/backend/app/Http/Controllers/AgentAssignedAppliancesController.php +++ b/src/backend/app/Http/Controllers/AgentAssignedAppliancesController.php @@ -23,7 +23,6 @@ public function __construct( /** * List for Android-APP. * - * * @return ApiResource */ public function index(Request $request) diff --git a/src/backend/app/Http/Controllers/AgentAuthController.php b/src/backend/app/Http/Controllers/AgentAuthController.php index 953260e87..001ecb8e3 100644 --- a/src/backend/app/Http/Controllers/AgentAuthController.php +++ b/src/backend/app/Http/Controllers/AgentAuthController.php @@ -34,7 +34,7 @@ public function login(Request $request) { $credentials = $request->only(['email', 'password']); - if (! $token = auth('agent_api')->setTTL(525600)->attempt($credentials)) { + if (!$token = auth('agent_api')->setTTL(525600)->attempt($credentials)) { return response()->json(['data' => ['message' => 'Unauthorized', 'status' => 401]], 401); } @@ -82,7 +82,8 @@ public function refresh() /** * Get the token array structure. * - * @param string $token + * @param string $token + * * @return JsonResponse */ protected function respondWithToken($token) diff --git a/src/backend/app/Http/Controllers/AgentBalanceHistoryController.php b/src/backend/app/Http/Controllers/AgentBalanceHistoryController.php index 1c4400264..8a9867071 100644 --- a/src/backend/app/Http/Controllers/AgentBalanceHistoryController.php +++ b/src/backend/app/Http/Controllers/AgentBalanceHistoryController.php @@ -38,7 +38,6 @@ public function store(Agent $agent, CreateAgentBalanceHistoryRequest $request): /** * Display the specified resource. * - * * @return void */ public function show(AgentBalanceHistory $agent_balance_history) @@ -48,7 +47,6 @@ public function show(AgentBalanceHistory $agent_balance_history) /** * Update the specified resource in storage. * - * * @return void */ public function update(Request $request, AgentBalanceHistory $agent_balance_history) @@ -58,7 +56,6 @@ public function update(Request $request, AgentBalanceHistory $agent_balance_hist /** * Remove the specified resource from storage. * - * * @return void */ public function destroy(AgentBalanceHistory $agent_balance_history) diff --git a/src/backend/app/Http/Controllers/AgentCommissionWebController.php b/src/backend/app/Http/Controllers/AgentCommissionWebController.php index fccd99376..f7dd9b25b 100644 --- a/src/backend/app/Http/Controllers/AgentCommissionWebController.php +++ b/src/backend/app/Http/Controllers/AgentCommissionWebController.php @@ -26,7 +26,6 @@ public function index(Request $request): ApiResource /** * Store a newly created resource in storage. * - * * @return ApiResource */ public function store(CreateAgentCommissionRequest $request) diff --git a/src/backend/app/Http/Controllers/AgentCustomerController.php b/src/backend/app/Http/Controllers/AgentCustomerController.php index e2561aa7e..a1bd5774d 100644 --- a/src/backend/app/Http/Controllers/AgentCustomerController.php +++ b/src/backend/app/Http/Controllers/AgentCustomerController.php @@ -18,7 +18,6 @@ public function __construct( /** * Display a listing of the resource. * - * * @return ApiResource */ public function index(Request $request) diff --git a/src/backend/app/Http/Controllers/AgentReceiptWebController.php b/src/backend/app/Http/Controllers/AgentReceiptWebController.php index 58b324cd6..82b185264 100644 --- a/src/backend/app/Http/Controllers/AgentReceiptWebController.php +++ b/src/backend/app/Http/Controllers/AgentReceiptWebController.php @@ -19,7 +19,6 @@ public function __construct( /** * Display a listing of the resource. * - * * @return ApiResource */ public function show($agentId, Request $request) @@ -32,7 +31,6 @@ public function show($agentId, Request $request) /** * Display a listing of the resource. * - * * @return ApiResource */ public function index(Request $request) @@ -45,7 +43,8 @@ public function index(Request $request) /** * Store a newly created resource in storage. * - * @param $agentId + * @param $agentId + * * @return ApiResource */ public function store(CreateAgentReceiptRequest $request) diff --git a/src/backend/app/Http/Controllers/AgentSoldApplianceController.php b/src/backend/app/Http/Controllers/AgentSoldApplianceController.php index fe1f28e18..1bc2d62d1 100644 --- a/src/backend/app/Http/Controllers/AgentSoldApplianceController.php +++ b/src/backend/app/Http/Controllers/AgentSoldApplianceController.php @@ -36,7 +36,6 @@ public function show($customerId, Request $request): ApiResource /** * Store a newly created resource in storage. * - * * @return ApiResource */ public function store(CreateAgentSoldApplianceRequest $request) diff --git a/src/backend/app/Http/Controllers/AgentTicketController.php b/src/backend/app/Http/Controllers/AgentTicketController.php index 8666d7b49..f7c0283f8 100644 --- a/src/backend/app/Http/Controllers/AgentTicketController.php +++ b/src/backend/app/Http/Controllers/AgentTicketController.php @@ -57,7 +57,7 @@ public function store(CreateAgentTicketRequest $request): TicketResource $ownerId = $ticketData['owner_id']; $owner = $this->personService->getById($ownerId); - if (! $owner) { + if (!$owner) { throw new TicketOwnerNotFoundException('Ticket owner with following id not found '.$ownerId); } diff --git a/src/backend/app/Http/Controllers/AssetPersonController.php b/src/backend/app/Http/Controllers/AssetPersonController.php index 61d8a9975..b12416855 100644 --- a/src/backend/app/Http/Controllers/AssetPersonController.php +++ b/src/backend/app/Http/Controllers/AssetPersonController.php @@ -42,7 +42,7 @@ public function __construct( /** * Store a newly created resource in storage. * - * @param AssetType $assetType + * @param AssetType $assetType */ public function store( Asset $asset, @@ -105,7 +105,7 @@ public function store( $this->geographicalInformationService->save($geographicalInformation); } if ($downPayment > 0) { - $sender = ! isset($addressData) ? '-' : $addressData['phone']; + $sender = !isset($addressData) ? '-' : $addressData['phone']; $transaction = $this->cashTransactionService->createCashTransaction( $user->id, $downPayment, diff --git a/src/backend/app/Http/Controllers/AssetRateController.php b/src/backend/app/Http/Controllers/AssetRateController.php index 591bf9a13..fde4078e7 100644 --- a/src/backend/app/Http/Controllers/AssetRateController.php +++ b/src/backend/app/Http/Controllers/AssetRateController.php @@ -13,8 +13,9 @@ class AssetRateController extends Controller /** * Update the specified resource in storage. * - * @param Request $request - * @param AssetRate $assetRate + * @param Request $request + * @param AssetRate $assetRate + * * @return ApiResource */ private $cashTransactionService; @@ -41,7 +42,7 @@ public function update(Request $request, AssetRate $applianceRate): ApiResource if ($newCost === 0) { $this->applianceRateService ->deleteUpdatedApplianceRateIfCostZero($applianceRate, $creatorId, $cost, $newCost); - $appliancePerson->rate_count--; + --$appliancePerson->rate_count; } else { $this->applianceRateService->updateApplianceRateCost($applianceRate, $creatorId, $cost, $newCost); } diff --git a/src/backend/app/Http/Controllers/AssetTypeController.php b/src/backend/app/Http/Controllers/AssetTypeController.php index e5df4e5d0..dad942212 100644 --- a/src/backend/app/Http/Controllers/AssetTypeController.php +++ b/src/backend/app/Http/Controllers/AssetTypeController.php @@ -55,8 +55,6 @@ public function update(AssetTypeUpdateRequest $request, AssetType $assetType): A /** * Remove the specified resource from storage. * - * - * * @throws \Exception */ public function destroy(AssetType $assetType): ApiResource diff --git a/src/backend/app/Http/Controllers/AuthController.php b/src/backend/app/Http/Controllers/AuthController.php index 51e67fee4..5c0a69433 100644 --- a/src/backend/app/Http/Controllers/AuthController.php +++ b/src/backend/app/Http/Controllers/AuthController.php @@ -31,7 +31,7 @@ public function login() { $credentials = request(['email', 'password']); - if (! $token = auth('api')->attempt($credentials)) { + if (!$token = auth('api')->attempt($credentials)) { return response()->json(['data' => ['message' => 'Unauthorized', 'status' => 401]], 401); } @@ -75,7 +75,8 @@ public function refresh() /** * Get the token array structure. * - * @param string $token + * @param string $token + * * @return JsonResponse */ protected function respondWithToken($token) diff --git a/src/backend/app/Http/Controllers/CompanyController.php b/src/backend/app/Http/Controllers/CompanyController.php index a86f98e32..8b6f0c889 100644 --- a/src/backend/app/Http/Controllers/CompanyController.php +++ b/src/backend/app/Http/Controllers/CompanyController.php @@ -94,7 +94,7 @@ function () use ($company, $plugins) { '-', $mpmPlugin->tail_tag ) : null, - 'adjusted' => ! isset($mpmPlugin->tail_tag), + 'adjusted' => !isset($mpmPlugin->tail_tag), ]; Artisan::call($mpmPlugin->installation_command); } diff --git a/src/backend/app/Http/Controllers/ManufacturerController.php b/src/backend/app/Http/Controllers/ManufacturerController.php index 2d4fa4597..5f909de41 100644 --- a/src/backend/app/Http/Controllers/ManufacturerController.php +++ b/src/backend/app/Http/Controllers/ManufacturerController.php @@ -49,7 +49,7 @@ public function store(ManufacturerRequest $request): JsonResponse /** * Display the specified resource. * - * @param int $manufacturerId + * @param int $manufacturerId */ public function show($manufacturerId): ApiResource { diff --git a/src/backend/app/Http/Controllers/MeterController.php b/src/backend/app/Http/Controllers/MeterController.php index a4d685ffb..a8668ddbc 100644 --- a/src/backend/app/Http/Controllers/MeterController.php +++ b/src/backend/app/Http/Controllers/MeterController.php @@ -40,7 +40,6 @@ public function index(Request $request): ApiResource * Create * Stores a new meter. * - * * @bodyParam serial_number string required * @bodyParam meter_type_id int required * @bodyParam manufacturer_id int required diff --git a/src/backend/app/Http/Controllers/MeterGeographicalInformationController.php b/src/backend/app/Http/Controllers/MeterGeographicalInformationController.php index 03ccaacba..ede227cb4 100644 --- a/src/backend/app/Http/Controllers/MeterGeographicalInformationController.php +++ b/src/backend/app/Http/Controllers/MeterGeographicalInformationController.php @@ -53,7 +53,7 @@ public function index($miniGridId): ApiResource * * @urlParam person required The ID of the person * - * @param int $person + * @param int $person * * @responseFile responses/people/person.meter.list.json */ @@ -70,7 +70,7 @@ public function show(int $personId): ApiResource * * @bodyParam points string. Comma seperated latitude and longitude. Example 1,2 * - * @param Meter $meter + * @param Meter $meter */ public function update(Request $request): ApiResource { diff --git a/src/backend/app/Http/Controllers/MeterTariffController.php b/src/backend/app/Http/Controllers/MeterTariffController.php index 7680a3e1f..6c5c21c8e 100644 --- a/src/backend/app/Http/Controllers/MeterTariffController.php +++ b/src/backend/app/Http/Controllers/MeterTariffController.php @@ -37,7 +37,7 @@ public function index(Request $request): ApiResource * * @responseFile responses/tariffs/tariff.detail.json * - * @param MeterTariff $tariff + * @param MeterTariff $tariff */ public function show(Request $request, $meterTariffId): ApiResource { diff --git a/src/backend/app/Http/Controllers/MeterTypeController.php b/src/backend/app/Http/Controllers/MeterTypeController.php index 80ba04c9c..703c7b72f 100644 --- a/src/backend/app/Http/Controllers/MeterTypeController.php +++ b/src/backend/app/Http/Controllers/MeterTypeController.php @@ -55,7 +55,7 @@ public function store(MeterTypeCreateRequest $request) * * @bodyParam id int required * - * @param int $meterTypeId + * @param int $meterTypeId */ public function show($meterTypeId): ApiResource { @@ -72,7 +72,7 @@ public function show($meterTypeId): ApiResource * @bodyParam phase int required * @bodyParam max_current int required * - * @param int $meterTypeId + * @param int $meterTypeId */ public function update(MeterTypeUpdateRequest $request, $meterTypeId): ApiResource { diff --git a/src/backend/app/Http/Controllers/MiniGridController.php b/src/backend/app/Http/Controllers/MiniGridController.php index d0d7dac55..1c117f8b2 100644 --- a/src/backend/app/Http/Controllers/MiniGridController.php +++ b/src/backend/app/Http/Controllers/MiniGridController.php @@ -35,7 +35,7 @@ public function index(Request $request): ApiResource * * @bodyParam id int required * - * @param int $id + * @param int $id */ public function show($miniGridId, Request $request): ApiResource { @@ -66,7 +66,7 @@ public function store(StoreMiniGridRequest $request): ApiResource * * @bodyParam name string The name of the MiniGrid. * - * @param MiniGrid $miniGrid + * @param MiniGrid $miniGrid */ public function update($miniGridId, UpdateMiniGridRequest $request): ApiResource { diff --git a/src/backend/app/Http/Controllers/PaymentHistoryController.php b/src/backend/app/Http/Controllers/PaymentHistoryController.php index 6c87cbb1f..b0996318b 100644 --- a/src/backend/app/Http/Controllers/PaymentHistoryController.php +++ b/src/backend/app/Http/Controllers/PaymentHistoryController.php @@ -37,8 +37,9 @@ public function __construct(PaymentHistory $history) * @urlParam limit integer * @urlParam order string * - * @param null $limit - * @param string $order + * @param null $limit + * @param string $order + * * @return array */ public function show(int $payerId, string $period, $limit = null, $order = 'ASC') @@ -74,7 +75,8 @@ public function show(int $payerId, string $period, $limit = null, $order = 'ASC' * * @urlParam personId integer required * - * @param $personId + * @param $personId + * * @return ApiResource * * @throws \Exception @@ -121,7 +123,8 @@ public function byYear(int $personId, ?int $year = null): array * @urlParam personId integer required * checks if the person has any debts to the system * - * @param int $personId + * @param int $personId + * * @return ApiResource */ public function debts($personId) diff --git a/src/backend/app/Http/Controllers/PersonController.php b/src/backend/app/Http/Controllers/PersonController.php index b25a23aa7..9336d6da8 100644 --- a/src/backend/app/Http/Controllers/PersonController.php +++ b/src/backend/app/Http/Controllers/PersonController.php @@ -54,8 +54,6 @@ public function index(Request $request): ApiResource * - Role * - Meter list. * - * - * * @apiResourceModel App\Models\Person\Person * * @responseFile responses/people/people.detail.json @@ -138,8 +136,6 @@ public function update( * The list of all transactions(paginated) which belong to that person. * Each page contains 7 entries of the last transaction. * - * - * * @bodyParam person_id int required the ID of the person. Example: 2 * * @responseFile responses/people/person.transaction.list.json diff --git a/src/backend/app/Http/Controllers/PluginController.php b/src/backend/app/Http/Controllers/PluginController.php index d797c1d6b..d3ca01642 100644 --- a/src/backend/app/Http/Controllers/PluginController.php +++ b/src/backend/app/Http/Controllers/PluginController.php @@ -36,14 +36,14 @@ public function update(Request $request, $mpmPluginId): ApiResource 'status' => $request->input('checked'), ]; - if (! $plugin && ! $request->input('checked')) { + if (!$plugin && !$request->input('checked')) { throw new \Exception('Plugin not found'); } if ($request->input('checked')) { // Check if this is the first time we are installing the plugin. // In that case we also need to run install commands, if present - if (! $plugin) { + if (!$plugin) { $createdPlugin = $this->pluginsService->create($pluginData); $this->registrationTailService->addMpmPluginToRegistrationTail($registrationTail, $mpmPlugin); diff --git a/src/backend/app/Http/Controllers/ReportController.php b/src/backend/app/Http/Controllers/ReportController.php index ceba5a5fa..75ea04362 100644 --- a/src/backend/app/Http/Controllers/ReportController.php +++ b/src/backend/app/Http/Controllers/ReportController.php @@ -20,7 +20,7 @@ public function __construct(Report $report) public function download($id) { - if (! $id) { + if (!$id) { return; } $report = $this->report->find($id); diff --git a/src/backend/app/Http/Controllers/Reports.php b/src/backend/app/Http/Controllers/Reports.php index 70c12f799..13ff37ea2 100644 --- a/src/backend/app/Http/Controllers/Reports.php +++ b/src/backend/app/Http/Controllers/Reports.php @@ -124,12 +124,12 @@ private function addTargetConnectionGroups(Worksheet $sheet): void )->get(); foreach ($connections as $connection) { $sheet->setCellValue($column.$row, $connection->name); - $row++; + ++$row; foreach ($connection->subConnections as $subConnection) { foreach ($subConnection->meterParameters as $meterParameter) { $sheet->setCellValue($subColumn.$row, $meterParameter->connectionGroup()->first()->name); $this->subConnectionRows[$meterParameter->connectionGroup()->first()->name] = $row; - $row++; + ++$row; } } } @@ -236,7 +236,7 @@ private function addStaticText(Worksheet $sheet, string $dateRange): void } /** - * @param Builder[]|Collection $transactions + * @param Builder[]|Collection $transactions * * @throws CustomerGroupNotFound * @throws \PhpOffice\PhpSpreadsheet\Exception @@ -265,8 +265,8 @@ public function generateXls( } /** - * @param bool $addPurchaseBreakDown - * @param Builder[]|Collection $transactions + * @param bool $addPurchaseBreakDown + * @param Builder[]|Collection $transactions * * @throws CustomerGroupNotFound */ @@ -276,7 +276,7 @@ private function addTransactions(Worksheet $sheet, $transactions, $addPurchaseBr $balance = 0; foreach ($transactions as $index => $transaction) { - if (! $transaction->meter || ! $transaction->meter->meterParameter) { + if (!$transaction->meter || !$transaction->meter->meterParameter) { continue; } @@ -328,7 +328,6 @@ private function addTransactions(Worksheet $sheet, $transactions, $addPurchaseBr /** * Add the breakdown of the transaction amount into the right place on the spreadsheet. * - * * @throws CustomerGroupNotFound */ private function purchaseBreakDown( @@ -381,7 +380,7 @@ private function storeConnectionGroupColumn(string $connectionGroup, string $col } /** - * @param Builder[]|Collection $connectionGroups + * @param Builder[]|Collection $connectionGroups * * @throws \PhpOffice\PhpSpreadsheet\Exception */ @@ -409,23 +408,23 @@ private function addConnectionGroupsToXLS( if ($accessRate) { if ($accessRate->amount > 0) { $nextColumn = $startingColumn; - $nextColumn++; + ++$nextColumn; $sheet->mergeCells($startingColumn.$startingRow.':'. $nextColumn.$startingRow); - $startingColumn++; + ++$startingColumn; break; } } } } - $startingColumn++; + ++$startingColumn; } } private function addSoldTotal(string $connectionGroupName, array $amount, $unit = null): void { - if (! array_key_exists($connectionGroupName, $this->totalSold)) { + if (!array_key_exists($connectionGroupName, $this->totalSold)) { $this->totalSold[$connectionGroupName] = [ 'energy' => 0, 'access_rate' => 0, @@ -485,8 +484,8 @@ private function addSoldSummary(Worksheet $sheet): void */ private function excelColumnRange(string $lower, string $upper): \Generator { - $upper++; - for ($i = $lower; $i !== $upper; $i++) { + ++$upper; + for ($i = $lower; $i !== $upper; ++$i) { yield $i; } } @@ -561,7 +560,7 @@ static function ($q) { $databaseProxy = app()->make(DatabaseProxy::class); $companyId = $databaseProxy->findByEmail($user->email)->getCompanyId(); - if (! file_exists($dirPath) && ! mkdir($dirPath, 0774, true) && ! is_dir($dirPath)) { + if (!file_exists($dirPath) && !mkdir($dirPath, 0774, true) && !is_dir($dirPath)) { throw new \RuntimeException(sprintf('Directory "%s" was not created', $dirPath)); } try { @@ -613,10 +612,10 @@ private function getCustomerGroupEnergyUsagePerMonth(array $dates): void $tariffPrice = $groupRevenue->tariff_price; - if (! $tariffPrice || $tariffPrice === 0) { + if (!$tariffPrice || $tariffPrice === 0) { continue; } - if (! $energyRevenue || $energyRevenue === 0) { + if (!$energyRevenue || $energyRevenue === 0) { continue; } $tariffPrice /= 100; @@ -661,7 +660,7 @@ private function addTargetsToXls(Worksheet $sheet): void { foreach ($this->monthlyTargetDatas as $subConnection => $monthlyTargetData) { $row = $this->subConnectionRows[$subConnection]; - if (! $row) { + if (!$row) { continue; } $sheet->setCellValue('E'.$row, $monthlyTargetData['connections']); @@ -679,12 +678,12 @@ private function addStoredTargets(Worksheet $sheet, int $cityId, $endDate): void ->where('owner_id', $cityId) ->orderBy('target_date', 'asc')->first(); - if (! $targetData) { // no target is defined for that mini-grid + if (!$targetData) { // no target is defined for that mini-grid return; } foreach ($targetData->subTargets as $subTarget) { - if (! isset($this->subConnectionRows[$subTarget->connectionType->name])) { + if (!isset($this->subConnectionRows[$subTarget->connectionType->name])) { continue; } $row = $this->subConnectionRows[$subTarget->connectionType->name]; diff --git a/src/backend/app/Http/Controllers/RevenueController.php b/src/backend/app/Http/Controllers/RevenueController.php index 7528ab541..a1e1c144f 100644 --- a/src/backend/app/Http/Controllers/RevenueController.php +++ b/src/backend/app/Http/Controllers/RevenueController.php @@ -78,7 +78,7 @@ public function trending($id, Request $request): ApiResource $cities = $this->city::query()->where('mini_grid_id', $id)->get(); $cityIds = implode(',', $cities->pluck('id')->toArray()); - if (! count($cities)) { + if (!count($cities)) { $response = ['data' => null, 'message' => 'There is no city for this MiniGrid']; return ApiResource::make($response); @@ -117,7 +117,6 @@ public function trending($id, Request $request): ApiResource /** * Prepares the data for revenue dashboard. * - * * @return array|mixed */ public function revenueData(Request $request): ApiResource diff --git a/src/backend/app/Http/Controllers/SmsController.php b/src/backend/app/Http/Controllers/SmsController.php index 830178a8c..7915f09a6 100644 --- a/src/backend/app/Http/Controllers/SmsController.php +++ b/src/backend/app/Http/Controllers/SmsController.php @@ -218,7 +218,7 @@ static function ($q) { /** * Marks the sms as sent. * - * @param string $uuid + * @param string $uuid */ public function updateForDelivered($uuid): void { diff --git a/src/backend/app/Http/Controllers/SubConnectionTypeController.php b/src/backend/app/Http/Controllers/SubConnectionTypeController.php index a789a87fb..999e8c88f 100644 --- a/src/backend/app/Http/Controllers/SubConnectionTypeController.php +++ b/src/backend/app/Http/Controllers/SubConnectionTypeController.php @@ -38,7 +38,7 @@ public function store(SubConnectionTypeCreateRequest $request): ApiResource /** * Update the specified resource in storage. * - * @param SubConnectionType $subConnectionType + * @param SubConnectionType $subConnectionType */ public function update(Request $request, $subConnectionTypeId): ApiResource { diff --git a/src/backend/app/Http/Controllers/UserPasswordController.php b/src/backend/app/Http/Controllers/UserPasswordController.php index 4fb67e1ef..960b86cb6 100644 --- a/src/backend/app/Http/Controllers/UserPasswordController.php +++ b/src/backend/app/Http/Controllers/UserPasswordController.php @@ -20,7 +20,7 @@ public function __construct(UserService $userService) public function forgotPassword(AdminResetPasswordRequest $request, Response $response): Response { - if (! $this->userService->resetPassword($request->input('email'))) { + if (!$this->userService->resetPassword($request->input('email'))) { return $response->setStatusCode(422)->setContent( [ 'data' => [ diff --git a/src/backend/app/Http/Middleware/AgentBalanceMiddleware.php b/src/backend/app/Http/Middleware/AgentBalanceMiddleware.php index 862b3f76c..1553ccc2a 100644 --- a/src/backend/app/Http/Middleware/AgentBalanceMiddleware.php +++ b/src/backend/app/Http/Middleware/AgentBalanceMiddleware.php @@ -23,7 +23,8 @@ public function __construct( /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request + * @param \Illuminate\Http\Request $request + * * @return mixed */ public function handle($request, \Closure $next) @@ -36,11 +37,11 @@ public function handle($request, \Closure $next) if ($routeName === 'agent-sell-appliance') { $assignedApplianceCost = $this->agentAssignedApplianceService->getById($request->input('agent_assigned_appliance_id')); $downPayment = $request->input('down_payment'); - if (! $assignedApplianceCost) { + if (!$assignedApplianceCost) { throw new ModelNotFoundException('Assigned Appliance not found'); } - if (! isset($downPayment)) { + if (!isset($downPayment)) { throw new DownPaymentNotFoundException('DownPayment not found'); } diff --git a/src/backend/app/Http/Middleware/RedirectIfAuthenticated.php b/src/backend/app/Http/Middleware/RedirectIfAuthenticated.php index 5765f549f..34e232eff 100644 --- a/src/backend/app/Http/Middleware/RedirectIfAuthenticated.php +++ b/src/backend/app/Http/Middleware/RedirectIfAuthenticated.php @@ -10,8 +10,9 @@ class RedirectIfAuthenticated /** * Handle an incoming request. * - * @param Request $request - * @param string|null $guard + * @param Request $request + * @param string|null $guard + * * @return mixed */ public function handle($request, \Closure $next, $guard = null) diff --git a/src/backend/app/Http/Middleware/RestrictionMiddleware.php b/src/backend/app/Http/Middleware/RestrictionMiddleware.php index 096a35607..1436dba1c 100644 --- a/src/backend/app/Http/Middleware/RestrictionMiddleware.php +++ b/src/backend/app/Http/Middleware/RestrictionMiddleware.php @@ -24,8 +24,9 @@ public function __construct( /** * Handle an incoming request. * - * @param Request $request - * @param $type + * @param Request $request + * @param $type + * * @return mixed */ public function handle($request, \Closure $next, $target) @@ -34,7 +35,7 @@ public function handle($request, \Closure $next, $target) $restriction = $this->restrictionService->getRestrictionForTarget($target); $restrictionResult = $this->handleRestriction($restriction->limit, $target, $request); - if (! $restrictionResult) { + if (!$restrictionResult) { $baseMessage = 'Your free limit of %s is exceeded. You can order more slots below.'; if ($target === 'maintenance-user') { diff --git a/src/backend/app/Http/Middleware/TransactionRequest.php b/src/backend/app/Http/Middleware/TransactionRequest.php index 2641e1dfe..1591edcf1 100644 --- a/src/backend/app/Http/Middleware/TransactionRequest.php +++ b/src/backend/app/Http/Middleware/TransactionRequest.php @@ -11,7 +11,8 @@ class TransactionRequest /** * Handle an incoming request. * - * @param Request $request + * @param Request $request + * * @return mixed */ public function handle($request, \Closure $next) diff --git a/src/backend/app/Http/Middleware/UserDefaultDatabaseConnectionMiddleware.php b/src/backend/app/Http/Middleware/UserDefaultDatabaseConnectionMiddleware.php index 99940c4e0..7a8216a46 100644 --- a/src/backend/app/Http/Middleware/UserDefaultDatabaseConnectionMiddleware.php +++ b/src/backend/app/Http/Middleware/UserDefaultDatabaseConnectionMiddleware.php @@ -76,7 +76,7 @@ private function handleApiRequest(Request $request, \Closure $next) $companyId = $databaseProxy->getCompanyId(); } elseif ($this->isAgentApp($request->path())) { // agent app authenticated user requests $companyId = auth('agent_api')->payload()->get('companyId'); - if (! is_numeric($companyId)) { + if (!is_numeric($companyId)) { throw new \Exception('JWT is not provided'); } } elseif ($this->resolveThirdPartyApi($request->path())) { @@ -87,7 +87,7 @@ private function handleApiRequest(Request $request, \Closure $next) } else { // web client authenticated user requests $companyId = auth('api')->payload()->get('companyId'); - if (! is_numeric($companyId)) { + if (!is_numeric($companyId)) { throw new \Exception('JWT is not provided'); } } diff --git a/src/backend/app/Http/Resources/ApiResource.php b/src/backend/app/Http/Resources/ApiResource.php index 1095cd954..5016dea38 100644 --- a/src/backend/app/Http/Resources/ApiResource.php +++ b/src/backend/app/Http/Resources/ApiResource.php @@ -10,7 +10,8 @@ class ApiResource extends JsonResource /** * Transform the resource into an array. * - * @param Request $request + * @param Request $request + * * @return array */ public function toArray($request) diff --git a/src/backend/app/Http/Resources/MeterResource.php b/src/backend/app/Http/Resources/MeterResource.php index 1054b63f7..4eba9a77d 100644 --- a/src/backend/app/Http/Resources/MeterResource.php +++ b/src/backend/app/Http/Resources/MeterResource.php @@ -10,7 +10,8 @@ class MeterResource extends JsonResource /** * Transform the resource into an array. * - * @param Request $request + * @param Request $request + * * @return array */ public function toArray($request) diff --git a/src/backend/app/Http/Resources/MeterTypeResource.php b/src/backend/app/Http/Resources/MeterTypeResource.php index 500cdbe9b..0f79f0186 100644 --- a/src/backend/app/Http/Resources/MeterTypeResource.php +++ b/src/backend/app/Http/Resources/MeterTypeResource.php @@ -10,7 +10,8 @@ class MeterTypeResource extends JsonResource /** * Transform the resource into an array. * - * @param Request $request + * @param Request $request + * * @return array */ public function toArray($request) diff --git a/src/backend/app/Http/Resources/SmsSearchResultResource.php b/src/backend/app/Http/Resources/SmsSearchResultResource.php index 9cd0980a2..8080af841 100644 --- a/src/backend/app/Http/Resources/SmsSearchResultResource.php +++ b/src/backend/app/Http/Resources/SmsSearchResultResource.php @@ -7,9 +7,9 @@ use Illuminate\Support\Collection; /** - * @property int $id - * @property string $name - * @property string $surname + * @property int $id + * @property string $name + * @property string $surname * @property Collection $addresses */ class SmsSearchResultResource extends JsonResource @@ -17,7 +17,7 @@ class SmsSearchResultResource extends JsonResource /** * Transform the resource into an array. * - * @param Request $request + * @param Request $request */ public function toArray($request): array { diff --git a/src/backend/app/Http/Resources/UserResource.php b/src/backend/app/Http/Resources/UserResource.php index 9197f45c6..9aa7c241a 100644 --- a/src/backend/app/Http/Resources/UserResource.php +++ b/src/backend/app/Http/Resources/UserResource.php @@ -10,7 +10,8 @@ class UserResource extends JsonResource /** * Transform the resource into an array. * - * @param Request $request + * @param Request $request + * * @return array */ public function toArray($request) diff --git a/src/backend/app/Jobs/EnergyTransactionProcessor.php b/src/backend/app/Jobs/EnergyTransactionProcessor.php index e9a1ba931..4f8cb3be7 100644 --- a/src/backend/app/Jobs/EnergyTransactionProcessor.php +++ b/src/backend/app/Jobs/EnergyTransactionProcessor.php @@ -72,7 +72,7 @@ private function checkForMinimumPurchaseAmount(TransactionDataContainer $transac if ($minimumPurchaseAmount > 0) { $validator = resolve('MinimumPurchaseAmountValidator'); try { - if (! $validator->validate($transactionData, $minimumPurchaseAmount)) { + if (!$validator->validate($transactionData, $minimumPurchaseAmount)) { throw new TransactionAmountNotEnoughException("Minimum purchase amount not reached for {$transactionData->device->device_serial}"); } } catch (\Exception $e) { diff --git a/src/backend/app/Jobs/ProcessPayment.php b/src/backend/app/Jobs/ProcessPayment.php index 72f2afcb4..2b2960a66 100644 --- a/src/backend/app/Jobs/ProcessPayment.php +++ b/src/backend/app/Jobs/ProcessPayment.php @@ -24,7 +24,7 @@ class ProcessPayment extends AbstractJob /** * Create a new job instance. * - * @param int $transaction_id + * @param int $transaction_id */ public function __construct(int $transactionId) { diff --git a/src/backend/app/Jobs/SmsProcessor.php b/src/backend/app/Jobs/SmsProcessor.php index 41fe1bcf9..17c1f848d 100644 --- a/src/backend/app/Jobs/SmsProcessor.php +++ b/src/backend/app/Jobs/SmsProcessor.php @@ -22,9 +22,9 @@ class SmsProcessor extends AbstractJob /** * Create a new job instance. * - * @param $data - * @param int $smsType - * @param $smsConfigs + * @param $data + * @param int $smsType + * @param $smsConfigs */ public function __construct(private SmsSender $smsSender) { diff --git a/src/backend/app/Jobs/TokenProcessor.php b/src/backend/app/Jobs/TokenProcessor.php index 818c8a327..96b363b38 100644 --- a/src/backend/app/Jobs/TokenProcessor.php +++ b/src/backend/app/Jobs/TokenProcessor.php @@ -114,7 +114,7 @@ private function handleTokenGenerationFailure(\Exception $e): void private function retryTokenGeneration(): void { - $this->counter++; + ++$this->counter; self::dispatch( $this->transactionContainer, false, diff --git a/src/backend/app/Jobs/UpdatePiggyBankEntry.php b/src/backend/app/Jobs/UpdatePiggyBankEntry.php index d9add72bc..2365c996a 100644 --- a/src/backend/app/Jobs/UpdatePiggyBankEntry.php +++ b/src/backend/app/Jobs/UpdatePiggyBankEntry.php @@ -39,7 +39,7 @@ public function __construct(MeterParameter $meterParameter) public function executeJob() { $socialTariff = $this->meterParameter->tariff()->first()->socialTariff; - if (! $socialTariff) { + if (!$socialTariff) { echo "meter has no social tariff should be deleted \n"; // meter parameter has no social tariff diff --git a/src/backend/app/Lib/IMeterReader.php b/src/backend/app/Lib/IMeterReader.php index 7448672be..eb0b9c614 100644 --- a/src/backend/app/Lib/IMeterReader.php +++ b/src/backend/app/Lib/IMeterReader.php @@ -7,7 +7,8 @@ interface IMeterReader /** * Reads the data for a single meter. * - * @param int $type defines what to read from the remote api + * @param int $type defines what to read from the remote api + * * @return mixed */ public function readMeter($meterIdentifier, $type); @@ -15,8 +16,9 @@ public function readMeter($meterIdentifier, $type); /** * Reads the data for a given meter list. * - * @param int $type defines what to read from the remote api - * * @param array $options + * @param int $type defines what to read from the remote api + * * @param array $options + * * @return mixed */ public function readBatch($meterList, $type, $options); diff --git a/src/backend/app/Lib/ISmsProvider.php b/src/backend/app/Lib/ISmsProvider.php index 5feb3a3d9..bf8455769 100644 --- a/src/backend/app/Lib/ISmsProvider.php +++ b/src/backend/app/Lib/ISmsProvider.php @@ -9,7 +9,6 @@ interface ISmsProvider /** * Sends the sms to the sms provider. * - * * @return mixed */ public function sendSms(string $number, string $body, string $callback, SmsAndroidSetting $smsAndroidSetting); diff --git a/src/backend/app/Listeners/AccessRateListener.php b/src/backend/app/Listeners/AccessRateListener.php index 87fcce7aa..e417d5534 100644 --- a/src/backend/app/Listeners/AccessRateListener.php +++ b/src/backend/app/Listeners/AccessRateListener.php @@ -15,7 +15,7 @@ public function initializeAccessRatePayment(Meter $meter): void { try { $accessRate = $meter->tariff()->first()->accessRate; - if (! $accessRate) { + if (!$accessRate) { throw new NoAccessRateFound('Access Rate is not set'); } $nextPaymentDate = Carbon::now()->addDays($accessRate->period)->toDateString(); diff --git a/src/backend/app/Listeners/ClusterGeoListener.php b/src/backend/app/Listeners/ClusterGeoListener.php index aa9e068e3..5b2a8f4e7 100644 --- a/src/backend/app/Listeners/ClusterGeoListener.php +++ b/src/backend/app/Listeners/ClusterGeoListener.php @@ -53,7 +53,6 @@ private function storeData(Cluster $cluster, $data): void /** * External geojson resource has lon,lat format. Change order to lat,lon. * - * * @return array[] * * @throws GeoFormatException @@ -63,15 +62,15 @@ private function storeData(Cluster $cluster, $data): void public function reformatExternalData($data): array { $formatted = []; - if (is_array($data) && ! array_key_exists('geojson', $data)) { + if (is_array($data) && !array_key_exists('geojson', $data)) { $data = $data[0]; } - if (! array_key_exists('geojson', $data)) { + if (!array_key_exists('geojson', $data)) { throw new GeoFormatException('external resource should contain a geojson key'); } - if (! array_key_exists('coordinates', $data['geojson'])) { + if (!array_key_exists('coordinates', $data['geojson'])) { throw new GeoFormatException('geojson key has not coordinates key'); } diff --git a/src/backend/app/Listeners/HistoryListener.php b/src/backend/app/Listeners/HistoryListener.php index c756bb014..0c35e74c4 100644 --- a/src/backend/app/Listeners/HistoryListener.php +++ b/src/backend/app/Listeners/HistoryListener.php @@ -25,8 +25,8 @@ public function __construct(History $historyModel) /** * Saves a new event in to the histories table. * - * @param mixed $data is an object which should be stored on the histories table - * @param string $content the stringified message about the entry + * @param mixed $data is an object which should be stored on the histories table + * @param string $content the stringified message about the entry */ public function save($data, string $content, string $type, ?string $field): void { diff --git a/src/backend/app/Listeners/PaymentListener.php b/src/backend/app/Listeners/PaymentListener.php index 0efcefd44..45c7b41b9 100644 --- a/src/backend/app/Listeners/PaymentListener.php +++ b/src/backend/app/Listeners/PaymentListener.php @@ -50,10 +50,10 @@ public function onPaymentFailed(): void } /** - * @param int $amount - * @param string $paymentService the name of the Payment gateway - * @param mixed $sender : The number or person who sent the money - * @param mixed $paidFor the identifier for the payment. Ex; { LoanID, TokenID } + * @param int $amount + * @param string $paymentService the name of the Payment gateway + * @param mixed $sender : The number or person who sent the money + * @param mixed $paidFor the identifier for the payment. Ex; { LoanID, TokenID } */ public function onPaymentSuccess( $amount, diff --git a/src/backend/app/Listeners/SmsListener.php b/src/backend/app/Listeners/SmsListener.php index e023ad4a6..eceab931d 100644 --- a/src/backend/app/Listeners/SmsListener.php +++ b/src/backend/app/Listeners/SmsListener.php @@ -31,11 +31,11 @@ public function __construct( public function onSmsStored($sender, $message) { $resendInformationKey = $this->smsResendInformationKeyService->getResendInformationKeys()->first(); - if (! $resendInformationKey) { + if (!$resendInformationKey) { return; } $resend = strpos(strtolower($message), strtolower($resendInformationKey)); - if (! $resend) { + if (!$resend) { return; } $wordsInMessage = explode(' ', $message); diff --git a/src/backend/app/ManufacturerApi/CalinReadMeter.php b/src/backend/app/ManufacturerApi/CalinReadMeter.php index 0d232fdf8..95c1af3a2 100644 --- a/src/backend/app/ManufacturerApi/CalinReadMeter.php +++ b/src/backend/app/ManufacturerApi/CalinReadMeter.php @@ -25,7 +25,6 @@ class CalinReadMeter implements IMeterReader /** * CalinReadMeter constructor. * - * * @throws \SoapFault */ public function __construct(MeterConsumption $consumption) @@ -38,8 +37,9 @@ public function __construct(MeterConsumption $consumption) } /** - * @param string $meterId serial number of the meter - * @param string $date y-m-d format date + * @param string $meterId serial number of the meter + * @param string $date y-m-d format date + * * @return mixed */ public function readDailyData($meterId, $date) @@ -59,7 +59,6 @@ public function readDailyData($meterId, $date) /** * Reads the total consumption of a meter. * - * * @return void */ public function readMeter($meterId, $type) @@ -69,14 +68,15 @@ public function readMeter($meterId, $type) /** * Reads the data for a given meter list. * - * @param int $type defines what to read from the remote api - * @param array $options + * @param int $type defines what to read from the remote api + * @param array $options + * * @return void */ public function readBatch($meterList, $type, $options) { if ($type === self::READ_DAILY) { - if (! isset($options['date'])) { + if (!isset($options['date'])) { throw new InvalidDateException('Date', 'date is not set. Send date within the options array'); } foreach ($meterList as $meter) { @@ -150,7 +150,8 @@ private function fetchResponseData($data): array } /** - * @param string $action + * @param string $action + * * @return array (\Illuminate\Config\Repository|float|mixed)[] */ private function prepareDailyReq(string $meterId, string $year, string $month, string $day, $action = 'Read'): array diff --git a/src/backend/app/Misc/LoanDataContainer.php b/src/backend/app/Misc/LoanDataContainer.php index b41afd284..2ad41fab4 100644 --- a/src/backend/app/Misc/LoanDataContainer.php +++ b/src/backend/app/Misc/LoanDataContainer.php @@ -29,7 +29,7 @@ public function initialize(Transaction $transaction): void public function loanCost() { - if (! $this->meterOwner) { + if (!$this->meterOwner) { throw new MeterParameterNotFound('loan data container'); } $loans = $this->getCustomerDueRates($this->meterOwner); @@ -121,7 +121,7 @@ private function getMeterOwner(string $serialNumber): ?Person } // meter is not been used by anyone - if (! $meter->in_use) { + if (!$meter->in_use) { throw new MeterIsNotInUse($serialNumber.' meter is not in use'); } diff --git a/src/backend/app/Models/Address/Address.php b/src/backend/app/Models/Address/Address.php index d7b17aa1d..47b657506 100644 --- a/src/backend/app/Models/Address/Address.php +++ b/src/backend/app/Models/Address/Address.php @@ -16,10 +16,10 @@ * @property string|null $email * @property string|null $phone * @property string|null $street - * @property int $city_id - * @property int $is_primary - * @property int $owner_id - * @property string $owner_type + * @property int $city_id + * @property int $is_primary + * @property int $owner_id + * @property string $owner_type */ class Address extends BaseModel { diff --git a/src/backend/app/Models/Agent.php b/src/backend/app/Models/Agent.php index 9182a5e1e..49dcbf3ee 100644 --- a/src/backend/app/Models/Agent.php +++ b/src/backend/app/Models/Agent.php @@ -18,19 +18,19 @@ /** * Class Agent. * - * @property int $id - * @property int $person_id - * @property int $mini_grid_id - * @property int $agent_commission_id + * @property int $id + * @property int $person_id + * @property int $mini_grid_id + * @property int $agent_commission_id * @property string $device_id * @property string $name * @property string $email * @property string $password * @property string $fire_base_token - * @property float $balance - * @property float $available_balance + * @property float $balance + * @property float $available_balance * @property string $remember_token - * @property int $company_id + * @property int $company_id */ class Agent extends Authenticatable implements JWTSubject { diff --git a/src/backend/app/Models/AgentCommission.php b/src/backend/app/Models/AgentCommission.php index aac65eeb7..bf5c3e75d 100644 --- a/src/backend/app/Models/AgentCommission.php +++ b/src/backend/app/Models/AgentCommission.php @@ -10,7 +10,7 @@ /** * Class AgentCommission. * - * @property int $id + * @property int $id * @property float $energy_commission * @property float $appliance_commission * @property float $risk_balance diff --git a/src/backend/app/Models/AssetRate.php b/src/backend/app/Models/AssetRate.php index 027bbbd53..fb7eb22ae 100644 --- a/src/backend/app/Models/AssetRate.php +++ b/src/backend/app/Models/AssetRate.php @@ -11,9 +11,9 @@ /** * Class AssetRate. * - * @property int $asset_person_id - * @property int $rate_cost - * @property int $remaining + * @property int $asset_person_id + * @property int $rate_cost + * @property int $remaining * @property string $due_date * @property AssetPerson assetPerson */ diff --git a/src/backend/app/Models/City.php b/src/backend/app/Models/City.php index 01556cb04..696945aa0 100644 --- a/src/backend/app/Models/City.php +++ b/src/backend/app/Models/City.php @@ -12,11 +12,11 @@ /** * Class City. * - * @property int $id + * @property int $id * @property string $name - * @property int $country_id - * @property int $cluster_id - * @property int $mini_grid_id + * @property int $country_id + * @property int $cluster_id + * @property int $mini_grid_id */ class City extends BaseModel { diff --git a/src/backend/app/Models/Cluster.php b/src/backend/app/Models/Cluster.php index 776f234f5..acf8bfaf2 100644 --- a/src/backend/app/Models/Cluster.php +++ b/src/backend/app/Models/Cluster.php @@ -11,7 +11,7 @@ /** * Class Cluster. * - * @property int $id + * @property int $id * @property string $name * @property int manager_id * @property string geo_data diff --git a/src/backend/app/Models/Company.php b/src/backend/app/Models/Company.php index a7362016d..584247dca 100644 --- a/src/backend/app/Models/Company.php +++ b/src/backend/app/Models/Company.php @@ -8,7 +8,7 @@ use Illuminate\Database\Eloquent\Relations\HasOne; /** - * @property int $id + * @property int $id * @property string $name; */ class Company extends BaseModelCore diff --git a/src/backend/app/Models/History.php b/src/backend/app/Models/History.php index 2c0bcb105..ddd6e1eab 100644 --- a/src/backend/app/Models/History.php +++ b/src/backend/app/Models/History.php @@ -8,9 +8,9 @@ /** * Class History holds all the changes in the system for the current day. * - * @property int $id - * @property string $action the type of the action like created, updated, deleted/closed - * @property string $field the affected field. Only required for the update action + * @property int $id + * @property string $action the type of the action like created, updated, deleted/closed + * @property string $field the affected field. Only required for the update action * @property string $content; */ class History extends BaseModel diff --git a/src/backend/app/Models/MainSettings.php b/src/backend/app/Models/MainSettings.php index 1d0222e43..d64c2a842 100644 --- a/src/backend/app/Models/MainSettings.php +++ b/src/backend/app/Models/MainSettings.php @@ -7,14 +7,14 @@ /** * Class MainSettings. * - * @property int $id + * @property int $id * @property string $site_title * @property string $company_name * @property string $currency * @property string $country * @property string $language - * @property float $vat_energy - * @property float $vat_appliance + * @property float $vat_energy + * @property float $vat_appliance * */ class MainSettings extends BaseModel { diff --git a/src/backend/app/Models/MapSettings.php b/src/backend/app/Models/MapSettings.php index 6cf816243..dbb4ea829 100644 --- a/src/backend/app/Models/MapSettings.php +++ b/src/backend/app/Models/MapSettings.php @@ -7,7 +7,7 @@ /** * Class MapSettings. * - * @property int $id + * @property int $id * @property float $zoom * @property float $latitude * @property float $longitude diff --git a/src/backend/app/Models/Meter/Meter.php b/src/backend/app/Models/Meter/Meter.php index b614bbad3..0f1e10cd1 100644 --- a/src/backend/app/Models/Meter/Meter.php +++ b/src/backend/app/Models/Meter/Meter.php @@ -17,9 +17,9 @@ use Illuminate\Database\Eloquent\Relations\MorphOne; /** - * @property int $id + * @property int $id * @property MeterTariff $tariff - * @property bool $in_use + * @property bool $in_use */ class Meter extends BaseModel { diff --git a/src/backend/app/Models/Meter/MeterConsumption.php b/src/backend/app/Models/Meter/MeterConsumption.php index 4fd8c17f4..d922b5bd8 100644 --- a/src/backend/app/Models/Meter/MeterConsumption.php +++ b/src/backend/app/Models/Meter/MeterConsumption.php @@ -8,11 +8,11 @@ /** * Class MeterConsumption. * - * @property int $id - * @property int $meter_id - * @property float $total_consumption - * @property float $consumption - * @property float $credit_on_meter + * @property int $id + * @property int $meter_id + * @property float $total_consumption + * @property float $consumption + * @property float $credit_on_meter * @property string $reading_date */ class MeterConsumption extends BaseModel diff --git a/src/backend/app/Models/Meter/MeterTariff.php b/src/backend/app/Models/Meter/MeterTariff.php index 46d752f7e..dbf24de90 100644 --- a/src/backend/app/Models/Meter/MeterTariff.php +++ b/src/backend/app/Models/Meter/MeterTariff.php @@ -17,11 +17,11 @@ /** * Class Tariff. * - * @property string $name - * @property int $price (100 times the price. Allows to play with .00 decimals) - * @property int $total_price (100 times the price. Allows to play with .00 decimals) - * @property string $currency - * @property int|null $factor + * @property string $name + * @property int $price (100 times the price. Allows to play with .00 decimals) + * @property int $total_price (100 times the price. Allows to play with .00 decimals) + * @property string $currency + * @property int|null $factor * @property AccessRate $accessRate */ class MeterTariff extends BaseModel diff --git a/src/backend/app/Models/Meter/MeterToken.php b/src/backend/app/Models/Meter/MeterToken.php index e122e3551..f5313c187 100644 --- a/src/backend/app/Models/Meter/MeterToken.php +++ b/src/backend/app/Models/Meter/MeterToken.php @@ -14,7 +14,7 @@ * Class Token. * * @property string $token - * @property float $energy + * @property float $energy */ class MeterToken extends BaseModel { diff --git a/src/backend/app/Models/Meter/MeterType.php b/src/backend/app/Models/Meter/MeterType.php index 8faf50d5e..4393e3b3d 100644 --- a/src/backend/app/Models/Meter/MeterType.php +++ b/src/backend/app/Models/Meter/MeterType.php @@ -7,10 +7,10 @@ use Illuminate\Database\Eloquent\Relations\HasMany; /** - * @property int $id - * @property bool $online + * @property int $id + * @property bool $online * @property string $phase - * @property int $max_current + * @property int $max_current */ class MeterType extends BaseModel { diff --git a/src/backend/app/Models/MiniGrid.php b/src/backend/app/Models/MiniGrid.php index 0f214ec9e..286fc95a0 100644 --- a/src/backend/app/Models/MiniGrid.php +++ b/src/backend/app/Models/MiniGrid.php @@ -14,9 +14,9 @@ /** * Class MiniGrid. * - * @property int $id - * @property string $name - * @property int $cluster_id + * @property int $id + * @property string $name + * @property int $cluster_id * @property Collection $cities */ class MiniGrid extends BaseModel implements TargetAssignable diff --git a/src/backend/app/Models/PaymentHistory.php b/src/backend/app/Models/PaymentHistory.php index 0253d7695..6601fa629 100644 --- a/src/backend/app/Models/PaymentHistory.php +++ b/src/backend/app/Models/PaymentHistory.php @@ -84,8 +84,8 @@ public function getPaymentFlow(string $payer_type, int $payer_id, int $year) } /** - * @param Request|array|string $begin - * @param Request|array|string $end + * @param Request|array|string $begin + * @param Request|array|string $end */ public function getOverview($begin, $end) { diff --git a/src/backend/app/Models/Person/Person.php b/src/backend/app/Models/Person/Person.php index 0e6a2d8fd..6fc5ffac0 100644 --- a/src/backend/app/Models/Person/Person.php +++ b/src/backend/app/Models/Person/Person.php @@ -28,15 +28,15 @@ /** * Class Person. * - * @property int $id + * @property int $id * @property string $title * @property string $education * @property string $name * @property string $surname - * @property mixed $birth_date - * @property string $sex TODO: replace with gender - * @property int $nationality - * @property int $is_customer + * @property mixed $birth_date + * @property string $sex TODO: replace with gender + * @property int $nationality + * @property int $is_customer */ class Person extends BaseModel implements HasAddressesInterface, RoleInterface { diff --git a/src/backend/app/Models/Report.php b/src/backend/app/Models/Report.php index 50fda112c..2b4d2e9a2 100644 --- a/src/backend/app/Models/Report.php +++ b/src/backend/app/Models/Report.php @@ -7,7 +7,7 @@ /** * Class Report. * - * @property int $id + * @property int $id * @property string $name * @property string $date * @property string $path diff --git a/src/backend/app/Models/Restriction.php b/src/backend/app/Models/Restriction.php index ffae96ca7..98bd99ed2 100644 --- a/src/backend/app/Models/Restriction.php +++ b/src/backend/app/Models/Restriction.php @@ -8,10 +8,10 @@ /** * Class Restriction. * - * @property int $id + * @property int $id * @property string $target - * @property int $default - * @property int $limit + * @property int $default + * @property int $limit */ class Restriction extends BaseModel { diff --git a/src/backend/app/Models/Sms.php b/src/backend/app/Models/Sms.php index 37e23fb66..36cbdbf81 100644 --- a/src/backend/app/Models/Sms.php +++ b/src/backend/app/Models/Sms.php @@ -10,15 +10,15 @@ /** * Class Sms. * - * @property int $id + * @property int $id * @property string $trigger_type - * @property int $trigger_id + * @property int $trigger_id * @property string $receiver * @property string $body - * @property int $status the status of the sms 0 : waiting, 1 sent out to the receiver by sms provider - * @property string $uuid used for the callback to update the status of the sms - * @property int $direction - * @property int $sender_id + * @property int $status the status of the sms 0 : waiting, 1 sent out to the receiver by sms provider + * @property string $uuid used for the callback to update the status of the sms + * @property int $direction + * @property int $sender_id */ class Sms extends BaseModel { diff --git a/src/backend/app/Models/SocialTariffPiggyBank.php b/src/backend/app/Models/SocialTariffPiggyBank.php index 2f78c4988..3deb05a7a 100644 --- a/src/backend/app/Models/SocialTariffPiggyBank.php +++ b/src/backend/app/Models/SocialTariffPiggyBank.php @@ -9,9 +9,9 @@ /** * Class SocialTariffPiggyBank. * - * @property int $owner_id + * @property int $owner_id * @property string $owner_type - * @property int $savings + * @property int $savings */ class SocialTariffPiggyBank extends BaseModel { diff --git a/src/backend/app/Models/Subscription.php b/src/backend/app/Models/Subscription.php index 3d0b1dff6..bbc1d7bd2 100644 --- a/src/backend/app/Models/Subscription.php +++ b/src/backend/app/Models/Subscription.php @@ -8,8 +8,8 @@ /** * Class Subscription. * - * @property int $id - * @property int $upgrade_id + * @property int $id + * @property int $upgrade_id * @property string $expires * @property string $transaction_id */ diff --git a/src/backend/app/Models/Target.php b/src/backend/app/Models/Target.php index 7ebea43bd..51093002b 100644 --- a/src/backend/app/Models/Target.php +++ b/src/backend/app/Models/Target.php @@ -12,10 +12,10 @@ /** * Class Target. * - * @property int $id + * @property int $id * @property string $start_date * @property string $end_date - * @property int $city_id + * @property int $city_id */ class Target extends BaseModel { diff --git a/src/backend/app/Models/TariffPricingComponent.php b/src/backend/app/Models/TariffPricingComponent.php index cf7b9edab..73422b6e0 100644 --- a/src/backend/app/Models/TariffPricingComponent.php +++ b/src/backend/app/Models/TariffPricingComponent.php @@ -8,10 +8,10 @@ /** * Class TariffPricingComponent. * - * @property int $id + * @property int $id * @property string $name - * @property int $price - * @property int $owner_id + * @property int $price + * @property int $owner_id * @property string $owner_type */ class TariffPricingComponent extends BaseModel diff --git a/src/backend/app/Models/TicketSettings.php b/src/backend/app/Models/TicketSettings.php index d7cf76ab8..081c3f385 100644 --- a/src/backend/app/Models/TicketSettings.php +++ b/src/backend/app/Models/TicketSettings.php @@ -7,7 +7,7 @@ /** * Class TicketSettings. * - * @property int $id + * @property int $id * @property string $name * @property string $api_token * @property string $api_url diff --git a/src/backend/app/Models/Transaction/AirtelTransaction.php b/src/backend/app/Models/Transaction/AirtelTransaction.php index afe8d2364..c638dcc65 100644 --- a/src/backend/app/Models/Transaction/AirtelTransaction.php +++ b/src/backend/app/Models/Transaction/AirtelTransaction.php @@ -11,11 +11,11 @@ /** * Class AirtelTransaction. * - * @property int $id + * @property int $id * @property string $interface_id * @property string $business_number * @property string $trans_id - * @property int $status + * @property int $status * @property string $tr_id */ class AirtelTransaction extends BaseModel implements FullySupportedTransactionInterface, IRawTransaction diff --git a/src/backend/app/Models/Transaction/Transaction.php b/src/backend/app/Models/Transaction/Transaction.php index bf5e24c22..b35a2a89e 100644 --- a/src/backend/app/Models/Transaction/Transaction.php +++ b/src/backend/app/Models/Transaction/Transaction.php @@ -20,8 +20,8 @@ /** * Class Transaction. * - * @property int $id - * @property int $amount + * @property int $id + * @property int $amount * @property string $type * @property string $sender * @property string $message diff --git a/src/backend/app/Models/User.php b/src/backend/app/Models/User.php index df44d4add..1b787188a 100644 --- a/src/backend/app/Models/User.php +++ b/src/backend/app/Models/User.php @@ -17,9 +17,9 @@ /** * Class User. * - * @property int $id - * @property int $company_id - * @property string $name + * @property int $id + * @property int $company_id + * @property string $name * @property string|null $email */ class User extends Authenticatable implements JWTSubject diff --git a/src/backend/app/Observers/AgentBalanceHistoryObserver.php b/src/backend/app/Observers/AgentBalanceHistoryObserver.php index acd2814b1..3db4e311e 100644 --- a/src/backend/app/Observers/AgentBalanceHistoryObserver.php +++ b/src/backend/app/Observers/AgentBalanceHistoryObserver.php @@ -20,7 +20,6 @@ public function __construct( /** * Handle the asset person "updated" event. * - * * @return void */ public function created(AgentBalanceHistory $agentBalanceHistory) diff --git a/src/backend/app/PaymentHandler/AccessRate.php b/src/backend/app/PaymentHandler/AccessRate.php index ede6b64e3..7b9e9f815 100644 --- a/src/backend/app/PaymentHandler/AccessRate.php +++ b/src/backend/app/PaymentHandler/AccessRate.php @@ -24,7 +24,7 @@ class AccessRate /** * AccessRatePayment constructor. * - * @param AccessRate $accessRate + * @param AccessRate $accessRate */ public function __construct() { diff --git a/src/backend/app/Relations/BelongsToMorph.php b/src/backend/app/Relations/BelongsToMorph.php index b87cbb6bb..07aeda666 100644 --- a/src/backend/app/Relations/BelongsToMorph.php +++ b/src/backend/app/Relations/BelongsToMorph.php @@ -35,9 +35,10 @@ public function __construct(Builder $query, Model $parent, $name, $type, $id, $o /** * Add the constraints for a relationship query. * - * @param Builder $query - * @param Builder $parent - * @param array|mixed $columns + * @param Builder $query + * @param Builder $parent + * @param array|mixed $columns + * * @return Builder */ /** @@ -64,9 +65,9 @@ public function getResults() /** * Get the polymorphic relationship columns. * - * @param string $name - * @param string $type - * @param string $id + * @param string $name + * @param string $type + * @param string $id */ protected static function getMorphs($name, $type, $id): array { @@ -79,12 +80,12 @@ protected static function getMorphs($name, $type, $id): array /** * Define an inverse morph relationship. * - * @param string $related - * @param string $name - * @param null $type - * @param null $id - * @param null $otherKey - * @param null $relation + * @param string $related + * @param string $name + * @param null $type + * @param null $id + * @param null $otherKey + * @param null $relation */ public static function build( Model $parent, diff --git a/src/backend/app/Services/AbstractExportService.php b/src/backend/app/Services/AbstractExportService.php index 05adde591..e495608d4 100644 --- a/src/backend/app/Services/AbstractExportService.php +++ b/src/backend/app/Services/AbstractExportService.php @@ -74,7 +74,7 @@ public function readable($amount, $separator = ',') $amount = strval($amount); // If the amount is not a valid float, return it as is - if (! is_numeric($amount) || floatval($amount) != $amount) { + if (!is_numeric($amount) || floatval($amount) != $amount) { return $amount; } diff --git a/src/backend/app/Services/AbstractPaymentAggregatorTransactionService.php b/src/backend/app/Services/AbstractPaymentAggregatorTransactionService.php index cb5b9f9b6..fad456b89 100644 --- a/src/backend/app/Services/AbstractPaymentAggregatorTransactionService.php +++ b/src/backend/app/Services/AbstractPaymentAggregatorTransactionService.php @@ -38,17 +38,17 @@ public function __construct( public function validatePaymentOwner(string $meterSerialNumber, float $amount): void { - if (! $meter = $this->meter->findBySerialNumber($meterSerialNumber)) { + if (!$meter = $this->meter->findBySerialNumber($meterSerialNumber)) { throw new ModelNotFoundException('Meter not found with serial number you entered'); } - if (! $meterTariff = $meter->meterParameter->tariff) { + if (!$meterTariff = $meter->meterParameter->tariff) { throw new ModelNotFoundException('Tariff not found with meter serial number you entered'); } $customerId = $meter->MeterParameter->owner_id; - if (! $customerId) { + if (!$customerId) { throw new ModelNotFoundException('Customer not found with meter serial number you entered'); } @@ -99,7 +99,7 @@ private function isImitationTransactionValid($transaction) $validator = resolve('MinimumPurchaseAmountValidator'); try { - if (! $validator->validate($transactionData, $this->getMinimumPurchaseAmount())) { + if (!$validator->validate($transactionData, $this->getMinimumPurchaseAmount())) { throw new TransactionAmountNotEnoughException('Transaction amount is not enough'); } } catch (TransactionAmountNotEnoughException $e) { diff --git a/src/backend/app/Services/AgentTransactionService.php b/src/backend/app/Services/AgentTransactionService.php index 4d308fcb2..7d75e37cf 100644 --- a/src/backend/app/Services/AgentTransactionService.php +++ b/src/backend/app/Services/AgentTransactionService.php @@ -54,7 +54,7 @@ public function getById(int $agentId, ?int $customerId = null): AgentTransaction $customerDeviceSerials = $this->device->newQuery()->where('person_id', $customerId) ->get()->pluck('device_serial'); - if (! $customerDeviceSerials->count()) { + if (!$customerDeviceSerials->count()) { return null; } diff --git a/src/backend/app/Services/AppliancePaymentService.php b/src/backend/app/Services/AppliancePaymentService.php index 9eccca948..73d5ef8f4 100644 --- a/src/backend/app/Services/AppliancePaymentService.php +++ b/src/backend/app/Services/AppliancePaymentService.php @@ -131,7 +131,7 @@ private function processPaymentForDevice($deviceSerial, $transaction, $appliance { $device = $this->deviceService->getBySerialNumber($deviceSerial); - if (! $device) { + if (!$device) { throw new ModelNotFoundException("No device found with $deviceSerial"); } diff --git a/src/backend/app/Services/ClusterRevenueService.php b/src/backend/app/Services/ClusterRevenueService.php index cd307aa65..1c8169f03 100644 --- a/src/backend/app/Services/ClusterRevenueService.php +++ b/src/backend/app/Services/ClusterRevenueService.php @@ -169,10 +169,10 @@ public function getRevenueAnalysisForConnectionTypesByCluser( $periods = $this->periodService->generatePeriodicList($startDate, $endDate, $period, 0); foreach ($connectionTypes as $connectionType) { - if (! isset($revenueAnalysis[$connectionType->name])) { + if (!isset($revenueAnalysis[$connectionType->name])) { $revenueAnalysis[$connectionType->name] = $periods; } - if (! isset($revenueAnalysis['Total'])) { + if (!isset($revenueAnalysis['Total'])) { $revenueAnalysis['Total'] = $periods; } @@ -216,11 +216,11 @@ public function getMonthlyRevenueAnalysisForConnectionTypesById( $periods = $this->periodService->generatePeriodicList($startDate, $endDate, $period, 0); foreach ($connectionTypes as $connectionType) { - if (! isset($revenueAnalysis[$connectionType->name])) { + if (!isset($revenueAnalysis[$connectionType->name])) { $revenueAnalysis[$connectionType->name] = $periods; } - if (! isset($revenueAnalysis['Total'])) { + if (!isset($revenueAnalysis['Total'])) { $revenueAnalysis['Total'] = $periods; } @@ -311,7 +311,7 @@ public function getMiniGridBasedRevenueById( public function setDatesForRequest($startDate, $endDate): array { - if (! $startDate) { + if (!$startDate) { $start = new \DateTime(); $start->setDate($start->format('Y'), $start->format('n'), 1); // Normalize the day to 1 $start->setTime(0, 0, 0); // Normalize time to midnight diff --git a/src/backend/app/Services/Interfaces/IAssociative.php b/src/backend/app/Services/Interfaces/IAssociative.php index 1de36ad03..12859bb1f 100644 --- a/src/backend/app/Services/Interfaces/IAssociative.php +++ b/src/backend/app/Services/Interfaces/IAssociative.php @@ -14,7 +14,7 @@ interface IAssociative public function make(array $data): Model; /** - * @param T $model + * @param T $model */ public function save(Model $model): bool; } diff --git a/src/backend/app/Services/Interfaces/IBaseService.php b/src/backend/app/Services/Interfaces/IBaseService.php index 4c2d225b1..90651b23e 100644 --- a/src/backend/app/Services/Interfaces/IBaseService.php +++ b/src/backend/app/Services/Interfaces/IBaseService.php @@ -20,7 +20,8 @@ public function getById(int $id): ?Model; public function create(array $data): Model; /** - * @param T $model + * @param T $model + * * @return T */ public function update(Model $model, array $data): Model; diff --git a/src/backend/app/Services/Interfaces/ISettingsService.php b/src/backend/app/Services/Interfaces/ISettingsService.php index 5d73f9348..37a6f47a3 100644 --- a/src/backend/app/Services/Interfaces/ISettingsService.php +++ b/src/backend/app/Services/Interfaces/ISettingsService.php @@ -15,7 +15,8 @@ interface ISettingsService public function get(): ?Model; /** - * @param T $model + * @param T $model + * * @return T */ public function update(Model $model, array $data): Model; diff --git a/src/backend/app/Services/PeriodService.php b/src/backend/app/Services/PeriodService.php index c09d5409f..c5b8a91ef 100644 --- a/src/backend/app/Services/PeriodService.php +++ b/src/backend/app/Services/PeriodService.php @@ -5,7 +5,7 @@ class PeriodService { /** - * @param (int|int[])[]|int $initialData + * @param (int|int[])[]|int $initialData * * @throws \Exception */ diff --git a/src/backend/app/Services/PersonService.php b/src/backend/app/Services/PersonService.php index cac29a6b5..4011bf9f2 100644 --- a/src/backend/app/Services/PersonService.php +++ b/src/backend/app/Services/PersonService.php @@ -35,7 +35,7 @@ public function addCitizenship(Person $person, Country $country): Model public function getDetails(int $personID, bool $allRelations = false) { - if (! $allRelations) { + if (!$allRelations) { return $this->getById($personID); } @@ -54,8 +54,9 @@ public function getDetails(int $personID, bool $allRelations = false) } /** - * @param string $searchTerm could either phone, name or surname - * @param Request|array|int|string $paginate + * @param string $searchTerm could either phone, name or surname + * @param Request|array|int|string $paginate + * * @return Builder[]|Collection|LengthAwarePaginator * * @psalm-return Collection|LengthAwarePaginator|array diff --git a/src/backend/app/Services/RegistrationTailService.php b/src/backend/app/Services/RegistrationTailService.php index dcfa68ca1..82af06afb 100644 --- a/src/backend/app/Services/RegistrationTailService.php +++ b/src/backend/app/Services/RegistrationTailService.php @@ -58,7 +58,7 @@ public function getFirst($limit = null) public function addMpmPluginToRegistrationTail(RegistrationTail $registrationTail, MpmPlugin $mpmPlugin): RegistrationTail { - $tail = ! empty($registrationTail->tail) ? json_decode($registrationTail->tail, true) : []; + $tail = !empty($registrationTail->tail) ? json_decode($registrationTail->tail, true) : []; array_push($tail, [ 'tag' => $mpmPlugin->tail_tag, @@ -67,7 +67,7 @@ public function addMpmPluginToRegistrationTail(RegistrationTail $registrationTai '-', $mpmPlugin->tail_tag ) : null, - 'adjusted' => ! isset($mpmPlugin->tail_tag), + 'adjusted' => !isset($mpmPlugin->tail_tag), ]); return $this->update( @@ -78,7 +78,7 @@ public function addMpmPluginToRegistrationTail(RegistrationTail $registrationTai public function removeMpmPluginFromRegistrationTail(RegistrationTail $registrationTail, MpmPlugin $mpmPlugin): RegistrationTail { - $tail = ! empty($registrationTail->tail) ? json_decode($registrationTail->tail, true) : []; + $tail = !empty($registrationTail->tail) ? json_decode($registrationTail->tail, true) : []; $updatedTail = array_filter($tail, function ($item) use ($mpmPlugin) { return $item['tag'] !== $mpmPlugin->tail_tag; diff --git a/src/backend/app/Services/SessionService.php b/src/backend/app/Services/SessionService.php index 97704825e..a85928ba0 100644 --- a/src/backend/app/Services/SessionService.php +++ b/src/backend/app/Services/SessionService.php @@ -13,7 +13,7 @@ public function setModel(BaseModel|Model $model): void { $this->model = $model; $databaseName = $model->getConnectionName(); - if (! $this->checkDatabaseName($databaseName)) { + if (!$this->checkDatabaseName($databaseName)) { $this->model->setConnection($this->getAuthenticatedUserDatabaseName()); } } diff --git a/src/backend/app/Services/SmsService.php b/src/backend/app/Services/SmsService.php index 42d04534f..01c4aea15 100644 --- a/src/backend/app/Services/SmsService.php +++ b/src/backend/app/Services/SmsService.php @@ -96,13 +96,13 @@ public function sendSms($data, $smsType, $smsConfigs) private function resolveSmsType($data, $smsType, $smsConfigs, $smsAndroidSettings) { $configs = resolve($smsConfigs); - if (! array_key_exists($smsType, $configs->smsTypes)) { + if (!array_key_exists($smsType, $configs->smsTypes)) { throw new SmsTypeNotFoundException('SmsType could not resolve.'); } $smsBodyService = resolve($configs->servicePath); $reflection = new \ReflectionClass($configs->smsTypes[$smsType]); - if (! $reflection->isSubclassOf(SmsSender::class)) { + if (!$reflection->isSubclassOf(SmsSender::class)) { throw new SmsBodyParserNotExtendedException('SmsBodyParser has not extended.'); } @@ -116,7 +116,7 @@ private function resolveSmsType($data, $smsType, $smsConfigs, $smsAndroidSetting private function associateSmsWithForSmsType($smsType, $data, $uuid, $receiver, $smsAndroidSettings) { - if (! ($smsType instanceof ManualSms)) { + if (!($smsType instanceof ManualSms)) { $sms = Sms::query()->make([ 'uuid' => $uuid, 'body' => $smsType->body, diff --git a/src/backend/app/Services/TargetService.php b/src/backend/app/Services/TargetService.php index 9cd956c9c..5a8d4193d 100644 --- a/src/backend/app/Services/TargetService.php +++ b/src/backend/app/Services/TargetService.php @@ -31,7 +31,7 @@ public function create(CarbonImmutable $period, string $targetForType, TargetAss 'target_date' => $period->format('Y-m-d'), 'type' => $targetForType, ]); - if (! $targetOwner instanceof Model) { + if (!$targetOwner instanceof Model) { throw new ValidationException('target owner should be a model'); } $target->owner()->associate($targetOwner); diff --git a/src/backend/app/Services/UserAddressService.php b/src/backend/app/Services/UserAddressService.php index eb3478d24..7bb1ffdc7 100644 --- a/src/backend/app/Services/UserAddressService.php +++ b/src/backend/app/Services/UserAddressService.php @@ -38,7 +38,7 @@ public function update(User $user, $data) $user->name = $data['name']; $user->update(); $address = $user->address()->first(); - if (! $address) { + if (!$address) { $address = $this->address->newQuery()->create([ 'email' => $user->email, 'phone' => $data['phone'], diff --git a/src/backend/app/Sms/AndroidGateway.php b/src/backend/app/Sms/AndroidGateway.php index 2baf09487..b4c342bc5 100644 --- a/src/backend/app/Sms/AndroidGateway.php +++ b/src/backend/app/Sms/AndroidGateway.php @@ -12,11 +12,11 @@ class AndroidGateway implements ISmsProvider /** * Sends the sms to the sms provider. * - * @param SmsAndroidSetting $smsAndroidSettings + * @param SmsAndroidSetting $smsAndroidSettings */ public function sendSms(string $number, string $body, string $callback, SmsAndroidSetting $smsAndroidSetting) { - if (! config('app.env') == 'production') { + if (!config('app.env') == 'production') { Log::debug('Send sms on allowed in production', ['number' => $number, 'message' => $body]); return; diff --git a/src/backend/app/Sms/BodyParsers/SmsResendInformationHeader.php b/src/backend/app/Sms/BodyParsers/SmsResendInformationHeader.php index 6135ae592..b1174b456 100644 --- a/src/backend/app/Sms/BodyParsers/SmsResendInformationHeader.php +++ b/src/backend/app/Sms/BodyParsers/SmsResendInformationHeader.php @@ -17,7 +17,7 @@ public function __construct($data) protected function getVariableValue($variable) { - if (! is_array($this->data)) { + if (!is_array($this->data)) { $person = $this->data->meter->meterParameter->owner()->first(); } else { try { diff --git a/src/backend/app/Sms/Senders/ResendInformationNotification.php b/src/backend/app/Sms/Senders/ResendInformationNotification.php index 646a3b4c6..eb8e9f776 100644 --- a/src/backend/app/Sms/Senders/ResendInformationNotification.php +++ b/src/backend/app/Sms/Senders/ResendInformationNotification.php @@ -22,7 +22,7 @@ class ResendInformationNotification extends SmsSender public function prepareBody() { - if (! is_array($this->data)) { + if (!is_array($this->data)) { try { $smsBody = $this->smsBodyService->getSmsBodyByReference('ResendInformation'); } catch (ModelNotFoundException $exception) { diff --git a/src/backend/app/Sms/Senders/SmsSender.php b/src/backend/app/Sms/Senders/SmsSender.php index ff5072360..715e4681b 100644 --- a/src/backend/app/Sms/Senders/SmsSender.php +++ b/src/backend/app/Sms/Senders/SmsSender.php @@ -162,7 +162,7 @@ public function getReceiver() '+' ) === 0 ? $this->data->assetPerson->person->addresses->first()->phone : '+'.$this->data->assetPerson->person->addresses->first()->phone; - } elseif (! is_array($this->data) && $this->data->mpmPerson) { + } elseif (!is_array($this->data) && $this->data->mpmPerson) { $this->receiver = strpos( $this->data->mpmPerson->addresses[0]->phone, '+' @@ -194,7 +194,7 @@ private function checkForViberIdOfReceiverIfPluginIsActive() if ($viberMessagingPlugin && $viberMessagingPlugin->status === Plugins::ACTIVE) { $viberContact = $viberContactService->getByReceiverPhoneNumber($this->receiver); - if (! $viberContact) { + if (!$viberContact) { return null; } diff --git a/src/backend/app/Traits/RestExceptionHandler.php b/src/backend/app/Traits/RestExceptionHandler.php index 7655af9fc..9a6770ac9 100644 --- a/src/backend/app/Traits/RestExceptionHandler.php +++ b/src/backend/app/Traits/RestExceptionHandler.php @@ -16,7 +16,8 @@ trait RestExceptionHandler /** * Creates a new response based on exception type. * - * @param \Exception $e + * @param \Exception $e + * * @return JsonResponse */ protected function getJsonResponseForException(Request $request, \Exception|\Throwable $e) @@ -44,8 +45,9 @@ protected function getJsonResponseForException(Request $request, \Exception|\Thr /** * returns a json response for all excepion types except modelnotfoundexception. * - * @param string $message - * @param int $status_code + * @param string $message + * @param int $status_code + * * @return JsonResponse */ protected function badRequest($message = 'Bad request', $status_code = 400) @@ -62,8 +64,9 @@ protected function badRequest($message = 'Bad request', $status_code = 400) /** * Returns a json response for Model not found exception. * - * @param string $message - * @param int $status_code + * @param string $message + * @param int $status_code + * * @return JsonResponse */ protected function modelNotFound($message = 'Record not found', $status_code = 404) @@ -80,8 +83,9 @@ protected function modelNotFound($message = 'Record not found', $status_code = 4 /** * Generates validation error response. * - * @param string $message - * @param int $status_code + * @param string $message + * @param int $status_code + * * @return JsonResponse */ protected function validationError($message = 'Validation failed', $status_code = 422) @@ -98,7 +102,7 @@ protected function validationError($message = 'Validation failed', $status_code /** * Determines if the exception type is Model not found exception. * - * @param \Exception $e + * @param \Exception $e */ protected function isModelNotFoundException($e): bool { @@ -108,7 +112,7 @@ protected function isModelNotFoundException($e): bool /** * Determines if given Exception is Validation Exception. * - * @param \Exception $e + * @param \Exception $e */ protected function isValidationException($e): bool { @@ -118,7 +122,6 @@ protected function isValidationException($e): bool /** * Generates a json response & returns it. * - * * @return JsonResponse */ protected function jsonResponse(?array $payload, $status_code) diff --git a/src/backend/app/Utils/ApplianceInstallmentPayer.php b/src/backend/app/Utils/ApplianceInstallmentPayer.php index 156be8fa3..b5c3951b8 100644 --- a/src/backend/app/Utils/ApplianceInstallmentPayer.php +++ b/src/backend/app/Utils/ApplianceInstallmentPayer.php @@ -84,7 +84,7 @@ private function getCustomerByDeviceSerial(string $serialNumber): Person { $device = $this->deviceService->getBySerialNumber($serialNumber); - if (! $device) { + if (!$device) { throw new DeviceIsNotAssignedToCustomer('Device is not assigned to customer'); } diff --git a/src/backend/app/modules/CustomBulkRegistration/Ecosys/CustomerDatabaseParser.php b/src/backend/app/modules/CustomBulkRegistration/Ecosys/CustomerDatabaseParser.php index ce68f6965..6643b22c7 100644 --- a/src/backend/app/modules/CustomBulkRegistration/Ecosys/CustomerDatabaseParser.php +++ b/src/backend/app/modules/CustomBulkRegistration/Ecosys/CustomerDatabaseParser.php @@ -86,7 +86,7 @@ public function insertFromCsv() $city = $this->createRecordFromCsv($row, CityService::class); $row['city_id'] = $city->id; - if (! $isExistingPerson) { + if (!$isExistingPerson) { $this->createRecordFromCsv($row, AddressService::class); } @@ -142,7 +142,7 @@ private function createRecordFromCsv($row, $service) private function checkRecordWasRecentlyCreated($record, $type) { if ($record->wasRecentlyCreated) { - $this->recentlyCreatedRecords[$type]++; + ++$this->recentlyCreatedRecords[$type]; } } } diff --git a/src/backend/app/modules/CustomBulkRegistration/Ecosys/Services/AppliancePersonService.php b/src/backend/app/modules/CustomBulkRegistration/Ecosys/Services/AppliancePersonService.php index fc434242e..ceb75346e 100644 --- a/src/backend/app/modules/CustomBulkRegistration/Ecosys/Services/AppliancePersonService.php +++ b/src/backend/app/modules/CustomBulkRegistration/Ecosys/Services/AppliancePersonService.php @@ -92,7 +92,7 @@ private function calculateRateCount($price, $downPayment, $minimumPaymentAmount) while ($rawCost > 0) { $rawCost = $rawCost - $minimumPaymentAmount; - $rateCount++; + ++$rateCount; } return $rateCount; diff --git a/src/backend/app/modules/Sharding/ApiCompanyResolverService.php b/src/backend/app/modules/Sharding/ApiCompanyResolverService.php index de17e7e3d..78b7dd31c 100644 --- a/src/backend/app/modules/Sharding/ApiCompanyResolverService.php +++ b/src/backend/app/modules/Sharding/ApiCompanyResolverService.php @@ -19,7 +19,7 @@ public function __construct(private ApiResolverMap $apiResolverMap) public function resolve(Request $request): int { $api = collect($this->apiResolverMap::RESOLVABLE_APIS)->filter(fn ($apiPath) => Str::startsWith(Str::lower($request->path()), Str::lower($apiPath))); - if (! $api) { + if (!$api) { throw new ValidationException('No api resolver registered for '.$request->path()); } @@ -31,7 +31,7 @@ public function resolve(Request $request): int private function startResolver(string $api): ApiResolverInterface { $apiResolver = $this->apiResolverMap->getApiResolver($api); - if (! $apiResolver) { + if (!$apiResolver) { throw new ValidationException('Api is registered to resolve but no resolver class is assigned'.$api); } /** @var ApiResolverInterface $resolver */ diff --git a/src/backend/app/modules/Sharding/ApiResolvers/TestApiResolver.php b/src/backend/app/modules/Sharding/ApiResolvers/TestApiResolver.php index c8b572072..d499c42ed 100644 --- a/src/backend/app/modules/Sharding/ApiResolvers/TestApiResolver.php +++ b/src/backend/app/modules/Sharding/ApiResolvers/TestApiResolver.php @@ -15,7 +15,7 @@ class TestApiResolver implements ApiResolverInterface public function resolveCompanyId(Request $request): int { $companyId = $request->input(self::QUERY_PARAM_COMPANY_ID); - if (! is_numeric($companyId)) { + if (!is_numeric($companyId)) { throw new ValidationException('the field which is used to identify the company is not provided'); } diff --git a/src/backend/app/modules/Transaction/Provider/AgentTransactionProvider.php b/src/backend/app/modules/Transaction/Provider/AgentTransactionProvider.php index d55f86afb..c57ba5a5e 100644 --- a/src/backend/app/modules/Transaction/Provider/AgentTransactionProvider.php +++ b/src/backend/app/modules/Transaction/Provider/AgentTransactionProvider.php @@ -57,7 +57,7 @@ public function sendResult(bool $requestType, Transaction $transaction): void $this->agentTransaction->update(['status' => $requestType === true ? 1 : -1]); $agent = $this->agentTransaction->agent; - if (! $requestType) { + if (!$requestType) { $body = $this->prepareBodyFail($transaction); $this->fireBaseService->sendNotify($agent->fire_base_token, $body); diff --git a/src/backend/app/modules/Transaction/Provider/AirtelVoltTerraProvider.php b/src/backend/app/modules/Transaction/Provider/AirtelVoltTerraProvider.php index 2527a5005..9256ab430 100644 --- a/src/backend/app/modules/Transaction/Provider/AirtelVoltTerraProvider.php +++ b/src/backend/app/modules/Transaction/Provider/AirtelVoltTerraProvider.php @@ -76,17 +76,17 @@ public function validateRequest($request): bool $meterModel = new Meter(); - if (! $meter = $meterModel->findBySerialNumber($meterSerial)) { + if (!$meter = $meterModel->findBySerialNumber($meterSerial)) { throw new ModelNotFoundException('Meter not found with serial number you entered'); } - if (! $meterTariff = $meter->meterParameter->tariff) { + if (!$meterTariff = $meter->meterParameter->tariff) { throw new ModelNotFoundException('Tariff not found with meter serial number you entered'); } $customerId = $meter->MeterParameter->owner_id; - if (! $customerId) { + if (!$customerId) { throw new ModelNotFoundException('Customer not found with meter serial number you entered'); } $minimumPurchaseAmount = $meterTariff->minimum_purchase_amount ?? 0; diff --git a/src/backend/app/modules/Transaction/Provider/TransactionAdapter.php b/src/backend/app/modules/Transaction/Provider/TransactionAdapter.php index a9a4cc1bf..9bb19e780 100644 --- a/src/backend/app/modules/Transaction/Provider/TransactionAdapter.php +++ b/src/backend/app/modules/Transaction/Provider/TransactionAdapter.php @@ -12,7 +12,7 @@ class TransactionAdapter { /** - * @param ITransactionProvider $transactionProvider + * @param ITransactionProvider $transactionProvider */ public static function getTransaction($transactionProvider): ?ITransactionProvider { diff --git a/src/backend/app/modules/Transaction/Provider/VodacomTransactionProvider.php b/src/backend/app/modules/Transaction/Provider/VodacomTransactionProvider.php index 223007895..c48fa6e4f 100644 --- a/src/backend/app/modules/Transaction/Provider/VodacomTransactionProvider.php +++ b/src/backend/app/modules/Transaction/Provider/VodacomTransactionProvider.php @@ -44,7 +44,7 @@ public function saveTransaction(): void */ public function sendResult(bool $requestType, Transaction $transaction): void { - if (! app()->environment('production')) { + if (!app()->environment('production')) { return; } $requestContent = $this->prepareRequest($requestType); @@ -66,7 +66,7 @@ public function sendResult(bool $requestType, Transaction $transaction): void ); // request was successful if ($response->getStatusCode() === 200) { - if (! $requestType) { + if (!$requestType) { Log::critical( 'Vodacom transaction cancelled', [ @@ -86,7 +86,7 @@ public function sendResult(bool $requestType, Transaction $transaction): void // vodacom returns 0 for confirmation and 999 for cancellation request // cast bool to int gives (0,1) as number. Multiply its inverse by // 999 gives 0 for true and 999 for false - $expectedResponseCode = (int) ! $requestType * 999; + $expectedResponseCode = (int) !$requestType * 999; if ((int) $xmlResponse->response->responseCode === $expectedResponseCode) { // mark transaction as done $this->vodacomTransaction->status = $requestType === true ? 1 : -1; @@ -124,7 +124,6 @@ public function sendResult(bool $requestType, Transaction $transaction): void * Validates incoming request * stores the request data to valid_data if request is valid. * - * * @throws \Exception */ public function validateRequest($request): void @@ -244,7 +243,7 @@ private function prepareRequest(bool $requestType): string $providerPassword = $this->encryptProviderPassword($time); $phonePassword = $this->encryptPhonePassword(); - if (! $requestType) { + if (!$requestType) { $requestContent = $this->serveResult( $providerPassword, $phonePassword, @@ -268,11 +267,11 @@ private function prepareRequest(bool $requestType): string /** * Generates result for cancel/approve transaction. * - * @param string $serviceProviderPassword - * @param string $phonePassword - * @param string $time Y-md H:i:s - * @param string $result - * @param int $resultCode + * @param string $serviceProviderPassword + * @param string $phonePassword + * @param string $time Y-md H:i:s + * @param string $result + * @param int $resultCode */ private function serveResult( $serviceProviderPassword, diff --git a/src/backend/database/migrations/2022_03_10_120408_create_companies_table.php b/src/backend/database/migrations/2022_03_10_120408_create_companies_table.php index f24dcc24e..86d746c4e 100644 --- a/src/backend/database/migrations/2022_03_10_120408_create_companies_table.php +++ b/src/backend/database/migrations/2022_03_10_120408_create_companies_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/2022_03_10_134450_create_company_databases_table.php b/src/backend/database/migrations/2022_03_10_134450_create_company_databases_table.php index b2a1403cc..d2b568602 100644 --- a/src/backend/database/migrations/2022_03_10_134450_create_company_databases_table.php +++ b/src/backend/database/migrations/2022_03_10_134450_create_company_databases_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/2022_06_18_204649_create_database_proxies_table.php b/src/backend/database/migrations/2022_06_18_204649_create_database_proxies_table.php index bacc9187c..6f51e02b3 100644 --- a/src/backend/database/migrations/2022_06_18_204649_create_database_proxies_table.php +++ b/src/backend/database/migrations/2022_06_18_204649_create_database_proxies_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { public function up(): void { Schema::create('database_proxies', function (Blueprint $table) { diff --git a/src/backend/database/migrations/2022_06_21_102121_create_mpm_plugins_table.php b/src/backend/database/migrations/2022_06_21_102121_create_mpm_plugins_table.php index ec38f54ba..252e717ed 100644 --- a/src/backend/database/migrations/2022_06_21_102121_create_mpm_plugins_table.php +++ b/src/backend/database/migrations/2022_06_21_102121_create_mpm_plugins_table.php @@ -7,7 +7,7 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/2022_06_21_122032_add_email_to_companies_table.php b/src/backend/database/migrations/2022_06_21_122032_add_email_to_companies_table.php index 3c068cf02..683ee1f16 100644 --- a/src/backend/database/migrations/2022_06_21_122032_add_email_to_companies_table.php +++ b/src/backend/database/migrations/2022_06_21_122032_add_email_to_companies_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/2022_07_05_093903_add_tail_tag_to_mpm_plugins_table.php b/src/backend/database/migrations/2022_07_05_093903_add_tail_tag_to_mpm_plugins_table.php index 7ab9a9325..2f2079520 100644 --- a/src/backend/database/migrations/2022_07_05_093903_add_tail_tag_to_mpm_plugins_table.php +++ b/src/backend/database/migrations/2022_07_05_093903_add_tail_tag_to_mpm_plugins_table.php @@ -7,7 +7,7 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/2022_07_07_140545_add_installation_command_to_mpm_plugins_table.php b/src/backend/database/migrations/2022_07_07_140545_add_installation_command_to_mpm_plugins_table.php index dd8b35d22..693d3017d 100644 --- a/src/backend/database/migrations/2022_07_07_140545_add_installation_command_to_mpm_plugins_table.php +++ b/src/backend/database/migrations/2022_07_07_140545_add_installation_command_to_mpm_plugins_table.php @@ -7,7 +7,7 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/2022_09_20_0000000_add_bulk_registration_to_mpm_plugin_table.php b/src/backend/database/migrations/2022_09_20_0000000_add_bulk_registration_to_mpm_plugin_table.php index 911ed02f3..141572263 100644 --- a/src/backend/database/migrations/2022_09_20_0000000_add_bulk_registration_to_mpm_plugin_table.php +++ b/src/backend/database/migrations/2022_09_20_0000000_add_bulk_registration_to_mpm_plugin_table.php @@ -5,7 +5,7 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Support\Facades\DB; -return new class () extends Migration { +return new class extends Migration { public function up() { DB::table('mpm_plugins')->insert([ diff --git a/src/backend/database/migrations/2022_11_08_0000000_add_viber_messaging_to_mpm_plugin_table.php b/src/backend/database/migrations/2022_11_08_0000000_add_viber_messaging_to_mpm_plugin_table.php index 15179525a..a623dc146 100644 --- a/src/backend/database/migrations/2022_11_08_0000000_add_viber_messaging_to_mpm_plugin_table.php +++ b/src/backend/database/migrations/2022_11_08_0000000_add_viber_messaging_to_mpm_plugin_table.php @@ -5,7 +5,7 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Support\Facades\DB; -return new class () extends Migration { +return new class extends Migration { public function up() { DB::table('mpm_plugins')->insert([ diff --git a/src/backend/database/migrations/2022_11_08_154321_update_email_field_for_database_proxies_table.php b/src/backend/database/migrations/2022_11_08_154321_update_email_field_for_database_proxies_table.php index 829c9537f..b5873bd60 100644 --- a/src/backend/database/migrations/2022_11_08_154321_update_email_field_for_database_proxies_table.php +++ b/src/backend/database/migrations/2022_11_08_154321_update_email_field_for_database_proxies_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/2022_11_21_000000_add_wave_money_payment_to_mpm_plugin_table.php b/src/backend/database/migrations/2022_11_21_000000_add_wave_money_payment_to_mpm_plugin_table.php index 6368c9eb0..0f7e83fed 100644 --- a/src/backend/database/migrations/2022_11_21_000000_add_wave_money_payment_to_mpm_plugin_table.php +++ b/src/backend/database/migrations/2022_11_21_000000_add_wave_money_payment_to_mpm_plugin_table.php @@ -5,7 +5,7 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Support\Facades\DB; -return new class () extends Migration { +return new class extends Migration { public function up() { DB::table('mpm_plugins')->insert([ diff --git a/src/backend/database/migrations/2022_11_25_091725_create_company_jobs.php b/src/backend/database/migrations/2022_11_25_091725_create_company_jobs.php index 8fe3d2cb1..f5cb6bfaf 100644 --- a/src/backend/database/migrations/2022_11_25_091725_create_company_jobs.php +++ b/src/backend/database/migrations/2022_11_25_091725_create_company_jobs.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/2022_11_29_000000_add_micro_star_to_mpm_plugin_table.php b/src/backend/database/migrations/2022_11_29_000000_add_micro_star_to_mpm_plugin_table.php index acd02c404..2fbfd37e8 100644 --- a/src/backend/database/migrations/2022_11_29_000000_add_micro_star_to_mpm_plugin_table.php +++ b/src/backend/database/migrations/2022_11_29_000000_add_micro_star_to_mpm_plugin_table.php @@ -5,7 +5,7 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Support\Facades\DB; -return new class () extends Migration { +return new class extends Migration { public function up() { DB::table('mpm_plugins')->insert([ diff --git a/src/backend/database/migrations/2022_12_12_000000_add_root_class_to_mpm_plugins_table.php b/src/backend/database/migrations/2022_12_12_000000_add_root_class_to_mpm_plugins_table.php index 8ecebf7bd..052cf053a 100644 --- a/src/backend/database/migrations/2022_12_12_000000_add_root_class_to_mpm_plugins_table.php +++ b/src/backend/database/migrations/2022_12_12_000000_add_root_class_to_mpm_plugins_table.php @@ -7,7 +7,7 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/2022_14_12_000000_add_sun_king_to_mpm_plugin_table.php b/src/backend/database/migrations/2022_14_12_000000_add_sun_king_to_mpm_plugin_table.php index d4883f0ab..ee5dee0f3 100644 --- a/src/backend/database/migrations/2022_14_12_000000_add_sun_king_to_mpm_plugin_table.php +++ b/src/backend/database/migrations/2022_14_12_000000_add_sun_king_to_mpm_plugin_table.php @@ -5,7 +5,7 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Support\Facades\DB; -return new class () extends Migration { +return new class extends Migration { public function up() { DB::table('mpm_plugins')->insert([ diff --git a/src/backend/database/migrations/2023_01_24_110414_create_protected_pages_table.php b/src/backend/database/migrations/2023_01_24_110414_create_protected_pages_table.php index f631c9b35..37e51a3b8 100644 --- a/src/backend/database/migrations/2023_01_24_110414_create_protected_pages_table.php +++ b/src/backend/database/migrations/2023_01_24_110414_create_protected_pages_table.php @@ -6,7 +6,7 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/2023_01_24_112359_add_protected_page_password_to_companies_table.php b/src/backend/database/migrations/2023_01_24_112359_add_protected_page_password_to_companies_table.php index 654468da4..0ed96210f 100644 --- a/src/backend/database/migrations/2023_01_24_112359_add_protected_page_password_to_companies_table.php +++ b/src/backend/database/migrations/2023_01_24_112359_add_protected_page_password_to_companies_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/2023_02_06_000000_add_gome_long_to_mpm_plugin_table.php b/src/backend/database/migrations/2023_02_06_000000_add_gome_long_to_mpm_plugin_table.php index ba3042e28..7bacd70cf 100644 --- a/src/backend/database/migrations/2023_02_06_000000_add_gome_long_to_mpm_plugin_table.php +++ b/src/backend/database/migrations/2023_02_06_000000_add_gome_long_to_mpm_plugin_table.php @@ -5,7 +5,7 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Support\Facades\DB; -return new class () extends Migration { +return new class extends Migration { public function up() { DB::table('mpm_plugins')->insert([ diff --git a/src/backend/database/migrations/2023_04_02_121811_add_wavecom_to_mpm_plugin_table.php b/src/backend/database/migrations/2023_04_02_121811_add_wavecom_to_mpm_plugin_table.php index 31d572551..b0bf2b309 100644 --- a/src/backend/database/migrations/2023_04_02_121811_add_wavecom_to_mpm_plugin_table.php +++ b/src/backend/database/migrations/2023_04_02_121811_add_wavecom_to_mpm_plugin_table.php @@ -5,7 +5,7 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Support\Facades\DB; -return new class () extends Migration { +return new class extends Migration { public function up() { DB::table('mpm_plugins')->insert([ diff --git a/src/backend/database/migrations/2023_11_23_134944_update_description_column_in_mpm_plugins_table.php b/src/backend/database/migrations/2023_11_23_134944_update_description_column_in_mpm_plugins_table.php index a9b567b2f..4157e3ac7 100644 --- a/src/backend/database/migrations/2023_11_23_134944_update_description_column_in_mpm_plugins_table.php +++ b/src/backend/database/migrations/2023_11_23_134944_update_description_column_in_mpm_plugins_table.php @@ -7,7 +7,7 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/2024_01_01_000000_add_daly_bms_to_mpm_plugin_table.php b/src/backend/database/migrations/2024_01_01_000000_add_daly_bms_to_mpm_plugin_table.php index ee1a746bf..e16792502 100644 --- a/src/backend/database/migrations/2024_01_01_000000_add_daly_bms_to_mpm_plugin_table.php +++ b/src/backend/database/migrations/2024_01_01_000000_add_daly_bms_to_mpm_plugin_table.php @@ -5,7 +5,7 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Support\Facades\DB; -return new class () extends Migration { +return new class extends Migration { public function up() { DB::table('mpm_plugins')->insert([ diff --git a/src/backend/database/migrations/2024_01_12_000000_add_angaza_to_mpm_plugin_table.php b/src/backend/database/migrations/2024_01_12_000000_add_angaza_to_mpm_plugin_table.php index 7abe2495f..388e3631b 100644 --- a/src/backend/database/migrations/2024_01_12_000000_add_angaza_to_mpm_plugin_table.php +++ b/src/backend/database/migrations/2024_01_12_000000_add_angaza_to_mpm_plugin_table.php @@ -5,7 +5,7 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Support\Facades\DB; -return new class () extends Migration { +return new class extends Migration { public function up() { DB::table('mpm_plugins')->insert([ diff --git a/src/backend/database/migrations/2024_02_07_100345_create_usage_types_table.php b/src/backend/database/migrations/2024_02_07_100345_create_usage_types_table.php index 88e95fd43..d97075caf 100644 --- a/src/backend/database/migrations/2024_02_07_100345_create_usage_types_table.php +++ b/src/backend/database/migrations/2024_02_07_100345_create_usage_types_table.php @@ -6,7 +6,7 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/2024_02_07_113319_add_usage_type_column_to_mpm_plugins_table.php b/src/backend/database/migrations/2024_02_07_113319_add_usage_type_column_to_mpm_plugins_table.php index a347ab7cb..f8f2db0b7 100644 --- a/src/backend/database/migrations/2024_02_07_113319_add_usage_type_column_to_mpm_plugins_table.php +++ b/src/backend/database/migrations/2024_02_07_113319_add_usage_type_column_to_mpm_plugins_table.php @@ -7,7 +7,7 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/2024_03_21_121825_add_message_and_trace_columns_to_company_jobs_table.php b/src/backend/database/migrations/2024_03_21_121825_add_message_and_trace_columns_to_company_jobs_table.php index 86819c41f..f2b07ddaa 100644 --- a/src/backend/database/migrations/2024_03_21_121825_add_message_and_trace_columns_to_company_jobs_table.php +++ b/src/backend/database/migrations/2024_03_21_121825_add_message_and_trace_columns_to_company_jobs_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2014_10_12_000000_create_users_table.php b/src/backend/database/migrations/micropowermanager/2014_10_12_000000_create_users_table.php index fb91c6e07..5a9665ae8 100644 --- a/src/backend/database/migrations/micropowermanager/2014_10_12_000000_create_users_table.php +++ b/src/backend/database/migrations/micropowermanager/2014_10_12_000000_create_users_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2014_10_12_100000_create_password_resets_table.php b/src/backend/database/migrations/micropowermanager/2014_10_12_100000_create_password_resets_table.php index 0ba694725..f1d5cd1e2 100644 --- a/src/backend/database/migrations/micropowermanager/2014_10_12_100000_create_password_resets_table.php +++ b/src/backend/database/migrations/micropowermanager/2014_10_12_100000_create_password_resets_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2018_05_24_195615_create_vodacom_transactions_table.php b/src/backend/database/migrations/micropowermanager/2018_05_24_195615_create_vodacom_transactions_table.php index 18a985c46..c7b377d77 100644 --- a/src/backend/database/migrations/micropowermanager/2018_05_24_195615_create_vodacom_transactions_table.php +++ b/src/backend/database/migrations/micropowermanager/2018_05_24_195615_create_vodacom_transactions_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2018_05_24_201051_create_transactions_table.php b/src/backend/database/migrations/micropowermanager/2018_05_24_201051_create_transactions_table.php index 648c7237f..6a2bbb5ae 100644 --- a/src/backend/database/migrations/micropowermanager/2018_05_24_201051_create_transactions_table.php +++ b/src/backend/database/migrations/micropowermanager/2018_05_24_201051_create_transactions_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2018_05_24_213335_create_airtel_transactions_table.php b/src/backend/database/migrations/micropowermanager/2018_05_24_213335_create_airtel_transactions_table.php index 1df046d52..0ac0b8858 100644 --- a/src/backend/database/migrations/micropowermanager/2018_05_24_213335_create_airtel_transactions_table.php +++ b/src/backend/database/migrations/micropowermanager/2018_05_24_213335_create_airtel_transactions_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2018_05_25_131106_create_payment_histories_table.php b/src/backend/database/migrations/micropowermanager/2018_05_25_131106_create_payment_histories_table.php index a77d900e5..0e5f8a612 100644 --- a/src/backend/database/migrations/micropowermanager/2018_05_25_131106_create_payment_histories_table.php +++ b/src/backend/database/migrations/micropowermanager/2018_05_25_131106_create_payment_histories_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2018_05_25_131119_create_meter_tariffs_table.php b/src/backend/database/migrations/micropowermanager/2018_05_25_131119_create_meter_tariffs_table.php index e13d89193..b0744f4d0 100644 --- a/src/backend/database/migrations/micropowermanager/2018_05_25_131119_create_meter_tariffs_table.php +++ b/src/backend/database/migrations/micropowermanager/2018_05_25_131119_create_meter_tariffs_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2018_05_29_071453_create_addresses_table.php b/src/backend/database/migrations/micropowermanager/2018_05_29_071453_create_addresses_table.php index 9717baef7..5428f4d4d 100644 --- a/src/backend/database/migrations/micropowermanager/2018_05_29_071453_create_addresses_table.php +++ b/src/backend/database/migrations/micropowermanager/2018_05_29_071453_create_addresses_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2018_05_29_080926_create_geographical_informations_table.php b/src/backend/database/migrations/micropowermanager/2018_05_29_080926_create_geographical_informations_table.php index 597f17d55..a52a9b450 100644 --- a/src/backend/database/migrations/micropowermanager/2018_05_29_080926_create_geographical_informations_table.php +++ b/src/backend/database/migrations/micropowermanager/2018_05_29_080926_create_geographical_informations_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2018_05_29_140926_create_meter_types_table.php b/src/backend/database/migrations/micropowermanager/2018_05_29_140926_create_meter_types_table.php index b478b7158..0b9b325a4 100644 --- a/src/backend/database/migrations/micropowermanager/2018_05_29_140926_create_meter_types_table.php +++ b/src/backend/database/migrations/micropowermanager/2018_05_29_140926_create_meter_types_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Reverse the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2018_05_30_124521_create_meters_table.php b/src/backend/database/migrations/micropowermanager/2018_05_30_124521_create_meters_table.php index 0389ee683..e32b18a61 100644 --- a/src/backend/database/migrations/micropowermanager/2018_05_30_124521_create_meters_table.php +++ b/src/backend/database/migrations/micropowermanager/2018_05_30_124521_create_meters_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2018_05_31_071601_create_manufacturers_table.php b/src/backend/database/migrations/micropowermanager/2018_05_31_071601_create_manufacturers_table.php index 12342d0ce..0e15fcd86 100644 --- a/src/backend/database/migrations/micropowermanager/2018_05_31_071601_create_manufacturers_table.php +++ b/src/backend/database/migrations/micropowermanager/2018_05_31_071601_create_manufacturers_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2018_05_31_075346_create_cities_table.php b/src/backend/database/migrations/micropowermanager/2018_05_31_075346_create_cities_table.php index aff7f86b7..9529c29fc 100644 --- a/src/backend/database/migrations/micropowermanager/2018_05_31_075346_create_cities_table.php +++ b/src/backend/database/migrations/micropowermanager/2018_05_31_075346_create_cities_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2018_05_31_075353_create_countries_table.php b/src/backend/database/migrations/micropowermanager/2018_05_31_075353_create_countries_table.php index 335d12b77..a62992da9 100644 --- a/src/backend/database/migrations/micropowermanager/2018_05_31_075353_create_countries_table.php +++ b/src/backend/database/migrations/micropowermanager/2018_05_31_075353_create_countries_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2018_06_01_141845_create_people_table.php b/src/backend/database/migrations/micropowermanager/2018_06_01_141845_create_people_table.php index 8dc05a7af..0139098bc 100644 --- a/src/backend/database/migrations/micropowermanager/2018_06_01_141845_create_people_table.php +++ b/src/backend/database/migrations/micropowermanager/2018_06_01_141845_create_people_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2018_06_04_124637_create__roles_table.php b/src/backend/database/migrations/micropowermanager/2018_06_04_124637_create__roles_table.php index 23a5983ca..d0450ff81 100644 --- a/src/backend/database/migrations/micropowermanager/2018_06_04_124637_create__roles_table.php +++ b/src/backend/database/migrations/micropowermanager/2018_06_04_124637_create__roles_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2018_06_07_155444_create_meter_tokens_table.php b/src/backend/database/migrations/micropowermanager/2018_06_07_155444_create_meter_tokens_table.php index aa18106dd..23877aee2 100644 --- a/src/backend/database/migrations/micropowermanager/2018_06_07_155444_create_meter_tokens_table.php +++ b/src/backend/database/migrations/micropowermanager/2018_06_07_155444_create_meter_tokens_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2018_06_08_102610_create_meter_parameters_table.php b/src/backend/database/migrations/micropowermanager/2018_06_08_102610_create_meter_parameters_table.php index 0123e3aad..a1b6fb9b4 100644 --- a/src/backend/database/migrations/micropowermanager/2018_06_08_102610_create_meter_parameters_table.php +++ b/src/backend/database/migrations/micropowermanager/2018_06_08_102610_create_meter_parameters_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2018_06_11_131951_create_sms_table.php b/src/backend/database/migrations/micropowermanager/2018_06_11_131951_create_sms_table.php index b1d9d8123..61220d925 100644 --- a/src/backend/database/migrations/micropowermanager/2018_06_11_131951_create_sms_table.php +++ b/src/backend/database/migrations/micropowermanager/2018_06_11_131951_create_sms_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2018_06_15_082352_create_transaction_conflicts_table.php b/src/backend/database/migrations/micropowermanager/2018_06_15_082352_create_transaction_conflicts_table.php index c9ca7c8cc..6252b570d 100644 --- a/src/backend/database/migrations/micropowermanager/2018_06_15_082352_create_transaction_conflicts_table.php +++ b/src/backend/database/migrations/micropowermanager/2018_06_15_082352_create_transaction_conflicts_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2018_06_28_080905_create_access_rates_table.php b/src/backend/database/migrations/micropowermanager/2018_06_28_080905_create_access_rates_table.php index 9c811792b..4c36881bc 100644 --- a/src/backend/database/migrations/micropowermanager/2018_06_28_080905_create_access_rates_table.php +++ b/src/backend/database/migrations/micropowermanager/2018_06_28_080905_create_access_rates_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2018_06_28_080914_create_access_rate_payments_table.php b/src/backend/database/migrations/micropowermanager/2018_06_28_080914_create_access_rate_payments_table.php index 293f96abf..1d4ac732e 100644 --- a/src/backend/database/migrations/micropowermanager/2018_06_28_080914_create_access_rate_payments_table.php +++ b/src/backend/database/migrations/micropowermanager/2018_06_28_080914_create_access_rate_payments_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2018_07_11_075002_create_permission_tables.php b/src/backend/database/migrations/micropowermanager/2018_07_11_075002_create_permission_tables.php index 647732e73..52a64a061 100644 --- a/src/backend/database/migrations/micropowermanager/2018_07_11_075002_create_permission_tables.php +++ b/src/backend/database/migrations/micropowermanager/2018_07_11_075002_create_permission_tables.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2018_07_12_133700_create_loans_table.php b/src/backend/database/migrations/micropowermanager/2018_07_12_133700_create_loans_table.php index 130cfde42..6202eb9a0 100644 --- a/src/backend/database/migrations/micropowermanager/2018_07_12_133700_create_loans_table.php +++ b/src/backend/database/migrations/micropowermanager/2018_07_12_133700_create_loans_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2018_07_12_134253_create_customers_table.php b/src/backend/database/migrations/micropowermanager/2018_07_12_134253_create_customers_table.php index 04e0b0554..a74747af6 100644 --- a/src/backend/database/migrations/micropowermanager/2018_07_12_134253_create_customers_table.php +++ b/src/backend/database/migrations/micropowermanager/2018_07_12_134253_create_customers_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2018_10_04_195503_create_histories_table.php b/src/backend/database/migrations/micropowermanager/2018_10_04_195503_create_histories_table.php index 27767e560..fea4b8872 100644 --- a/src/backend/database/migrations/micropowermanager/2018_10_04_195503_create_histories_table.php +++ b/src/backend/database/migrations/micropowermanager/2018_10_04_195503_create_histories_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. */ diff --git a/src/backend/database/migrations/micropowermanager/2018_10_12_110924_create_meter_consumptions_table.php b/src/backend/database/migrations/micropowermanager/2018_10_12_110924_create_meter_consumptions_table.php index d7d85ee9b..3780d7efd 100644 --- a/src/backend/database/migrations/micropowermanager/2018_10_12_110924_create_meter_consumptions_table.php +++ b/src/backend/database/migrations/micropowermanager/2018_10_12_110924_create_meter_consumptions_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2018_10_12_123911_create_payment_profiles_table.php b/src/backend/database/migrations/micropowermanager/2018_10_12_123911_create_payment_profiles_table.php index dd741492b..9594e3c81 100644 --- a/src/backend/database/migrations/micropowermanager/2018_10_12_123911_create_payment_profiles_table.php +++ b/src/backend/database/migrations/micropowermanager/2018_10_12_123911_create_payment_profiles_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2018_11_29_090603_create_clusters_table.php b/src/backend/database/migrations/micropowermanager/2018_11_29_090603_create_clusters_table.php index c3b491cd9..1c4048b7b 100644 --- a/src/backend/database/migrations/micropowermanager/2018_11_29_090603_create_clusters_table.php +++ b/src/backend/database/migrations/micropowermanager/2018_11_29_090603_create_clusters_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2018_12_05_144906_create_revenues_table.php b/src/backend/database/migrations/micropowermanager/2018_12_05_144906_create_revenues_table.php index 0560c08da..729380b0e 100644 --- a/src/backend/database/migrations/micropowermanager/2018_12_05_144906_create_revenues_table.php +++ b/src/backend/database/migrations/micropowermanager/2018_12_05_144906_create_revenues_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2018_12_11_083717_create_connection_types_table.php b/src/backend/database/migrations/micropowermanager/2018_12_11_083717_create_connection_types_table.php index e45b79bd9..e35198c21 100644 --- a/src/backend/database/migrations/micropowermanager/2018_12_11_083717_create_connection_types_table.php +++ b/src/backend/database/migrations/micropowermanager/2018_12_11_083717_create_connection_types_table.php @@ -6,7 +6,7 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2018_12_13_083722_create_targets_table.php b/src/backend/database/migrations/micropowermanager/2018_12_13_083722_create_targets_table.php index fdfe166e4..5f68c0492 100644 --- a/src/backend/database/migrations/micropowermanager/2018_12_13_083722_create_targets_table.php +++ b/src/backend/database/migrations/micropowermanager/2018_12_13_083722_create_targets_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2018_12_13_100738_create_sub_targets_table.php b/src/backend/database/migrations/micropowermanager/2018_12_13_100738_create_sub_targets_table.php index 79190f40f..a9d3433fa 100644 --- a/src/backend/database/migrations/micropowermanager/2018_12_13_100738_create_sub_targets_table.php +++ b/src/backend/database/migrations/micropowermanager/2018_12_13_100738_create_sub_targets_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2019_04_19_083645_customer_group.php b/src/backend/database/migrations/micropowermanager/2019_04_19_083645_customer_group.php index cab29f323..dc1b08a2d 100644 --- a/src/backend/database/migrations/micropowermanager/2019_04_19_083645_customer_group.php +++ b/src/backend/database/migrations/micropowermanager/2019_04_19_083645_customer_group.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2019_04_25_092438_create_sub_connection_types_table.php b/src/backend/database/migrations/micropowermanager/2019_04_25_092438_create_sub_connection_types_table.php index ea7947207..4d2dff495 100644 --- a/src/backend/database/migrations/micropowermanager/2019_04_25_092438_create_sub_connection_types_table.php +++ b/src/backend/database/migrations/micropowermanager/2019_04_25_092438_create_sub_connection_types_table.php @@ -6,7 +6,7 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. */ diff --git a/src/backend/database/migrations/micropowermanager/2019_05_01_103123_create_connection_groups_table.php b/src/backend/database/migrations/micropowermanager/2019_05_01_103123_create_connection_groups_table.php index b97dd78d9..c19716b7a 100644 --- a/src/backend/database/migrations/micropowermanager/2019_05_01_103123_create_connection_groups_table.php +++ b/src/backend/database/migrations/micropowermanager/2019_05_01_103123_create_connection_groups_table.php @@ -6,7 +6,7 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2019_05_15_122118_reports.php b/src/backend/database/migrations/micropowermanager/2019_05_15_122118_reports.php index 076adfe74..de15e08a0 100644 --- a/src/backend/database/migrations/micropowermanager/2019_05_15_122118_reports.php +++ b/src/backend/database/migrations/micropowermanager/2019_05_15_122118_reports.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2019_06_24_160040_create_mini_grids_table.php b/src/backend/database/migrations/micropowermanager/2019_06_24_160040_create_mini_grids_table.php index bae31d4ee..58ae32ad7 100644 --- a/src/backend/database/migrations/micropowermanager/2019_06_24_160040_create_mini_grids_table.php +++ b/src/backend/database/migrations/micropowermanager/2019_06_24_160040_create_mini_grids_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2019_07_01_133655_create_maintenance_users_table.php b/src/backend/database/migrations/micropowermanager/2019_07_01_133655_create_maintenance_users_table.php index 2ecd0e202..7ed712525 100644 --- a/src/backend/database/migrations/micropowermanager/2019_07_01_133655_create_maintenance_users_table.php +++ b/src/backend/database/migrations/micropowermanager/2019_07_01_133655_create_maintenance_users_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2019_11_06_121116_create_energies_table.php b/src/backend/database/migrations/micropowermanager/2019_11_06_121116_create_energies_table.php index 0028c9e56..ceb964f95 100644 --- a/src/backend/database/migrations/micropowermanager/2019_11_06_121116_create_energies_table.php +++ b/src/backend/database/migrations/micropowermanager/2019_11_06_121116_create_energies_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2019_11_15_102431_create_solars_table.php b/src/backend/database/migrations/micropowermanager/2019_11_15_102431_create_solars_table.php index d9bdc6141..092056f67 100644 --- a/src/backend/database/migrations/micropowermanager/2019_11_15_102431_create_solars_table.php +++ b/src/backend/database/migrations/micropowermanager/2019_11_15_102431_create_solars_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2019_11_26_063009_create_batteries_table.php b/src/backend/database/migrations/micropowermanager/2019_11_26_063009_create_batteries_table.php index 74e4824ad..e84d8693c 100644 --- a/src/backend/database/migrations/micropowermanager/2019_11_26_063009_create_batteries_table.php +++ b/src/backend/database/migrations/micropowermanager/2019_11_26_063009_create_batteries_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2019_12_16_090907_create_assets_table.php b/src/backend/database/migrations/micropowermanager/2019_12_16_090907_create_assets_table.php index c781d65ee..864a51c53 100644 --- a/src/backend/database/migrations/micropowermanager/2019_12_16_090907_create_assets_table.php +++ b/src/backend/database/migrations/micropowermanager/2019_12_16_090907_create_assets_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2019_12_16_091934_create_asset_types_table.php b/src/backend/database/migrations/micropowermanager/2019_12_16_091934_create_asset_types_table.php index 3732d70f4..7a704050b 100644 --- a/src/backend/database/migrations/micropowermanager/2019_12_16_091934_create_asset_types_table.php +++ b/src/backend/database/migrations/micropowermanager/2019_12_16_091934_create_asset_types_table.php @@ -6,7 +6,7 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. */ diff --git a/src/backend/database/migrations/micropowermanager/2019_12_16_092044_create_asset_people_table.php b/src/backend/database/migrations/micropowermanager/2019_12_16_092044_create_asset_people_table.php index 0117a7115..bf5851245 100644 --- a/src/backend/database/migrations/micropowermanager/2019_12_16_092044_create_asset_people_table.php +++ b/src/backend/database/migrations/micropowermanager/2019_12_16_092044_create_asset_people_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2019_12_16_093223_create_asset_rates_table.php b/src/backend/database/migrations/micropowermanager/2019_12_16_093223_create_asset_rates_table.php index ce01316e8..bf5ff42ba 100644 --- a/src/backend/database/migrations/micropowermanager/2019_12_16_093223_create_asset_rates_table.php +++ b/src/backend/database/migrations/micropowermanager/2019_12_16_093223_create_asset_rates_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2020_01_27_135206_create_logs_table.php b/src/backend/database/migrations/micropowermanager/2020_01_27_135206_create_logs_table.php index 555d4846a..8b6eb8dc4 100644 --- a/src/backend/database/migrations/micropowermanager/2020_01_27_135206_create_logs_table.php +++ b/src/backend/database/migrations/micropowermanager/2020_01_27_135206_create_logs_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2020_04_05_233604_create_p_v_s_table.php b/src/backend/database/migrations/micropowermanager/2020_04_05_233604_create_p_v_s_table.php index b47d121eb..4248e8a37 100644 --- a/src/backend/database/migrations/micropowermanager/2020_04_05_233604_create_p_v_s_table.php +++ b/src/backend/database/migrations/micropowermanager/2020_04_05_233604_create_p_v_s_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2020_04_19_234527_create_restrictions_table.php b/src/backend/database/migrations/micropowermanager/2020_04_19_234527_create_restrictions_table.php index ba22b236b..343eb5b1e 100644 --- a/src/backend/database/migrations/micropowermanager/2020_04_19_234527_create_restrictions_table.php +++ b/src/backend/database/migrations/micropowermanager/2020_04_19_234527_create_restrictions_table.php @@ -5,7 +5,7 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2020_04_19_235421_create_upgrades_table.php b/src/backend/database/migrations/micropowermanager/2020_04_19_235421_create_upgrades_table.php index 43453dd9e..758fd9dc6 100644 --- a/src/backend/database/migrations/micropowermanager/2020_04_19_235421_create_upgrades_table.php +++ b/src/backend/database/migrations/micropowermanager/2020_04_19_235421_create_upgrades_table.php @@ -5,7 +5,7 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2020_04_20_001454_create_subscriptions_table.php b/src/backend/database/migrations/micropowermanager/2020_04_20_001454_create_subscriptions_table.php index b35909c56..03f59e136 100644 --- a/src/backend/database/migrations/micropowermanager/2020_04_20_001454_create_subscriptions_table.php +++ b/src/backend/database/migrations/micropowermanager/2020_04_20_001454_create_subscriptions_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2020_06_20_085555_weather_data.php b/src/backend/database/migrations/micropowermanager/2020_06_20_085555_weather_data.php index e89593640..40ce2c983 100644 --- a/src/backend/database/migrations/micropowermanager/2020_06_20_085555_weather_data.php +++ b/src/backend/database/migrations/micropowermanager/2020_06_20_085555_weather_data.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2020_06_21_131740_create_tariff_pricing_components_table.php b/src/backend/database/migrations/micropowermanager/2020_06_21_131740_create_tariff_pricing_components_table.php index d6a3d6842..748b295cb 100644 --- a/src/backend/database/migrations/micropowermanager/2020_06_21_131740_create_tariff_pricing_components_table.php +++ b/src/backend/database/migrations/micropowermanager/2020_06_21_131740_create_tariff_pricing_components_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2020_06_21_194542_create_social_tariffs_table.php b/src/backend/database/migrations/micropowermanager/2020_06_21_194542_create_social_tariffs_table.php index 81f08e18c..26d61b55b 100644 --- a/src/backend/database/migrations/micropowermanager/2020_06_21_194542_create_social_tariffs_table.php +++ b/src/backend/database/migrations/micropowermanager/2020_06_21_194542_create_social_tariffs_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2020_06_22_085345_create_social_tariff_piggy_banks_table.php b/src/backend/database/migrations/micropowermanager/2020_06_22_085345_create_social_tariff_piggy_banks_table.php index f1bb29501..61697c8b9 100644 --- a/src/backend/database/migrations/micropowermanager/2020_06_22_085345_create_social_tariff_piggy_banks_table.php +++ b/src/backend/database/migrations/micropowermanager/2020_06_22_085345_create_social_tariff_piggy_banks_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2020_06_22_115405_add_total_price_to_meter_tariffs.php b/src/backend/database/migrations/micropowermanager/2020_06_22_115405_add_total_price_to_meter_tariffs.php index efb03e96f..6d311f3d0 100644 --- a/src/backend/database/migrations/micropowermanager/2020_06_22_115405_add_total_price_to_meter_tariffs.php +++ b/src/backend/database/migrations/micropowermanager/2020_06_22_115405_add_total_price_to_meter_tariffs.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2020_07_12_192802_create_agents_table.php b/src/backend/database/migrations/micropowermanager/2020_07_12_192802_create_agents_table.php index 124e9c43c..84b02871f 100644 --- a/src/backend/database/migrations/micropowermanager/2020_07_12_192802_create_agents_table.php +++ b/src/backend/database/migrations/micropowermanager/2020_07_12_192802_create_agents_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2020_07_13_130601_create_agent_transactions_table.php b/src/backend/database/migrations/micropowermanager/2020_07_13_130601_create_agent_transactions_table.php index 9309c5d51..86730eb84 100644 --- a/src/backend/database/migrations/micropowermanager/2020_07_13_130601_create_agent_transactions_table.php +++ b/src/backend/database/migrations/micropowermanager/2020_07_13_130601_create_agent_transactions_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2020_07_13_132006_create_agent_balance_histories_table.php b/src/backend/database/migrations/micropowermanager/2020_07_13_132006_create_agent_balance_histories_table.php index 56cfce334..e73d0b7c3 100644 --- a/src/backend/database/migrations/micropowermanager/2020_07_13_132006_create_agent_balance_histories_table.php +++ b/src/backend/database/migrations/micropowermanager/2020_07_13_132006_create_agent_balance_histories_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2020_07_13_132423_create_agent_assigned_appliances_table.php b/src/backend/database/migrations/micropowermanager/2020_07_13_132423_create_agent_assigned_appliances_table.php index c841a39b1..6f0e7e097 100644 --- a/src/backend/database/migrations/micropowermanager/2020_07_13_132423_create_agent_assigned_appliances_table.php +++ b/src/backend/database/migrations/micropowermanager/2020_07_13_132423_create_agent_assigned_appliances_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2020_07_13_132811_create_agent_sold_appliances_table.php b/src/backend/database/migrations/micropowermanager/2020_07_13_132811_create_agent_sold_appliances_table.php index a9fd8c036..1cc6849f5 100644 --- a/src/backend/database/migrations/micropowermanager/2020_07_13_132811_create_agent_sold_appliances_table.php +++ b/src/backend/database/migrations/micropowermanager/2020_07_13_132811_create_agent_sold_appliances_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2020_07_25_083600_create_agent_commissions_table.php b/src/backend/database/migrations/micropowermanager/2020_07_25_083600_create_agent_commissions_table.php index fdf44f20b..9002d5b8a 100644 --- a/src/backend/database/migrations/micropowermanager/2020_07_25_083600_create_agent_commissions_table.php +++ b/src/backend/database/migrations/micropowermanager/2020_07_25_083600_create_agent_commissions_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2020_07_25_155837_create_agent_receipts_table.php b/src/backend/database/migrations/micropowermanager/2020_07_25_155837_create_agent_receipts_table.php index a648c6f3f..ac1b4a33f 100644 --- a/src/backend/database/migrations/micropowermanager/2020_07_25_155837_create_agent_receipts_table.php +++ b/src/backend/database/migrations/micropowermanager/2020_07_25_155837_create_agent_receipts_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2020_08_03_081836_create_agent_charges_table.php b/src/backend/database/migrations/micropowermanager/2020_08_03_081836_create_agent_charges_table.php index 495526c62..45f6599bc 100644 --- a/src/backend/database/migrations/micropowermanager/2020_08_03_081836_create_agent_charges_table.php +++ b/src/backend/database/migrations/micropowermanager/2020_08_03_081836_create_agent_charges_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2020_08_05_133748_create_agent_receipt_details_table.php b/src/backend/database/migrations/micropowermanager/2020_08_05_133748_create_agent_receipt_details_table.php index 78f9e28fb..52dd76cea 100644 --- a/src/backend/database/migrations/micropowermanager/2020_08_05_133748_create_agent_receipt_details_table.php +++ b/src/backend/database/migrations/micropowermanager/2020_08_05_133748_create_agent_receipt_details_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2020_10_02_072509_create_time_of_usages_table.php b/src/backend/database/migrations/micropowermanager/2020_10_02_072509_create_time_of_usages_table.php index b76f584b1..c41292352 100644 --- a/src/backend/database/migrations/micropowermanager/2020_10_02_072509_create_time_of_usages_table.php +++ b/src/backend/database/migrations/micropowermanager/2020_10_02_072509_create_time_of_usages_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2020_10_19_122517_create_sub_menu_items_table.php b/src/backend/database/migrations/micropowermanager/2020_10_19_122517_create_sub_menu_items_table.php index 9e6680513..7924e56bb 100644 --- a/src/backend/database/migrations/micropowermanager/2020_10_19_122517_create_sub_menu_items_table.php +++ b/src/backend/database/migrations/micropowermanager/2020_10_19_122517_create_sub_menu_items_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2020_10_19_122649_create_menu_items_table.php b/src/backend/database/migrations/micropowermanager/2020_10_19_122649_create_menu_items_table.php index ab6e76457..2d2512d7b 100644 --- a/src/backend/database/migrations/micropowermanager/2020_10_19_122649_create_menu_items_table.php +++ b/src/backend/database/migrations/micropowermanager/2020_10_19_122649_create_menu_items_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2020_10_29_170007_create_plugins_table.php b/src/backend/database/migrations/micropowermanager/2020_10_29_170007_create_plugins_table.php index 0242050b4..b57721df7 100644 --- a/src/backend/database/migrations/micropowermanager/2020_10_29_170007_create_plugins_table.php +++ b/src/backend/database/migrations/micropowermanager/2020_10_29_170007_create_plugins_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2020_12_17_144527_create_main_settings_table.php b/src/backend/database/migrations/micropowermanager/2020_12_17_144527_create_main_settings_table.php index e98b9ee25..a9bfe2c7f 100644 --- a/src/backend/database/migrations/micropowermanager/2020_12_17_144527_create_main_settings_table.php +++ b/src/backend/database/migrations/micropowermanager/2020_12_17_144527_create_main_settings_table.php @@ -6,7 +6,7 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2020_12_23_165814_create_map_settings_table.php b/src/backend/database/migrations/micropowermanager/2020_12_23_165814_create_map_settings_table.php index 0b096710c..3e51dd8c6 100644 --- a/src/backend/database/migrations/micropowermanager/2020_12_23_165814_create_map_settings_table.php +++ b/src/backend/database/migrations/micropowermanager/2020_12_23_165814_create_map_settings_table.php @@ -6,7 +6,7 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2021_01_02_130016_add_manufacturer_transaction_to_agent_transactions_table.php b/src/backend/database/migrations/micropowermanager/2021_01_02_130016_add_manufacturer_transaction_to_agent_transactions_table.php index e3588ea13..f9102782f 100644 --- a/src/backend/database/migrations/micropowermanager/2021_01_02_130016_add_manufacturer_transaction_to_agent_transactions_table.php +++ b/src/backend/database/migrations/micropowermanager/2021_01_02_130016_add_manufacturer_transaction_to_agent_transactions_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2021_01_02_130412_create_third_party_transactions.php b/src/backend/database/migrations/micropowermanager/2021_01_02_130412_create_third_party_transactions.php index eb7b82826..0ea1fb8d4 100644 --- a/src/backend/database/migrations/micropowermanager/2021_01_02_130412_create_third_party_transactions.php +++ b/src/backend/database/migrations/micropowermanager/2021_01_02_130412_create_third_party_transactions.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2021_01_02_134152_add_manufacturer_transaction_to_vodacom_transactions_table.php b/src/backend/database/migrations/micropowermanager/2021_01_02_134152_add_manufacturer_transaction_to_vodacom_transactions_table.php index 75c1454b1..8d6587a9a 100644 --- a/src/backend/database/migrations/micropowermanager/2021_01_02_134152_add_manufacturer_transaction_to_vodacom_transactions_table.php +++ b/src/backend/database/migrations/micropowermanager/2021_01_02_134152_add_manufacturer_transaction_to_vodacom_transactions_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2021_01_02_134212_add_manufacturer_transaction_to_airtel_transactions_table.php b/src/backend/database/migrations/micropowermanager/2021_01_02_134212_add_manufacturer_transaction_to_airtel_transactions_table.php index 2bacebbb6..c8ea0ae32 100644 --- a/src/backend/database/migrations/micropowermanager/2021_01_02_134212_add_manufacturer_transaction_to_airtel_transactions_table.php +++ b/src/backend/database/migrations/micropowermanager/2021_01_02_134212_add_manufacturer_transaction_to_airtel_transactions_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2021_01_05_234039_create_ticket_settings_table.php b/src/backend/database/migrations/micropowermanager/2021_01_05_234039_create_ticket_settings_table.php index 4f1f7fb36..9cdbe3bda 100644 --- a/src/backend/database/migrations/micropowermanager/2021_01_05_234039_create_ticket_settings_table.php +++ b/src/backend/database/migrations/micropowermanager/2021_01_05_234039_create_ticket_settings_table.php @@ -6,7 +6,7 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2021_01_18_122556_add_columns_to_batteries_table.php b/src/backend/database/migrations/micropowermanager/2021_01_18_122556_add_columns_to_batteries_table.php index 5afd57d9b..33160094d 100644 --- a/src/backend/database/migrations/micropowermanager/2021_01_18_122556_add_columns_to_batteries_table.php +++ b/src/backend/database/migrations/micropowermanager/2021_01_18_122556_add_columns_to_batteries_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2021_01_18_123245_add_columns_to_p_v_s_table.php b/src/backend/database/migrations/micropowermanager/2021_01_18_123245_add_columns_to_p_v_s_table.php index 46ca45ff9..0dd8d204d 100644 --- a/src/backend/database/migrations/micropowermanager/2021_01_18_123245_add_columns_to_p_v_s_table.php +++ b/src/backend/database/migrations/micropowermanager/2021_01_18_123245_add_columns_to_p_v_s_table.php @@ -5,7 +5,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2021_02_18_153556_create_sms_bodies.php b/src/backend/database/migrations/micropowermanager/2021_02_18_153556_create_sms_bodies.php index ebdfa0989..90c658d13 100644 --- a/src/backend/database/migrations/micropowermanager/2021_02_18_153556_create_sms_bodies.php +++ b/src/backend/database/migrations/micropowermanager/2021_02_18_153556_create_sms_bodies.php @@ -6,7 +6,7 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2021_02_18_153556_create_sms_resend_information_keys.php b/src/backend/database/migrations/micropowermanager/2021_02_18_153556_create_sms_resend_information_keys.php index 47c0a507d..9a80c7383 100644 --- a/src/backend/database/migrations/micropowermanager/2021_02_18_153556_create_sms_resend_information_keys.php +++ b/src/backend/database/migrations/micropowermanager/2021_02_18_153556_create_sms_resend_information_keys.php @@ -6,7 +6,7 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2021_02_18_156421_create_sms_appliance_remind_rates.php b/src/backend/database/migrations/micropowermanager/2021_02_18_156421_create_sms_appliance_remind_rates.php index c7a84e8a1..8ebddbbd0 100644 --- a/src/backend/database/migrations/micropowermanager/2021_02_18_156421_create_sms_appliance_remind_rates.php +++ b/src/backend/database/migrations/micropowermanager/2021_02_18_156421_create_sms_appliance_remind_rates.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2021_03_03_140758_create_sms_android_settings.php b/src/backend/database/migrations/micropowermanager/2021_03_03_140758_create_sms_android_settings.php index 9cc789ad7..fb89c99c4 100644 --- a/src/backend/database/migrations/micropowermanager/2021_03_03_140758_create_sms_android_settings.php +++ b/src/backend/database/migrations/micropowermanager/2021_03_03_140758_create_sms_android_settings.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2021_03_03_141706_create_sms_variable_default_values.php b/src/backend/database/migrations/micropowermanager/2021_03_03_141706_create_sms_variable_default_values.php index 34ed727b7..c4a52ea02 100644 --- a/src/backend/database/migrations/micropowermanager/2021_03_03_141706_create_sms_variable_default_values.php +++ b/src/backend/database/migrations/micropowermanager/2021_03_03_141706_create_sms_variable_default_values.php @@ -6,7 +6,7 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2021_03_2_1561251_update_sms_table.php b/src/backend/database/migrations/micropowermanager/2021_03_2_1561251_update_sms_table.php index 7a17e803a..370737ae3 100644 --- a/src/backend/database/migrations/micropowermanager/2021_03_2_1561251_update_sms_table.php +++ b/src/backend/database/migrations/micropowermanager/2021_03_2_1561251_update_sms_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2021_04_28_103758_add_additional_json_column_to_people.php b/src/backend/database/migrations/micropowermanager/2021_04_28_103758_add_additional_json_column_to_people.php index c05d0464c..95a98688a 100644 --- a/src/backend/database/migrations/micropowermanager/2021_04_28_103758_add_additional_json_column_to_people.php +++ b/src/backend/database/migrations/micropowermanager/2021_04_28_103758_add_additional_json_column_to_people.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2021_04_28_104840_create_person_documents_table.php b/src/backend/database/migrations/micropowermanager/2021_04_28_104840_create_person_documents_table.php index 25e5f6b45..665872e34 100644 --- a/src/backend/database/migrations/micropowermanager/2021_04_28_104840_create_person_documents_table.php +++ b/src/backend/database/migrations/micropowermanager/2021_04_28_104840_create_person_documents_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2021_06_04_085817_update_meter_consumptions_table.php b/src/backend/database/migrations/micropowermanager/2021_06_04_085817_update_meter_consumptions_table.php index 58d8d3bc1..23371ddd6 100644 --- a/src/backend/database/migrations/micropowermanager/2021_06_04_085817_update_meter_consumptions_table.php +++ b/src/backend/database/migrations/micropowermanager/2021_06_04_085817_update_meter_consumptions_table.php @@ -6,7 +6,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * @@ -14,7 +14,7 @@ */ public function up() { - if (! Type::hasType('double')) { + if (!Type::hasType('double')) { Type::addType('double', FloatType::class); } Schema::connection('shard')->table('meter_consumptions', function (Blueprint $table) { diff --git a/src/backend/database/migrations/micropowermanager/2021_08_17_090801_add_down_payment_to_asset_people_table.php b/src/backend/database/migrations/micropowermanager/2021_08_17_090801_add_down_payment_to_asset_people_table.php index 57a38caf6..24351a0b9 100644 --- a/src/backend/database/migrations/micropowermanager/2021_08_17_090801_add_down_payment_to_asset_people_table.php +++ b/src/backend/database/migrations/micropowermanager/2021_08_17_090801_add_down_payment_to_asset_people_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2021_08_17_090913_add_first_payment_date_to_asset_people_table.php b/src/backend/database/migrations/micropowermanager/2021_08_17_090913_add_first_payment_date_to_asset_people_table.php index 747895479..6c7f61835 100644 --- a/src/backend/database/migrations/micropowermanager/2021_08_17_090913_add_first_payment_date_to_asset_people_table.php +++ b/src/backend/database/migrations/micropowermanager/2021_08_17_090913_add_first_payment_date_to_asset_people_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2021_09_07_092522_create_cash_transactions_table.php b/src/backend/database/migrations/micropowermanager/2021_09_07_092522_create_cash_transactions_table.php index 849193095..0256a7245 100644 --- a/src/backend/database/migrations/micropowermanager/2021_09_07_092522_create_cash_transactions_table.php +++ b/src/backend/database/migrations/micropowermanager/2021_09_07_092522_create_cash_transactions_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2021_10_18_220817_create_mail_settings.php b/src/backend/database/migrations/micropowermanager/2021_10_18_220817_create_mail_settings.php index ceab71922..6373909e0 100644 --- a/src/backend/database/migrations/micropowermanager/2021_10_18_220817_create_mail_settings.php +++ b/src/backend/database/migrations/micropowermanager/2021_10_18_220817_create_mail_settings.php @@ -6,7 +6,7 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2022_05_10_093215_update_meter_tariffs_table.php b/src/backend/database/migrations/micropowermanager/2022_05_10_093215_update_meter_tariffs_table.php index 743fbdd1d..adc97125e 100644 --- a/src/backend/database/migrations/micropowermanager/2022_05_10_093215_update_meter_tariffs_table.php +++ b/src/backend/database/migrations/micropowermanager/2022_05_10_093215_update_meter_tariffs_table.php @@ -6,7 +6,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * @@ -14,7 +14,7 @@ */ public function up() { - if (! Type::hasType('double')) { + if (!Type::hasType('double')) { Type::addType('double', FloatType::class); } Schema::connection('shard')->table('meter_tariffs', function (Blueprint $table) { diff --git a/src/backend/database/migrations/micropowermanager/2022_05_10_101348_update_social_tariffs_table.php b/src/backend/database/migrations/micropowermanager/2022_05_10_101348_update_social_tariffs_table.php index 9866bab70..0e583258e 100644 --- a/src/backend/database/migrations/micropowermanager/2022_05_10_101348_update_social_tariffs_table.php +++ b/src/backend/database/migrations/micropowermanager/2022_05_10_101348_update_social_tariffs_table.php @@ -6,7 +6,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * @@ -14,7 +14,7 @@ */ public function up() { - if (! Type::hasType('double')) { + if (!Type::hasType('double')) { Type::addType('double', FloatType::class); } Schema::connection('shard')->table('social_tariffs', function (Blueprint $table) { diff --git a/src/backend/database/migrations/micropowermanager/2022_05_10_101616_update_tariff_pricing_components_table.php b/src/backend/database/migrations/micropowermanager/2022_05_10_101616_update_tariff_pricing_components_table.php index 4365574db..df5be7dff 100644 --- a/src/backend/database/migrations/micropowermanager/2022_05_10_101616_update_tariff_pricing_components_table.php +++ b/src/backend/database/migrations/micropowermanager/2022_05_10_101616_update_tariff_pricing_components_table.php @@ -6,7 +6,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * @@ -14,7 +14,7 @@ */ public function up() { - if (! Type::hasType('double')) { + if (!Type::hasType('double')) { Type::addType('double', FloatType::class); } Schema::connection('shard')->table('tariff_pricing_components', function (Blueprint $table) { diff --git a/src/backend/database/migrations/micropowermanager/2022_05_10_101855_update_social_tariff_piggy_banks_table.php b/src/backend/database/migrations/micropowermanager/2022_05_10_101855_update_social_tariff_piggy_banks_table.php index 2dbe149a2..10d1b30a2 100644 --- a/src/backend/database/migrations/micropowermanager/2022_05_10_101855_update_social_tariff_piggy_banks_table.php +++ b/src/backend/database/migrations/micropowermanager/2022_05_10_101855_update_social_tariff_piggy_banks_table.php @@ -6,7 +6,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * @@ -14,7 +14,7 @@ */ public function up() { - if (! Type::hasType('double')) { + if (!Type::hasType('double')) { Type::addType('double', FloatType::class); } Schema::connection('shard')->table('social_tariff_piggy_banks', function (Blueprint $table) { diff --git a/src/backend/database/migrations/micropowermanager/2022_05_10_102047_update_access_rates_table.php b/src/backend/database/migrations/micropowermanager/2022_05_10_102047_update_access_rates_table.php index 6b5d726b8..d16be1a73 100644 --- a/src/backend/database/migrations/micropowermanager/2022_05_10_102047_update_access_rates_table.php +++ b/src/backend/database/migrations/micropowermanager/2022_05_10_102047_update_access_rates_table.php @@ -6,7 +6,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * @@ -14,7 +14,7 @@ */ public function up() { - if (! Type::hasType('double')) { + if (!Type::hasType('double')) { Type::addType('double', FloatType::class); } Schema::connection('shard')->table('access_rates', function (Blueprint $table) { diff --git a/src/backend/database/migrations/micropowermanager/2022_05_10_102214_update_access_rate_payments_table.php b/src/backend/database/migrations/micropowermanager/2022_05_10_102214_update_access_rate_payments_table.php index b2424a07a..2a000621d 100644 --- a/src/backend/database/migrations/micropowermanager/2022_05_10_102214_update_access_rate_payments_table.php +++ b/src/backend/database/migrations/micropowermanager/2022_05_10_102214_update_access_rate_payments_table.php @@ -6,7 +6,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * @@ -14,7 +14,7 @@ */ public function up() { - if (! Type::hasType('double')) { + if (!Type::hasType('double')) { Type::addType('double', FloatType::class); } Schema::connection('shard')->table('access_rate_payments', function (Blueprint $table) { diff --git a/src/backend/database/migrations/micropowermanager/2022_05_10_102507_update_asset_people_table.php b/src/backend/database/migrations/micropowermanager/2022_05_10_102507_update_asset_people_table.php index 74154da78..93a3c8c43 100644 --- a/src/backend/database/migrations/micropowermanager/2022_05_10_102507_update_asset_people_table.php +++ b/src/backend/database/migrations/micropowermanager/2022_05_10_102507_update_asset_people_table.php @@ -6,7 +6,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * @@ -14,7 +14,7 @@ */ public function up() { - if (! Type::hasType('double')) { + if (!Type::hasType('double')) { Type::addType('double', FloatType::class); } Schema::connection('shard')->table('asset_people', function (Blueprint $table) { diff --git a/src/backend/database/migrations/micropowermanager/2022_05_10_102649_update_transactions_table.php b/src/backend/database/migrations/micropowermanager/2022_05_10_102649_update_transactions_table.php index 68968bebc..1ba707cf1 100644 --- a/src/backend/database/migrations/micropowermanager/2022_05_10_102649_update_transactions_table.php +++ b/src/backend/database/migrations/micropowermanager/2022_05_10_102649_update_transactions_table.php @@ -6,7 +6,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * @@ -14,7 +14,7 @@ */ public function up() { - if (! Type::hasType('double')) { + if (!Type::hasType('double')) { Type::addType('double', FloatType::class); } Schema::connection('shard')->table('transactions', function (Blueprint $table) { diff --git a/src/backend/database/migrations/micropowermanager/2022_05_10_102805_update_payment_histories_table.php b/src/backend/database/migrations/micropowermanager/2022_05_10_102805_update_payment_histories_table.php index 7f1f6d2d6..4d26923b2 100644 --- a/src/backend/database/migrations/micropowermanager/2022_05_10_102805_update_payment_histories_table.php +++ b/src/backend/database/migrations/micropowermanager/2022_05_10_102805_update_payment_histories_table.php @@ -6,7 +6,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * @@ -14,7 +14,7 @@ */ public function up() { - if (! Type::hasType('double')) { + if (!Type::hasType('double')) { Type::addType('double', FloatType::class); } Schema::connection('shard')->table('payment_histories', function (Blueprint $table) { diff --git a/src/backend/database/migrations/micropowermanager/2022_05_19_102938_update_asset_types_table.php b/src/backend/database/migrations/micropowermanager/2022_05_19_102938_update_asset_types_table.php index 7f47e8179..685ac3089 100644 --- a/src/backend/database/migrations/micropowermanager/2022_05_19_102938_update_asset_types_table.php +++ b/src/backend/database/migrations/micropowermanager/2022_05_19_102938_update_asset_types_table.php @@ -6,7 +6,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * @@ -14,7 +14,7 @@ */ public function up() { - if (! Type::hasType('double')) { + if (!Type::hasType('double')) { Type::addType('double', FloatType::class); } Schema::connection('shard')->table('asset_types', function (Blueprint $table) { diff --git a/src/backend/database/migrations/micropowermanager/2022_05_23_104138_add_connection_column_to_agents_table.php b/src/backend/database/migrations/micropowermanager/2022_05_23_104138_add_connection_column_to_agents_table.php index a818cd1cb..a9374728b 100644 --- a/src/backend/database/migrations/micropowermanager/2022_05_23_104138_add_connection_column_to_agents_table.php +++ b/src/backend/database/migrations/micropowermanager/2022_05_23_104138_add_connection_column_to_agents_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2022_06_21_090125_create_calin_tables.php b/src/backend/database/migrations/micropowermanager/2022_06_21_090125_create_calin_tables.php index 7117a6d11..650ee27f5 100644 --- a/src/backend/database/migrations/micropowermanager/2022_06_21_090125_create_calin_tables.php +++ b/src/backend/database/migrations/micropowermanager/2022_06_21_090125_create_calin_tables.php @@ -4,10 +4,10 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { public function up() { - if (! Schema::hasTable('calin_api_credentials')) { + if (!Schema::hasTable('calin_api_credentials')) { Schema::connection('shard')->create('calin_api_credentials', static function (Blueprint $table) { $table->increments('id'); $table->string('api_url')->default('http://api.calinhost.com/api'); @@ -16,7 +16,7 @@ public function up() $table->timestamps(); }); } - if (! Schema::hasTable('calin_transactions')) { + if (!Schema::hasTable('calin_transactions')) { Schema::connection('shard')->create('calin_transactions', static function (Blueprint $table) { $table->increments('id'); $table->timestamps(); diff --git a/src/backend/database/migrations/micropowermanager/2022_06_21_090327_create_calin_smart_tables.php b/src/backend/database/migrations/micropowermanager/2022_06_21_090327_create_calin_smart_tables.php index a630c3233..0cbffde97 100644 --- a/src/backend/database/migrations/micropowermanager/2022_06_21_090327_create_calin_smart_tables.php +++ b/src/backend/database/migrations/micropowermanager/2022_06_21_090327_create_calin_smart_tables.php @@ -4,10 +4,10 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { public function up() { - if (! Schema::hasTable('calin_smart_api_credentials')) { + if (!Schema::hasTable('calin_smart_api_credentials')) { Schema::connection('shard')->create('calin_smart_api_credentials', static function (Blueprint $table) { $table->increments('id'); $table->string('api_url')->default('https://ami.calinhost.com/api'); @@ -18,7 +18,7 @@ public function up() $table->timestamps(); }); } - if (! Schema::hasTable('calin_smart_transactions')) { + if (!Schema::hasTable('calin_smart_transactions')) { Schema::connection('shard')->create('calin_smart_transactions', static function (Blueprint $table) { $table->increments('id'); $table->timestamps(); diff --git a/src/backend/database/migrations/micropowermanager/2022_06_21_090338_create_kelin_tables.php b/src/backend/database/migrations/micropowermanager/2022_06_21_090338_create_kelin_tables.php index 777aa6307..b0c7decd2 100644 --- a/src/backend/database/migrations/micropowermanager/2022_06_21_090338_create_kelin_tables.php +++ b/src/backend/database/migrations/micropowermanager/2022_06_21_090338_create_kelin_tables.php @@ -4,10 +4,10 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { public function up() { - if (! Schema::hasTable('kelin_api_credentials')) { + if (!Schema::hasTable('kelin_api_credentials')) { Schema::connection('shard')->create('kelin_api_credentials', static function (Blueprint $table) { $table->increments('id'); $table->string('api_url')->nullable(); @@ -19,7 +19,7 @@ public function up() }); } - if (! Schema::hasTable('kelin_customers')) { + if (!Schema::hasTable('kelin_customers')) { Schema::connection('shard')->create('kelin_customers', static function (Blueprint $table) { $table->increments('id'); $table->integer('mpm_customer_id')->unique(); // Code of the customer, id of corresponding person in MPM @@ -31,7 +31,7 @@ public function up() }); } - if (! Schema::hasTable('kelin_meters')) { + if (!Schema::hasTable('kelin_meters')) { Schema::connection('shard')->create('kelin_meters', function (Blueprint $table) { $table->increments('id'); $table->integer('mpm_meter_id')->unique(); @@ -44,7 +44,7 @@ public function up() }); } - if (! Schema::hasTable('kelin_transactions')) { + if (!Schema::hasTable('kelin_transactions')) { Schema::connection('shard')->create('kelin_transactions', function (Blueprint $table) { $table->increments('id'); $table->string('meter_serial'); @@ -59,7 +59,7 @@ public function up() }); } - if (! Schema::hasTable('kelin_sync_actions')) { + if (!Schema::hasTable('kelin_sync_actions')) { Schema::connection('shard')->create('kelin_sync_actions', function (Blueprint $table) { $table->increments('id'); $table->integer('sync_setting_id'); @@ -70,7 +70,7 @@ public function up() }); } - if (! Schema::hasTable('kelin_sync_settings')) { + if (!Schema::hasTable('kelin_sync_settings')) { Schema::connection('shard')->create('kelin_sync_settings', function (Blueprint $table) { $table->increments('id'); $table->string('action_name')->unique(); @@ -81,7 +81,7 @@ public function up() }); } - if (! Schema::hasTable('kelin_meter_minutely_datas')) { + if (!Schema::hasTable('kelin_meter_minutely_datas')) { Schema::connection('shard')->create('kelin_meter_minutely_datas', static function (Blueprint $table) { $table->increments('id'); $table->integer('id_of_terminal'); @@ -116,7 +116,7 @@ public function up() }); } - if (! Schema::hasTable('kelin_meter_daily_datas')) { + if (!Schema::hasTable('kelin_meter_daily_datas')) { Schema::connection('shard')->create('kelin_meter_daily_datas', static function (Blueprint $table) { $table->increments('id'); $table->integer('id_of_terminal'); @@ -148,7 +148,7 @@ public function up() }); } - if (! Schema::hasTable('kelin_settings')) { + if (!Schema::hasTable('kelin_settings')) { Schema::connection('shard')->create('kelin_settings', function (Blueprint $table) { $table->increments('id'); $table->integer('setting_id'); diff --git a/src/backend/database/migrations/micropowermanager/2022_06_21_090345_create_mesomb_payment_provider_tables.php b/src/backend/database/migrations/micropowermanager/2022_06_21_090345_create_mesomb_payment_provider_tables.php index 0e0ba78eb..df8f72421 100644 --- a/src/backend/database/migrations/micropowermanager/2022_06_21_090345_create_mesomb_payment_provider_tables.php +++ b/src/backend/database/migrations/micropowermanager/2022_06_21_090345_create_mesomb_payment_provider_tables.php @@ -4,10 +4,10 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { public function up() { - if (! Schema::hasTable('mesomb_transactions')) { + if (!Schema::hasTable('mesomb_transactions')) { Schema::connection('shard')->create('mesomb_transactions', static function (Blueprint $table) { $table->increments('id'); $table->string('pk'); diff --git a/src/backend/database/migrations/micropowermanager/2022_06_21_090351_create_spark_tables.php b/src/backend/database/migrations/micropowermanager/2022_06_21_090351_create_spark_tables.php index 5b75e29bc..c5fae50c0 100644 --- a/src/backend/database/migrations/micropowermanager/2022_06_21_090351_create_spark_tables.php +++ b/src/backend/database/migrations/micropowermanager/2022_06_21_090351_create_spark_tables.php @@ -4,10 +4,10 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { public function up() { - if (! Schema::hasTable('sm_api_credentials')) { + if (!Schema::hasTable('sm_api_credentials')) { Schema::connection('shard')->create('sm_api_credentials', static function (Blueprint $table) { $table->increments('id'); $table->string('api_url')->default('https://www.sparkmeter.cloud/api/v0'); @@ -19,7 +19,7 @@ public function up() }); } - if (! Schema::hasTable('sm_customers')) { + if (!Schema::hasTable('sm_customers')) { Schema::connection('shard')->create('sm_customers', static function (Blueprint $table) { $table->increments('id'); $table->string('customer_id')->unique(); // Code of the customer, id of corresponding person in MPM @@ -32,7 +32,7 @@ public function up() }); } - if (! Schema::hasTable('sm_meter_models')) { + if (!Schema::hasTable('sm_meter_models')) { Schema::connection('shard')->create('sm_meter_models', static function (Blueprint $table) { $table->increments('id'); $table->string('site_id'); @@ -45,7 +45,7 @@ public function up() }); } - if (! Schema::hasTable('sm_organizations')) { + if (!Schema::hasTable('sm_organizations')) { Schema::connection('shard')->create('sm_organizations', static function (Blueprint $table) { $table->increments('id'); $table->string('organization_id')->unique(); @@ -55,7 +55,7 @@ public function up() }); } - if (! Schema::hasTable('sm_sites')) { + if (!Schema::hasTable('sm_sites')) { Schema::connection('shard')->create('sm_sites', static function (Blueprint $table) { $table->increments('id'); $table->string('site_id')->unique(); @@ -69,7 +69,7 @@ public function up() }); } - if (! Schema::hasTable('sm_tariffs')) { + if (!Schema::hasTable('sm_tariffs')) { Schema::connection('shard')->create('sm_tariffs', static function (Blueprint $table) { $table->increments('id'); $table->string('site_id'); @@ -83,7 +83,7 @@ public function up() }); } - if (! Schema::hasTable('sm_transactions')) { + if (!Schema::hasTable('sm_transactions')) { Schema::connection('shard')->create('sm_transactions', static function (Blueprint $table) { $table->increments('id'); $table->string('site_id'); @@ -96,7 +96,7 @@ public function up() }); } - if (! Schema::hasTable('sm_sync_actions')) { + if (!Schema::hasTable('sm_sync_actions')) { Schema::connection('shard')->create('sm_sync_actions', function (Blueprint $table) { $table->increments('id'); $table->integer('sync_setting_id'); @@ -107,7 +107,7 @@ public function up() }); } - if (! Schema::hasTable('sm_settings')) { + if (!Schema::hasTable('sm_settings')) { Schema::connection('shard')->create('sm_settings', function (Blueprint $table) { $table->increments('id'); $table->integer('setting_id'); @@ -116,7 +116,7 @@ public function up() }); } - if (! Schema::hasTable('sm_sms_settings')) { + if (!Schema::hasTable('sm_sms_settings')) { Schema::connection('shard')->create('sm_sms_settings', function (Blueprint $table) { $table->increments('id'); $table->string('state')->unique(); @@ -126,7 +126,7 @@ public function up() }); } - if (! Schema::hasTable('sm_sync_settings')) { + if (!Schema::hasTable('sm_sync_settings')) { Schema::connection('shard')->create('sm_sync_settings', function (Blueprint $table) { $table->increments('id'); $table->string('action_name')->unique(); @@ -137,7 +137,7 @@ public function up() }); } - if (! Schema::hasTable('sm_sms_notified_customers')) { + if (!Schema::hasTable('sm_sms_notified_customers')) { Schema::connection('shard')->create('sm_sms_notified_customers', function (Blueprint $table) { $table->increments('id'); $table->string('customer_id'); @@ -147,7 +147,7 @@ public function up() }); } - if (! Schema::hasTable('sm_sms_bodies')) { + if (!Schema::hasTable('sm_sms_bodies')) { Schema::connection('shard')->create('sm_sms_bodies', function (Blueprint $table) { $table->increments('id'); $table->string('reference', 50)->unique(); @@ -159,7 +159,7 @@ public function up() }); } - if (! Schema::hasTable('sm_sms_variable_default_values')) { + if (!Schema::hasTable('sm_sms_variable_default_values')) { Schema::connection('shard')->create('sm_sms_variable_default_values', function (Blueprint $table) { $table->id(); $table->string('variable'); @@ -168,7 +168,7 @@ public function up() }); } - if (! Schema::hasTable('sm_sales_accounts')) { + if (!Schema::hasTable('sm_sales_accounts')) { Schema::connection('shard')->create('sm_sales_accounts', static function (Blueprint $table) { $table->increments('id'); $table->string('sales_account_id'); @@ -183,7 +183,7 @@ public function up() }); } - if (! Schema::hasTable('sm_sms_feedback_words')) { + if (!Schema::hasTable('sm_sms_feedback_words')) { Schema::connection('shard')->create('sm_sms_feedback_words', function (Blueprint $table) { $table->increments('id'); $table->string('meter_reset')->nullable(); diff --git a/src/backend/database/migrations/micropowermanager/2022_06_21_090402_create_steama_tables.php b/src/backend/database/migrations/micropowermanager/2022_06_21_090402_create_steama_tables.php index 350495680..b6264ceac 100644 --- a/src/backend/database/migrations/micropowermanager/2022_06_21_090402_create_steama_tables.php +++ b/src/backend/database/migrations/micropowermanager/2022_06_21_090402_create_steama_tables.php @@ -4,10 +4,10 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { public function up() { - if (! Schema::hasTable('steama_agents')) { + if (!Schema::hasTable('steama_agents')) { Schema::connection('shard')->create('steama_agents', function (Blueprint $table) { $table->increments('id'); $table->integer('site_id'); @@ -20,7 +20,7 @@ public function up() }); } - if (! Schema::hasTable('steama_asset_rates_payment_plans')) { + if (!Schema::hasTable('steama_asset_rates_payment_plans')) { Schema::connection('shard')->create('steama_asset_rates_payment_plans', function (Blueprint $table) { $table->increments('id'); $table->integer('mpm_asset_people_id'); @@ -29,7 +29,7 @@ public function up() }); } - if (! Schema::hasTable('steama_credentials')) { + if (!Schema::hasTable('steama_credentials')) { Schema::connection('shard')->create('steama_credentials', function (Blueprint $table) { $table->increments('id'); $table->string('username')->nullable(); @@ -41,7 +41,7 @@ public function up() }); } - if (! Schema::hasTable('steama_customer_basis_payment_plans')) { + if (!Schema::hasTable('steama_customer_basis_payment_plans')) { Schema::connection('shard')->create('steama_customer_basis_payment_plans', function (Blueprint $table) { $table->increments('id'); $table->integer('customer_id'); @@ -51,7 +51,7 @@ public function up() }); } - if (! Schema::hasTable('steama_customer_basis_time_of_usages')) { + if (!Schema::hasTable('steama_customer_basis_time_of_usages')) { Schema::connection('shard')->create('steama_customer_basis_time_of_usages', function (Blueprint $table) { $table->increments('id'); $table->integer('start'); @@ -61,7 +61,7 @@ public function up() }); } - if (! Schema::hasTable('steama_customers')) { + if (!Schema::hasTable('steama_customers')) { Schema::connection('shard')->create('steama_customers', function (Blueprint $table) { $table->increments('id'); $table->integer('site_id'); @@ -76,7 +76,7 @@ public function up() }); } - if (! Schema::hasTable('steama_flat_rate_payment_plans')) { + if (!Schema::hasTable('steama_flat_rate_payment_plans')) { Schema::connection('shard')->create('steama_flat_rate_payment_plans', function (Blueprint $table) { $table->increments('id'); $table->decimal('energy_price')->default(0); @@ -84,7 +84,7 @@ public function up() }); } - if (! Schema::hasTable('steama_hybrid_payment_plans')) { + if (!Schema::hasTable('steama_hybrid_payment_plans')) { Schema::connection('shard')->create('steama_hybrid_payment_plans', function (Blueprint $table) { $table->increments('id'); $table->decimal('connection_fee')->nullable(); @@ -94,7 +94,7 @@ public function up() }); } - if (! Schema::hasTable('steama_meter_types')) { + if (!Schema::hasTable('steama_meter_types')) { Schema::connection('shard')->create('steama_meter_types', function (Blueprint $table) { $table->increments('id'); $table->integer('mpm_meter_type_id'); @@ -105,7 +105,7 @@ public function up() }); } - if (! Schema::hasTable('steama_meters')) { + if (!Schema::hasTable('steama_meters')) { Schema::connection('shard')->create('steama_meters', function (Blueprint $table) { $table->increments('id'); $table->integer('meter_id')->unique(); @@ -117,7 +117,7 @@ public function up() }); } - if (! Schema::hasTable('steama_minimum_top_up_requirements_payment_plans')) { + if (!Schema::hasTable('steama_minimum_top_up_requirements_payment_plans')) { Schema::connection('shard')->create('steama_minimum_top_up_requirements_payment_plans', function (Blueprint $table) { $table->increments('id'); $table->decimal('threshold')->default(0); @@ -125,7 +125,7 @@ public function up() }); } - if (! Schema::hasTable('steama_per_kwh_payment_plans')) { + if (!Schema::hasTable('steama_per_kwh_payment_plans')) { Schema::connection('shard')->create('steama_per_kwh_payment_plans', function (Blueprint $table) { $table->increments('id'); $table->decimal('energy_price')->default(0); @@ -133,7 +133,7 @@ public function up() }); } - if (! Schema::hasTable('steama_site_level_payment_plan_types')) { + if (!Schema::hasTable('steama_site_level_payment_plan_types')) { Schema::connection('shard')->create('steama_site_level_payment_plan_types', function (Blueprint $table) { $table->increments('id'); $table->string('name'); @@ -141,7 +141,7 @@ public function up() }); } - if (! Schema::hasTable('steama_site_level_payment_plans')) { + if (!Schema::hasTable('steama_site_level_payment_plans')) { Schema::connection('shard')->create('steama_site_level_payment_plans', function (Blueprint $table) { $table->increments('id'); $table->integer('site_id'); @@ -153,7 +153,7 @@ public function up() }); } - if (! Schema::hasTable('steama_sites')) { + if (!Schema::hasTable('steama_sites')) { Schema::connection('shard')->create('steama_sites', function (Blueprint $table) { $table->increments('id'); $table->integer('site_id')->unique(); @@ -163,7 +163,7 @@ public function up() }); } - if (! Schema::hasTable('steama_subscription_payment_plans')) { + if (!Schema::hasTable('steama_subscription_payment_plans')) { Schema::connection('shard')->create('steama_subscription_payment_plans', function (Blueprint $table) { $table->increments('id'); $table->decimal('plan_fee')->default(0); @@ -174,7 +174,7 @@ public function up() }); } - if (! Schema::hasTable('steama_tariff_override_payment_plans')) { + if (!Schema::hasTable('steama_tariff_override_payment_plans')) { Schema::connection('shard')->create('steama_tariff_override_payment_plans', function (Blueprint $table) { $table->increments('id'); $table->decimal('energy_price')->default(0); @@ -182,7 +182,7 @@ public function up() }); } - if (! Schema::hasTable('steama_tariffs')) { + if (!Schema::hasTable('steama_tariffs')) { Schema::connection('shard')->create('steama_tariffs', function (Blueprint $table) { $table->increments('id'); $table->integer('mpm_tariff_id')->unique(); @@ -190,7 +190,7 @@ public function up() }); } - if (! Schema::hasTable('steama_transactions')) { + if (!Schema::hasTable('steama_transactions')) { Schema::connection('shard')->create('steama_transactions', function (Blueprint $table) { $table->increments('id'); $table->integer('site_id'); @@ -205,7 +205,7 @@ public function up() }); } - if (! Schema::hasTable('steama_user_types')) { + if (!Schema::hasTable('steama_user_types')) { Schema::connection('shard')->create('steama_user_types', function (Blueprint $table) { $table->increments('id'); $table->integer('mpm_connection_type_id'); @@ -215,7 +215,7 @@ public function up() }); } - if (! Schema::hasTable('steama_sync_actions')) { + if (!Schema::hasTable('steama_sync_actions')) { Schema::connection('shard')->create('steama_sync_actions', function (Blueprint $table) { $table->increments('id'); $table->integer('sync_setting_id'); @@ -226,7 +226,7 @@ public function up() }); } - if (! Schema::hasTable('steama_settings')) { + if (!Schema::hasTable('steama_settings')) { Schema::connection('shard')->create('steama_settings', function (Blueprint $table) { $table->increments('id'); $table->integer('setting_id'); @@ -235,7 +235,7 @@ public function up() }); } - if (! Schema::hasTable('steama_sms_settings')) { + if (!Schema::hasTable('steama_sms_settings')) { Schema::connection('shard')->create('steama_sms_settings', function (Blueprint $table) { $table->increments('id'); $table->string('state')->unique(); @@ -245,7 +245,7 @@ public function up() }); } - if (! Schema::hasTable('steama_sync_settings')) { + if (!Schema::hasTable('steama_sync_settings')) { Schema::connection('shard')->create('steama_sync_settings', function (Blueprint $table) { $table->increments('id'); $table->string('action_name')->unique(); @@ -256,7 +256,7 @@ public function up() }); } - if (! Schema::hasTable('steama_sms_notified_customers')) { + if (!Schema::hasTable('steama_sms_notified_customers')) { Schema::connection('shard')->create('steama_sms_notified_customers', function (Blueprint $table) { $table->increments('id'); $table->integer('customer_id'); @@ -266,7 +266,7 @@ public function up() }); } - if (! Schema::hasTable('steama_sms_bodies')) { + if (!Schema::hasTable('steama_sms_bodies')) { Schema::connection('shard')->create('steama_sms_bodies', function (Blueprint $table) { $table->increments('id'); $table->string('reference', 50)->unique(); @@ -278,7 +278,7 @@ public function up() }); } - if (! Schema::hasTable('steama_sms_variable_default_values')) { + if (!Schema::hasTable('steama_sms_variable_default_values')) { Schema::connection('shard')->create('steama_sms_variable_default_values', function (Blueprint $table) { $table->id(); $table->string('variable'); @@ -287,7 +287,7 @@ public function up() }); } - if (! Schema::hasTable('steama_sms_feedback_words')) { + if (!Schema::hasTable('steama_sms_feedback_words')) { Schema::connection('shard')->create('steama_sms_feedback_words', function (Blueprint $table) { $table->increments('id'); $table->string('meter_balance')->nullable(); diff --git a/src/backend/database/migrations/micropowermanager/2022_06_21_090412_create_stron_tables.php b/src/backend/database/migrations/micropowermanager/2022_06_21_090412_create_stron_tables.php index 26537479e..8c1e7343f 100644 --- a/src/backend/database/migrations/micropowermanager/2022_06_21_090412_create_stron_tables.php +++ b/src/backend/database/migrations/micropowermanager/2022_06_21_090412_create_stron_tables.php @@ -4,10 +4,10 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { public function up() { - if (! Schema::hasTable('stron_api_credentials')) { + if (!Schema::hasTable('stron_api_credentials')) { Schema::connection('shard')->create('stron_api_credentials', static function (Blueprint $table) { $table->increments('id'); $table->string('api_url')->default('http://www.saitecapi.stronpower.com/api'); @@ -19,7 +19,7 @@ public function up() $table->timestamps(); }); } - if (! Schema::hasTable('stron_transactions')) { + if (!Schema::hasTable('stron_transactions')) { Schema::connection('shard')->create('stron_transactions', static function (Blueprint $table) { $table->increments('id'); $table->timestamps(); diff --git a/src/backend/database/migrations/micropowermanager/2022_06_21_090425_create_swifta_payment_provider_tables.php b/src/backend/database/migrations/micropowermanager/2022_06_21_090425_create_swifta_payment_provider_tables.php index 9072b7113..39905bf5c 100644 --- a/src/backend/database/migrations/micropowermanager/2022_06_21_090425_create_swifta_payment_provider_tables.php +++ b/src/backend/database/migrations/micropowermanager/2022_06_21_090425_create_swifta_payment_provider_tables.php @@ -4,10 +4,10 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { public function up() { - if (! Schema::hasTable('swifta_transactions')) { + if (!Schema::hasTable('swifta_transactions')) { Schema::connection('shard')->create('swifta_transactions', static function (Blueprint $table) { $table->increments('id'); $table->string('transaction_reference')->nullable(); @@ -20,7 +20,7 @@ public function up() $table->timestamps(); }); } - if (! Schema::hasTable('swifta_authentication')) { + if (!Schema::hasTable('swifta_authentication')) { Schema::connection('shard')->create('swifta_authentication', static function (Blueprint $table) { $table->increments('id'); $table->string('token')->nullable(); diff --git a/src/backend/database/migrations/micropowermanager/2022_07_05_092948_create_registration_tail_table.php b/src/backend/database/migrations/micropowermanager/2022_07_05_092948_create_registration_tail_table.php index 23ed77cb3..c0f14af3e 100644 --- a/src/backend/database/migrations/micropowermanager/2022_07_05_092948_create_registration_tail_table.php +++ b/src/backend/database/migrations/micropowermanager/2022_07_05_092948_create_registration_tail_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2022_09_20_0000000_create_bulk_registration_tables.php b/src/backend/database/migrations/micropowermanager/2022_09_20_0000000_create_bulk_registration_tables.php index 522b2eef7..5d4adeaeb 100644 --- a/src/backend/database/migrations/micropowermanager/2022_09_20_0000000_create_bulk_registration_tables.php +++ b/src/backend/database/migrations/micropowermanager/2022_09_20_0000000_create_bulk_registration_tables.php @@ -4,10 +4,10 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { public function up() { - if (! Schema::connection('shard')->hasTable('bulk_registration_csv_datas')) { + if (!Schema::connection('shard')->hasTable('bulk_registration_csv_datas')) { Schema::connection('shard')->create('bulk_registration_csv_datas', function (Blueprint $table) { $table->increments('id'); $table->unsignedInteger('user_id'); diff --git a/src/backend/database/migrations/micropowermanager/2022_10_27_130327_add_direction_column_to_sms_table.php b/src/backend/database/migrations/micropowermanager/2022_10_27_130327_add_direction_column_to_sms_table.php index 889e28ca2..34ad352e9 100644 --- a/src/backend/database/migrations/micropowermanager/2022_10_27_130327_add_direction_column_to_sms_table.php +++ b/src/backend/database/migrations/micropowermanager/2022_10_27_130327_add_direction_column_to_sms_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2022_10_27_140945_add_gateway_id_column_to_sms_table.php b/src/backend/database/migrations/micropowermanager/2022_10_27_140945_add_gateway_id_column_to_sms_table.php index 52967fea1..ce2821e1d 100644 --- a/src/backend/database/migrations/micropowermanager/2022_10_27_140945_add_gateway_id_column_to_sms_table.php +++ b/src/backend/database/migrations/micropowermanager/2022_10_27_140945_add_gateway_id_column_to_sms_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2022_10_27_142123_add_dispatched_column_to_sms_table.php b/src/backend/database/migrations/micropowermanager/2022_10_27_142123_add_dispatched_column_to_sms_table.php index fd0890489..02e97429d 100644 --- a/src/backend/database/migrations/micropowermanager/2022_10_27_142123_add_dispatched_column_to_sms_table.php +++ b/src/backend/database/migrations/micropowermanager/2022_10_27_142123_add_dispatched_column_to_sms_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2022_10_27_142319_add_attempts_column_to_sms_table.php b/src/backend/database/migrations/micropowermanager/2022_10_27_142319_add_attempts_column_to_sms_table.php index 3ddc6c9fd..d8da6df80 100644 --- a/src/backend/database/migrations/micropowermanager/2022_10_27_142319_add_attempts_column_to_sms_table.php +++ b/src/backend/database/migrations/micropowermanager/2022_10_27_142319_add_attempts_column_to_sms_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2022_11_08_0000000_create_viber_messaging_tables.php b/src/backend/database/migrations/micropowermanager/2022_11_08_0000000_create_viber_messaging_tables.php index 155677b6e..48c5c383c 100644 --- a/src/backend/database/migrations/micropowermanager/2022_11_08_0000000_create_viber_messaging_tables.php +++ b/src/backend/database/migrations/micropowermanager/2022_11_08_0000000_create_viber_messaging_tables.php @@ -4,10 +4,10 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { public function up() { - if (! Schema::hasTable('viber_credentials')) { + if (!Schema::hasTable('viber_credentials')) { Schema::connection('shard')->create('viber_credentials', static function (Blueprint $table) { $table->increments('id'); $table->string('api_token')->nullable(); @@ -17,14 +17,14 @@ public function up() $table->timestamps(); }); } - if (! Schema::hasTable('viber_messages')) { + if (!Schema::hasTable('viber_messages')) { Schema::connection('shard')->create('viber_messages', static function (Blueprint $table) { $table->increments('id'); $table->integer('sms_id'); $table->timestamps(); }); } - if (! Schema::hasTable('viber_contacts')) { + if (!Schema::hasTable('viber_contacts')) { Schema::connection('shard')->create('viber_contacts', static function (Blueprint $table) { $table->increments('id'); $table->integer('person_id'); diff --git a/src/backend/database/migrations/micropowermanager/2022_11_14_101338_add_minimum_purchase_amount_to_meter_tariffs_table.php b/src/backend/database/migrations/micropowermanager/2022_11_14_101338_add_minimum_purchase_amount_to_meter_tariffs_table.php index 29f89dbb0..1bb868b51 100644 --- a/src/backend/database/migrations/micropowermanager/2022_11_14_101338_add_minimum_purchase_amount_to_meter_tariffs_table.php +++ b/src/backend/database/migrations/micropowermanager/2022_11_14_101338_add_minimum_purchase_amount_to_meter_tariffs_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2022_11_21_000000_create_wave_money_payment_provider_tables.php b/src/backend/database/migrations/micropowermanager/2022_11_21_000000_create_wave_money_payment_provider_tables.php index 1f93a0540..c2fd8756c 100644 --- a/src/backend/database/migrations/micropowermanager/2022_11_21_000000_create_wave_money_payment_provider_tables.php +++ b/src/backend/database/migrations/micropowermanager/2022_11_21_000000_create_wave_money_payment_provider_tables.php @@ -4,10 +4,10 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { public function up() { - if (! Schema::hasTable('wave_money_transactions')) { + if (!Schema::hasTable('wave_money_transactions')) { Schema::connection('shard')->create('wave_money_transactions', static function (Blueprint $table) { $table->increments('id'); $table->integer('status')->default(-2); @@ -22,7 +22,7 @@ public function up() $table->timestamps(); }); } - if (! Schema::hasTable('wave_money_credentials')) { + if (!Schema::hasTable('wave_money_credentials')) { Schema::connection('shard')->create('wave_money_credentials', static function (Blueprint $table) { $table->increments('id'); $table->string('merchant_id')->nullable(); diff --git a/src/backend/database/migrations/micropowermanager/2022_11_29_000000_create_micro_star_tables.php b/src/backend/database/migrations/micropowermanager/2022_11_29_000000_create_micro_star_tables.php index 15a4cdae5..f8d27f2e2 100644 --- a/src/backend/database/migrations/micropowermanager/2022_11_29_000000_create_micro_star_tables.php +++ b/src/backend/database/migrations/micropowermanager/2022_11_29_000000_create_micro_star_tables.php @@ -4,10 +4,10 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { public function up() { - if (! Schema::hasTable('micro_star_api_credentials')) { + if (!Schema::hasTable('micro_star_api_credentials')) { Schema::connection('shard')->create('micro_star_api_credentials', static function (Blueprint $table) { $table->increments('id'); $table->string('api_url')->nullable(); @@ -18,7 +18,7 @@ public function up() $table->timestamps(); }); } - if (! Schema::hasTable('micro_star_transactions')) { + if (!Schema::hasTable('micro_star_transactions')) { Schema::connection('shard')->create('micro_star_transactions', static function (Blueprint $table) { $table->increments('id'); $table->timestamps(); diff --git a/src/backend/database/migrations/micropowermanager/2022_12_11_000000_update_swifta_authentication_table.php b/src/backend/database/migrations/micropowermanager/2022_12_11_000000_update_swifta_authentication_table.php index 97def6ebb..756749f5a 100644 --- a/src/backend/database/migrations/micropowermanager/2022_12_11_000000_update_swifta_authentication_table.php +++ b/src/backend/database/migrations/micropowermanager/2022_12_11_000000_update_swifta_authentication_table.php @@ -6,7 +6,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * @@ -14,7 +14,7 @@ */ public function up() { - if (! Type::hasType('token')) { + if (!Type::hasType('token')) { Type::addType('token', FloatType::class); } Schema::connection('shard')->table('swifta_authentication', function (Blueprint $table) { diff --git a/src/backend/database/migrations/micropowermanager/2022_14_12_create_sun_king_tables.php b/src/backend/database/migrations/micropowermanager/2022_14_12_create_sun_king_tables.php index a3710cba1..2836b3223 100644 --- a/src/backend/database/migrations/micropowermanager/2022_14_12_create_sun_king_tables.php +++ b/src/backend/database/migrations/micropowermanager/2022_14_12_create_sun_king_tables.php @@ -4,10 +4,10 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { public function up() { - if (! Schema::connection('shard')->hasTable('sun_king_api_credentials')) { + if (!Schema::connection('shard')->hasTable('sun_king_api_credentials')) { Schema::connection('shard')->create('sun_king_api_credentials', static function (Blueprint $table) { $table->increments('id'); $table->string('auth_url')->default('https://auth.central.glpapps.com/auth/realms/glp-dev/protocol/openid-connect/token'); @@ -19,7 +19,7 @@ public function up() $table->timestamps(); }); } - if (! Schema::connection('shard')->hasTable('sun_king_transactions')) { + if (!Schema::connection('shard')->hasTable('sun_king_transactions')) { Schema::connection('shard')->create('sun_king_transactions', static function (Blueprint $table) { $table->increments('id'); $table->timestamps(); diff --git a/src/backend/database/migrations/micropowermanager/2023_03_15_092048_add_colums_to_solars_table.php b/src/backend/database/migrations/micropowermanager/2023_03_15_092048_add_colums_to_solars_table.php index 6190e2f5b..011ac4f62 100644 --- a/src/backend/database/migrations/micropowermanager/2023_03_15_092048_add_colums_to_solars_table.php +++ b/src/backend/database/migrations/micropowermanager/2023_03_15_092048_add_colums_to_solars_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2023_03_16_105024_update_solars_table.php b/src/backend/database/migrations/micropowermanager/2023_03_16_105024_update_solars_table.php index bdfbdf2ff..8e54b500f 100644 --- a/src/backend/database/migrations/micropowermanager/2023_03_16_105024_update_solars_table.php +++ b/src/backend/database/migrations/micropowermanager/2023_03_16_105024_update_solars_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2023_03_17_234630_update_data_type_values_energies_table.php b/src/backend/database/migrations/micropowermanager/2023_03_17_234630_update_data_type_values_energies_table.php index 5c994a7c7..e180bf954 100644 --- a/src/backend/database/migrations/micropowermanager/2023_03_17_234630_update_data_type_values_energies_table.php +++ b/src/backend/database/migrations/micropowermanager/2023_03_17_234630_update_data_type_values_energies_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2023_03_18_014305_update_data_type_values_energies_table.php b/src/backend/database/migrations/micropowermanager/2023_03_18_014305_update_data_type_values_energies_table.php index 2c7b4bf06..f2344b9a0 100644 --- a/src/backend/database/migrations/micropowermanager/2023_03_18_014305_update_data_type_values_energies_table.php +++ b/src/backend/database/migrations/micropowermanager/2023_03_18_014305_update_data_type_values_energies_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2023_04_02_121811_create_wavecom_tables.php b/src/backend/database/migrations/micropowermanager/2023_04_02_121811_create_wavecom_tables.php index abde750de..245fa7a8b 100644 --- a/src/backend/database/migrations/micropowermanager/2023_04_02_121811_create_wavecom_tables.php +++ b/src/backend/database/migrations/micropowermanager/2023_04_02_121811_create_wavecom_tables.php @@ -4,12 +4,12 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { private const TABLE_NAME = 'wavecom_transactions'; public function up() { - if (! Schema::hasTable(self::TABLE_NAME)) { + if (!Schema::hasTable(self::TABLE_NAME)) { Schema::create(self::TABLE_NAME, function (Blueprint $table) { $table->increments('id'); $table->string('transaction_id')->unique(); diff --git a/src/backend/database/migrations/micropowermanager/2023_04_04_211421_add_api_type_to_table_transactions.php b/src/backend/database/migrations/micropowermanager/2023_04_04_211421_add_api_type_to_table_transactions.php index 292b015af..2358fd0b9 100644 --- a/src/backend/database/migrations/micropowermanager/2023_04_04_211421_add_api_type_to_table_transactions.php +++ b/src/backend/database/migrations/micropowermanager/2023_04_04_211421_add_api_type_to_table_transactions.php @@ -3,7 +3,7 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Support\Facades\DB; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2023_04_26_223352_update_sms_table.php b/src/backend/database/migrations/micropowermanager/2023_04_26_223352_update_sms_table.php index 5abf3c936..4c46c099e 100644 --- a/src/backend/database/migrations/micropowermanager/2023_04_26_223352_update_sms_table.php +++ b/src/backend/database/migrations/micropowermanager/2023_04_26_223352_update_sms_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2023_06_02_create_gome_long_tables.php b/src/backend/database/migrations/micropowermanager/2023_06_02_create_gome_long_tables.php index 4e819cf34..71d96f441 100644 --- a/src/backend/database/migrations/micropowermanager/2023_06_02_create_gome_long_tables.php +++ b/src/backend/database/migrations/micropowermanager/2023_06_02_create_gome_long_tables.php @@ -6,10 +6,10 @@ // Despite the migration's name, this migration was actually created on Feb 6h // Name should be 2023-02-06 not 2023-06-02... -return new class () extends Migration { +return new class extends Migration { public function up() { - if (! Schema::hasTable('gome_long_api_credentials')) { + if (!Schema::hasTable('gome_long_api_credentials')) { Schema::create('gome_long_api_credentials', static function (Blueprint $table) { $table->increments('id'); $table->string('api_url')->default('http://60.205.216.142:8085/api/EKPower'); @@ -19,14 +19,14 @@ public function up() }); } - if (! Schema::hasTable('gome_long_transactions')) { + if (!Schema::hasTable('gome_long_transactions')) { Schema::create('gome_long_transactions', static function (Blueprint $table) { $table->increments('id'); $table->timestamps(); }); } - if (! Schema::hasTable('gome_long_tariffs')) { + if (!Schema::hasTable('gome_long_tariffs')) { Schema::create('gome_long_tariffs', static function (Blueprint $table) { $table->increments('id'); $table->string('tariff_id')->unique(); diff --git a/src/backend/database/migrations/micropowermanager/2023_09_25_232731_update_assets_asset_people_asset_types_tables.php b/src/backend/database/migrations/micropowermanager/2023_09_25_232731_update_assets_asset_people_asset_types_tables.php index fa4e255bb..c729cdd8b 100644 --- a/src/backend/database/migrations/micropowermanager/2023_09_25_232731_update_assets_asset_people_asset_types_tables.php +++ b/src/backend/database/migrations/micropowermanager/2023_09_25_232731_update_assets_asset_people_asset_types_tables.php @@ -6,7 +6,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * @@ -46,7 +46,7 @@ public function down() $table->renameColumn('price', 'default_price'); $table->integer('default_rate'); }); - if (! Type::hasType('double')) { + if (!Type::hasType('double')) { Type::addType('double', FloatType::class); } Schema::connection('shard')->table('asset_types', function (Blueprint $table) { diff --git a/src/backend/database/migrations/micropowermanager/2023_09_28_130619_update_sms_appliance_remind_rates_table.php b/src/backend/database/migrations/micropowermanager/2023_09_28_130619_update_sms_appliance_remind_rates_table.php index 41c4217a1..6182a8d76 100644 --- a/src/backend/database/migrations/micropowermanager/2023_09_28_130619_update_sms_appliance_remind_rates_table.php +++ b/src/backend/database/migrations/micropowermanager/2023_09_28_130619_update_sms_appliance_remind_rates_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2023_10_25_074114_update_wavecom_wavemoney_tables.php b/src/backend/database/migrations/micropowermanager/2023_10_25_074114_update_wavecom_wavemoney_tables.php index 07ef68f96..78b331283 100644 --- a/src/backend/database/migrations/micropowermanager/2023_10_25_074114_update_wavecom_wavemoney_tables.php +++ b/src/backend/database/migrations/micropowermanager/2023_10_25_074114_update_wavecom_wavemoney_tables.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2023_11_03_112202_create_devices_table.php b/src/backend/database/migrations/micropowermanager/2023_11_03_112202_create_devices_table.php index 8b0b749cb..45ac7b542 100644 --- a/src/backend/database/migrations/micropowermanager/2023_11_03_112202_create_devices_table.php +++ b/src/backend/database/migrations/micropowermanager/2023_11_03_112202_create_devices_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2023_11_03_120614_create_solar_home_systems_table.php b/src/backend/database/migrations/micropowermanager/2023_11_03_120614_create_solar_home_systems_table.php index f85c3ac57..bfa0ee70a 100644 --- a/src/backend/database/migrations/micropowermanager/2023_11_03_120614_create_solar_home_systems_table.php +++ b/src/backend/database/migrations/micropowermanager/2023_11_03_120614_create_solar_home_systems_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2023_11_03_121740_add_configuration_columns_to_meters_table.php b/src/backend/database/migrations/micropowermanager/2023_11_03_121740_add_configuration_columns_to_meters_table.php index 60f31da52..4bfc16837 100644 --- a/src/backend/database/migrations/micropowermanager/2023_11_03_121740_add_configuration_columns_to_meters_table.php +++ b/src/backend/database/migrations/micropowermanager/2023_11_03_121740_add_configuration_columns_to_meters_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2023_11_11_142307_update_action_field_type_logs_table.php b/src/backend/database/migrations/micropowermanager/2023_11_11_142307_update_action_field_type_logs_table.php index f3598f212..2fe634fb0 100644 --- a/src/backend/database/migrations/micropowermanager/2023_11_11_142307_update_action_field_type_logs_table.php +++ b/src/backend/database/migrations/micropowermanager/2023_11_11_142307_update_action_field_type_logs_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2023_11_14_160711_drop_geo_id_column_from_address_table.php b/src/backend/database/migrations/micropowermanager/2023_11_14_160711_drop_geo_id_column_from_address_table.php index 6ac069628..c0df218ad 100644 --- a/src/backend/database/migrations/micropowermanager/2023_11_14_160711_drop_geo_id_column_from_address_table.php +++ b/src/backend/database/migrations/micropowermanager/2023_11_14_160711_drop_geo_id_column_from_address_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2023_11_16_175649_add_type_column_to_manufacturers_table.php b/src/backend/database/migrations/micropowermanager/2023_11_16_175649_add_type_column_to_manufacturers_table.php index 89a8c0d24..b3cf72cad 100644 --- a/src/backend/database/migrations/micropowermanager/2023_11_16_175649_add_type_column_to_manufacturers_table.php +++ b/src/backend/database/migrations/micropowermanager/2023_11_16_175649_add_type_column_to_manufacturers_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2023_11_16_175940_add_asset_id_column_to_solar_home_systems_table.php b/src/backend/database/migrations/micropowermanager/2023_11_16_175940_add_asset_id_column_to_solar_home_systems_table.php index b8adf1020..88cc96d66 100644 --- a/src/backend/database/migrations/micropowermanager/2023_11_16_175940_add_asset_id_column_to_solar_home_systems_table.php +++ b/src/backend/database/migrations/micropowermanager/2023_11_16_175940_add_asset_id_column_to_solar_home_systems_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2023_11_16_220432_update_person_id_column_in_devices_table.php b/src/backend/database/migrations/micropowermanager/2023_11_16_220432_update_person_id_column_in_devices_table.php index 3e8423d30..d664a8186 100644 --- a/src/backend/database/migrations/micropowermanager/2023_11_16_220432_update_person_id_column_in_devices_table.php +++ b/src/backend/database/migrations/micropowermanager/2023_11_16_220432_update_person_id_column_in_devices_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2023_11_16_220931_update_device_serial_column_in_devices_table.php b/src/backend/database/migrations/micropowermanager/2023_11_16_220931_update_device_serial_column_in_devices_table.php index eca4dbdc2..ae99fec1a 100644 --- a/src/backend/database/migrations/micropowermanager/2023_11_16_220931_update_device_serial_column_in_devices_table.php +++ b/src/backend/database/migrations/micropowermanager/2023_11_16_220931_update_device_serial_column_in_devices_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2023_11_16_221111_update_serial_number_column_in_solar_home_systems_table.php b/src/backend/database/migrations/micropowermanager/2023_11_16_221111_update_serial_number_column_in_solar_home_systems_table.php index e4f5bd460..55c5ddce8 100644 --- a/src/backend/database/migrations/micropowermanager/2023_11_16_221111_update_serial_number_column_in_solar_home_systems_table.php +++ b/src/backend/database/migrations/micropowermanager/2023_11_16_221111_update_serial_number_column_in_solar_home_systems_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2023_11_17_095204_create_tokens_table.php b/src/backend/database/migrations/micropowermanager/2023_11_17_095204_create_tokens_table.php index ce82cfa03..a96a4b81a 100644 --- a/src/backend/database/migrations/micropowermanager/2023_11_17_095204_create_tokens_table.php +++ b/src/backend/database/migrations/micropowermanager/2023_11_17_095204_create_tokens_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2023_11_18_190332_add_device_serial_column_to_asset_people_table.php b/src/backend/database/migrations/micropowermanager/2023_11_18_190332_add_device_serial_column_to_asset_people_table.php index 3b2d1f914..f082d21e1 100644 --- a/src/backend/database/migrations/micropowermanager/2023_11_18_190332_add_device_serial_column_to_asset_people_table.php +++ b/src/backend/database/migrations/micropowermanager/2023_11_18_190332_add_device_serial_column_to_asset_people_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2023_11_21_090129_update_derice_serial_column_in_asset_people_table.php b/src/backend/database/migrations/micropowermanager/2023_11_21_090129_update_derice_serial_column_in_asset_people_table.php index 989b8618f..dc9926242 100644 --- a/src/backend/database/migrations/micropowermanager/2023_11_21_090129_update_derice_serial_column_in_asset_people_table.php +++ b/src/backend/database/migrations/micropowermanager/2023_11_21_090129_update_derice_serial_column_in_asset_people_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2024_01_01_create_daly_bms_tables.php b/src/backend/database/migrations/micropowermanager/2024_01_01_create_daly_bms_tables.php index 6bd81d992..af89ef270 100644 --- a/src/backend/database/migrations/micropowermanager/2024_01_01_create_daly_bms_tables.php +++ b/src/backend/database/migrations/micropowermanager/2024_01_01_create_daly_bms_tables.php @@ -4,10 +4,10 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { public function up() { - if (! Schema::hasTable('daly_bms_api_credentials')) { + if (!Schema::hasTable('daly_bms_api_credentials')) { Schema::create('daly_bms_api_credentials', static function (Blueprint $table) { $table->increments('id'); $table->string('api_url')->default('https://dev.iov18.com/api'); @@ -18,7 +18,7 @@ public function up() $table->timestamps(); }); } - if (! Schema::hasTable('daly_bms_transactions')) { + if (!Schema::hasTable('daly_bms_transactions')) { Schema::create('daly_bms_transactions', static function (Blueprint $table) { $table->increments('id'); $table->timestamps(); diff --git a/src/backend/database/migrations/micropowermanager/2024_01_02_124146_create_e_bikes_table.php b/src/backend/database/migrations/micropowermanager/2024_01_02_124146_create_e_bikes_table.php index 6f8820d3e..c600d582c 100644 --- a/src/backend/database/migrations/micropowermanager/2024_01_02_124146_create_e_bikes_table.php +++ b/src/backend/database/migrations/micropowermanager/2024_01_02_124146_create_e_bikes_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2024_01_12_create_angaza_tables.php b/src/backend/database/migrations/micropowermanager/2024_01_12_create_angaza_tables.php index e3428cfe2..78200f4b5 100644 --- a/src/backend/database/migrations/micropowermanager/2024_01_12_create_angaza_tables.php +++ b/src/backend/database/migrations/micropowermanager/2024_01_12_create_angaza_tables.php @@ -4,10 +4,10 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { public function up() { - if (! Schema::connection('shard')->hasTable('angaza_api_credentials')) { + if (!Schema::connection('shard')->hasTable('angaza_api_credentials')) { Schema::connection('shard')->create('angaza_api_credentials', static function (Blueprint $table) { $table->increments('id'); $table->string('api_url')->default('https://payg.angazadesign.com/nexus/v1'); @@ -16,7 +16,7 @@ public function up() $table->timestamps(); }); } - if (! Schema::connection('shard')->hasTable('angaza_transactions')) { + if (!Schema::connection('shard')->hasTable('angaza_transactions')) { Schema::connection('shard')->create('angaza_transactions', static function (Blueprint $table) { $table->increments('id'); $table->timestamps(); diff --git a/src/backend/database/migrations/micropowermanager/2024_02_07_102305_add_usage_type_column_to_main_settings_table.php b/src/backend/database/migrations/micropowermanager/2024_02_07_102305_add_usage_type_column_to_main_settings_table.php index c0e1f01bf..d977f2a13 100644 --- a/src/backend/database/migrations/micropowermanager/2024_02_07_102305_add_usage_type_column_to_main_settings_table.php +++ b/src/backend/database/migrations/micropowermanager/2024_02_07_102305_add_usage_type_column_to_main_settings_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2024_02_07_113710_add_usage_type_column_to_menu_items_table.php b/src/backend/database/migrations/micropowermanager/2024_02_07_113710_add_usage_type_column_to_menu_items_table.php index 23d3993f9..d16cd7fb9 100644 --- a/src/backend/database/migrations/micropowermanager/2024_02_07_113710_add_usage_type_column_to_menu_items_table.php +++ b/src/backend/database/migrations/micropowermanager/2024_02_07_113710_add_usage_type_column_to_menu_items_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2024_09_30_113302_remove_siderbar_tables.php b/src/backend/database/migrations/micropowermanager/2024_09_30_113302_remove_siderbar_tables.php index c02aecded..3d7fe14f9 100644 --- a/src/backend/database/migrations/micropowermanager/2024_09_30_113302_remove_siderbar_tables.php +++ b/src/backend/database/migrations/micropowermanager/2024_09_30_113302_remove_siderbar_tables.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2024_10_23_153042_add_amount_to_agent_charge.php b/src/backend/database/migrations/micropowermanager/2024_10_23_153042_add_amount_to_agent_charge.php index d3b7a9eb6..a0f9ed99e 100644 --- a/src/backend/database/migrations/micropowermanager/2024_10_23_153042_add_amount_to_agent_charge.php +++ b/src/backend/database/migrations/micropowermanager/2024_10_23_153042_add_amount_to_agent_charge.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2024_10_30_154625_create_notifications_table.php b/src/backend/database/migrations/micropowermanager/2024_10_30_154625_create_notifications_table.php index 448655043..3d6cbf7f8 100644 --- a/src/backend/database/migrations/micropowermanager/2024_10_30_154625_create_notifications_table.php +++ b/src/backend/database/migrations/micropowermanager/2024_10_30_154625_create_notifications_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2024_10_31_180458_remove_batteries_table.php b/src/backend/database/migrations/micropowermanager/2024_10_31_180458_remove_batteries_table.php index 81555990f..4da0bd72e 100644 --- a/src/backend/database/migrations/micropowermanager/2024_10_31_180458_remove_batteries_table.php +++ b/src/backend/database/migrations/micropowermanager/2024_10_31_180458_remove_batteries_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2024_10_31_180510_remove_energies_table.php b/src/backend/database/migrations/micropowermanager/2024_10_31_180510_remove_energies_table.php index a1bd1f04f..55994d8e8 100644 --- a/src/backend/database/migrations/micropowermanager/2024_10_31_180510_remove_energies_table.php +++ b/src/backend/database/migrations/micropowermanager/2024_10_31_180510_remove_energies_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2024_10_31_180524_remove_mini_grid_frequencies_table.php b/src/backend/database/migrations/micropowermanager/2024_10_31_180524_remove_mini_grid_frequencies_table.php index a9a158daf..4a350e0eb 100644 --- a/src/backend/database/migrations/micropowermanager/2024_10_31_180524_remove_mini_grid_frequencies_table.php +++ b/src/backend/database/migrations/micropowermanager/2024_10_31_180524_remove_mini_grid_frequencies_table.php @@ -3,7 +3,7 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2024_10_31_180539_remove_pvs_table.php b/src/backend/database/migrations/micropowermanager/2024_10_31_180539_remove_pvs_table.php index 0957f165e..3b6fb8e94 100644 --- a/src/backend/database/migrations/micropowermanager/2024_10_31_180539_remove_pvs_table.php +++ b/src/backend/database/migrations/micropowermanager/2024_10_31_180539_remove_pvs_table.php @@ -5,7 +5,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2024_10_31_180546_remove_solars_table.php b/src/backend/database/migrations/micropowermanager/2024_10_31_180546_remove_solars_table.php index 8c2f0b897..87b6114b5 100644 --- a/src/backend/database/migrations/micropowermanager/2024_10_31_180546_remove_solars_table.php +++ b/src/backend/database/migrations/micropowermanager/2024_10_31_180546_remove_solars_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2024_10_31_180605_remove_weather_data_table.php b/src/backend/database/migrations/micropowermanager/2024_10_31_180605_remove_weather_data_table.php index 8e91b068d..35d582874 100644 --- a/src/backend/database/migrations/micropowermanager/2024_10_31_180605_remove_weather_data_table.php +++ b/src/backend/database/migrations/micropowermanager/2024_10_31_180605_remove_weather_data_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2024_10_31_180852_remove_agent_tickets.php b/src/backend/database/migrations/micropowermanager/2024_10_31_180852_remove_agent_tickets.php index 1aec28c01..d81b62db0 100644 --- a/src/backend/database/migrations/micropowermanager/2024_10_31_180852_remove_agent_tickets.php +++ b/src/backend/database/migrations/micropowermanager/2024_10_31_180852_remove_agent_tickets.php @@ -3,7 +3,7 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2024_10_31_181016_remove_city_clusters.php b/src/backend/database/migrations/micropowermanager/2024_10_31_181016_remove_city_clusters.php index 86d7d95d8..afc95f4a0 100644 --- a/src/backend/database/migrations/micropowermanager/2024_10_31_181016_remove_city_clusters.php +++ b/src/backend/database/migrations/micropowermanager/2024_10_31_181016_remove_city_clusters.php @@ -3,7 +3,7 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/migrations/micropowermanager/2024_11_11_130340_drop_data_stream_column_from_mini_grid.php b/src/backend/database/migrations/micropowermanager/2024_11_11_130340_drop_data_stream_column_from_mini_grid.php index 82d0ae3e9..2f89d59cb 100644 --- a/src/backend/database/migrations/micropowermanager/2024_11_11_130340_drop_data_stream_column_from_mini_grid.php +++ b/src/backend/database/migrations/micropowermanager/2024_11_11_130340_drop_data_stream_column_from_mini_grid.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. * diff --git a/src/backend/database/seeders/SolarHomeSystemSeeder.php b/src/backend/database/seeders/SolarHomeSystemSeeder.php index feb80b5ac..e9505edd5 100644 --- a/src/backend/database/seeders/SolarHomeSystemSeeder.php +++ b/src/backend/database/seeders/SolarHomeSystemSeeder.php @@ -58,7 +58,7 @@ public function run() ->create(); // Create not-yet-sold SHS such that we can "sell" them in the Demo - for ($i = 1; $i <= 10; $i++) { + for ($i = 1; $i <= 10; ++$i) { $solarHomeSystem = SolarHomeSystem::factory() ->for(Asset::all()->random(), 'appliance') ->for(Manufacturer::where('type', 'shs')->get()->random()) diff --git a/src/backend/packages/inensus/angaza-shs/src/Http/Resources/AngazaResource.php b/src/backend/packages/inensus/angaza-shs/src/Http/Resources/AngazaResource.php index eaf3510c3..4cd7c6ade 100644 --- a/src/backend/packages/inensus/angaza-shs/src/Http/Resources/AngazaResource.php +++ b/src/backend/packages/inensus/angaza-shs/src/Http/Resources/AngazaResource.php @@ -10,7 +10,8 @@ class AngazaResource extends JsonResource /** * Transform the resource into an array. * - * @param Request $request + * @param Request $request + * * @return array */ public function toArray($request) diff --git a/src/backend/packages/inensus/angaza-shs/src/Services/ManufacturerService.php b/src/backend/packages/inensus/angaza-shs/src/Services/ManufacturerService.php index 74299d063..5b6179c7c 100644 --- a/src/backend/packages/inensus/angaza-shs/src/Services/ManufacturerService.php +++ b/src/backend/packages/inensus/angaza-shs/src/Services/ManufacturerService.php @@ -13,7 +13,7 @@ public function __construct(private Manufacturer $manufacturer) public function register() { $api = $this->manufacturer->newQuery()->where('api_name', 'AngazaSHSApi')->first(); - if (! $api) { + if (!$api) { $this->manufacturer->newQuery()->create([ 'name' => 'Angaza SHS', 'type' => 'shs', diff --git a/src/backend/packages/inensus/bulk-registration/database/migrations/create_bulk_registration_tables.php b/src/backend/packages/inensus/bulk-registration/database/migrations/create_bulk_registration_tables.php index 8b077f6f2..987381d2d 100644 --- a/src/backend/packages/inensus/bulk-registration/database/migrations/create_bulk_registration_tables.php +++ b/src/backend/packages/inensus/bulk-registration/database/migrations/create_bulk_registration_tables.php @@ -4,10 +4,10 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { public function up() { - if (! Schema::hasTable('bulk_registration_csv_datas')) { + if (!Schema::hasTable('bulk_registration_csv_datas')) { Schema::create('bulk_registration_csv_datas', function (Blueprint $table) { $table->increments('id'); $table->unsignedInteger('user_id'); diff --git a/src/backend/packages/inensus/bulk-registration/src/Console/Commands/UpdatePackage.php b/src/backend/packages/inensus/bulk-registration/src/Console/Commands/UpdatePackage.php index 3cabead09..51a1f0db0 100644 --- a/src/backend/packages/inensus/bulk-registration/src/Console/Commands/UpdatePackage.php +++ b/src/backend/packages/inensus/bulk-registration/src/Console/Commands/UpdatePackage.php @@ -59,7 +59,7 @@ private function deleteMigration(Filesystem $filesystem) $migrationFile = $filesystem->glob(database_path().DIRECTORY_SEPARATOR.'migrations'.DIRECTORY_SEPARATOR.'*_create_bulk-registration_tables.php')[0]; $migration = DB::table('migrations') ->where('migration', substr(explode('/migrations/', $migrationFile)[1], 0, -4))->first(); - if (! $migration) { + if (!$migration) { return false; } diff --git a/src/backend/packages/inensus/bulk-registration/src/Exceptions/Handler.php b/src/backend/packages/inensus/bulk-registration/src/Exceptions/Handler.php index 7cf909713..0e1cf57d0 100644 --- a/src/backend/packages/inensus/bulk-registration/src/Exceptions/Handler.php +++ b/src/backend/packages/inensus/bulk-registration/src/Exceptions/Handler.php @@ -28,7 +28,6 @@ class Handler extends ExceptionHandler /** * Report or log an exception. * - * * @return void * * @throws \Exception @@ -41,7 +40,8 @@ public function report(\Throwable $exception) /** * Render an exception into an HTTP response. * - * @param \Illuminate\Http\Request $request + * @param \Illuminate\Http\Request $request + * * @return \Symfony\Component\HttpFoundation\Response * * @throws \Throwable diff --git a/src/backend/packages/inensus/bulk-registration/src/Helpers/CsvDataProcessor.php b/src/backend/packages/inensus/bulk-registration/src/Helpers/CsvDataProcessor.php index eac212573..cba669c12 100644 --- a/src/backend/packages/inensus/bulk-registration/src/Helpers/CsvDataProcessor.php +++ b/src/backend/packages/inensus/bulk-registration/src/Helpers/CsvDataProcessor.php @@ -111,7 +111,7 @@ private function createRecordFromCsv($row, $serviceName) private function checkRecordWasRecentlyCreated($record, $type) { if ($record->wasRecentlyCreated) { - $this->recentlyCreatedRecords[$type]++; + ++$this->recentlyCreatedRecords[$type]; } } } diff --git a/src/backend/packages/inensus/bulk-registration/src/Services/CityService.php b/src/backend/packages/inensus/bulk-registration/src/Services/CityService.php index f37930099..690d62dea 100644 --- a/src/backend/packages/inensus/bulk-registration/src/Services/CityService.php +++ b/src/backend/packages/inensus/bulk-registration/src/Services/CityService.php @@ -16,12 +16,12 @@ public function resolveCsvDataFromComingRow($csvData) { $cityConfig = config('bulk-registration.csv_fields.city'); - if (! $csvData[$cityConfig['name']]) { + if (!$csvData[$cityConfig['name']]) { throw new VillageNotFoundException('Village Name is required'); } $registeredCity = City::query()->where('name', $csvData[$cityConfig['name']])->first(); - if (! $registeredCity) { + if (!$registeredCity) { $message = 'There is no registered Village for '.$csvData[$cityConfig['name']]. '. Please add the Village first.'; diff --git a/src/backend/packages/inensus/bulk-registration/src/Services/ClusterService.php b/src/backend/packages/inensus/bulk-registration/src/Services/ClusterService.php index deb89dff2..bfde714e2 100644 --- a/src/backend/packages/inensus/bulk-registration/src/Services/ClusterService.php +++ b/src/backend/packages/inensus/bulk-registration/src/Services/ClusterService.php @@ -17,12 +17,12 @@ public function resolveCsvDataFromComingRow($csvData) { $clusterConfig = config('bulk-registration.csv_fields.cluster'); - if (! $csvData[$clusterConfig['name']]) { + if (!$csvData[$clusterConfig['name']]) { throw new ClusterNotFoundException('Cluster Name is required'); } $registeredCluster = Cluster::query()->where('name', $csvData[$clusterConfig['name']])->first(); - if (! $registeredCluster) { + if (!$registeredCluster) { $message = 'There is no cluster registered for '.$csvData[$clusterConfig['name']]. '. Please add the Cluster first.'; diff --git a/src/backend/packages/inensus/bulk-registration/src/Services/ManufacturerService.php b/src/backend/packages/inensus/bulk-registration/src/Services/ManufacturerService.php index 48e557292..697f8e7dd 100644 --- a/src/backend/packages/inensus/bulk-registration/src/Services/ManufacturerService.php +++ b/src/backend/packages/inensus/bulk-registration/src/Services/ManufacturerService.php @@ -26,7 +26,7 @@ public function resolveCsvDataFromComingRow($csvData) { $manufacturerConfig = config('bulk-registration.csv_fields.manufacturer'); - if (! in_array($csvData[$manufacturerConfig['name']], $this->manufacturers)) { + if (!in_array($csvData[$manufacturerConfig['name']], $this->manufacturers)) { $message = 'Manufacturer '.$csvData[$manufacturerConfig['name']]. ' is not supported. Supported manufacturers are '.implode(', ', $this->manufacturers); throw new ManufacturerNotSupportedException($message); diff --git a/src/backend/packages/inensus/bulk-registration/src/Services/MiniGridService.php b/src/backend/packages/inensus/bulk-registration/src/Services/MiniGridService.php index 4120044c2..d6cb31d50 100644 --- a/src/backend/packages/inensus/bulk-registration/src/Services/MiniGridService.php +++ b/src/backend/packages/inensus/bulk-registration/src/Services/MiniGridService.php @@ -16,13 +16,13 @@ public function resolveCsvDataFromComingRow($csvData) { $miniGridConfig = config('bulk-registration.csv_fields.mini_grid'); - if (! $csvData[$miniGridConfig['name']]) { + if (!$csvData[$miniGridConfig['name']]) { throw new MiniGridNotFoundException('Mini Grid Name is required'); } $registeredMiniGrid = MiniGrid::query()->where('name', $csvData[$miniGridConfig['name']])->first(); - if (! $registeredMiniGrid) { + if (!$registeredMiniGrid) { $message = 'There is no registered Mini Grid for '.$csvData[$miniGridConfig['name']]. '. Please add the Mini Grid first.'; throw new MiniGridNotFoundException($message); diff --git a/src/backend/packages/inensus/calin-meter/src/Console/Commands/UpdatePackage.php b/src/backend/packages/inensus/calin-meter/src/Console/Commands/UpdatePackage.php index 093744721..779d89343 100644 --- a/src/backend/packages/inensus/calin-meter/src/Console/Commands/UpdatePackage.php +++ b/src/backend/packages/inensus/calin-meter/src/Console/Commands/UpdatePackage.php @@ -52,7 +52,7 @@ private function deleteMigration(Filesystem $filesystem) $migrationFile = $filesystem->glob(database_path().DIRECTORY_SEPARATOR.'migrations'.DIRECTORY_SEPARATOR.'*_create_calin_tables.php')[0]; $migration = DB::table('migrations') ->where('migration', substr(explode('/migrations/', $migrationFile)[1], 0, -4))->first(); - if (! $migration) { + if (!$migration) { return false; } diff --git a/src/backend/packages/inensus/calin-meter/src/Helpers/ApiHelpers.php b/src/backend/packages/inensus/calin-meter/src/Helpers/ApiHelpers.php index a9e6724ba..5443a5b77 100644 --- a/src/backend/packages/inensus/calin-meter/src/Helpers/ApiHelpers.php +++ b/src/backend/packages/inensus/calin-meter/src/Helpers/ApiHelpers.php @@ -17,7 +17,7 @@ public function __construct(Manufacturer $manufacturerModel) public function registerCalinMeterManufacturer() { $api = $this->manufacturer->newQuery()->where('api_name', 'CalinMeterApi')->first(); - if (! $api) { + if (!$api) { $this->manufacturer->newQuery()->create([ 'name' => 'Calin Meters', 'website' => 'http://www.calinmeter.com/', diff --git a/src/backend/packages/inensus/calin-meter/src/Http/Resources/CalinResource.php b/src/backend/packages/inensus/calin-meter/src/Http/Resources/CalinResource.php index 34ba97dd2..2c5b6dd4b 100644 --- a/src/backend/packages/inensus/calin-meter/src/Http/Resources/CalinResource.php +++ b/src/backend/packages/inensus/calin-meter/src/Http/Resources/CalinResource.php @@ -10,7 +10,8 @@ class CalinResource extends JsonResource /** * Transform the resource into an array. * - * @param Request $request + * @param Request $request + * * @return array */ public function toArray($request) diff --git a/src/backend/packages/inensus/calin-smart-meter/src/CalinSmartMeterApi.php b/src/backend/packages/inensus/calin-smart-meter/src/CalinSmartMeterApi.php index 7f634a6d5..5940fcd7e 100644 --- a/src/backend/packages/inensus/calin-smart-meter/src/CalinSmartMeterApi.php +++ b/src/backend/packages/inensus/calin-smart-meter/src/CalinSmartMeterApi.php @@ -73,7 +73,7 @@ public function chargeDevice($transactionContainer): array } /** - * @param Meter $meter + * @param Meter $meter * * @throws GuzzleException * diff --git a/src/backend/packages/inensus/calin-smart-meter/src/Console/Commands/UpdatePackage.php b/src/backend/packages/inensus/calin-smart-meter/src/Console/Commands/UpdatePackage.php index 622aa7db7..f5426000e 100644 --- a/src/backend/packages/inensus/calin-smart-meter/src/Console/Commands/UpdatePackage.php +++ b/src/backend/packages/inensus/calin-smart-meter/src/Console/Commands/UpdatePackage.php @@ -50,7 +50,7 @@ private function deleteMigration(Filesystem $filesystem) $migrationFile = $filesystem->glob(database_path().DIRECTORY_SEPARATOR.'migrations'.DIRECTORY_SEPARATOR.'*_create_calin_smart_tables.php')[0]; $migration = DB::table('migrations') ->where('migration', substr(explode('/migrations/', $migrationFile)[1], 0, -4))->first(); - if (! $migration) { + if (!$migration) { return false; } diff --git a/src/backend/packages/inensus/calin-smart-meter/src/Helpers/ApiHelpers.php b/src/backend/packages/inensus/calin-smart-meter/src/Helpers/ApiHelpers.php index a02660b2e..550b05bbb 100644 --- a/src/backend/packages/inensus/calin-smart-meter/src/Helpers/ApiHelpers.php +++ b/src/backend/packages/inensus/calin-smart-meter/src/Helpers/ApiHelpers.php @@ -17,7 +17,7 @@ public function __construct(Manufacturer $manufacturerModel) public function registerCalinMeterManufacturer() { $api = $this->manufacturer->newQuery()->where('api_name', 'CalinSmartMeterApi')->first(); - if (! $api) { + if (!$api) { $this->manufacturer->newQuery()->create([ 'name' => 'Calin Smart Meters', 'website' => 'https://ami.calinhost.com/', diff --git a/src/backend/packages/inensus/calin-smart-meter/src/Http/Resources/CalinSmartResource.php b/src/backend/packages/inensus/calin-smart-meter/src/Http/Resources/CalinSmartResource.php index 0045cfc2f..0be320896 100644 --- a/src/backend/packages/inensus/calin-smart-meter/src/Http/Resources/CalinSmartResource.php +++ b/src/backend/packages/inensus/calin-smart-meter/src/Http/Resources/CalinSmartResource.php @@ -10,7 +10,8 @@ class CalinSmartResource extends JsonResource /** * Transform the resource into an array. * - * @param Request $request + * @param Request $request + * * @return array */ public function toArray($request) diff --git a/src/backend/packages/inensus/daly-bms/src/Console/Commands/CheckPayments.php b/src/backend/packages/inensus/daly-bms/src/Console/Commands/CheckPayments.php index 4bcc151b8..da62dc0dc 100644 --- a/src/backend/packages/inensus/daly-bms/src/Console/Commands/CheckPayments.php +++ b/src/backend/packages/inensus/daly-bms/src/Console/Commands/CheckPayments.php @@ -37,7 +37,7 @@ public function __construct( public function handle(): void { - if (! $this->checkForPluginStatusIsActive(self::MPM_PLUGIN_ID)) { + if (!$this->checkForPluginStatusIsActive(self::MPM_PLUGIN_ID)) { return; } diff --git a/src/backend/packages/inensus/daly-bms/src/Console/Commands/SyncBikes.php b/src/backend/packages/inensus/daly-bms/src/Console/Commands/SyncBikes.php index 038262e32..d6d82c812 100644 --- a/src/backend/packages/inensus/daly-bms/src/Console/Commands/SyncBikes.php +++ b/src/backend/packages/inensus/daly-bms/src/Console/Commands/SyncBikes.php @@ -31,7 +31,7 @@ public function __construct( public function handle(): void { - if (! $this->checkForPluginStatusIsActive(self::MPM_PLUGIN_ID)) { + if (!$this->checkForPluginStatusIsActive(self::MPM_PLUGIN_ID)) { return; } diff --git a/src/backend/packages/inensus/daly-bms/src/Http/Resources/DalyBmsResource.php b/src/backend/packages/inensus/daly-bms/src/Http/Resources/DalyBmsResource.php index 3894c0ca6..0e7cc1363 100644 --- a/src/backend/packages/inensus/daly-bms/src/Http/Resources/DalyBmsResource.php +++ b/src/backend/packages/inensus/daly-bms/src/Http/Resources/DalyBmsResource.php @@ -10,7 +10,8 @@ class DalyBmsResource extends JsonResource /** * Transform the resource into an array. * - * @param Request $request + * @param Request $request + * * @return array */ public function toArray($request) diff --git a/src/backend/packages/inensus/daly-bms/src/Modules/Api/ApiRequests.php b/src/backend/packages/inensus/daly-bms/src/Modules/Api/ApiRequests.php index c2c4541f8..6b9b21775 100644 --- a/src/backend/packages/inensus/daly-bms/src/Modules/Api/ApiRequests.php +++ b/src/backend/packages/inensus/daly-bms/src/Modules/Api/ApiRequests.php @@ -64,7 +64,7 @@ public function postWithBodyParams(DalyBmsCredential $credentials, array $params $body = json_decode((string) $response->getBody(), true); $status = $body['status']; - if (($status !== 200 && $status !== 201) || (! is_array($body['response']) && $body['response'] === false)) { + if (($status !== 200 && $status !== 201) || (!is_array($body['response']) && $body['response'] === false)) { throw new DalyBmsApiResponseException($body['msg']); } diff --git a/src/backend/packages/inensus/daly-bms/src/Modules/Api/DalyBmsApi.php b/src/backend/packages/inensus/daly-bms/src/Modules/Api/DalyBmsApi.php index fa2fdc775..e5d2417a6 100644 --- a/src/backend/packages/inensus/daly-bms/src/Modules/Api/DalyBmsApi.php +++ b/src/backend/packages/inensus/daly-bms/src/Modules/Api/DalyBmsApi.php @@ -41,7 +41,7 @@ public function getDevices(array $deviceSerials) $credentials = $this->credentialService->getCredentials(); try { - if (! $this->credentialService->isAccessTokenValid($credentials)) { + if (!$this->credentialService->isAccessTokenValid($credentials)) { $authResponse = $this->apiRequests->authentication($credentials); $this->credentialService->updateCredentials($credentials, $authResponse); } @@ -64,7 +64,7 @@ public function getDevice(string $code) $credentials = $this->credentialService->getCredentials(); try { - if (! $this->credentialService->isAccessTokenValid($credentials)) { + if (!$this->credentialService->isAccessTokenValid($credentials)) { $authResponse = $this->apiRequests->authentication($credentials); $this->credentialService->updateCredentials($credentials, $authResponse); } @@ -92,7 +92,7 @@ public function switchDevice(string $code, bool $isOn) $credentials = $this->credentialService->getCredentials(); try { - if (! $this->credentialService->isAccessTokenValid($credentials)) { + if (!$this->credentialService->isAccessTokenValid($credentials)) { $authResponse = $this->apiRequests->authentication($credentials); $this->credentialService->updateCredentials($credentials, $authResponse); } diff --git a/src/backend/packages/inensus/daly-bms/src/Services/ManufacturerService.php b/src/backend/packages/inensus/daly-bms/src/Services/ManufacturerService.php index 14224fba3..f9902e410 100644 --- a/src/backend/packages/inensus/daly-bms/src/Services/ManufacturerService.php +++ b/src/backend/packages/inensus/daly-bms/src/Services/ManufacturerService.php @@ -13,7 +13,7 @@ public function __construct(private Manufacturer $manufacturer) public function register() { $api = $this->manufacturer->newQuery()->where('api_name', 'DalyBmsApi')->first(); - if (! $api) { + if (!$api) { $this->manufacturer->newQuery()->create([ 'name' => 'DalyBms', 'type' => 'e-bike', diff --git a/src/backend/packages/inensus/gome-long-meter/src/Http/Resources/GomeLongResource.php b/src/backend/packages/inensus/gome-long-meter/src/Http/Resources/GomeLongResource.php index 2aa0c3563..2cae87243 100644 --- a/src/backend/packages/inensus/gome-long-meter/src/Http/Resources/GomeLongResource.php +++ b/src/backend/packages/inensus/gome-long-meter/src/Http/Resources/GomeLongResource.php @@ -10,7 +10,8 @@ class GomeLongResource extends JsonResource /** * Transform the resource into an array. * - * @param Request $request + * @param Request $request + * * @return array */ public function toArray($request) diff --git a/src/backend/packages/inensus/gome-long-meter/src/Observers/MeterTariffObserver.php b/src/backend/packages/inensus/gome-long-meter/src/Observers/MeterTariffObserver.php index edbe17178..7db874da3 100644 --- a/src/backend/packages/inensus/gome-long-meter/src/Observers/MeterTariffObserver.php +++ b/src/backend/packages/inensus/gome-long-meter/src/Observers/MeterTariffObserver.php @@ -21,7 +21,7 @@ public function __construct( public function created(MeterTariff $tariff) { - if (! $this->checkForPluginStatusIsActive(MpmPlugin::GOME_LONG_METERS)) { + if (!$this->checkForPluginStatusIsActive(MpmPlugin::GOME_LONG_METERS)) { return; } $credential = $this->credentialService->getCredentials(); @@ -32,7 +32,7 @@ public function created(MeterTariff $tariff) public function updated(MeterTariff $tariff) { - if (! $this->checkForPluginStatusIsActive(MpmPlugin::GOME_LONG_METERS)) { + if (!$this->checkForPluginStatusIsActive(MpmPlugin::GOME_LONG_METERS)) { return; } $credential = $this->credentialService->getCredentials(); @@ -44,7 +44,7 @@ public function updated(MeterTariff $tariff) public function deleted(MeterTariff $tariff) { - if (! $this->checkForPluginStatusIsActive(MpmPlugin::GOME_LONG_METERS)) { + if (!$this->checkForPluginStatusIsActive(MpmPlugin::GOME_LONG_METERS)) { return; } $credential = $this->credentialService->getCredentials(); diff --git a/src/backend/packages/inensus/gome-long-meter/src/Services/GomeLongTariffService.php b/src/backend/packages/inensus/gome-long-meter/src/Services/GomeLongTariffService.php index 84ba89e35..d9fdc1cff 100644 --- a/src/backend/packages/inensus/gome-long-meter/src/Services/GomeLongTariffService.php +++ b/src/backend/packages/inensus/gome-long-meter/src/Services/GomeLongTariffService.php @@ -38,7 +38,7 @@ public function createGomeLongTariff($tariff) { $gomeLongTariff = $this->getByMpmTariffId($tariff->id); - if (! $gomeLongTariff) { + if (!$gomeLongTariff) { $credentials = $this->credentialService->getCredentials(); $vatEnergy = $this->mainSettings->newQuery()->first()->vat_energy; $params = [ @@ -65,7 +65,7 @@ public function updateGomeLongTariff($tariff) try { $gomeLongTariff = $this->getByMpmTariffId($tariff->id); - if (! $gomeLongTariff) { + if (!$gomeLongTariff) { return true; } @@ -122,7 +122,7 @@ public function sync() try { $credentials = $this->credentialService->getCredentials(); - if (! $credentials || ($credentials->getUserId() === null + if (!$credentials || ($credentials->getUserId() === null || $credentials->getUserPassword() === null)) { return true; } diff --git a/src/backend/packages/inensus/gome-long-meter/src/Services/ManufacturerService.php b/src/backend/packages/inensus/gome-long-meter/src/Services/ManufacturerService.php index 1d21f008e..0ee2502ee 100644 --- a/src/backend/packages/inensus/gome-long-meter/src/Services/ManufacturerService.php +++ b/src/backend/packages/inensus/gome-long-meter/src/Services/ManufacturerService.php @@ -13,7 +13,7 @@ public function __construct(private Manufacturer $manufacturer) public function register() { $api = $this->manufacturer->newQuery()->where('api_name', 'GomeLongMeterApi')->first(); - if (! $api) { + if (!$api) { $this->manufacturer->newQuery()->create([ 'name' => 'GomeLong Meters', 'website' => 'https://www.gomelongmeter.com/', diff --git a/src/backend/packages/inensus/kelin-meter/src/Console/Commands/AccessTokenRefresher.php b/src/backend/packages/inensus/kelin-meter/src/Console/Commands/AccessTokenRefresher.php index 123a453f7..b69d93720 100644 --- a/src/backend/packages/inensus/kelin-meter/src/Console/Commands/AccessTokenRefresher.php +++ b/src/backend/packages/inensus/kelin-meter/src/Console/Commands/AccessTokenRefresher.php @@ -24,7 +24,7 @@ public function __construct(private KelinCredentialService $credentialService) public function handle(): void { - if (! $this->checkForPluginStatusIsActive(self::MPM_PLUGIN_ID)) { + if (!$this->checkForPluginStatusIsActive(self::MPM_PLUGIN_ID)) { return; } diff --git a/src/backend/packages/inensus/kelin-meter/src/Console/Commands/DataSynchronizer.php b/src/backend/packages/inensus/kelin-meter/src/Console/Commands/DataSynchronizer.php index 637944975..792134e89 100644 --- a/src/backend/packages/inensus/kelin-meter/src/Console/Commands/DataSynchronizer.php +++ b/src/backend/packages/inensus/kelin-meter/src/Console/Commands/DataSynchronizer.php @@ -39,7 +39,7 @@ public function __construct( public function handle(): void { - if (! $this->checkForPluginStatusIsActive(self::MPM_PLUGIN_ID)) { + if (!$this->checkForPluginStatusIsActive(self::MPM_PLUGIN_ID)) { return; } @@ -53,18 +53,18 @@ public function handle(): void try { $this->syncSettingService->getSyncSettings()->each(function ($syncSetting) use ($syncActions) { $syncAction = $syncActions->where('sync_setting_id', $syncSetting->id)->first(); - if (! $syncAction) { + if (!$syncAction) { return true; } if ($syncAction->attempts >= $syncSetting->max_attempts) { $nextSync = Carbon::parse($syncAction->next_sync)->addHours(2); $syncAction->next_sync = $nextSync; $cluster = $this->cluster->newQuery()->with('manager')->first(); - if (! $cluster) { + if (!$cluster) { return true; } $adminAddress = $this->address->whereHasMorph('owner', [$cluster->manager])->first(); - if (! $adminAddress) { + if (!$adminAddress) { return true; } $data = [ diff --git a/src/backend/packages/inensus/kelin-meter/src/Console/Commands/ReadDailyMeterConsumptions.php b/src/backend/packages/inensus/kelin-meter/src/Console/Commands/ReadDailyMeterConsumptions.php index 43055cf97..cec9d61b9 100644 --- a/src/backend/packages/inensus/kelin-meter/src/Console/Commands/ReadDailyMeterConsumptions.php +++ b/src/backend/packages/inensus/kelin-meter/src/Console/Commands/ReadDailyMeterConsumptions.php @@ -27,7 +27,7 @@ public function __construct( public function handle(): void { - if (! $this->checkForPluginStatusIsActive(self::MPM_PLUGIN_ID)) { + if (!$this->checkForPluginStatusIsActive(self::MPM_PLUGIN_ID)) { return; } diff --git a/src/backend/packages/inensus/kelin-meter/src/Console/Commands/ReadMinutelyMeterConsumptions.php b/src/backend/packages/inensus/kelin-meter/src/Console/Commands/ReadMinutelyMeterConsumptions.php index 95e0fbba5..5d8d26f14 100644 --- a/src/backend/packages/inensus/kelin-meter/src/Console/Commands/ReadMinutelyMeterConsumptions.php +++ b/src/backend/packages/inensus/kelin-meter/src/Console/Commands/ReadMinutelyMeterConsumptions.php @@ -27,7 +27,7 @@ public function __construct( public function handle(): void { - if (! $this->checkForPluginStatusIsActive(self::MPM_PLUGIN_ID)) { + if (!$this->checkForPluginStatusIsActive(self::MPM_PLUGIN_ID)) { return; } diff --git a/src/backend/packages/inensus/kelin-meter/src/Console/Commands/UpdatePackage.php b/src/backend/packages/inensus/kelin-meter/src/Console/Commands/UpdatePackage.php index 9dc1c908f..e09c67120 100644 --- a/src/backend/packages/inensus/kelin-meter/src/Console/Commands/UpdatePackage.php +++ b/src/backend/packages/inensus/kelin-meter/src/Console/Commands/UpdatePackage.php @@ -56,7 +56,7 @@ private function deleteMigration(Filesystem $filesystem) $migrationFile = $filesystem->glob(database_path().DIRECTORY_SEPARATOR.'migrations'.DIRECTORY_SEPARATOR.'*_create_kelin_tables.php')[0]; $migration = DB::table('migrations') ->where('migration', substr(explode('/migrations/', $migrationFile)[1], 0, -4))->first(); - if (! $migration) { + if (!$migration) { return false; } diff --git a/src/backend/packages/inensus/kelin-meter/src/Helpers/ApiHelpers.php b/src/backend/packages/inensus/kelin-meter/src/Helpers/ApiHelpers.php index 8216dbe75..d4e2f4c6e 100644 --- a/src/backend/packages/inensus/kelin-meter/src/Helpers/ApiHelpers.php +++ b/src/backend/packages/inensus/kelin-meter/src/Helpers/ApiHelpers.php @@ -27,7 +27,7 @@ public function registerMeterManufacturer() public function checkApiResult($result) { - if (! $result) { + if (!$result) { throw new KelinApiEmtyDataException('Null result returned.'); } if ($result['status'] == -1) { diff --git a/src/backend/packages/inensus/kelin-meter/src/Http/Resources/DailyConsumptionCollection.php b/src/backend/packages/inensus/kelin-meter/src/Http/Resources/DailyConsumptionCollection.php index 1366fec14..e3c9b2908 100644 --- a/src/backend/packages/inensus/kelin-meter/src/Http/Resources/DailyConsumptionCollection.php +++ b/src/backend/packages/inensus/kelin-meter/src/Http/Resources/DailyConsumptionCollection.php @@ -9,7 +9,8 @@ class DailyConsumptionCollection extends ResourceCollection /** * Transform the resource collection into an array. * - * @param \Illuminate\Http\Request $request + * @param \Illuminate\Http\Request $request + * * @return array */ public function toArray($request) diff --git a/src/backend/packages/inensus/kelin-meter/src/Http/Resources/KelinCustomerCollection.php b/src/backend/packages/inensus/kelin-meter/src/Http/Resources/KelinCustomerCollection.php index 8b9935933..e5d3baeba 100644 --- a/src/backend/packages/inensus/kelin-meter/src/Http/Resources/KelinCustomerCollection.php +++ b/src/backend/packages/inensus/kelin-meter/src/Http/Resources/KelinCustomerCollection.php @@ -9,7 +9,8 @@ class KelinCustomerCollection extends ResourceCollection /** * Transform the resource collection into an array. * - * @param \Illuminate\Http\Request $request + * @param \Illuminate\Http\Request $request + * * @return array */ public function toArray($request) diff --git a/src/backend/packages/inensus/kelin-meter/src/Http/Resources/KelinMeterCollection.php b/src/backend/packages/inensus/kelin-meter/src/Http/Resources/KelinMeterCollection.php index e6144951f..ad033f477 100644 --- a/src/backend/packages/inensus/kelin-meter/src/Http/Resources/KelinMeterCollection.php +++ b/src/backend/packages/inensus/kelin-meter/src/Http/Resources/KelinMeterCollection.php @@ -9,7 +9,8 @@ class KelinMeterCollection extends ResourceCollection /** * Transform the resource collection into an array. * - * @param \Illuminate\Http\Request $request + * @param \Illuminate\Http\Request $request + * * @return array */ public function toArray($request) diff --git a/src/backend/packages/inensus/kelin-meter/src/Http/Resources/KelinResource.php b/src/backend/packages/inensus/kelin-meter/src/Http/Resources/KelinResource.php index 013bc8a96..5c5b2694f 100644 --- a/src/backend/packages/inensus/kelin-meter/src/Http/Resources/KelinResource.php +++ b/src/backend/packages/inensus/kelin-meter/src/Http/Resources/KelinResource.php @@ -10,7 +10,8 @@ class KelinResource extends JsonResource /** * Transform the resource into an array. * - * @param Request $request + * @param Request $request + * * @return array */ public function toArray($request) diff --git a/src/backend/packages/inensus/kelin-meter/src/Http/Resources/KelinSettingCollection.php b/src/backend/packages/inensus/kelin-meter/src/Http/Resources/KelinSettingCollection.php index e1bf4d578..560514960 100644 --- a/src/backend/packages/inensus/kelin-meter/src/Http/Resources/KelinSettingCollection.php +++ b/src/backend/packages/inensus/kelin-meter/src/Http/Resources/KelinSettingCollection.php @@ -9,7 +9,8 @@ class KelinSettingCollection extends ResourceCollection /** * Transform the resource collection into an array. * - * @param \Illuminate\Http\Request $request + * @param \Illuminate\Http\Request $request + * * @return array */ public function toArray($request) diff --git a/src/backend/packages/inensus/kelin-meter/src/Http/Resources/MinutelyConsumptionCollection.php b/src/backend/packages/inensus/kelin-meter/src/Http/Resources/MinutelyConsumptionCollection.php index 243bd67d4..e5f600943 100644 --- a/src/backend/packages/inensus/kelin-meter/src/Http/Resources/MinutelyConsumptionCollection.php +++ b/src/backend/packages/inensus/kelin-meter/src/Http/Resources/MinutelyConsumptionCollection.php @@ -9,7 +9,8 @@ class MinutelyConsumptionCollection extends ResourceCollection /** * Transform the resource collection into an array. * - * @param \Illuminate\Http\Request $request + * @param \Illuminate\Http\Request $request + * * @return array */ public function toArray($request) diff --git a/src/backend/packages/inensus/kelin-meter/src/Services/DailyConsumptionService.php b/src/backend/packages/inensus/kelin-meter/src/Services/DailyConsumptionService.php index 508839cef..161c47c70 100644 --- a/src/backend/packages/inensus/kelin-meter/src/Services/DailyConsumptionService.php +++ b/src/backend/packages/inensus/kelin-meter/src/Services/DailyConsumptionService.php @@ -67,7 +67,7 @@ public function getDailyDataFromAPI() 'reverted_reactive_total_daily_power' => $data['dlFw'], ]); }); - $pageNo++; + ++$pageNo; } catch (\Exception $exception) { Log::error('Failed on daily data request .', ['message' => $exception->getMessage()]); $result['dataCount'] = 0; diff --git a/src/backend/packages/inensus/kelin-meter/src/Services/KelinCredentialService.php b/src/backend/packages/inensus/kelin-meter/src/Services/KelinCredentialService.php index d977fe722..b9ab61dfc 100644 --- a/src/backend/packages/inensus/kelin-meter/src/Services/KelinCredentialService.php +++ b/src/backend/packages/inensus/kelin-meter/src/Services/KelinCredentialService.php @@ -80,7 +80,7 @@ public function updateCredentials($data) public function refreshAccessToken() { $credential = $this->getCredentials(); - if (! $credential->username && ! $credential->password) { + if (!$credential->username && !$credential->password) { Log::debug('KelinMeter credentials is not registered yet.'); return; diff --git a/src/backend/packages/inensus/kelin-meter/src/Services/KelinMeterService.php b/src/backend/packages/inensus/kelin-meter/src/Services/KelinMeterService.php index 8ee54263b..5dfaa9725 100644 --- a/src/backend/packages/inensus/kelin-meter/src/Services/KelinMeterService.php +++ b/src/backend/packages/inensus/kelin-meter/src/Services/KelinMeterService.php @@ -267,13 +267,13 @@ public function createRelatedMeter($kelinMeter) $p = $points == null ? ',' : $kelinCustomer->address; $geoLocation->points = $p; $connectionType = $this->connectionType->newQuery()->first(); - if (! $connectionType) { + if (!$connectionType) { $connectionType = $this->connectionType->newQuery()->create([ 'name' => 'default', ]); } $connectionGroup = $this->connectionGroup->newQuery()->first(); - if (! $connectionGroup) { + if (!$connectionGroup) { $connectionGroup = $this->connectionGroup->newQuery()->create([ 'name' => 'default', ]); @@ -340,7 +340,7 @@ public function updateRelatedMeter($kelinMeter, $meter) private function findRegisteredMeter($kelinMeter) { $meter = collect($this->earlyRegisteredMeters)->where('meter_serial', $kelinMeter['meterAddr'])->first(); - if (! $meter) { + if (!$meter) { return $meter; } @@ -365,7 +365,7 @@ private function generateMeterSerialNumberInFormat($meterAddress) { $length = strlen($meterAddress); $newSerial = $meterAddress[0]; - for ($i = 0; $i < $length; $i++) { + for ($i = 0; $i < $length; ++$i) { if ($i != 0) { if ($i % 4 == 0) { $newSerial .= '-'.$meterAddress[$i]; diff --git a/src/backend/packages/inensus/kelin-meter/src/Services/KelinSyncActionService.php b/src/backend/packages/inensus/kelin-meter/src/Services/KelinSyncActionService.php index 67330e3ca..2e192df61 100644 --- a/src/backend/packages/inensus/kelin-meter/src/Services/KelinSyncActionService.php +++ b/src/backend/packages/inensus/kelin-meter/src/Services/KelinSyncActionService.php @@ -32,7 +32,7 @@ public function getActionsNeedsToSync() public function updateSyncAction($syncAction, $syncSetting, $syncResult) { - if (! $syncResult) { + if (!$syncResult) { return $syncAction->update([ 'attempts' => $syncAction->attempts + 1, 'last_sync' => Carbon::now(), diff --git a/src/backend/packages/inensus/kelin-meter/src/Services/KelinSyncSettingService.php b/src/backend/packages/inensus/kelin-meter/src/Services/KelinSyncSettingService.php index e6f09f94f..6cd9b4712 100644 --- a/src/backend/packages/inensus/kelin-meter/src/Services/KelinSyncSettingService.php +++ b/src/backend/packages/inensus/kelin-meter/src/Services/KelinSyncSettingService.php @@ -32,7 +32,7 @@ public function createDefaultSettings() $fiveMinInterval = CarbonInterval::make('5minute'); $syncCustomer = $this->syncSetting->newQuery()->where('action_name', 'Customers')->first(); - if (! $syncCustomer) { + if (!$syncCustomer) { $now = Carbon::now(); $customerSetting = $this->setting->newQuery()->make(); $syncCustomer = $this->syncSetting->newQuery()->create([ @@ -50,7 +50,7 @@ public function createDefaultSettings() } $syncMeter = $this->syncSetting->newQuery()->where('action_name', 'Meters')->first(); - if (! $syncMeter) { + if (!$syncMeter) { $now = Carbon::now(); $meterSetting = $this->setting->newQuery()->make(); $syncMeter = $this->syncSetting->newQuery()->create([ diff --git a/src/backend/packages/inensus/kelin-meter/src/Services/MinutelyConsumptionService.php b/src/backend/packages/inensus/kelin-meter/src/Services/MinutelyConsumptionService.php index af27f2b7c..3473bf500 100644 --- a/src/backend/packages/inensus/kelin-meter/src/Services/MinutelyConsumptionService.php +++ b/src/backend/packages/inensus/kelin-meter/src/Services/MinutelyConsumptionService.php @@ -73,7 +73,7 @@ public function getMinutelyDataFromAPI() 'flow_velocity' => $data['sPEED'], ]); }); - $pageNo++; + ++$pageNo; } catch (\Exception $exception) { Log::error('Failed on minutely data request .', ['message' => $exception->getMessage()]); $result['data']['dataCount'] = 0; diff --git a/src/backend/packages/inensus/mesomb-payment-provider/src/Console/Commands/UpdatePackage.php b/src/backend/packages/inensus/mesomb-payment-provider/src/Console/Commands/UpdatePackage.php index df729965a..f9d4463b8 100644 --- a/src/backend/packages/inensus/mesomb-payment-provider/src/Console/Commands/UpdatePackage.php +++ b/src/backend/packages/inensus/mesomb-payment-provider/src/Console/Commands/UpdatePackage.php @@ -49,7 +49,7 @@ private function deleteMigration(Filesystem $filesystem) $migrationFile = $filesystem->glob(database_path().DIRECTORY_SEPARATOR.'migrations'.DIRECTORY_SEPARATOR.'*_create_mesomb_payment_provider_tables.php')[0]; $migration = DB::table('migrations') ->where('migration', substr(explode('/migrations/', $migrationFile)[1], 0, -4))->first(); - if (! $migration) { + if (!$migration) { return; } DB::table('migrations') diff --git a/src/backend/packages/inensus/mesomb-payment-provider/src/Http/Resources/MesombTransactionProcessingResource.php b/src/backend/packages/inensus/mesomb-payment-provider/src/Http/Resources/MesombTransactionProcessingResource.php index 6cb749f26..ad3fa435c 100644 --- a/src/backend/packages/inensus/mesomb-payment-provider/src/Http/Resources/MesombTransactionProcessingResource.php +++ b/src/backend/packages/inensus/mesomb-payment-provider/src/Http/Resources/MesombTransactionProcessingResource.php @@ -9,7 +9,8 @@ class MesombTransactionProcessingResource extends JsonResource /** * Transform the resource into an array. * - * @param \Illuminate\Http\Request $request + * @param \Illuminate\Http\Request $request + * * @return array */ public function toArray($request) diff --git a/src/backend/packages/inensus/mesomb-payment-provider/src/Services/MesomTransactionService.php b/src/backend/packages/inensus/mesomb-payment-provider/src/Services/MesomTransactionService.php index 7f0297529..baa9227ed 100644 --- a/src/backend/packages/inensus/mesomb-payment-provider/src/Services/MesomTransactionService.php +++ b/src/backend/packages/inensus/mesomb-payment-provider/src/Services/MesomTransactionService.php @@ -13,7 +13,7 @@ class MesomTransactionService public function __construct( MesombTransaction $mesombTransaction, - Transaction $transaction + Transaction $transaction, ) { $this->mesombTransaction = $mesombTransaction; $this->transaction = $transaction; diff --git a/src/backend/packages/inensus/micro-star-meter/src/Console/Commands/UpdatePackage.php b/src/backend/packages/inensus/micro-star-meter/src/Console/Commands/UpdatePackage.php index 57b656ec4..0691a891e 100644 --- a/src/backend/packages/inensus/micro-star-meter/src/Console/Commands/UpdatePackage.php +++ b/src/backend/packages/inensus/micro-star-meter/src/Console/Commands/UpdatePackage.php @@ -50,7 +50,7 @@ private function deleteMigration(Filesystem $filesystem) .'*_create_micro_star_tables.php')[0]; $migration = DB::table('migrations') ->where('migration', substr(explode('/migrations/', $migrationFile)[1], 0, -4))->first(); - if (! $migration) { + if (!$migration) { return false; } diff --git a/src/backend/packages/inensus/micro-star-meter/src/Http/Resources/MicroStarResource.php b/src/backend/packages/inensus/micro-star-meter/src/Http/Resources/MicroStarResource.php index c6f7202dc..6450670aa 100644 --- a/src/backend/packages/inensus/micro-star-meter/src/Http/Resources/MicroStarResource.php +++ b/src/backend/packages/inensus/micro-star-meter/src/Http/Resources/MicroStarResource.php @@ -10,7 +10,8 @@ class MicroStarResource extends JsonResource /** * Transform the resource into an array. * - * @param Request $request + * @param Request $request + * * @return array */ public function toArray($request) diff --git a/src/backend/packages/inensus/micro-star-meter/src/Services/ManufacturerService.php b/src/backend/packages/inensus/micro-star-meter/src/Services/ManufacturerService.php index 8bafd9c23..7915b77aa 100644 --- a/src/backend/packages/inensus/micro-star-meter/src/Services/ManufacturerService.php +++ b/src/backend/packages/inensus/micro-star-meter/src/Services/ManufacturerService.php @@ -13,7 +13,7 @@ public function __construct(private Manufacturer $manufacturer) public function register() { $api = $this->manufacturer->newQuery()->where('api_name', 'MicroStarMeterApi')->first(); - if (! $api) { + if (!$api) { $this->manufacturer->newQuery()->create([ 'name' => 'MicroStar Meters', 'website' => 'https://www.microstarelectric.com/', diff --git a/src/backend/packages/inensus/micro-star-meter/src/Services/MicroStarCertificateService.php b/src/backend/packages/inensus/micro-star-meter/src/Services/MicroStarCertificateService.php index e0debd7e0..f25ee9ac5 100644 --- a/src/backend/packages/inensus/micro-star-meter/src/Services/MicroStarCertificateService.php +++ b/src/backend/packages/inensus/micro-star-meter/src/Services/MicroStarCertificateService.php @@ -13,7 +13,7 @@ public function upload($request, $credentials) $file = $request->file('cert'); $companyId = app()->make(UserService::class)->getCompanyId(); - if (! File::isDirectory(storage_path("/app/certs/companies/$companyId"))) { + if (!File::isDirectory(storage_path("/app/certs/companies/$companyId"))) { File::makeDirectory(storage_path("/app/certs/companies/$companyId"), 0777, true, true); } @@ -30,7 +30,7 @@ public function upload($request, $credentials) public function getUploadedCertificate($credentials) { - if (! $credentials->certificate_path || ! $credentials->certificate_file_name) { + if (!$credentials->certificate_path || !$credentials->certificate_file_name) { return ''; } diff --git a/src/backend/packages/inensus/spark-meter/src/Console/Commands/InstallSparkMeterPackage.php b/src/backend/packages/inensus/spark-meter/src/Console/Commands/InstallSparkMeterPackage.php index ce840de01..68a533d67 100644 --- a/src/backend/packages/inensus/spark-meter/src/Console/Commands/InstallSparkMeterPackage.php +++ b/src/backend/packages/inensus/spark-meter/src/Console/Commands/InstallSparkMeterPackage.php @@ -45,12 +45,12 @@ public function handle(): void $this->credentialService->createSmCredentials(); $this->info('Package installed successfully..'); $connections = $this->customerService->checkConnectionAvailability(); - if (! $this->siteService->checkLocationAvailability()) { + if (!$this->siteService->checkLocationAvailability()) { $this->warn('------------------------------'); $this->warn('Spark Meter package needs least one registered Cluster.'); $this->warn('If you have no Cluster, please navigate to #Locations# section and register your locations.'); } - if (! $connections['type'] || ! $connections['group']) { + if (!$connections['type'] || !$connections['group']) { $this->warn('------------------------------'); $this->warn('Spark Meter package needs least one Connection Group and one Connection Type.'); $this->warn('Before you get Customers from Spark Meter please check them in #Connection# section.'); diff --git a/src/backend/packages/inensus/spark-meter/src/Console/Commands/SparkMeterDataSynchronizer.php b/src/backend/packages/inensus/spark-meter/src/Console/Commands/SparkMeterDataSynchronizer.php index a6aeb0015..1bc3bcf7d 100644 --- a/src/backend/packages/inensus/spark-meter/src/Console/Commands/SparkMeterDataSynchronizer.php +++ b/src/backend/packages/inensus/spark-meter/src/Console/Commands/SparkMeterDataSynchronizer.php @@ -46,7 +46,7 @@ public function __construct( public function handle(): void { - if (! $this->checkForPluginStatusIsActive(self::MPM_PLUGIN_ID)) { + if (!$this->checkForPluginStatusIsActive(self::MPM_PLUGIN_ID)) { return; } @@ -60,7 +60,7 @@ public function handle(): void try { $this->smSyncSettingService->getSyncSettings()->each(function ($syncSetting) use ($syncActions) { $syncAction = $syncActions->where('sync_setting_id', $syncSetting->id)->first(); - if (! $syncAction) { + if (!$syncAction) { return true; } if ($syncAction->attempts >= $syncSetting->max_attempts) { @@ -68,7 +68,7 @@ public function handle(): void $syncAction->next_sync = $nextSync; $syncAction->save(); $cluster = $this->cluster->newQuery()->with('manager')->first(); - if (! $cluster) { + if (!$cluster) { return true; } $adminId = $cluster->manager->id; @@ -80,7 +80,7 @@ function ($q) use ($adminId) { } )->first(); - if (! $adminAddress) { + if (!$adminAddress) { return true; } $data = [ diff --git a/src/backend/packages/inensus/spark-meter/src/Console/Commands/SparkMeterSmsNotifier.php b/src/backend/packages/inensus/spark-meter/src/Console/Commands/SparkMeterSmsNotifier.php index 31e4d01dc..2185401bd 100644 --- a/src/backend/packages/inensus/spark-meter/src/Console/Commands/SparkMeterSmsNotifier.php +++ b/src/backend/packages/inensus/spark-meter/src/Console/Commands/SparkMeterSmsNotifier.php @@ -74,11 +74,11 @@ private function sendTransactionNotifySms($transactionMin, $smsNotifiedCustomers return $customer->customer_id == $smTransaction->customer_id; })->first(); - if (! $notifyCustomer) { + if (!$notifyCustomer) { return true; } if ( - ! $notifyCustomer->mpmPerson->addresses + !$notifyCustomer->mpmPerson->addresses || $notifyCustomer->mpmPerson->addresses[0]->phone === null || $notifyCustomer->mpmPerson->addresses[0]->phone === '' ) { @@ -114,7 +114,7 @@ private function sendLowBalanceWarningNotifySms($customers, $smsNotifiedCustomer return true; } if ( - ! $customer->mpmPerson->addresses || $customer->mpmPerson->addresses[0]->phone === null + !$customer->mpmPerson->addresses || $customer->mpmPerson->addresses[0]->phone === null || $customer->mpmPerson->addresses[0]->phone === '' ) { return true; @@ -132,7 +132,7 @@ private function sendLowBalanceWarningNotifySms($customers, $smsNotifiedCustomer public function handle(): void { - if (! $this->checkForPluginStatusIsActive(self::MPM_PLUGIN_ID)) { + if (!$this->checkForPluginStatusIsActive(self::MPM_PLUGIN_ID)) { return; } @@ -145,14 +145,14 @@ public function handle(): void $smsSettings = $this->smsSettingsService->getSmsSettings(); $transactionsSettings = $smsSettings->where('state', 'Transactions')->first(); - if (! $transactionsSettings) { + if (!$transactionsSettings) { throw new CronJobException('Transaction min is not set'); } $transactionMin = $transactionsSettings->not_send_elder_than_mins; $lowBalanceWarningSetting = $smsSettings->where('state', 'Low Balance Warning')->first(); - if (! $lowBalanceWarningSetting) { + if (!$lowBalanceWarningSetting) { throw new CronJobException('Low balance min is not set'); } diff --git a/src/backend/packages/inensus/spark-meter/src/Console/Commands/SparkMeterTransactionStatusCheck.php b/src/backend/packages/inensus/spark-meter/src/Console/Commands/SparkMeterTransactionStatusCheck.php index 0eaf207f0..ff27950db 100644 --- a/src/backend/packages/inensus/spark-meter/src/Console/Commands/SparkMeterTransactionStatusCheck.php +++ b/src/backend/packages/inensus/spark-meter/src/Console/Commands/SparkMeterTransactionStatusCheck.php @@ -25,7 +25,7 @@ public function __construct( public function handle(): void { - if (! $this->checkForPluginStatusIsActive(MpmPlugin::SPARK_METER)) { + if (!$this->checkForPluginStatusIsActive(MpmPlugin::SPARK_METER)) { return; } diff --git a/src/backend/packages/inensus/spark-meter/src/Console/Commands/UpdateSparkMeterPackage.php b/src/backend/packages/inensus/spark-meter/src/Console/Commands/UpdateSparkMeterPackage.php index 9a442728a..654c082b8 100644 --- a/src/backend/packages/inensus/spark-meter/src/Console/Commands/UpdateSparkMeterPackage.php +++ b/src/backend/packages/inensus/spark-meter/src/Console/Commands/UpdateSparkMeterPackage.php @@ -74,7 +74,7 @@ private function deleteMigration(Filesystem $filesystem) $migrationFile = $filesystem->glob(database_path().DIRECTORY_SEPARATOR.'migrations'.DIRECTORY_SEPARATOR.'*_create_spark_tables.php')[0]; $migration = DB::table('migrations') ->where('migration', substr(explode('/migrations/', $migrationFile)[1], 0, -4))->first(); - if (! $migration) { + if (!$migration) { return false; } diff --git a/src/backend/packages/inensus/spark-meter/src/Helpers/InsertSparkMeterApi.php b/src/backend/packages/inensus/spark-meter/src/Helpers/InsertSparkMeterApi.php index a5e6db955..99bd7fd4e 100644 --- a/src/backend/packages/inensus/spark-meter/src/Helpers/InsertSparkMeterApi.php +++ b/src/backend/packages/inensus/spark-meter/src/Helpers/InsertSparkMeterApi.php @@ -17,7 +17,7 @@ public function __construct( public function registerSparkMeterManufacturer() { $api = $this->manufacturer->newQuery()->where('api_name', 'SparkMeterApi')->first(); - if (! $api) { + if (!$api) { $this->manufacturer->newQuery()->create([ 'name' => 'Spark Meters', 'website' => 'https://www.sparkmeter.io/', diff --git a/src/backend/packages/inensus/spark-meter/src/Http/Resources/SparkMeterCredentialResource.php b/src/backend/packages/inensus/spark-meter/src/Http/Resources/SparkMeterCredentialResource.php index acec3b74f..891e090a1 100644 --- a/src/backend/packages/inensus/spark-meter/src/Http/Resources/SparkMeterCredentialResource.php +++ b/src/backend/packages/inensus/spark-meter/src/Http/Resources/SparkMeterCredentialResource.php @@ -16,7 +16,8 @@ public function __construct(SmCredential $smCredential) /** * Transform the resource into an array. * - * @param Request $request + * @param Request $request + * * @return Request */ public function toArray($request) diff --git a/src/backend/packages/inensus/spark-meter/src/Http/Resources/SparkResource.php b/src/backend/packages/inensus/spark-meter/src/Http/Resources/SparkResource.php index 1aeb5b160..d28e1c463 100644 --- a/src/backend/packages/inensus/spark-meter/src/Http/Resources/SparkResource.php +++ b/src/backend/packages/inensus/spark-meter/src/Http/Resources/SparkResource.php @@ -10,7 +10,8 @@ class SparkResource extends JsonResource /** * Transform the resource into an array. * - * @param Request $request + * @param Request $request + * * @return array */ public function toArray($request) diff --git a/src/backend/packages/inensus/spark-meter/src/Listeners/MeterParameterListener.php b/src/backend/packages/inensus/spark-meter/src/Listeners/MeterParameterListener.php index d2e427f0d..600d1ff7a 100644 --- a/src/backend/packages/inensus/spark-meter/src/Listeners/MeterParameterListener.php +++ b/src/backend/packages/inensus/spark-meter/src/Listeners/MeterParameterListener.php @@ -77,7 +77,7 @@ public function onParameterSaved(int $meter_id) $smTariff = $this->smTariff->newQuery()->whereHas('mpmTariff', function ($q) use ($tariffId) { $q->where('mpm_tariff_id', $tariffId); })->first(); - if (! $smTariff) { + if (!$smTariff) { $this->tariffService->createSmTariff($meterInfo->tariff, $smSite->site_id); } if ($meterInfo->owner) { @@ -89,7 +89,7 @@ function ($q) use ($customerId) { $q->where('mpm_customer_id', $customerId); } )->first(); - if (! $smCustomer) { + if (!$smCustomer) { $this->customerService->createCustomer($meterInfo, $smSite->site_id); } } diff --git a/src/backend/packages/inensus/spark-meter/src/Listeners/SmsListener.php b/src/backend/packages/inensus/spark-meter/src/Listeners/SmsListener.php index a6046df5a..7e6b84689 100644 --- a/src/backend/packages/inensus/spark-meter/src/Listeners/SmsListener.php +++ b/src/backend/packages/inensus/spark-meter/src/Listeners/SmsListener.php @@ -36,7 +36,7 @@ public function __construct( public function onSmsStored($sender, $message) { $sparkCustomer = $this->customerService->getSparkCustomerWithPhone($sender); - if (! $sparkCustomer) { + if (!$sparkCustomer) { return; } $smsFeedbackWords = $this->smsFeedbackWordService->getSmsFeedbackWords(); diff --git a/src/backend/packages/inensus/spark-meter/src/Services/CustomerService.php b/src/backend/packages/inensus/spark-meter/src/Services/CustomerService.php index e5e20b6e7..3444d59fe 100644 --- a/src/backend/packages/inensus/spark-meter/src/Services/CustomerService.php +++ b/src/backend/packages/inensus/spark-meter/src/Services/CustomerService.php @@ -121,7 +121,7 @@ public function createCustomer($meterInfo, $siteId) 'hash' => $smCustomerHash, ]); } - if (! $customerExists) { + if (!$customerExists) { $rootUrl = '/system-info'; $result = $this->sparkMeterApiRequests->get($rootUrl, $siteId); $grid = $result['grids'][0]; diff --git a/src/backend/packages/inensus/spark-meter/src/Services/OrganizationService.php b/src/backend/packages/inensus/spark-meter/src/Services/OrganizationService.php index 821a1a415..8cdaa098c 100644 --- a/src/backend/packages/inensus/spark-meter/src/Services/OrganizationService.php +++ b/src/backend/packages/inensus/spark-meter/src/Services/OrganizationService.php @@ -22,7 +22,7 @@ public function getOrganizations() public function createOrganization($organizationData) { $organization = $this->organization->newQuery()->first(); - if (! $organization) { + if (!$organization) { return $this->organization->newQuery()->create([ 'organization_id' => $organizationData['id'], 'code' => $organizationData['code'], diff --git a/src/backend/packages/inensus/spark-meter/src/Services/SmSmsSettingService.php b/src/backend/packages/inensus/spark-meter/src/Services/SmSmsSettingService.php index 2e512e137..7d3f76f90 100644 --- a/src/backend/packages/inensus/spark-meter/src/Services/SmSmsSettingService.php +++ b/src/backend/packages/inensus/spark-meter/src/Services/SmSmsSettingService.php @@ -20,7 +20,7 @@ public function __construct(SmSmsSetting $smsSetting, SmSetting $setting) public function createDefaultSettings() { $smsTransaction = $this->smsSetting->newQuery()->where('state', 'Transactions')->first(); - if (! $smsTransaction) { + if (!$smsTransaction) { $smsSetting = $this->setting->newQuery()->make(); $smsTransaction = $this->smsSetting->newQuery()->create([ 'state' => 'Transactions', @@ -30,7 +30,7 @@ public function createDefaultSettings() $smsSetting->save(); } $smsLowBalanceWarning = $this->smsSetting->newQuery()->where('state', 'Low Balance Warning')->first(); - if (! $smsLowBalanceWarning) { + if (!$smsLowBalanceWarning) { $balanceSetting = $this->setting->newQuery()->make(); $smsLowBalanceWarning = $this->smsSetting->newQuery()->create([ 'state' => 'Low Balance Warning', diff --git a/src/backend/packages/inensus/spark-meter/src/Services/SmSyncActionService.php b/src/backend/packages/inensus/spark-meter/src/Services/SmSyncActionService.php index 37a7a0399..f2de4658a 100644 --- a/src/backend/packages/inensus/spark-meter/src/Services/SmSyncActionService.php +++ b/src/backend/packages/inensus/spark-meter/src/Services/SmSyncActionService.php @@ -32,7 +32,7 @@ public function getActionsNeedsToSync() public function updateSyncAction($syncAction, $syncSetting, $syncResult) { - if (! $syncResult) { + if (!$syncResult) { return $syncAction->update([ 'attempts' => $syncAction->attempts + 1, 'last_sync' => Carbon::now(), diff --git a/src/backend/packages/inensus/spark-meter/src/Services/SmSyncSettingService.php b/src/backend/packages/inensus/spark-meter/src/Services/SmSyncSettingService.php index 42cae03d1..1e68cdb16 100644 --- a/src/backend/packages/inensus/spark-meter/src/Services/SmSyncSettingService.php +++ b/src/backend/packages/inensus/spark-meter/src/Services/SmSyncSettingService.php @@ -30,7 +30,7 @@ public function createDefaultSettings() $syncSite = $this->syncSetting->newQuery()->where('action_name', 'Sites')->first(); - if (! $syncSite) { + if (!$syncSite) { $now = Carbon::now(); $siteSetting = $this->setting->newQuery()->make(); $syncSite = $this->syncSetting->newQuery()->create([ @@ -48,7 +48,7 @@ public function createDefaultSettings() } $syncMeterMotel = $this->syncSetting->newQuery()->where('action_name', 'MeterModels')->first(); - if (! $syncMeterMotel) { + if (!$syncMeterMotel) { $now = Carbon::now(); $meterModelSetting = $this->setting->newQuery()->make(); $syncMeterMotel = $this->syncSetting->newQuery()->create([ @@ -66,7 +66,7 @@ public function createDefaultSettings() } $syncTariff = $this->syncSetting->newQuery()->where('action_name', 'Tariffs')->first(); - if (! $syncTariff) { + if (!$syncTariff) { $now = Carbon::now(); $tariffSetting = $this->setting->newQuery()->make(); $syncTariff = $this->syncSetting->newQuery()->create([ @@ -84,7 +84,7 @@ public function createDefaultSettings() } $syncCustomer = $this->syncSetting->newQuery()->where('action_name', 'Customers')->first(); - if (! $syncCustomer) { + if (!$syncCustomer) { $now = Carbon::now(); $customerSetting = $this->setting->newQuery()->make(); $syncCustomer = $this->syncSetting->newQuery()->create([ @@ -102,7 +102,7 @@ public function createDefaultSettings() } $syncTransaction = $this->syncSetting->newQuery()->where('action_name', 'Transactions')->first(); - if (! $syncTransaction) { + if (!$syncTransaction) { $now = Carbon::now(); $transactionSetting = $this->setting->newQuery()->make(); $syncTransaction = $this->syncSetting->newQuery()->create([ @@ -120,7 +120,7 @@ public function createDefaultSettings() } $syncSalesAccount = $this->syncSetting->newQuery()->where('action_name', 'SalesAccounts')->first(); - if (! $syncSalesAccount) { + if (!$syncSalesAccount) { $now = Carbon::now(); $salesAccountSetting = $this->setting->newQuery()->make(); $syncSalesAccount = $this->syncSetting->newQuery()->create([ diff --git a/src/backend/packages/inensus/spark-meter/src/Services/TariffService.php b/src/backend/packages/inensus/spark-meter/src/Services/TariffService.php index 479851ffe..f13f02f73 100644 --- a/src/backend/packages/inensus/spark-meter/src/Services/TariffService.php +++ b/src/backend/packages/inensus/spark-meter/src/Services/TariffService.php @@ -95,7 +95,7 @@ public function createSmTariff($tariff, $siteId) break; } } - if (! $tariffExists) { + if (!$tariffExists) { $modelTouString = ''; foreach ($tariff->tou as $key => $value) { $modelTouString .= $value->start.$value->end.floatval($value->value); diff --git a/src/backend/packages/inensus/spark-meter/src/Services/TransactionService.php b/src/backend/packages/inensus/spark-meter/src/Services/TransactionService.php index a6524b450..5df1ee641 100644 --- a/src/backend/packages/inensus/spark-meter/src/Services/TransactionService.php +++ b/src/backend/packages/inensus/spark-meter/src/Services/TransactionService.php @@ -174,7 +174,7 @@ public function sync() 'desc' )->first(); $organization = $this->sparkOrganization->newQuery()->first(); - if (! $organization) { + if (!$organization) { Log::info('Organization not found for Koios API'); return; @@ -208,14 +208,14 @@ public function sync() if ($count === 1) { break; } - if (! count($syncCheck)) { + if (!count($syncCheck)) { break; } collect($transactions)->filter(function ($transaction) { return $transaction['type'] === 'transaction'; })->each(function ($transaction) use ($syncCheck, $sparkCustomers, $sparkTariffs) { $siteTransaction = $syncCheck->firstWhere('site_id', $transaction['site']); - if (! $siteTransaction) { + if (!$siteTransaction) { return true; } switch ($transaction['state']) { @@ -237,12 +237,12 @@ public function sync() $transaction['transaction_id'] )->first(); - if (! $transactionRecord) { - if (! array_key_exists('customer', $transaction['to'])) { + if (!$transactionRecord) { + if (!array_key_exists('customer', $transaction['to'])) { return true; } $sparkTransaction = $this->createSparkTransaction($transaction); - if (! $transaction['reference_id']) { + if (!$transaction['reference_id']) { $thirdPartyTransaction = $this->createThirdPartyTransaction( $transaction, $sparkTransaction, @@ -254,7 +254,7 @@ public function sync() $sparkTransaction->customer_id ); - if (! $sparkCustomer) { + if (!$sparkCustomer) { return true; } $meterParameter = $sparkCustomer->mpmPerson->meters[0]; @@ -316,7 +316,7 @@ public function syncCheck() $credentials = $this->sparkCredentialService->getCredentials(); $sparkSites = $this->sparkSite->newQuery()->where('is_authenticated', 1)->where('is_online', 1)->get(); - if (! $credentials) { + if (!$credentials) { $message = 'No Credentials record found.'; throw new CredentialsNotFoundException($message); } @@ -326,12 +326,12 @@ public function syncCheck() } $siteSynchronized = $this->sparkSiteService->syncCheck(); - if (! $siteSynchronized['result']) { + if (!$siteSynchronized['result']) { $message = 'Site records are not up to date.'; throw new SitesNotUpToDateException($message); } - if (! $sparkSites->count()) { + if (!$sparkSites->count()) { $message = 'No online Site record found.'; throw new NoOnlineSiteRecordException($message); } diff --git a/src/backend/packages/inensus/spark-meter/src/Sms/BodyParsers/SparkSmsMeterResetFeedbackHeader.php b/src/backend/packages/inensus/spark-meter/src/Sms/BodyParsers/SparkSmsMeterResetFeedbackHeader.php index 8724b2c94..d683c5b7c 100644 --- a/src/backend/packages/inensus/spark-meter/src/Sms/BodyParsers/SparkSmsMeterResetFeedbackHeader.php +++ b/src/backend/packages/inensus/spark-meter/src/Sms/BodyParsers/SparkSmsMeterResetFeedbackHeader.php @@ -18,7 +18,7 @@ public function __construct($data) protected function getVariableValue($variable) { - if (! is_array($this->data)) { + if (!is_array($this->data)) { $person = $this->data->meterParameter->whereHasMorph('owner', [Person::class])->first()->owner()->first(); } else { try { diff --git a/src/backend/packages/inensus/spark-meter/src/Sms/Senders/MeterResetFeedback.php b/src/backend/packages/inensus/spark-meter/src/Sms/Senders/MeterResetFeedback.php index aecf2bad5..1fc1c8e03 100644 --- a/src/backend/packages/inensus/spark-meter/src/Sms/Senders/MeterResetFeedback.php +++ b/src/backend/packages/inensus/spark-meter/src/Sms/Senders/MeterResetFeedback.php @@ -23,7 +23,7 @@ class MeterResetFeedback extends SmsSender public function prepareBody() { - if (! is_array($this->data)) { + if (!is_array($this->data)) { try { $smsBody = $this->smsBodyService->getSmsBodyByReference('SparkSmsMeterResetFeedbackBody'); } catch (ModelNotFoundException $exception) { diff --git a/src/backend/packages/inensus/spark-meter/src/Tests/Unit/SmsNotifyTest.php b/src/backend/packages/inensus/spark-meter/src/Tests/Unit/SmsNotifyTest.php index 518286fe2..81eb04602 100644 --- a/src/backend/packages/inensus/spark-meter/src/Tests/Unit/SmsNotifyTest.php +++ b/src/backend/packages/inensus/spark-meter/src/Tests/Unit/SmsNotifyTest.php @@ -72,7 +72,7 @@ public function isLowBalanceNotifySend() return true; } if ( - ! $customer->mpmPerson->addresses || $customer->mpmPerson->addresses[0]->phone === null + !$customer->mpmPerson->addresses || $customer->mpmPerson->addresses[0]->phone === null || $customer->mpmPerson->addresses[0]->phone === '' ) { return true; @@ -124,11 +124,11 @@ public function isTransactionNotifySend() $notifyCustomer = $customers->filter(function ($customer) use ($sparkTransaction) { return $customer->customer_id == $sparkTransaction->customer_id; })->first(); - if (! $notifyCustomer) { + if (!$notifyCustomer) { return true; } if ( - ! $notifyCustomer->mpmPerson->addresses || $notifyCustomer->mpmPerson->addresses[0]->phone === null + !$notifyCustomer->mpmPerson->addresses || $notifyCustomer->mpmPerson->addresses[0]->phone === null || $notifyCustomer->mpmPerson->addresses[0]->phone === '' ) { return true; @@ -160,7 +160,7 @@ public function isMaxAttemptNotifySend() SmSyncSetting::query()->get()->each(function ($syncSetting) use ($syncActions) { $syncAction = $syncActions->where('sync_setting_id', $syncSetting->id)->first(); - if (! $syncAction) { + if (!$syncAction) { return true; } if ($syncAction->attempts >= $syncSetting->max_attempts) { @@ -170,7 +170,7 @@ public function isMaxAttemptNotifySend() 'owner', [User::class] )->first(); - if (! $adminAddress) { + if (!$adminAddress) { return true; } $data = [ diff --git a/src/backend/packages/inensus/steama-meter/src/Console/Commands/InstallPackage.php b/src/backend/packages/inensus/steama-meter/src/Console/Commands/InstallPackage.php index 707cd7ced..3d993784f 100644 --- a/src/backend/packages/inensus/steama-meter/src/Console/Commands/InstallPackage.php +++ b/src/backend/packages/inensus/steama-meter/src/Console/Commands/InstallPackage.php @@ -59,7 +59,7 @@ public function handle(): void // $this->call('routes:generate'); // $this->call('sidebar:generate'); // $this->info('Package installed successfully..'); - if (! $this->siteService->checkLocationAvailability()) { + if (!$this->siteService->checkLocationAvailability()) { $this->warn('------------------------------'); $this->warn('Steamaco Meter package needs least one registered Cluster.'); $this->warn('If you have no Cluster, please navigate to #Locations# section and register your locations.'); diff --git a/src/backend/packages/inensus/steama-meter/src/Console/Commands/ReadHourlyMeterReadings.php b/src/backend/packages/inensus/steama-meter/src/Console/Commands/ReadHourlyMeterReadings.php index 3a644d039..4d4d6a366 100644 --- a/src/backend/packages/inensus/steama-meter/src/Console/Commands/ReadHourlyMeterReadings.php +++ b/src/backend/packages/inensus/steama-meter/src/Console/Commands/ReadHourlyMeterReadings.php @@ -24,7 +24,7 @@ public function __construct(private SteamaMeterReadingService $steamaMeterReadin public function handle(): void { - if (! $this->checkForPluginStatusIsActive(self::MPM_PLUGIN_ID)) { + if (!$this->checkForPluginStatusIsActive(self::MPM_PLUGIN_ID)) { return; } diff --git a/src/backend/packages/inensus/steama-meter/src/Console/Commands/SteamaMeterDataSynchronizer.php b/src/backend/packages/inensus/steama-meter/src/Console/Commands/SteamaMeterDataSynchronizer.php index a7977a769..fd1eace4e 100644 --- a/src/backend/packages/inensus/steama-meter/src/Console/Commands/SteamaMeterDataSynchronizer.php +++ b/src/backend/packages/inensus/steama-meter/src/Console/Commands/SteamaMeterDataSynchronizer.php @@ -73,7 +73,7 @@ public function __construct( public function handle(): void { - if (! $this->checkForPluginStatusIsActive(self::MPM_PLUGIN_ID)) { + if (!$this->checkForPluginStatusIsActive(self::MPM_PLUGIN_ID)) { return; } @@ -87,7 +87,7 @@ public function handle(): void try { $this->steamaSyncSettingservice->getSyncSettings()->each(function ($syncSetting) use ($syncActions) { $syncAction = $syncActions->where('sync_setting_id', $syncSetting->id)->first(); - if (! $syncAction) { + if (!$syncAction) { return true; } if ($syncAction->attempts >= $syncSetting->max_attempts) { @@ -95,7 +95,7 @@ public function handle(): void $syncAction->next_sync = $nextSync; $syncAction->save(); $cluster = $this->cluster->newQuery()->with('manager')->first(); - if (! $cluster) { + if (!$cluster) { return true; } $adminId = $cluster->manager->id; @@ -106,7 +106,7 @@ function ($q) use ($adminId) { $q->where('id', $adminId); } )->first(); - if (! $adminAddress) { + if (!$adminAddress) { return true; } $data = [ diff --git a/src/backend/packages/inensus/steama-meter/src/Console/Commands/SteamaSmsNotifier.php b/src/backend/packages/inensus/steama-meter/src/Console/Commands/SteamaSmsNotifier.php index 8a32c85a3..e615ddf9d 100644 --- a/src/backend/packages/inensus/steama-meter/src/Console/Commands/SteamaSmsNotifier.php +++ b/src/backend/packages/inensus/steama-meter/src/Console/Commands/SteamaSmsNotifier.php @@ -71,12 +71,12 @@ private function sendTransactionNotifySms($transactionMin, $smsNotifiedCustomers return $customer->customer_id == $steamaTransaction->customer_id; })->first(); - if (! $notifyCustomer) { + if (!$notifyCustomer) { return true; } if ( - ! $notifyCustomer->mpmPerson->addresses + !$notifyCustomer->mpmPerson->addresses || $notifyCustomer->mpmPerson->addresses[0]->phone === null || $notifyCustomer->mpmPerson->addresses[0]->phone === '' ) { @@ -113,7 +113,7 @@ private function sendLowBalanceWarningNotifySms($customers, $smsNotifiedCustomer return true; } if ( - ! $customer->mpmPerson->addresses || $customer->mpmPerson->addresses[0]->phone === null + !$customer->mpmPerson->addresses || $customer->mpmPerson->addresses[0]->phone === null || $customer->mpmPerson->addresses[0]->phone === '' ) { return true; @@ -132,7 +132,7 @@ private function sendLowBalanceWarningNotifySms($customers, $smsNotifiedCustomer public function handle(): void { - if (! $this->checkForPluginStatusIsActive(self::MPM_PLUGIN_ID)) { + if (!$this->checkForPluginStatusIsActive(self::MPM_PLUGIN_ID)) { return; } diff --git a/src/backend/packages/inensus/steama-meter/src/Console/Commands/UpdatePackage.php b/src/backend/packages/inensus/steama-meter/src/Console/Commands/UpdatePackage.php index d06626907..f9fa8a7d5 100644 --- a/src/backend/packages/inensus/steama-meter/src/Console/Commands/UpdatePackage.php +++ b/src/backend/packages/inensus/steama-meter/src/Console/Commands/UpdatePackage.php @@ -76,7 +76,7 @@ private function deleteMigration(Filesystem $filesystem) $migrationFile = $filesystem->glob(database_path().DIRECTORY_SEPARATOR.'migrations'.DIRECTORY_SEPARATOR.'*_create_steama_tables.php')[0]; $migration = DB::table('migrations') ->where('migration', substr(explode('/migrations/', $migrationFile)[1], 0, -4))->first(); - if (! $migration) { + if (!$migration) { return false; } diff --git a/src/backend/packages/inensus/steama-meter/src/Helpers/ApiHelpers.php b/src/backend/packages/inensus/steama-meter/src/Helpers/ApiHelpers.php index 442e20fea..82fdd6d3d 100644 --- a/src/backend/packages/inensus/steama-meter/src/Helpers/ApiHelpers.php +++ b/src/backend/packages/inensus/steama-meter/src/Helpers/ApiHelpers.php @@ -17,7 +17,7 @@ public function __construct(Manufacturer $manufacturerModel) public function registerSparkMeterManufacturer() { $api = $this->manufacturer->newQuery()->where('api_name', 'SteamaMeterApi')->first(); - if (! $api) { + if (!$api) { $this->manufacturer->newQuery()->create([ 'name' => 'Steama Meters', 'website' => 'https://steama.co/', diff --git a/src/backend/packages/inensus/steama-meter/src/Http/Resources/SteamaCredentialResource.php b/src/backend/packages/inensus/steama-meter/src/Http/Resources/SteamaCredentialResource.php index 4d8f690c2..ad7259755 100644 --- a/src/backend/packages/inensus/steama-meter/src/Http/Resources/SteamaCredentialResource.php +++ b/src/backend/packages/inensus/steama-meter/src/Http/Resources/SteamaCredentialResource.php @@ -16,7 +16,8 @@ public function __construct(SteamaCredential $steamaCredential) /** * Transform the resource into an array. * - * @param Request $request + * @param Request $request + * * @return Request */ public function toArray($request) diff --git a/src/backend/packages/inensus/steama-meter/src/Http/Resources/SteamaResource.php b/src/backend/packages/inensus/steama-meter/src/Http/Resources/SteamaResource.php index 523c789e7..84df4c453 100644 --- a/src/backend/packages/inensus/steama-meter/src/Http/Resources/SteamaResource.php +++ b/src/backend/packages/inensus/steama-meter/src/Http/Resources/SteamaResource.php @@ -10,7 +10,8 @@ class SteamaResource extends JsonResource /** * Transform the resource into an array. * - * @param Request $request + * @param Request $request + * * @return array */ public function toArray($request) diff --git a/src/backend/packages/inensus/steama-meter/src/Listeners/MeterParameterListener.php b/src/backend/packages/inensus/steama-meter/src/Listeners/MeterParameterListener.php index 60aad5c29..f97c93754 100644 --- a/src/backend/packages/inensus/steama-meter/src/Listeners/MeterParameterListener.php +++ b/src/backend/packages/inensus/steama-meter/src/Listeners/MeterParameterListener.php @@ -62,7 +62,7 @@ public function onParameterSaved(int $meterId) $steamaTariff = $this->stmTariff->newQuery()->whereHas('mpmTariff', function ($q) use ($tariffId) { $q->where('mpm_tariff_id', $tariffId); })->first(); - if (! $steamaTariff) { + if (!$steamaTariff) { $steamaTariff = $this->stmTariff->newQuery()->with('mpmTariff')->first(); $meterInfo->tariff_id = $steamaTariff->mpmTariff->id; $meterInfo->update(); @@ -74,13 +74,13 @@ public function onParameterSaved(int $meterId) ->whereHas('mpmPerson', function ($q) use ($customerId) { $q->where('id', $customerId); })->first(); - if (! $steamaCustomer) { + if (!$steamaCustomer) { $steamaCustomer = $this->stmCustomerService->createSteamaCustomer($meterInfo); } $steamaMeter = $this->stmMeter->newQuery()->whereHas('mpmMeter', function ($q) use ($meterId) { $q->where('id', $meterId); })->first(); - if (! $steamaMeter) { + if (!$steamaMeter) { $this->stmMeterService->creteSteamaMeter($meterInfo, $steamaCustomer); } $steamaMeter->customer_id = $steamaCustomer->customer_id; diff --git a/src/backend/packages/inensus/steama-meter/src/Listeners/SmsListener.php b/src/backend/packages/inensus/steama-meter/src/Listeners/SmsListener.php index bedc8286c..06b72534e 100644 --- a/src/backend/packages/inensus/steama-meter/src/Listeners/SmsListener.php +++ b/src/backend/packages/inensus/steama-meter/src/Listeners/SmsListener.php @@ -35,7 +35,7 @@ public function __construct( public function onSmsStored($sender, $message) { $steamaCustomer = $this->customerService->getSteamaCustomerWithPhone($sender); - if (! $steamaCustomer) { + if (!$steamaCustomer) { return; } $smsFeedbackWords = $this->smsFeedbackWordService->getSmsFeedbackWords(); diff --git a/src/backend/packages/inensus/steama-meter/src/Services/SteamaAgentService.php b/src/backend/packages/inensus/steama-meter/src/Services/SteamaAgentService.php index 7794c8b80..6d3d4db44 100644 --- a/src/backend/packages/inensus/steama-meter/src/Services/SteamaAgentService.php +++ b/src/backend/packages/inensus/steama-meter/src/Services/SteamaAgentService.php @@ -86,7 +86,7 @@ public function getAgentsCount() public function createSteamaAgentCommission() { $agentCommission = $this->agentCommission->newQuery()->where('name', 'Steama Agent Comission')->first(); - if (! $agentCommission) { + if (!$agentCommission) { $agentCommission = $this->agentCommission->newQuery()->create([ 'name' => 'Steama Agent Comission', 'energy_commission' => 0, diff --git a/src/backend/packages/inensus/steama-meter/src/Services/SteamaMeterService.php b/src/backend/packages/inensus/steama-meter/src/Services/SteamaMeterService.php index 9aef3289e..13e2d1e2c 100644 --- a/src/backend/packages/inensus/steama-meter/src/Services/SteamaMeterService.php +++ b/src/backend/packages/inensus/steama-meter/src/Services/SteamaMeterService.php @@ -197,7 +197,7 @@ public function createRelatedMeter($stmMeter) $connectionType = $stmCustomer->userType->mpmConnectionType; $connectionGroup = $this->connectionGroup->newQuery()->first(); - if (! $connectionGroup) { + if (!$connectionGroup) { $connectionGroup = $this->connectionGroup->newQuery()->create([ 'name' => 'default', ]); diff --git a/src/backend/packages/inensus/steama-meter/src/Services/SteamaSiteLevelPaymentPlanTypeService.php b/src/backend/packages/inensus/steama-meter/src/Services/SteamaSiteLevelPaymentPlanTypeService.php index 8458dcd00..b93ee0489 100644 --- a/src/backend/packages/inensus/steama-meter/src/Services/SteamaSiteLevelPaymentPlanTypeService.php +++ b/src/backend/packages/inensus/steama-meter/src/Services/SteamaSiteLevelPaymentPlanTypeService.php @@ -26,7 +26,7 @@ public function createPaymentPlans() ]; foreach ($paymentPlans as $value) { $paymentPlanType = $this->paymentPlanType->newQuery()->where('name', $value)->first(); - if (! $paymentPlanType) { + if (!$paymentPlanType) { $this->paymentPlanType->newQuery()->create([ 'name' => $value, ]); diff --git a/src/backend/packages/inensus/steama-meter/src/Services/SteamaSmsSettingService.php b/src/backend/packages/inensus/steama-meter/src/Services/SteamaSmsSettingService.php index 9a863585c..4ea598e94 100644 --- a/src/backend/packages/inensus/steama-meter/src/Services/SteamaSmsSettingService.php +++ b/src/backend/packages/inensus/steama-meter/src/Services/SteamaSmsSettingService.php @@ -20,7 +20,7 @@ public function __construct(SteamaSmsSetting $smsSetting, SteamaSetting $setting public function createDefaultSettings() { $smsTransaction = $this->smsSetting->newQuery()->where('state', 'Transactions')->first(); - if (! $smsTransaction) { + if (!$smsTransaction) { $smsSetting = $this->setting->newQuery()->make(); $smsTransaction = $this->smsSetting->newQuery()->create([ 'state' => 'Transactions', @@ -30,7 +30,7 @@ public function createDefaultSettings() $smsSetting->save(); } $smsLowBalanceWarning = $this->smsSetting->newQuery()->where('state', 'Low Balance Warning')->first(); - if (! $smsLowBalanceWarning) { + if (!$smsLowBalanceWarning) { $balanceSetting = $this->setting->newQuery()->make(); $smsLowBalanceWarning = $this->smsSetting->newQuery()->create([ 'state' => 'Low Balance Warning', diff --git a/src/backend/packages/inensus/steama-meter/src/Services/SteamaSyncSettingService.php b/src/backend/packages/inensus/steama-meter/src/Services/SteamaSyncSettingService.php index 0c056270a..ee626ffc6 100644 --- a/src/backend/packages/inensus/steama-meter/src/Services/SteamaSyncSettingService.php +++ b/src/backend/packages/inensus/steama-meter/src/Services/SteamaSyncSettingService.php @@ -33,7 +33,7 @@ public function createDefaultSettings() $syncSite = $this->syncSetting->newQuery()->where('action_name', 'Sites')->first(); - if (! $syncSite) { + if (!$syncSite) { $now = Carbon::now(); $siteSetting = $this->setting->newQuery()->make(); $syncSite = $this->syncSetting->newQuery()->create([ @@ -51,7 +51,7 @@ public function createDefaultSettings() } $syncCustomer = $this->syncSetting->newQuery()->where('action_name', 'Customers')->first(); - if (! $syncCustomer) { + if (!$syncCustomer) { $now = Carbon::now(); $customerSetting = $this->setting->newQuery()->make(); $syncCustomer = $this->syncSetting->newQuery()->create([ @@ -69,7 +69,7 @@ public function createDefaultSettings() } $syncMeter = $this->syncSetting->newQuery()->where('action_name', 'Meters')->first(); - if (! $syncMeter) { + if (!$syncMeter) { $now = Carbon::now(); $meterSetting = $this->setting->newQuery()->make(); $syncMeter = $this->syncSetting->newQuery()->create([ @@ -87,7 +87,7 @@ public function createDefaultSettings() } $syncAgent = $this->syncSetting->newQuery()->where('action_name', 'Agents')->first(); - if (! $syncAgent) { + if (!$syncAgent) { $now = Carbon::now(); $agentSetting = $this->setting->newQuery()->make(); $syncAgent = $this->syncSetting->newQuery()->create([ @@ -105,7 +105,7 @@ public function createDefaultSettings() } $syncTransaction = $this->syncSetting->newQuery()->where('action_name', 'Transactions')->first(); - if (! $syncTransaction) { + if (!$syncTransaction) { $now = Carbon::now(); $transactionSetting = $this->setting->newQuery()->make(); $syncTransaction = $this->syncSetting->newQuery()->create([ diff --git a/src/backend/packages/inensus/steama-meter/src/Services/SteamaTariffService.php b/src/backend/packages/inensus/steama-meter/src/Services/SteamaTariffService.php index fb2781dea..e0341571f 100644 --- a/src/backend/packages/inensus/steama-meter/src/Services/SteamaTariffService.php +++ b/src/backend/packages/inensus/steama-meter/src/Services/SteamaTariffService.php @@ -17,7 +17,7 @@ public function __construct(private readonly SteamaTariff $tariff, private reado public function createTariff() { $meterTariff = $this->meterTariff->newQuery()->where('name', 'Steama External Tariff')->first(); - if (! $meterTariff) { + if (!$meterTariff) { $meterTariff = $this->meterTariff->newQuery()->create([ 'name' => 'Steama External Tariff', 'price' => 0, diff --git a/src/backend/packages/inensus/steama-meter/src/Services/SteamaUserTypeService.php b/src/backend/packages/inensus/steama-meter/src/Services/SteamaUserTypeService.php index 5d1fad63f..342b52736 100644 --- a/src/backend/packages/inensus/steama-meter/src/Services/SteamaUserTypeService.php +++ b/src/backend/packages/inensus/steama-meter/src/Services/SteamaUserTypeService.php @@ -38,14 +38,14 @@ public function createUserTypes($tariff) foreach ($connectionTypes as $key => $value) { $connectionType = $this->connectionType->newQuery()->where('name', $value)->first(); - if (! $connectionType) { + if (!$connectionType) { $connectionType = $this->connectionType->newQuery()->create([ 'name' => $value, ]); } $userType = $this->userType->newQuery()->where('name', $value)->first(); - if (! $userType) { + if (!$userType) { $this->userType->newQuery()->create([ 'mpm_connection_type_id' => $connectionType->id, 'name' => $value, @@ -54,7 +54,7 @@ public function createUserTypes($tariff) } $subConnectionType = $this->subConnectionType->newQuery()->where('name', $value)->first(); - if (! $subConnectionType) { + if (!$subConnectionType) { $this->subConnectionType->newQuery()->create([ 'name' => $value, 'connection_type_id' => $connectionType->id, diff --git a/src/backend/packages/inensus/steama-meter/src/Services/StemaSyncActionService.php b/src/backend/packages/inensus/steama-meter/src/Services/StemaSyncActionService.php index f409f80fa..f298b6146 100644 --- a/src/backend/packages/inensus/steama-meter/src/Services/StemaSyncActionService.php +++ b/src/backend/packages/inensus/steama-meter/src/Services/StemaSyncActionService.php @@ -32,7 +32,7 @@ public function getActionsNeedsToSync() public function updateSyncAction($syncAction, $syncSetting, $syncResult) { - if (! $syncResult) { + if (!$syncResult) { return $syncAction->update([ 'attempts' => $syncAction->attempts + 1, 'last_sync' => Carbon::now(), diff --git a/src/backend/packages/inensus/steama-meter/src/Tests/Unit/SmsNotifyTest.php b/src/backend/packages/inensus/steama-meter/src/Tests/Unit/SmsNotifyTest.php index 63dc36fc8..04413f28d 100644 --- a/src/backend/packages/inensus/steama-meter/src/Tests/Unit/SmsNotifyTest.php +++ b/src/backend/packages/inensus/steama-meter/src/Tests/Unit/SmsNotifyTest.php @@ -73,7 +73,7 @@ public function isLowBalanceNotifySend() return true; } if ( - ! $customer->mpmPerson->addresses || $customer->mpmPerson->addresses[0]->phone === null + !$customer->mpmPerson->addresses || $customer->mpmPerson->addresses[0]->phone === null || $customer->mpmPerson->addresses[0]->phone === '' ) { return true; @@ -125,11 +125,11 @@ public function isTransactionNotifySend() $notifyCustomer = $customers->filter(function ($customer) use ($steamaTransaction) { return $customer->customer_id == $steamaTransaction->customer_id; })->first(); - if (! $notifyCustomer) { + if (!$notifyCustomer) { return true; } if ( - ! $notifyCustomer->mpmPerson->addresses || $notifyCustomer->mpmPerson->addresses[0]->phone === null + !$notifyCustomer->mpmPerson->addresses || $notifyCustomer->mpmPerson->addresses[0]->phone === null || $notifyCustomer->mpmPerson->addresses[0]->phone === '' ) { return true; @@ -160,7 +160,7 @@ public function isMaxAttemptNotifySend() SteamaSyncSetting::query()->get()->each(function ($syncSetting) use ($syncActions, $newNextSync) { $syncAction = $syncActions->where('sync_setting_id', $syncSetting->id)->first(); - if (! $syncAction) { + if (!$syncAction) { return true; } if ($syncAction->attempts >= $syncSetting->max_attempts) { @@ -171,7 +171,7 @@ public function isMaxAttemptNotifySend() 'owner', [User::class] )->first(); - if (! $adminAddress) { + if (!$adminAddress) { return true; } $data = [ diff --git a/src/backend/packages/inensus/stron-meter/src/Console/Commands/UpdatePackage.php b/src/backend/packages/inensus/stron-meter/src/Console/Commands/UpdatePackage.php index 678cd37fe..ba3b5018c 100644 --- a/src/backend/packages/inensus/stron-meter/src/Console/Commands/UpdatePackage.php +++ b/src/backend/packages/inensus/stron-meter/src/Console/Commands/UpdatePackage.php @@ -50,7 +50,7 @@ private function deleteMigration(Filesystem $filesystem) $migrationFile = $filesystem->glob(database_path().DIRECTORY_SEPARATOR.'migrations'.DIRECTORY_SEPARATOR.'*_create_calin_smart_tables.php')[0]; $migration = DB::table('migrations') ->where('migration', substr(explode('/migrations/', $migrationFile)[1], 0, -4))->first(); - if (! $migration) { + if (!$migration) { return false; } diff --git a/src/backend/packages/inensus/stron-meter/src/Helpers/ApiHelpers.php b/src/backend/packages/inensus/stron-meter/src/Helpers/ApiHelpers.php index 466c78210..8592ca5db 100644 --- a/src/backend/packages/inensus/stron-meter/src/Helpers/ApiHelpers.php +++ b/src/backend/packages/inensus/stron-meter/src/Helpers/ApiHelpers.php @@ -17,7 +17,7 @@ public function __construct(Manufacturer $manufacturerModel) public function registerStronMeterManufacturer() { $api = $this->manufacturer->newQuery()->where('api_name', 'StronMeterApi')->first(); - if (! $api) { + if (!$api) { $this->manufacturer->newQuery()->create([ 'name' => 'Stron Meters', 'website' => 'http://www.stronsmart.com/', diff --git a/src/backend/packages/inensus/stron-meter/src/Http/Resources/StronCredentialResource.php b/src/backend/packages/inensus/stron-meter/src/Http/Resources/StronCredentialResource.php index cbb1a6911..9dcee0599 100644 --- a/src/backend/packages/inensus/stron-meter/src/Http/Resources/StronCredentialResource.php +++ b/src/backend/packages/inensus/stron-meter/src/Http/Resources/StronCredentialResource.php @@ -16,7 +16,8 @@ public function __construct(StronCredential $stronCredential) /** * Transform the resource into an array. * - * @param Request $request + * @param Request $request + * * @return Request */ public function toArray($request) diff --git a/src/backend/packages/inensus/stron-meter/src/Http/Resources/StronResource.php b/src/backend/packages/inensus/stron-meter/src/Http/Resources/StronResource.php index 132b88a68..ccacc4bc8 100644 --- a/src/backend/packages/inensus/stron-meter/src/Http/Resources/StronResource.php +++ b/src/backend/packages/inensus/stron-meter/src/Http/Resources/StronResource.php @@ -10,7 +10,8 @@ class StronResource extends JsonResource /** * Transform the resource into an array. * - * @param Request $request + * @param Request $request + * * @return array */ public function toArray($request) diff --git a/src/backend/packages/inensus/sun-king-shs/src/Http/Resources/SunKingResource.php b/src/backend/packages/inensus/sun-king-shs/src/Http/Resources/SunKingResource.php index a5360b8bf..e7a541476 100644 --- a/src/backend/packages/inensus/sun-king-shs/src/Http/Resources/SunKingResource.php +++ b/src/backend/packages/inensus/sun-king-shs/src/Http/Resources/SunKingResource.php @@ -10,7 +10,8 @@ class SunKingResource extends JsonResource /** * Transform the resource into an array. * - * @param Request $request + * @param Request $request + * * @return array */ public function toArray($request) diff --git a/src/backend/packages/inensus/sun-king-shs/src/Services/ManufacturerService.php b/src/backend/packages/inensus/sun-king-shs/src/Services/ManufacturerService.php index 0568b8944..0948e4470 100644 --- a/src/backend/packages/inensus/sun-king-shs/src/Services/ManufacturerService.php +++ b/src/backend/packages/inensus/sun-king-shs/src/Services/ManufacturerService.php @@ -13,7 +13,7 @@ public function __construct(private Manufacturer $manufacturer) public function register() { $api = $this->manufacturer->newQuery()->where('api_name', 'SunKingSHSApi')->first(); - if (! $api) { + if (!$api) { $this->manufacturer->newQuery()->create([ 'name' => 'SunKing SHS', 'type' => 'shs', diff --git a/src/backend/packages/inensus/swifta-payment-provider/src/Console/Commands/InstallPackage.php b/src/backend/packages/inensus/swifta-payment-provider/src/Console/Commands/InstallPackage.php index 4d10d5c9b..599cae7df 100644 --- a/src/backend/packages/inensus/swifta-payment-provider/src/Console/Commands/InstallPackage.php +++ b/src/backend/packages/inensus/swifta-payment-provider/src/Console/Commands/InstallPackage.php @@ -103,7 +103,7 @@ private function generateRandomNumber(): string { $length = random_int(1, 10); $number = ''; - for ($i = 0; $i < $length; $i++) { + for ($i = 0; $i < $length; ++$i) { $number .= random_int(0, 9); } $number = ltrim($number, '0'); diff --git a/src/backend/packages/inensus/swifta-payment-provider/src/Console/Commands/TransactionStatusChecker.php b/src/backend/packages/inensus/swifta-payment-provider/src/Console/Commands/TransactionStatusChecker.php index 84dab3d47..ea8f82ec2 100644 --- a/src/backend/packages/inensus/swifta-payment-provider/src/Console/Commands/TransactionStatusChecker.php +++ b/src/backend/packages/inensus/swifta-payment-provider/src/Console/Commands/TransactionStatusChecker.php @@ -24,7 +24,7 @@ public function __construct(private SwiftaTransactionService $swiftaTransactionS public function handle(): void { - if (! $this->checkForPluginStatusIsActive(self::MPM_PLUGIN_ID)) { + if (!$this->checkForPluginStatusIsActive(self::MPM_PLUGIN_ID)) { return; } diff --git a/src/backend/packages/inensus/swifta-payment-provider/src/Console/Commands/UpdatePackage.php b/src/backend/packages/inensus/swifta-payment-provider/src/Console/Commands/UpdatePackage.php index e8a1b6b2e..665bb0496 100644 --- a/src/backend/packages/inensus/swifta-payment-provider/src/Console/Commands/UpdatePackage.php +++ b/src/backend/packages/inensus/swifta-payment-provider/src/Console/Commands/UpdatePackage.php @@ -67,7 +67,7 @@ private function deleteMigration(Filesystem $filesystem) $migrationFile = $filesystem->glob(database_path().DIRECTORY_SEPARATOR.'migrations'.DIRECTORY_SEPARATOR.'*_create_swifta_payment_provider_tables.php')[0]; $migration = DB::table('migrations') ->where('migration', substr(explode('/migrations/', $migrationFile)[1], 0, -4))->first(); - if (! $migration) { + if (!$migration) { return; } DB::table('migrations') @@ -116,7 +116,7 @@ private function generateRandomNumber(): string { $length = random_int(1, 10); $number = ''; - for ($i = 0; $i < $length; $i++) { + for ($i = 0; $i < $length; ++$i) { $number .= random_int(0, 9); } $number = ltrim($number, '0'); diff --git a/src/backend/packages/inensus/ticket/src/Http/Controllers/TicketExportController.php b/src/backend/packages/inensus/ticket/src/Http/Controllers/TicketExportController.php index b0ab396bf..3736287c9 100644 --- a/src/backend/packages/inensus/ticket/src/Http/Controllers/TicketExportController.php +++ b/src/backend/packages/inensus/ticket/src/Http/Controllers/TicketExportController.php @@ -29,8 +29,6 @@ public function index(Request $request): TicketResource /** * Generates a book keeping file and stores it. * - * - * * @throws \PhpOffice\PhpSpreadsheet\Exception */ public function outsource(Request $request): TicketResource diff --git a/src/backend/packages/inensus/ticket/src/Http/Controllers/WatcherController.php b/src/backend/packages/inensus/ticket/src/Http/Controllers/WatcherController.php index 7532d8230..47818725c 100644 --- a/src/backend/packages/inensus/ticket/src/Http/Controllers/WatcherController.php +++ b/src/backend/packages/inensus/ticket/src/Http/Controllers/WatcherController.php @@ -48,7 +48,7 @@ public function store(): void $action = $content['action']; $actionType = $action['type']; - if (! $this->filterRequest($actionType)) { // there is no interest for that action + if (!$this->filterRequest($actionType)) { // there is no interest for that action Log::debug('action is not interesting'); return; @@ -60,7 +60,7 @@ public function store(): void /** * Checks if the request type is interesting or not. * - * @param string $type the request type + * @param string $type the request type */ private function filterRequest($type): bool { @@ -71,8 +71,6 @@ private function filterRequest($type): bool * Tries to match the given ticket id with an entry in the database * it should prevent, that any new ticket created directly in Trello. * - * - * * @throws ModelNotFoundException */ private function ticketMatcher(string $ticketId): Ticket diff --git a/src/backend/packages/inensus/ticket/src/Http/Resources/TicketResource.php b/src/backend/packages/inensus/ticket/src/Http/Resources/TicketResource.php index e2d7878be..024d08f73 100644 --- a/src/backend/packages/inensus/ticket/src/Http/Resources/TicketResource.php +++ b/src/backend/packages/inensus/ticket/src/Http/Resources/TicketResource.php @@ -10,7 +10,8 @@ class TicketResource extends JsonResource /** * Transform the resource into an array. * - * @param Request $request + * @param Request $request + * * @return array */ public function toArray($request) diff --git a/src/backend/packages/inensus/ticket/src/Models/TicketOutsourceReport.php b/src/backend/packages/inensus/ticket/src/Models/TicketOutsourceReport.php index bab763f8a..18f04c596 100644 --- a/src/backend/packages/inensus/ticket/src/Models/TicketOutsourceReport.php +++ b/src/backend/packages/inensus/ticket/src/Models/TicketOutsourceReport.php @@ -5,7 +5,7 @@ /** * Class OutsourceReport. * - * @property int $id + * @property int $id * @property string $date * @property string $path */ diff --git a/src/backend/packages/inensus/ticket/src/Models/TicketUser.php b/src/backend/packages/inensus/ticket/src/Models/TicketUser.php index 956e5d649..01e1f4dd1 100644 --- a/src/backend/packages/inensus/ticket/src/Models/TicketUser.php +++ b/src/backend/packages/inensus/ticket/src/Models/TicketUser.php @@ -7,8 +7,8 @@ * * @property string $user_name * @property string $user_tag - * @property int $out_source - * @property int $id + * @property int $out_source + * @property int $id */ class TicketUser extends BaseModel { diff --git a/src/backend/packages/inensus/ticket/src/Providers/TicketServiceProvider.php b/src/backend/packages/inensus/ticket/src/Providers/TicketServiceProvider.php index e357cc666..f2fbd7e73 100644 --- a/src/backend/packages/inensus/ticket/src/Providers/TicketServiceProvider.php +++ b/src/backend/packages/inensus/ticket/src/Providers/TicketServiceProvider.php @@ -32,7 +32,7 @@ public function publishConfigFiles() public function publishMigrations() { - if (! class_exists('CreateTicketingTables')) { + if (!class_exists('CreateTicketingTables')) { $timestamp = date('Y_m_d_His', time()); $this->publishes([ diff --git a/src/backend/packages/inensus/ticket/src/Services/TicketCommentService.php b/src/backend/packages/inensus/ticket/src/Services/TicketCommentService.php index 0326c4ff1..c657b3d02 100644 --- a/src/backend/packages/inensus/ticket/src/Services/TicketCommentService.php +++ b/src/backend/packages/inensus/ticket/src/Services/TicketCommentService.php @@ -10,7 +10,7 @@ class TicketCommentService public function __construct( private Person $person, private TicketComment $ticketComment, - private TicketUserService $ticketUserService + private TicketUserService $ticketUserService, ) { } @@ -46,7 +46,7 @@ static function ($q) use ($sender) { ->where('is_customer', 0) ->first(); - if ($person && ! $person->tickets->isEmpty()) { + if ($person && !$person->tickets->isEmpty()) { $ticketUser = $this->ticketUserService->findByPhone($sender); $this->createComment($person->tickets[0]->ticket_id, 'Sms Comment'.$message, $ticketUser->getId()); } diff --git a/src/backend/packages/inensus/ticket/src/Services/TicketOutsourceReportService.php b/src/backend/packages/inensus/ticket/src/Services/TicketOutsourceReportService.php index 3319c575d..276e0bed0 100644 --- a/src/backend/packages/inensus/ticket/src/Services/TicketOutsourceReportService.php +++ b/src/backend/packages/inensus/ticket/src/Services/TicketOutsourceReportService.php @@ -17,7 +17,7 @@ class TicketOutsourceReportService implements IBaseService { public function __construct( private TicketOutsourceReport $ticketOutsourceReport, - private Spreadsheet $spreadsheet + private Spreadsheet $spreadsheet, ) { } @@ -51,7 +51,7 @@ public function createExcelSheet($startDate, $endDate, $tickets) } $writer = new Xlsx($this->spreadsheet); $dirPath = storage_path('./outsourcing'); - if (! file_exists($dirPath)) { + if (!file_exists($dirPath)) { mkdir($dirPath, 0774, true); } try { diff --git a/src/backend/packages/inensus/viber-messaging/src/Console/Commands/UpdatePackage.php b/src/backend/packages/inensus/viber-messaging/src/Console/Commands/UpdatePackage.php index 62341a540..ae98722be 100644 --- a/src/backend/packages/inensus/viber-messaging/src/Console/Commands/UpdatePackage.php +++ b/src/backend/packages/inensus/viber-messaging/src/Console/Commands/UpdatePackage.php @@ -52,7 +52,7 @@ private function deleteMigration(Filesystem $filesystem) '*_create_viber_tables.php')[0]; $migration = DB::table('migrations') ->where('migration', substr(explode('/migrations/', $migrationFile)[1], 0, -4))->first(); - if (! $migration) { + if (!$migration) { return false; } diff --git a/src/backend/packages/inensus/viber-messaging/src/Http/Controllers/WebhookController.php b/src/backend/packages/inensus/viber-messaging/src/Http/Controllers/WebhookController.php index 3c56ebf24..5b951162e 100644 --- a/src/backend/packages/inensus/viber-messaging/src/Http/Controllers/WebhookController.php +++ b/src/backend/packages/inensus/viber-messaging/src/Http/Controllers/WebhookController.php @@ -61,7 +61,7 @@ public function index(string $slug) $meter = Meter::query()->where('serial_number', $meterSerialNumber)->first(); - if (! $meter) { + if (!$meter) { $this->answerToCustomer($bot, $botSender, $event, $this->setMeterNotFoundMessage()); return; @@ -95,13 +95,13 @@ public function index(string $slug) } }) ->onText("|$resendInformationKey.*|si", function ($event) use ($bot, $botSender, $resendInformationKey) { - if (! $resendInformationKey) { + if (!$resendInformationKey) { return; } $meterSerial = $this->viberContactService->getByViberId($event->getSender() ->getId())->registered_meter_serial_number; - if (! $meterSerial) { + if (!$meterSerial) { $this->answerToCustomer($bot, $botSender, $event, $this->setNotRegisteredMessage()); return; @@ -109,7 +109,7 @@ public function index(string $slug) $transaction = Transaction::with('paymentHistories') ->where('message', $meterSerial)->latest()->first(); - if (! $transaction) { + if (!$transaction) { $this->answerToCustomer($bot, $botSender, $event, $this->setNoTransactionMessage($meterSerial)); return; diff --git a/src/backend/packages/inensus/viber-messaging/src/Http/Resources/ViberResource.php b/src/backend/packages/inensus/viber-messaging/src/Http/Resources/ViberResource.php index c7dd9d8bf..1f204d92d 100644 --- a/src/backend/packages/inensus/viber-messaging/src/Http/Resources/ViberResource.php +++ b/src/backend/packages/inensus/viber-messaging/src/Http/Resources/ViberResource.php @@ -10,7 +10,8 @@ class ViberResource extends JsonResource /** * Transform the resource into an array. * - * @param Request $request + * @param Request $request + * * @return array */ public function toArray($request) diff --git a/src/backend/packages/inensus/viber-messaging/src/Services/ViberCredentialService.php b/src/backend/packages/inensus/viber-messaging/src/Services/ViberCredentialService.php index bd544b9f8..f4995c7fa 100644 --- a/src/backend/packages/inensus/viber-messaging/src/Services/ViberCredentialService.php +++ b/src/backend/packages/inensus/viber-messaging/src/Services/ViberCredentialService.php @@ -44,11 +44,11 @@ public function updateCredentials($data) ]); $credential->save(); - if (! $credential->has_webhook_created) { + if (!$credential->has_webhook_created) { $this->webhookService->createWebHook($credential); } - if (! $credential->deep_link) { + if (!$credential->deep_link) { $uri = $this->accountService->getAccountInfo($credential); $credential->deep_link = "viber://pa?chatURI=$uri&text=register+change_this_with_your_meter_serial_number"; $credential->save(); diff --git a/src/backend/packages/inensus/wave-money-payment-provider/database/migrations/create_wave_money_payment_provider_tables.php b/src/backend/packages/inensus/wave-money-payment-provider/database/migrations/create_wave_money_payment_provider_tables.php index 90104de84..8cc6bc9e2 100644 --- a/src/backend/packages/inensus/wave-money-payment-provider/database/migrations/create_wave_money_payment_provider_tables.php +++ b/src/backend/packages/inensus/wave-money-payment-provider/database/migrations/create_wave_money_payment_provider_tables.php @@ -8,7 +8,7 @@ class CreateWaveMoneyPaymentProviderTables extends Migration { public function up() { - if (! Schema::hasTable('wave_money_transactions')) { + if (!Schema::hasTable('wave_money_transactions')) { Schema::create('wave_money_transactions', static function (Blueprint $table) { $table->increments('id'); $table->integer('status')->default(-2); @@ -23,7 +23,7 @@ public function up() $table->timestamps(); }); } - if (! Schema::hasTable('wave_money_credentials')) { + if (!Schema::hasTable('wave_money_credentials')) { Schema::create('wave_money_credentials', static function (Blueprint $table) { $table->increments('id'); $table->string('merchant_id')->nullable(); diff --git a/src/backend/packages/inensus/wave-money-payment-provider/src/Console/Commands/InstallPackage.php b/src/backend/packages/inensus/wave-money-payment-provider/src/Console/Commands/InstallPackage.php index a64e17127..160b7cf0a 100644 --- a/src/backend/packages/inensus/wave-money-payment-provider/src/Console/Commands/InstallPackage.php +++ b/src/backend/packages/inensus/wave-money-payment-provider/src/Console/Commands/InstallPackage.php @@ -12,7 +12,7 @@ class InstallPackage extends Command protected $description = 'Install WaveMoneyPaymentProvider Package'; public function __construct( - private WaveMoneyCredentialService $credentialService + private WaveMoneyCredentialService $credentialService, ) { parent::__construct(); } diff --git a/src/backend/packages/inensus/wave-money-payment-provider/src/Console/Commands/UpdatePackage.php b/src/backend/packages/inensus/wave-money-payment-provider/src/Console/Commands/UpdatePackage.php index 48c5bca78..1d2fd6199 100644 --- a/src/backend/packages/inensus/wave-money-payment-provider/src/Console/Commands/UpdatePackage.php +++ b/src/backend/packages/inensus/wave-money-payment-provider/src/Console/Commands/UpdatePackage.php @@ -52,7 +52,7 @@ private function deleteMigration(Filesystem $filesystem) '*_create_wave_money_payment_provider_tables.php')[0]; $migration = DB::table('migrations') ->where('migration', substr(explode('/migrations/', $migrationFile)[1], 0, -4))->first(); - if (! $migration) { + if (!$migration) { return false; } diff --git a/src/backend/packages/inensus/wave-money-payment-provider/src/Http/Resources/WaveMoneyResource.php b/src/backend/packages/inensus/wave-money-payment-provider/src/Http/Resources/WaveMoneyResource.php index 3a8849a99..c66114fea 100644 --- a/src/backend/packages/inensus/wave-money-payment-provider/src/Http/Resources/WaveMoneyResource.php +++ b/src/backend/packages/inensus/wave-money-payment-provider/src/Http/Resources/WaveMoneyResource.php @@ -10,7 +10,8 @@ class WaveMoneyResource extends JsonResource /** * Transform the resource into an array. * - * @param Request $request + * @param Request $request + * * @return array */ public function toArray($request) diff --git a/src/backend/packages/inensus/wavecom-payment-provider/src/Models/WaveComTransaction.php b/src/backend/packages/inensus/wavecom-payment-provider/src/Models/WaveComTransaction.php index 3ee90a069..34ecadbe2 100644 --- a/src/backend/packages/inensus/wavecom-payment-provider/src/Models/WaveComTransaction.php +++ b/src/backend/packages/inensus/wavecom-payment-provider/src/Models/WaveComTransaction.php @@ -14,11 +14,11 @@ use MPM\Transaction\FullySupportedTransactionInterface; /** - * @property int $id + * @property int $id * @property string $transaction_id * @property string $sender * @property string $message - * @property int $amount + * @property int $amount */ class WaveComTransaction extends BaseModel implements FullySupportedTransactionInterface, IRawTransaction { diff --git a/src/backend/tests/Feature/CityTest.php b/src/backend/tests/Feature/CityTest.php index fde6cb1f7..aea40f479 100644 --- a/src/backend/tests/Feature/CityTest.php +++ b/src/backend/tests/Feature/CityTest.php @@ -118,16 +118,16 @@ protected function createTestData($clusterCount = 1, $miniGridCount = 1, $cityCo 'cluster_id' => $cluster->id, ]); array_push($this->cityIds, $city->id); - $cityCount--; + --$cityCount; } $geographicalInformation->owner()->associate($miniGrid); $geographicalInformation->save(); array_push($this->miniGridIds, $miniGrid->id); - $miniGridCount--; + --$miniGridCount; } - $clusterCount--; + --$clusterCount; } } diff --git a/src/backend/tests/Feature/ClusterDashboardCacheTest.php b/src/backend/tests/Feature/ClusterDashboardCacheTest.php index 9a1e1c778..878f1fa0e 100644 --- a/src/backend/tests/Feature/ClusterDashboardCacheTest.php +++ b/src/backend/tests/Feature/ClusterDashboardCacheTest.php @@ -110,7 +110,7 @@ protected function createTestData($clusterCount = 1, $meterCount = 1, $transacti 'mini_grid_id' => $miniGrid->id, 'cluster_id' => $cluster->id, ]); - $clusterCount--; + --$clusterCount; while ($meterCount > 0) { $meter = MeterFactory::new()->create([ @@ -156,7 +156,7 @@ protected function createTestData($clusterCount = 1, $meterCount = 1, $transacti ]); $personAddress->owner()->associate($person); $personAddress->save(); - $meterCount--; + --$meterCount; while ($transactionCount > 0) { $vodacomTransaction = @@ -194,7 +194,7 @@ protected function createTestData($clusterCount = 1, $meterCount = 1, $transacti 'payer_type' => 'person', 'payer_id' => $person->id, ]); - $transactionCount--; + --$transactionCount; } } } diff --git a/src/backend/tests/Feature/ClusterRevenueTest.php b/src/backend/tests/Feature/ClusterRevenueTest.php index 6e23659ee..514bd7e99 100644 --- a/src/backend/tests/Feature/ClusterRevenueTest.php +++ b/src/backend/tests/Feature/ClusterRevenueTest.php @@ -202,7 +202,7 @@ protected function createTestData($clusterCount = 1, $meterCount = 1, $transacti 'mini_grid_id' => $miniGrid->id, 'cluster_id' => $cluster->id, ]); - $clusterCount--; + --$clusterCount; while ($meterCount > 0) { $meter = MeterFactory::new()->create([ @@ -248,7 +248,7 @@ protected function createTestData($clusterCount = 1, $meterCount = 1, $transacti ]); $personAddress->owner()->associate($person); $personAddress->save(); - $meterCount--; + --$meterCount; while ($transactionCount > 0) { $vodacomTransaction = @@ -286,7 +286,7 @@ protected function createTestData($clusterCount = 1, $meterCount = 1, $transacti 'payer_type' => 'person', 'payer_id' => $person->id, ]); - $transactionCount--; + --$transactionCount; } } } diff --git a/src/backend/tests/Feature/ClusterTest.php b/src/backend/tests/Feature/ClusterTest.php index d63c35d53..2d6fe8826 100644 --- a/src/backend/tests/Feature/ClusterTest.php +++ b/src/backend/tests/Feature/ClusterTest.php @@ -133,7 +133,7 @@ protected function createTestData($clusterCount = 1, $meterCount = 1, $transacti 'mini_grid_id' => $miniGrid->id, 'cluster_id' => $cluster->id, ]); - $clusterCount--; + --$clusterCount; while ($meterCount > 0) { $meter = MeterFactory::new()->create([ @@ -179,7 +179,7 @@ protected function createTestData($clusterCount = 1, $meterCount = 1, $transacti ]); $personAddress->owner()->associate($person); $personAddress->save(); - $meterCount--; + --$meterCount; while ($transactionCount > 0) { $vodacomTransaction = @@ -217,7 +217,7 @@ protected function createTestData($clusterCount = 1, $meterCount = 1, $transacti 'payer_type' => 'person', 'payer_id' => $person->id, ]); - $transactionCount--; + --$transactionCount; } } } diff --git a/src/backend/tests/Feature/ConnectionGroupTest.php b/src/backend/tests/Feature/ConnectionGroupTest.php index 307d64cb1..9784e1d2c 100644 --- a/src/backend/tests/Feature/ConnectionGroupTest.php +++ b/src/backend/tests/Feature/ConnectionGroupTest.php @@ -85,7 +85,7 @@ protected function createTestData($connectionGroupCount = 1) while ($connectionGroupCount > 0) { $connectionGroup = ConnectionGroupFactory::new()->create(); array_push($this->connectonGroupIds, $connectionGroup->id); - $connectionGroupCount--; + --$connectionGroupCount; } } } diff --git a/src/backend/tests/Feature/ConnectionTypeTest.php b/src/backend/tests/Feature/ConnectionTypeTest.php index ef63b6cb7..bb4b2fab8 100644 --- a/src/backend/tests/Feature/ConnectionTypeTest.php +++ b/src/backend/tests/Feature/ConnectionTypeTest.php @@ -85,7 +85,7 @@ protected function createTestData($connectionTypeCount = 1) while ($connectionTypeCount > 0) { $connectionType = ConnectionTypeFactory::new()->create(); array_push($this->connectonTypeIds, $connectionType->id); - $connectionTypeCount--; + --$connectionTypeCount; } } } diff --git a/src/backend/tests/Feature/CreateEnvironments.php b/src/backend/tests/Feature/CreateEnvironments.php index 688474c3e..43d8b9e46 100644 --- a/src/backend/tests/Feature/CreateEnvironments.php +++ b/src/backend/tests/Feature/CreateEnvironments.php @@ -192,7 +192,7 @@ protected function createCluster($clusterCount = 1) 'manager_id' => $this->user->id, ]); $this->clusters[] = $cluster; - $clusterCount--; + --$clusterCount; } if (count($this->clusters) > 0) { @@ -208,7 +208,7 @@ protected function createMiniGrid($miniGridCount = 1) 'name' => $this->faker->unique()->companySuffix, ]); $this->miniGrids[] = $miniGrid; - $miniGridCount--; + --$miniGridCount; } if (count($this->miniGrids) > 0) { @@ -226,7 +226,7 @@ protected function createCity($cityCount = 1) 'cluster_id' => $this->getRandomIdFromList($this->clusters), ]); $this->cities[] = $city; - $cityCount--; + --$cityCount; } if (count($this->cities) > 0) { @@ -292,7 +292,7 @@ protected function createMeterWithGeo(): void ]); $address->owner()->associate($meterParameter)->save(); $geographicalInformation->owner()->associate($meterParameter)->save(); - $meterCunt--; + --$meterCunt; } } @@ -347,9 +347,9 @@ protected function createMetersWithDifferentMeterTypes($meterCountPerMeterType = 'connection_type_id' => $this->connectionType->id, 'connection_group_id' => $this->connectionGroup->id, ]); - $meterCountPerMeterType--; + --$meterCountPerMeterType; } - $meterTypeCount--; + --$meterTypeCount; } } @@ -368,7 +368,7 @@ protected function createMeterManufacturer($manufacturerCount = 1): void $this->manufacturers[] = $manufacturer; - $manufacturerCount--; + --$manufacturerCount; } if (count($this->manufacturers) > 0) { $this->manufacturer = $this->manufacturers[0]; @@ -390,7 +390,7 @@ protected function createMeterTariff($meterTariffCount = 1, $withTimeOfUsage = f ]); } - $meterTariffCount--; + --$meterTariffCount; } if (count($this->meterTariffs) > 0) { $this->meterTariff = $this->meterTariffs[0]; @@ -411,12 +411,12 @@ protected function createConnectionType($connectionTypeCount = 1, $subConnection ]); $this->subConnectionTypes[] = $subConnectionType; - $subConnectionTypeCount--; + --$subConnectionTypeCount; } if (count($this->subConnectionTypes) > 0) { $this->subConnectionType = $this->subConnectionTypes[0]; } - $connectionTypeCount--; + --$connectionTypeCount; } if (count($this->connectonTypes) > 0) { $this->connectionType = $this->connectonTypes[0]; @@ -428,7 +428,7 @@ protected function createConnectionGroup($connectionGroupCount = 1): void while ($connectionGroupCount > 0) { $connectionGroup = ConnectionGroupFactory::new()->create(); $this->connectionGroups[] = $connectionGroup; - $connectionGroupCount--; + --$connectionGroupCount; } if (count($this->connectionGroups) > 0) { $this->connectionGroup = $this->connectionGroups[0]; @@ -441,7 +441,7 @@ protected function createMeterType($meterTypeCount = 1): void $meterType = MeterTypeFactory::new()->create(); $this->meterTypes[] = $meterType; - $meterTypeCount--; + --$meterTypeCount; } if (count($this->meterTypes) > 0) { @@ -483,7 +483,7 @@ protected function createMeter($meterCount = 1): void $address->owner()->associate($meterParameter)->save(); $geographicalInformation->owner()->associate($meterParameter)->save(); - $meterCount--; + --$meterCount; } } @@ -492,7 +492,7 @@ protected function createTarget($targetCount = 1): void while ($targetCount > 0) { $target = TargetFactory::new()->create(); $this->targets[] = $target; - $targetCount--; + --$targetCount; } if (count($this->targets) > 0) { $this->target = $this->targets[0]; @@ -507,7 +507,7 @@ protected function createSubTarget($subTargetCount = 1): void 'connection_id' => $this->getRandomIdFromList($this->connectionGroups), ]); $this->subTargets[] = $subTarget; - $subTargetCount--; + --$subTargetCount; } if (count($this->subTargets) > 0) { $this->subTarget = $this->subTargets[0]; @@ -530,7 +530,7 @@ protected function createPerson($personCount = 1, $isCustomer = 1) $address->owner()->associate($person)->save(); $address->save(); - $personCount--; + --$personCount; } if (count($this->people) > 0) { $this->person = $this->people[0]; @@ -562,7 +562,7 @@ protected function createAgentCommission($agentCommissionCount = 1) $agentCommission = AgentCommissionFactory::new()->create(); $this->agentCommissions[] = $agentCommission; - $agentCommissionCount--; + --$agentCommissionCount; } if (count($this->agentCommissions) > 0) { $this->agentCommission = $this->agentCommissions[0]; @@ -575,7 +575,7 @@ protected function createAssetType($assetTypeCount = 1) $assetType = AssetTypeFactory::new()->create(); $this->assetTypes[] = $assetType; - $assetTypeCount--; + --$assetTypeCount; } if (count($this->assetTypes) > 0) { $this->assetType = $this->assetTypes[0]; @@ -594,7 +594,7 @@ protected function createAssignedAppliances($applianceCount = 1) ]); $this->assignedAppliances[] = $assignedAppliance; - $applianceCount--; + --$applianceCount; } if (count($this->assignedAppliances) > 0) { $this->assignedAppliance = $this->assignedAppliances[0]; @@ -624,7 +624,7 @@ protected function createAgentSoldAppliance($soldApplianceCount = 1) 'creator_id' => $assignedAppliance->agent_id, ]); - $soldApplianceCount--; + --$soldApplianceCount; } if (count($this->soldAppliances) > 0) { $this->soldAppliance = $this->soldAppliances[0]; @@ -642,7 +642,7 @@ protected function createAgentReceipt($agentReceiptCount = 1, $amount = 50) ]); $this->agentReceipts[] = $agentReceipt; - $agentReceiptCount--; + --$agentReceiptCount; } if (count($this->agentReceipts) > 0) { $this->agentReceipt = $this->agentReceipts[0]; @@ -663,7 +663,7 @@ protected function createAgentBalanceHistory($agentBalanceHistoryCount = 1) ]); $this->agentBalanceHistories[] = $agentBalanceHistory; - $agentBalanceHistoryCount--; + --$agentBalanceHistoryCount; } if (count($this->agentBalanceHistories) > 0) { $this->agentBalanceHistory = $this->agentBalanceHistories[0]; @@ -681,7 +681,7 @@ protected function createAgentTransaction($agentTransactionCount = 1, $amount = 'message' => $meter->serial_number, ]); - if (! $agentId) { + if (!$agentId) { $agentId = $this->getRandomIdFromList($this->agents); } @@ -743,7 +743,7 @@ protected function createAgentTransaction($agentTransactionCount = 1, $amount = ]); $this->agentBalanceHistories[] = $agentBalanceHistory; - $agentTransactionCount--; + --$agentTransactionCount; } if (count($this->agentTransactions) > 0) { $this->agentTransaction = $this->agentTransactions[0]; @@ -766,7 +766,7 @@ protected function createPaymentHistory($paymentHistoryCount = 1, $amount = 100, 'payment_type' => $this->faker->randomElement(['appliance', 'energy', 'installment', 'access rate']), ]); - if (! $agentId) { + if (!$agentId) { $agentId = $this->getRandomIdFromList($this->agents); } @@ -785,7 +785,7 @@ protected function createPaymentHistory($paymentHistoryCount = 1, $amount = 100, ]); $this->agentBalanceHistories[] = $agentBalanceHistory; - $paymentHistoryCount--; + --$paymentHistoryCount; } if (count($this->paymentHistories) > 0) { $this->paymentHistory = $this->paymentHistories[0]; @@ -798,7 +798,7 @@ protected function createTicketCategory($ticketCategoryCount = 1) $ticketCategory = TicketCategoryFactory::new()->create(); $this->ticketCategories[] = $ticketCategory; - $ticketCategoryCount--; + --$ticketCategoryCount; } if (count($this->ticketCategories) > 0) { $this->ticketCategory = $this->ticketCategories[0]; @@ -831,7 +831,7 @@ protected function createTicket($ticketCount = 1, $status = 0, $customerId = nul ]); $this->tickets[] = $ticket; - $ticketCount--; + --$ticketCount; } if (count($this->tickets) > 0) { $this->ticket = $this->tickets[0]; @@ -868,7 +868,7 @@ protected function createTicketUser($ticketUserCount = 1, $tag = 'inensusinensus ]); $this->ticketUsers[] = $ticketUser; - $ticketUserCount--; + --$ticketUserCount; } if (count($this->ticketUsers) > 0) { $this->ticketUser = $this->ticketUsers[0]; diff --git a/src/backend/tests/Feature/MeterTest.php b/src/backend/tests/Feature/MeterTest.php index 96ff0e9d4..7fb73bb1d 100644 --- a/src/backend/tests/Feature/MeterTest.php +++ b/src/backend/tests/Feature/MeterTest.php @@ -75,7 +75,7 @@ public function testUserGetsMeterList() 'connection_type_id' => $this->connectionType->id, 'connection_group_id' => $this->connectionGroup->id, ]); - $meterCunt--; + --$meterCunt; } $response = $this->actingAs($this->user)->get('/api/meters'); $response->assertStatus(200); @@ -274,7 +274,7 @@ protected function createMeterWithGeo(): void ]); $address->owner()->associate($meterParameter)->save(); $geographicalInformation->owner()->associate($meterParameter)->save(); - $meterCunt--; + --$meterCunt; } } diff --git a/src/backend/tests/Feature/MiniGridRevenueTest.php b/src/backend/tests/Feature/MiniGridRevenueTest.php index 1778d89e4..92959e5d1 100644 --- a/src/backend/tests/Feature/MiniGridRevenueTest.php +++ b/src/backend/tests/Feature/MiniGridRevenueTest.php @@ -194,7 +194,7 @@ protected function createTestData($clusterCount = 1, $meterCount = 1, $transacti 'mini_grid_id' => $miniGrid->id, 'cluster_id' => $cluster->id, ]); - $clusterCount--; + --$clusterCount; while ($meterCount > 0) { $meter = MeterFactory::new()->create([ @@ -240,7 +240,7 @@ protected function createTestData($clusterCount = 1, $meterCount = 1, $transacti ]); $personAddress->owner()->associate($person); $personAddress->save(); - $meterCount--; + --$meterCount; while ($transactionCount > 0) { $vodacomTransaction = @@ -279,7 +279,7 @@ protected function createTestData($clusterCount = 1, $meterCount = 1, $transacti 'payer_type' => 'person', 'payer_id' => $person->id, ]); - $transactionCount--; + --$transactionCount; } } } diff --git a/src/backend/tests/Feature/MiniGridTest.php b/src/backend/tests/Feature/MiniGridTest.php index c6a7d7458..34ec2b034 100644 --- a/src/backend/tests/Feature/MiniGridTest.php +++ b/src/backend/tests/Feature/MiniGridTest.php @@ -124,9 +124,9 @@ protected function createTestData($clusterCount = 1, $miniGridCount = 1) 'cluster_id' => $cluster->id, ]); array_push($this->miniGridIds, $miniGrid->id); - $miniGridCount--; + --$miniGridCount; } - $clusterCount--; + --$clusterCount; } } diff --git a/src/backend/tests/Feature/SocialTariffPiggyBankTest.php b/src/backend/tests/Feature/SocialTariffPiggyBankTest.php index 22cfe95d9..92d1d5767 100644 --- a/src/backend/tests/Feature/SocialTariffPiggyBankTest.php +++ b/src/backend/tests/Feature/SocialTariffPiggyBankTest.php @@ -48,7 +48,7 @@ public function testAddPiggyBankBalance() $socialTariff = SocialTariff::first(); $socialBank = SocialTariffPiggyBank::first(); $savings = $socialBank->savings; - for ($i = 1; $i <= $socialTariff->maximum_stacked_energy / $socialTariff->daily_allowance; $i++) { + for ($i = 1; $i <= $socialTariff->maximum_stacked_energy / $socialTariff->daily_allowance; ++$i) { $job->handle(); if ($i % ($socialTariff->maximum_stacked_energy / $socialTariff->daily_allowance)) { $this->assertEquals($savings + ($socialTariff->daily_allowance * $i), $socialBank->fresh()->savings); diff --git a/src/backend/tests/RefreshMultipleDatabases.php b/src/backend/tests/RefreshMultipleDatabases.php index cd2d5b1e0..049c2b129 100644 --- a/src/backend/tests/RefreshMultipleDatabases.php +++ b/src/backend/tests/RefreshMultipleDatabases.php @@ -27,7 +27,7 @@ protected function refreshInMemoryDatabase() protected function refreshTestDatabase() { - if (! RefreshDatabaseState::$migrated) { + if (!RefreshDatabaseState::$migrated) { Artisan::call( 'migrate:fresh', ['--database' => 'micro_power_manager', '--path' => '/database/migrations/base'] diff --git a/src/backend/tests/TestCase.php b/src/backend/tests/TestCase.php index 8b6becf84..61dd33b7b 100644 --- a/src/backend/tests/TestCase.php +++ b/src/backend/tests/TestCase.php @@ -16,7 +16,7 @@ abstract class TestCase extends BaseTestCase */ protected function headers(?User $user = null) { - if (! $user) { + if (!$user) { $user = User::create([ 'name' => 'John Doe', 'email' => 'johndoe@example.com',