File tree Expand file tree Collapse file tree 7 files changed +763
-0
lines changed Expand file tree Collapse file tree 7 files changed +763
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on : [push,pull_request]
4+
5+ permissions :
6+ contents : read
7+
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - uses : actions/checkout@v3
14+
15+ - name : Validate composer.json and composer.lock
16+ run : composer validate --strict
17+
18+ - name : Cache Composer packages
19+ id : composer-cache
20+ uses : actions/cache@v3
21+ with :
22+ path : vendor
23+ key : ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
24+ restore-keys : |
25+ ${{ runner.os }}-php-
26+
27+ - name : Install dependencies
28+ run : composer install --prefer-dist --no-progress
29+
30+ - name : Run test suite
31+ run : composer run-script test .
Original file line number Diff line number Diff line change 1+ /.idea
2+ /composer.lock
3+ /vendor
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 1+ # yocLib - Netstring (PHP)
2+
3+ This yocLibrary enables your project to encode and decode Netstring values in PHP.
4+
5+ ## Status
6+
7+ [ ![ CI] ( https://github.com/yocto/yoclib-netstring-php/actions/workflows/ci.yml/badge.svg )] ( https://github.com/yocto/yoclib-netstring-php/actions/workflows/ci.yml )
8+
9+ ## Installation
10+
11+ ` composer require yocto/yoclib-netstring `
12+
13+ ## Use
14+
15+ ### Serialization
16+
17+ ``` php
18+ //TODO
19+ ```
20+
21+ ### Deserialization
22+
23+ ``` php
24+ //TODO
25+ ```
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " yocto/yoclib-netstring" ,
3+ "type" : " library" ,
4+ "description" : " This yocLibrary enables your project to encode and decode Netstring values in PHP." ,
5+ "keywords" :[
6+ " composer" ,
7+ " netstring" ,
8+ " php" ,
9+ " qmqp" ,
10+ " qmtp" ,
11+ " yocto" ,
12+ " yoclib"
13+ ],
14+ "license" : " GPL-3.0-or-later" ,
15+ "require" : {
16+ "php" : " ^7||^8" ,
17+ },
18+ "require-dev" : {
19+ "phpunit/phpunit" : " ^7||^8||^9"
20+ },
21+ "autoload" : {
22+ "psr-4" : {
23+ "YOCLIB\\ Netstring\\ " : " src/"
24+ }
25+ },
26+ "autoload-dev" : {
27+ "psr-4" : {
28+ "YOCLIB\\ Netstring\\ Tests\\ " : " tests/"
29+ }
30+ },
31+ "scripts" : {
32+ "test" : " phpunit"
33+ }
34+ }
Original file line number Diff line number Diff line change 1+ <?php
2+ namespace YOCLIB \Netstring ;
3+
4+ class Netstring{
5+
6+ private $ string ;
7+
8+ /**
9+ * @return string
10+ */
11+ public function getString (){
12+ return $ this ->string ;
13+ }
14+
15+ /**
16+ * @param string string
17+ */
18+ public function setString ($ string ): void {
19+ $ this ->string = $ string ;
20+ }
21+
22+ }
Original file line number Diff line number Diff line change 1+ <?php
2+ namespace YOCLIB \Netstring \Tests ;
3+
4+ use PHPUnit \Framework \TestCase ;
5+
6+ use YOCLIB \Netstring \Netstring ;
7+
8+ class NetstringTest extends TestCase{
9+
10+ //TODO Create tests
11+
12+ }
You can’t perform that action at this time.
0 commit comments