hydephp / develop

The HydePHP Source Code Monorepo
https://hydephp.com
MIT License
13 stars 6 forks source link

[2.x] Rename method `Asset::hasMediaFile` to `Asset::exists` #1957

Closed caendesilva closed 3 weeks ago

caendesilva commented 3 weeks ago

Also considered has, but exists is generally better for clarity, as it directly indicates that you're checking for the presence of a file. has can be more ambiguous, as it might imply ownership or possession rather than existence. Therefore, exists is often preferred for methods that check for the presence of an item. It's also what the Laravel Filesystem facade uses.

Part of https://github.com/hydephp/develop/pull/1904

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (8dfb5ce) to head (a897d0d). Report is 2 commits behind head on normalize-the-asset-api.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## normalize-the-asset-api #1957 +/- ## =========================================================== Coverage 100.00% 100.00% Complexity 1883 1883 =========================================================== Files 193 193 Lines 4977 4977 =========================================================== Hits 4977 4977 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.