Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added millibar as pressure unit #34

Merged
merged 5 commits into from
Oct 16, 2017
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions src/UnitConverter/Unit/Pressure/Millibar.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

/**
* This file is part of the jordanbrauer/unit-converter PHP package.
*
* @copyright 2017 Jordan Brauer <[email protected]>
* @license MIT
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

declare(strict_types = 1);

namespace UnitConverter\Unit\Pressure;

/**
* Millibar unit data class.
*
* @version 1.0.0
* @since 1.0.0
* @author Teun Willems
*/
class Millibar extends PressureUnit
{
protected function configure () : void
{
$this
->setName("bar")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the name to "millibar".


->setSymbol("mbar")

->setUnits(1)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Units should be 100 (1 millibar === 100 pascal)

;
}
}