filmtools/ndeviation

Interfaces, classes and traits for Zone system deviation in film developing

1.1.2 2021-01-17 11:22 UTC

This package is auto-updated.

Last update: 2024-12-17 20:01:22 UTC


README

Interfaces, classes and traits for Zone system deviation

Packagist PHP version Build Status Scrutinizer Code Quality Code Coverage Build Status

Installation

$ composer require filmtools/ndeviation

NDeviation classes

<?php
use FilmTools\NDeviation\NDeviation;
use FilmTools\NDeviation\NDeviationFormatter;

// Short title is optional;
$ndev = new NDeviation( 2 );
$ndev = new NDeviation( 2, "push +2" );

// Grab values
$ndev->getValue(); // 2.0
$ndev->getType(); // "push +2"

// Nice formatting:
$formatter = new NDeviationFormatter;
echo $formatter( $ndev ); // "𝑵 +2"

// …can cope with strings
echo $formatter( "2.2" ); // "𝑵 +2.2"
echo $formatter( "foo" ); // "foo"

Interfaces

NDeviationInterface

use FilmTools\NDeviation\NDeviationInterface;

public function getValue() : ?float;
public function getType() : ?string;
public function valid() : bool;

NDeviationProviderInterface

use FilmTools\NDeviation\NDeviationInterface;
use FilmTools\NDeviation\NDeviationProviderInterface;

public function getNDeviation() : NDeviationInterface;