Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed small deprecation warnings for PHP8.2 #14932

Merged
merged 1 commit into from
Jun 21, 2024
Merged

Conversation

snipe
Copy link
Owner

@snipe snipe commented Jun 21, 2024

This should take care of some deprecations warnings in the Asset model regarding depreciations

Signed-off-by: snipe <[email protected]>
Copy link

what-the-diff bot commented Jun 21, 2024

PR Summary

  • Refinement of Asset Assignment Type Retrieval
    The pull request includes a change to how asset assignment types are retrieved in the system. Previously, the type (e.g., 'monitor', 'computer', etc.) of an assigned asset was returned exactly as it exists in the system. The proposed modification aims to standardize these assignment types by making them all lowercase, which could potentially improve data consistency and searchability. If no assignment type exists for the asset, a 'nil' value will be returned instead.

  • Improvement of Depreciation Date Calculation
    The pull request introduces an additional check for the depreciation date calculation method within depreciable assets. Here, both the purchase date and depreciation details are required for accurate calculation. If both of these values are present, the system will calculate the depreciation date accurately by adding the defined depreciation time (in months) to the purchase date. In the case where either or both of these essential parameters are missing, the method will now return a 'nil' value, alerting the user that depreciation determination wasn't possible due to missing information.

@snipe snipe requested review from marcusmoore and uberbrady June 21, 2024 20:21
@snipe snipe changed the title Fixes small deprecation warnings for PHP8.2 Fixed small deprecation warnings for PHP8.2 Jun 21, 2024
@snipe snipe merged commit 42caacb into develop Jun 21, 2024
8 checks passed
@snipe snipe deleted the fixes/small_deprecations branch June 21, 2024 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant