wearerequired / traduttore

🗼 A WordPress plugin to improve the I18N workflow for your own projects based on @GlotPress.
https://wearerequired.github.io/traduttore/
72 stars 12 forks source link

Use correct project ID in UpdateCommand #82

Closed swissspidy closed 6 years ago

codecov-io commented 6 years ago

Codecov Report

Merging #82 into master will not change coverage. The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #82   +/-   ##
=========================================
  Coverage     69.08%   69.08%           
  Complexity      338      338           
=========================================
  Files            26       26           
  Lines           828      828           
=========================================
  Hits            572      572           
  Misses          256      256
Impacted Files Coverage Δ Complexity Δ
inc/CLI/UpdateCommand.php 0% <0%> (ø) 6 <0> (ø) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update af7023c...8c55cf3. Read the comment docs.

grappler commented 6 years ago

@swissspidy Do you have more information why $project->get_id() is better then $project->id or the reference to the API? I could find the information but if you have done the research you could find it quicker.

swissspidy commented 6 years ago

Simply put, $project->id does not exist 🙂

$project is an instance of Traduttore's own Project class, which is a decorator for GP_Project. Project::get_id() calls GP_Project::$id under the hood.

The change here simply fixes this bug and makes it consistent with the other CLI controllers.