Skip to content

Commit

Permalink
Change namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
bosunski committed Dec 27, 2023
1 parent 5455acb commit 1b787d8
Show file tree
Hide file tree
Showing 15 changed files with 42 additions and 42 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
},
"autoload": {
"psr-4": {
"Results\\": "src/"
"Bosunski\\Results\\": "src/"
},
"files": [
"src/helpers.php"
]
},
"autoload-dev": {
"psr-4": {
"Results\\Tests\\": "tests/"
"Bosunski\\Results\\Tests\\": "tests/"
}
},
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/Option/None.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace Results\Option;
namespace Bosunski\Results\Option;

use Bosunski\Results\Result\Err;
use Exception;
use Results\Result\Err;
use Throwable;

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Option/Option.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace Results\Option;
namespace Bosunski\Results\Option;

use Results\Result\Result;
use Bosunski\Results\Result\Result;
use Throwable;

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Option/Some.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace Results\Option;
namespace Bosunski\Results\Option;

use Results\Result\Ok;
use Bosunski\Results\Result\Ok;
use Throwable;

/**
Expand Down
6 changes: 3 additions & 3 deletions src/Result/Err.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace Results\Result;
namespace Bosunski\Results\Result;

use Results\Option\None;
use Results\Option\Option;
use Bosunski\Results\Option\None;
use Bosunski\Results\Option\Option;
use Throwable;

/**
Expand Down
6 changes: 3 additions & 3 deletions src/Result/Ok.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace Results\Result;
namespace Bosunski\Results\Result;

use Bosunski\Results\Option\Option;
use Bosunski\Results\Option\Some;
use Exception;
use Results\Option\Option;
use Results\Option\Some;
use Throwable;

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Result/Result.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace Results\Result;
namespace Bosunski\Results\Result;

use Results\Option\Option;
use Bosunski\Results\Option\Option;
use Throwable;

/**
Expand Down
14 changes: 7 additions & 7 deletions src/helpers.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

namespace Results;
namespace Bosunski\Results;

use Results\Option\None;
use Results\Option\Option;
use Results\Option\Some;
use Results\Result\Err;
use Results\Result\Ok;
use Results\Result\Result;
use Bosunski\Results\Option\None;
use Bosunski\Results\Option\Option;
use Bosunski\Results\Option\Some;
use Bosunski\Results\Result\Err;
use Bosunski\Results\Result\Ok;
use Bosunski\Results\Result\Result;
use Throwable;

if (! function_exists('Some')) {
Expand Down
2 changes: 1 addition & 1 deletion tests/Pest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use Results\Tests\TestCase;
use Bosunski\Results\Tests\TestCase;

/*
|--------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Results\Tests;
namespace Bosunski\Results\Tests;

use PHPUnit\Framework\TestCase as BaseTestCase;

Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/ErrTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

use Results\Option\None;
use Results\Result\Err;
use Bosunski\Results\Option\None;
use Bosunski\Results\Result\Err;

test('expect returns throws error value', function (): void {
$e = new Exception('some message');
Expand Down
22 changes: 11 additions & 11 deletions tests/Unit/HelpersTest.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?php

use Results\Option\None;
use Results\Option\Some;
use Results\Result\Err;
use Results\Result\Ok;
use Bosunski\Results\Option\None;
use Bosunski\Results\Option\Some;
use Bosunski\Results\Result\Err;
use Bosunski\Results\Result\Ok;

use function Results\Err;
use function Results\None;
use function Results\Ok;
use function Results\Option;
use function Results\Result;
use function Results\Some;
use function Results\wrap;
use function Bosunski\Results\Err;
use function Bosunski\Results\None;
use function Bosunski\Results\Ok;
use function Bosunski\Results\Option;
use function Bosunski\Results\Result;
use function Bosunski\Results\Some;
use function Bosunski\Results\wrap;

test('Ok returns an Ok', function (): void {
$ok = Ok(1);
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/NoneTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use Results\Option\None;
use Bosunski\Results\Option\None;

test('unwrap returns value', function () {
$some = new None();
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/OkTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

use Results\Option\Some;
use Results\Result\Ok;
use Bosunski\Results\Option\Some;
use Bosunski\Results\Result\Ok;

test('expect returns value', function () {
$ok = new Ok(1);
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/SomeTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use Results\Option\Some;
use Bosunski\Results\Option\Some;

test('unwrap returns value', function () {
$some = new Some(1);
Expand Down

0 comments on commit 1b787d8

Please sign in to comment.