How important is it to adhere to coding standards like PSR-2 when developing PHP classes for specific data types like measurement values?

Adhering to coding standards like PSR-2 is important when developing PHP classes for specific data types like measurement values because it promotes consistency, readability, and maintainability of the codebase. By following a standardized coding style, developers can easily understand and collaborate on the code, reducing errors and improving overall code quality.

<?php

class MeasurementValue
{
    private $value;
    
    public function __construct($value)
    {
        $this->value = $value;
    }
    
    public function getValue()
    {
        return $this->value;
    }
    
    public function setValue($value)
    {
        $this->value = $value;
    }
}