Closed (fixed)
Project:
Physical Fields
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
11 May 2017 at 14:17 UTC
Updated:
21 Nov 2018 at 14:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
r0nn1ef commentedHere's a patch that adds the temperature measurement and tests. It supports the three most common units; Kelvin, Fahrenheit, and Celsius.
Comment #3
bojanz commentedThis patch doesn't completely follow coding standards.
You can install phpcs and run "phpcs --standard=phpcs.xml" from the module folder to get the list of warnings. Some of them include no newline at the end of files (also shown in the patch), others are about the placement of "else" (should be below the closing brace, not on it), etc.
Also, could you tell me what the primary use case will be for this feature?
Comment #4
dhruveshdtripathi commentedChanges made according to comment #3. Interdiff added.
Thank you.
Comment #5
r0nn1ef commentedThe feature is needed in a SCUBA dive log module suite that I'm writing. All dive log software allows users to select between Fahrenheit and Celsius, but to be complete, I added Kelvin in since it is the other widely-used temperature scale. There were others, but they haven't been used in over 100 years.
Comment #6
bojanz commentedThe patch still doesn't pass phpcs. There are spaces around functional calls and other non-Drupal style decisions.
The unit constants need to be machine readable, they should not have the degree symbol.
Comment #8
bojanz commentedCleaned up and committed, thanks!