Skip to content

Commit 69c181e

Browse files
committed
Fix README
1 parent 275f836 commit 69c181e

File tree

6 files changed

+9
-34
lines changed

6 files changed

+9
-34
lines changed

README.md

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,15 @@
11
# yocLib - Open Location Code (PHP)
22

3-
This yocLibrary enables your project to read and write MPEGURL files in PHP.
3+
This yocLibrary enables your project to encode and decode Open Location Codes in PHP.
44

55
## Status
66

7-
[![Build Status](https://travis-ci.com/yocto/yoclib-mpegurl-php.svg?branch=master)](https://travis-ci.com/yocto/yoclib-mpegurl-php)
7+
[![Build Status](https://travis-ci.com/yocto/yoclib-openlocationcode-php.svg?branch=master)](https://travis-ci.com/yocto/yoclib-openlocationcode-php)
88

99
## Installation
1010

11-
`composer require yocto/yoclib-mpegurl`
11+
`composer require yocto/yoclib-openlocationcode`
1212

1313
## Use
1414

15-
Read:
16-
```php
17-
use YOCLIB\MPEGURL\MPEGURL;
18-
19-
$fileContent = '';
20-
$fileContent .= '#EXTM3U'."\r\n";
21-
$fileContent .= '#EXTINF:123,The example file'."\r\n";
22-
$fileContent .= '/home/user/test.mp3'."\r\n";
23-
24-
$mpegurl = MPEGURL::read($fileContent);
25-
```
26-
27-
Write:
28-
```php
29-
use YOCLIB\MPEGURL\MPEGURL;
30-
use YOCLIB\MPEGURL\Lines\Location;
31-
use YOCLIB\MPEGURL\Lines\Tags\EXTINF;
32-
use YOCLIB\MPEGURL\Lines\Tags\EXTMxU;
33-
34-
$mpegurl = new MPEGURL();
35-
$mpegurl->addLine(new EXTMxU());
36-
$mpegurl->addLine(new EXTINF('123,The example file'));
37-
$mpegurl->addLine(new Location('/home/user/test.mp3'));
38-
39-
$fileContent = MPEGURL::write($mpegurl);
40-
```
15+
TODO

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "yocto/yoclib-openlocationcode",
33
"type": "library",
4-
"description": "This yocLibrary enables your project to read and write MPEGURL files in PHP.",
4+
"description": "This yocLibrary enables your project to encode and decode Open Location Codes in PHP.",
55
"keywords":[
66
"composer",
77
"openlocationcode",

tests/DecodingTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class DecodingTest extends TestCase{
1616
public function setUp(): void{
1717
$lines = TestUtils::getTestFileLines('decoding.csv');
1818
foreach($lines AS $line){
19-
if(str_starts_with($line,'#')){
19+
if(substr($line, 0, 1)=='#'){
2020
continue;
2121
}
2222
$this->testDataList[] = new DecodingTest_TestData($line);

tests/EncodingTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class EncodingTest extends TestCase{
1616
public function setUp(): void{
1717
$lines = TestUtils::getTestFileLines('encoding.csv');
1818
foreach($lines AS $line){
19-
if(str_starts_with($line,'#') || strlen(trim($line))==0){
19+
if(substr($line, 0, 1)=='#' || strlen(trim($line))==0){
2020
continue;
2121
}
2222
$this->testDataList[] = new EncodingTest_TestData($line);

tests/ShorteningTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class ShorteningTest extends TestCase{
1414
public function setUp(): void{
1515
$lines = TestUtils::getTestFileLines('shortCodeTests.csv');
1616
foreach($lines AS $line){
17-
if(str_starts_with($line,'#')){
17+
if(substr($line, 0, 1)=='#'){
1818
continue;
1919
}
2020
$this->testDataList[] = new ShorteningTest_TestData($line);

tests/ValidityTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class ValidityTest extends TestCase{
1414
public function setUp(): void{
1515
$lines = TestUtils::getTestFileLines('validityTests.csv');
1616
foreach($lines AS $line){
17-
if(str_starts_with($line,'#')){
17+
if(substr($line, 0, 1)=='#'){
1818
continue;
1919
}
2020
$this->testDataList[] = new ValidityTest_TestData($line);

0 commit comments

Comments
 (0)