Skip to content

Commit

Permalink
Refactor namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
DigiLive committed Oct 2, 2022
1 parent 8a47ddc commit 06a7986
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 24 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ from [GitHub](https://github.com/DigiLive/gitChangelog/releases).
```php
<?php

use DigiLive\GitChangelog\GitChangelog\Renderers\MarkDown;
use DigiLive\GitChangelog\Renderers\MarkDown;

// Use composer's auto loader.
$requiredFile = 'Path/To/vendor/autoload.php';
Expand Down
4 changes: 2 additions & 2 deletions src/GitChangelog/GitChangelog.php → src/GitChangelog.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

declare(strict_types=1);

namespace DigiLive\GitChangelog\GitChangelog;
namespace DigiLive\GitChangelog;

use DigiLive\GitChangelog\RepoHandler\RepoHandler;
use DigiLive\GitChangelog\Utilities\ArrayUtils;
Expand Down Expand Up @@ -76,7 +76,7 @@ class GitChangelog
{
/**
* @var string The generated changelog.
* @see \DigiLive\GitChangelog\GitChangelog\Renderers\RendererInterface::build()
* @see \DigiLive\GitChangelog\Renderers\RendererInterface::build()
*/
protected $changelog;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

declare(strict_types=1);

namespace DigiLive\GitChangelog\GitChangelog;
namespace DigiLive\GitChangelog;

/**
* Exception class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@

declare(strict_types=1);

namespace DigiLive\GitChangelog\GitChangelog\Renderers;
namespace DigiLive\GitChangelog\Renderers;

use DigiLive\GitChangelog\GitChangelog\GitChangelog;
use DigiLive\GitChangelog\GitChangelog;
use DigiLive\GitChangelog\Utilities\ArrayUtils;

/**
Expand Down Expand Up @@ -139,7 +139,7 @@ private function convertReferences(string $line, string $referenceType): string
* @param array $hashes Hashes to format
*
* @return string Formatted hash string.
* @see GitChangelog::$commitUrl
* @see \DigiLive\GitChangelog\GitChangelog::$commitUrl
*/
private function formatHashes(array $hashes): string
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@

declare(strict_types=1);

namespace DigiLive\GitChangelog\GitChangelog\Renderers;
namespace DigiLive\GitChangelog\Renderers;

use DigiLive\GitChangelog\GitChangelog\GitChangelog;
use DigiLive\GitChangelog\GitChangelog;
use DigiLive\GitChangelog\Utilities\ArrayUtils;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

declare(strict_types=1);

namespace DigiLive\GitChangelog\GitChangelog\Renderers;
namespace DigiLive\GitChangelog\Renderers;

/**
* Interface RendererInterface.
Expand All @@ -53,7 +53,7 @@ interface RendererInterface
* The purpose of this method is to generate a changelog for GitChangelog.
* This generated changelog is expected be stored into \DigiLive\GitChangelog\GitChangelog::$changelog
*
* @see \DigiLive\GitChangelog\GitChangelog\GitChangelog::$changelog
* @see \DigiLive\GitChangelog\GitChangelog::$changelog
*/
public function build(): void;
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@

declare(strict_types=1);

namespace DigiLive\GitChangelog\GitChangelog\Renderers;
namespace DigiLive\GitChangelog\Renderers;

use DigiLive\GitChangelog\GitChangelog\GitChangelogException;
use DigiLive\GitChangelog\GitChangelogException;

/**
* Common methods and properties of the changelog renderers.
Expand Down Expand Up @@ -177,7 +177,7 @@ public function setUrl(string $type, ?string $url): void
* @param string $type 'issue' or 'mergeRequest'.
* @param ?string $pattern Pattern of an issue or merge request.
*
* @throws \DigiLive\GitChangelog\GitChangelog\GitChangelogException If the pattern doesn't contain exactly one
* @throws \DigiLive\GitChangelog\GitChangelogException If the pattern doesn't contain exactly one
* capturing group.
* @see RendererTrait::$patterns
*/
Expand Down
1 change: 1 addition & 0 deletions src/RepoHandler/RepoHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

namespace DigiLive\GitChangelog\RepoHandler;

use DigiLive\GitChangelog\GitChangelog;
use DigiLive\GitChangelog\Utilities\ArrayUtils;
use Symfony\Component\Process\Exception\ProcessFailedException;
use Symfony\Component\Process\ExecutableFinder;
Expand Down
4 changes: 2 additions & 2 deletions tests/GitChangelog/GitChangelogTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

namespace DigiLive\GitChangelog\Tests\GitChangelog;

use DigiLive\GitChangelog\GitChangelog\GitChangelog;
use DigiLive\GitChangelog\GitChangelog;
use DigiLive\GitChangelog\RepoHandler\RepoHandler;
use DigiLive\GitChangelog\Tests\ReflectionTrait;
use org\bovigo\vfs\vfsStream;
Expand All @@ -53,7 +53,7 @@ class GitChangelogTest extends TestCase
use ReflectionTrait;

/**
* @var \DigiLive\GitChangelog\GitChangelog\GitChangelog The object that will be tested against.
* @var \DigiLive\GitChangelog\GitChangelog The object that will be tested against.
*/
private $changelog;

Expand Down
6 changes: 3 additions & 3 deletions tests/GitChangelog/Renderers/HtmlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

namespace DigiLive\GitChangelog\Tests\GitChangelog\Renderers;

use DigiLive\GitChangelog\GitChangelog\Renderers\Html;
use DigiLive\GitChangelog\Renderers\Html;
use DigiLive\GitChangelog\Tests\ReflectionTrait;
use PHPUnit\Framework\TestCase;

Expand All @@ -47,7 +47,7 @@ class HtmlTest extends TestCase
use ReflectionTrait;

/**
* @var \DigiLive\GitChangelog\GitChangelog\Renderers\Html The object that will be tested against.
* @var \DigiLive\GitChangelog\Renderers\Html The object that will be tested against.
*/
private $changelog;

Expand All @@ -68,7 +68,7 @@ public function setUp(): void
*
* @throws \ReflectionException When setting a private property fails.
* @throws \DigiLive\GitChangelog\RepoHandler\RepoHandlerException If fetching the repository tags fails.
* @throws \DigiLive\GitChangelog\GitChangelog\GitChangelogException If the pattern doesn't contain exactly one
* @throws \DigiLive\GitChangelog\GitChangelogException If the pattern doesn't contain exactly one
* capturing group.
*/
public function testBuildAscendingTitleOrder()
Expand Down
6 changes: 3 additions & 3 deletions tests/GitChangelog/Renderers/MarkDownTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

namespace DigiLive\GitChangelog\Tests\GitChangelog\Renderers;

use DigiLive\GitChangelog\GitChangelog\Renderers\MarkDown;
use DigiLive\GitChangelog\Renderers\MarkDown;
use DigiLive\GitChangelog\Tests\ReflectionTrait;
use PHPUnit\Framework\TestCase;

Expand All @@ -47,7 +47,7 @@ class MarkDownTest extends TestCase
use ReflectionTrait;

/**
* @var \DigiLive\GitChangelog\GitChangelog\Renderers\MarkDown The object that will be tested against.
* @var \DigiLive\GitChangelog\Renderers\MarkDown The object that will be tested against.
*/
private $changelog;

Expand All @@ -69,7 +69,7 @@ public function setUp(): void
* @throws \OutOfBoundsException If the option you're trying to set doesn't exist.
* @throws \RangeException If setting option 'headTagName' to an invalid value.
* @throws \DigiLive\GitChangelog\RepoHandler\RepoHandlerException If addressing the repository fails.
* @throws \DigiLive\GitChangelog\GitChangelog\GitChangelogException If the pattern doesn't contain exactly one
* @throws \DigiLive\GitChangelog\GitChangelogException If the pattern doesn't contain exactly one
* capturing group.
*/
public function testBuildAscendingTitleOrder(): void
Expand Down
4 changes: 2 additions & 2 deletions tests/GitChangelog/Renderers/RendererTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@

namespace DigiLive\GitChangelog\Tests\GitChangelog\Renderers;

use DigiLive\GitChangelog\GitChangelog\GitChangelogException;
use DigiLive\GitChangelog\GitChangelog\Renderers\RendererTrait;
use DigiLive\GitChangelog\GitChangelogException;
use DigiLive\GitChangelog\Renderers\RendererTrait;
use DigiLive\GitChangelog\Tests\ReflectionTrait;
use PHPUnit\Framework\TestCase;

Expand Down

0 comments on commit 06a7986

Please sign in to comment.