Skip to content

Commit 1411288

Browse files
committed
doc: update readme file.
1 parent 0989fa2 commit 1411288

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,12 @@ composer require khaledalam/unit
3434

3535
```php
3636
<?php
37+
// test.php
3738

3839
// __construct(string $name, Name|string $symbol, float $factor, Dimension $dimension)
3940

41+
require __DIR__ . '/vendor/autoload.php';
42+
4043
use KhaledAlam\Unit\Unit;
4144
use KhaledAlam\Unit\Name;
4245
use KhaledAlam\Unit\Dimension;
@@ -59,6 +62,11 @@ echo $sum; // "3 m"
5962

6063
?>
6164
```
65+
output:
66+
```bash
67+
% php main.php
68+
3 m
69+
```
6270

6371
---
6472

src/Unit/UnitRegistry.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use KhaledAlam\Unit\Unit;
66

7-
class UnitRegistry
7+
final class UnitRegistry
88
{
99
/** @var array<string, Unit> */
1010
private static array $units = [];

0 commit comments

Comments
 (0)