Skip to content

Commit

Permalink
Merge pull request #113 from opentracing/moves_exception_to_root
Browse files Browse the repository at this point in the history
chore: move Exceptions to root directory.
  • Loading branch information
jcchavezs authored Dec 10, 2020
2 parents ff240f8 + 9ab469b commit d2466a2
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace OpenTracing\Exceptions;
namespace OpenTracing;

use InvalidArgumentException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace OpenTracing\Exceptions;
namespace OpenTracing;

use DomainException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace OpenTracing\Exceptions;
namespace OpenTracing;

use InvalidArgumentException;

Expand Down
4 changes: 2 additions & 2 deletions src/OpenTracing/Mock/MockTracer.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

namespace OpenTracing\Mock;

use OpenTracing\Exceptions\InvalidReferenceArgumentException;
use OpenTracing\Exceptions\UnsupportedFormatException;
use OpenTracing\InvalidReferenceArgumentException;
use OpenTracing\UnsupportedFormatException;
use OpenTracing\Scope;
use OpenTracing\ScopeManager;
use OpenTracing\Span;
Expand Down
6 changes: 3 additions & 3 deletions src/OpenTracing/Reference.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@

namespace OpenTracing;

use OpenTracing\Exceptions\InvalidReferenceArgumentException;
use OpenTracing\InvalidReferenceArgumentException;

final class Reference
{
/**
* A Span may be the ChildOf a parent Span. In a ChildOf reference,
* the parent Span depends on the child Span in some capacity.
*/
const CHILD_OF = 'child_of';
public const CHILD_OF = 'child_of';

/**
* Some parent Spans do not depend in any way on the result of their
* child Spans. In these cases, we say merely that the child Span
* FollowsFrom the parent Span in a causal sense.
*/
const FOLLOWS_FROM = 'follows_from';
public const FOLLOWS_FROM = 'follows_from';

/**
* @var string
Expand Down
2 changes: 1 addition & 1 deletion src/OpenTracing/ScopeManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/
interface ScopeManager
{
const DEFAULT_FINISH_SPAN_ON_CLOSE = true;
public const DEFAULT_FINISH_SPAN_ON_CLOSE = true;

/**
* Activates an `Span`, so that it is used as a parent when creating new spans.
Expand Down
4 changes: 2 additions & 2 deletions src/OpenTracing/StartSpanOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

use DateTime;
use DateTimeInterface;
use OpenTracing\Exceptions\InvalidReferencesSetException;
use OpenTracing\Exceptions\InvalidSpanOptionException;
use OpenTracing\InvalidReferencesSetException;
use OpenTracing\InvalidSpanOptionException;

final class StartSpanOptions
{
Expand Down
6 changes: 3 additions & 3 deletions src/OpenTracing/Tracer.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

namespace OpenTracing;

use OpenTracing\Exceptions\InvalidReferencesSetException;
use OpenTracing\Exceptions\InvalidSpanOptionException;
use OpenTracing\Exceptions\UnsupportedFormatException;
use OpenTracing\UnsupportedFormatException;
use OpenTracing\InvalidSpanOptionException;
use OpenTracing\InvalidReferencesSetException;

interface Tracer
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace OpenTracing\Exceptions;
namespace OpenTracing;

use UnexpectedValueException;

Expand All @@ -17,6 +17,6 @@ final class UnsupportedFormatException extends UnexpectedValueException
*/
public static function forFormat(string $format): UnsupportedFormatException
{
return new self(sprintf('The format \'%s\' is not supported.', $format));
return new self(sprintf('The format "%s" is not supported.', $format));
}
}
4 changes: 2 additions & 2 deletions tests/OpenTracing/Mock/MockTracerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

namespace OpenTracing\Tests\Mock;

use OpenTracing\Exceptions\InvalidReferenceArgumentException;
use OpenTracing\Exceptions\UnsupportedFormatException;
use OpenTracing\InvalidReferenceArgumentException;
use OpenTracing\UnsupportedFormatException;
use OpenTracing\Mock\MockTracer;
use OpenTracing\NoopSpanContext;
use OpenTracing\Reference;
Expand Down
8 changes: 4 additions & 4 deletions tests/OpenTracing/ReferenceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

namespace OpenTracing\Tests;

use OpenTracing\Exceptions\InvalidReferenceArgumentException;
use OpenTracing\NoopSpanContext;
use OpenTracing\Reference;
use PHPUnit\Framework\TestCase;
use TypeError;
use PHPUnit\Framework\TestCase;
use OpenTracing\Reference;
use OpenTracing\NoopSpanContext;
use OpenTracing\InvalidReferenceArgumentException;

/**
* @covers Reference
Expand Down
2 changes: 1 addition & 1 deletion tests/OpenTracing/StartSpanOptionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace OpenTracing\Tests;

use DateTime;
use OpenTracing\Exceptions\InvalidSpanOptionException;
use OpenTracing\InvalidSpanOptionException;
use OpenTracing\NoopSpanContext;
use OpenTracing\Reference;
use OpenTracing\StartSpanOptions;
Expand Down

0 comments on commit d2466a2

Please sign in to comment.