Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-helldar committed Mar 12, 2024
1 parent ddd6cf1 commit 720f744
Show file tree
Hide file tree
Showing 15 changed files with 0 additions and 22 deletions.
1 change: 0 additions & 1 deletion src/Callbacks/Sorter.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ protected function lower($value): mixed
/**
* Determine if a value is a special character.
*/
#[Pure]
protected function hasSpecialChar($value): bool
{
return in_array($value, $this->specialChars());
Expand Down
3 changes: 0 additions & 3 deletions src/Concerns/Makeable.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@

namespace DragonCode\Support\Concerns;

use JetBrains\PhpStorm\Pure;

trait Makeable
{
#[Pure]
public static function make(...$parameters): static
{
return new static(...$parameters);
Expand Down
1 change: 0 additions & 1 deletion src/Exceptions/DirectoryNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

class DirectoryNotFoundException extends Exception
{
#[Pure]
public function __construct(?string $path)
{
parent::__construct('Directory "' . $path . '" does not exist.');
Expand Down
1 change: 0 additions & 1 deletion src/Exceptions/FileNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

class FileNotFoundException extends Exception
{
#[Pure]
public function __construct(?string $path)
{
parent::__construct('File "' . $path . '" does not exist.');
Expand Down
1 change: 0 additions & 1 deletion src/Exceptions/ForbiddenVariableTypeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

class ForbiddenVariableTypeException extends LogicException
{
#[Pure]
public function __construct(string $haystack, array|string $needles)
{
$needles = $this->needles($needles);
Expand Down
1 change: 0 additions & 1 deletion src/Exceptions/InvalidDestinationPathException.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

class InvalidDestinationPathException extends Exception
{
#[Pure]
public function __construct(?string $path)
{
parent::__construct('The start and end paths must not be the same: ' . $path);
Expand Down
1 change: 0 additions & 1 deletion src/Exceptions/NotValidUrlException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

class NotValidUrlException extends Exception
{
#[Pure]
public function __construct(?string $url)
{
$value = $this->value($url);
Expand Down
1 change: 0 additions & 1 deletion src/Exceptions/UnhandledFileExtensionException.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

class UnhandledFileExtensionException extends Exception
{
#[Pure]
public function __construct(?string $path)
{
parent::__construct('Unhandled file extension: ' . $path);
Expand Down
1 change: 0 additions & 1 deletion src/Exceptions/UnknownStubFileException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

class UnknownStubFileException extends Exception
{
#[Pure]
public function __construct(?string $filename)
{
parent::__construct('Unknown stub file: "' . $filename . '"', 400);
Expand Down
1 change: 0 additions & 1 deletion src/Exceptions/UnknownUrlComponentIndexException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

class UnknownUrlComponentIndexException extends LogicException
{
#[Pure]
public function __construct(int $component)
{
parent::__construct('Unknown URL component index: ' . $component);
Expand Down
1 change: 0 additions & 1 deletion src/Helpers/Ables/Arrayable.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ public function when(mixed $condition, callable $callback, mixed $default = null
/**
* Join array elements with a string.
*/
#[Pure]
public function implode(string $separator): Stringable
{
return new Stringable(implode($separator, $this->value));
Expand Down
2 changes: 0 additions & 2 deletions src/Helpers/Ables/Stringable.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ public function when(mixed $condition, mixed $callback, mixed $default = null):
/**
* Split a string by a string.
*/
#[Pure]
public function explode(string $separator, ?string $map_into = null): Arrayable
{
$array = Arr::of(explode($separator, $this->toString()));
Expand Down Expand Up @@ -296,7 +295,6 @@ public function map(callable $callback): self
/**
* Get the portion of a string between two given values.
*/
#[Pure]
public function between(mixed $from, mixed $to, bool $trim = true): self
{
return new self(Str::between($this->toString(), $from, $to, $trim));
Expand Down
1 change: 0 additions & 1 deletion src/Helpers/Boolean.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public function isFalse(mixed $value): bool
/**
* Converts a value to a boolean type.
*/
#[Pure]
public function to(mixed $value): bool
{
return (bool) $this->parse($value);
Expand Down
1 change: 0 additions & 1 deletion src/Http/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,6 @@ protected function prepare(): array
];
}

#[Pure]
protected function resolveSame(int $component = self::PHP_URL_ALL): self
{
return $component === self::PHP_URL_ALL ? new self() : $this;
Expand Down
5 changes: 0 additions & 5 deletions tests/Unit/Concerns/Makeable/MakeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,4 @@ public function testValue()
$this->assertSame('Foo', $object->foo);
$this->assertSame('Bar', $object->bar);
}

public function testStatic()
{
$this->assertInstanceOf(static::class, self::make());
}
}

0 comments on commit 720f744

Please sign in to comment.