Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Endpoint/AbstractEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Http\Client\Common\Plugin\LoggerPlugin;
use Http\Client\Exception;
use ProgrammatorDev\OpenWeatherMap\Config;
use ProgrammatorDev\OpenWeatherMap\Endpoint\Util\WithCacheTtlTrait;
use ProgrammatorDev\OpenWeatherMap\Endpoint\Util\CacheTtlTrait;
use ProgrammatorDev\OpenWeatherMap\Entity\Error;
use ProgrammatorDev\OpenWeatherMap\Exception\BadRequestException;
use ProgrammatorDev\OpenWeatherMap\Exception\NotFoundException;
Expand All @@ -24,7 +24,7 @@

class AbstractEndpoint
{
use WithCacheTtlTrait;
use CacheTtlTrait;

private Config $config;

Expand Down
8 changes: 4 additions & 4 deletions src/Endpoint/OneCallEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace ProgrammatorDev\OpenWeatherMap\Endpoint;

use Http\Client\Exception;
use ProgrammatorDev\OpenWeatherMap\Endpoint\Util\WithLanguageTrait;
use ProgrammatorDev\OpenWeatherMap\Endpoint\Util\WithUnitSystemTrait;
use ProgrammatorDev\OpenWeatherMap\Endpoint\Util\LanguageTrait;
use ProgrammatorDev\OpenWeatherMap\Endpoint\Util\UnitSystemTrait;
use ProgrammatorDev\OpenWeatherMap\Entity\OneCall\WeatherAggregate;
use ProgrammatorDev\OpenWeatherMap\Entity\OneCall\WeatherLocation;
use ProgrammatorDev\OpenWeatherMap\Entity\OneCall\OneCall;
Expand All @@ -18,8 +18,8 @@

class OneCallEndpoint extends AbstractEndpoint
{
use WithUnitSystemTrait;
use WithLanguageTrait;
use UnitSystemTrait;
use LanguageTrait;

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

namespace ProgrammatorDev\OpenWeatherMap\Endpoint\Util;

trait WithCacheTtlTrait
trait CacheTtlTrait
{
public function withCacheTtl(int $seconds): static
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use ProgrammatorDev\YetAnotherPhpValidator\Exception\ValidationException;
use ProgrammatorDev\YetAnotherPhpValidator\Validator;

trait WithLanguageTrait
trait LanguageTrait
{
/**
* @throws ValidationException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use ProgrammatorDev\YetAnotherPhpValidator\Exception\ValidationException;
use ProgrammatorDev\YetAnotherPhpValidator\Validator;

trait WithUnitSystemTrait
trait UnitSystemTrait
{
/**
* @throws ValidationException
Expand Down
8 changes: 4 additions & 4 deletions src/Endpoint/WeatherEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace ProgrammatorDev\OpenWeatherMap\Endpoint;

use Http\Client\Exception;
use ProgrammatorDev\OpenWeatherMap\Endpoint\Util\WithLanguageTrait;
use ProgrammatorDev\OpenWeatherMap\Endpoint\Util\WithUnitSystemTrait;
use ProgrammatorDev\OpenWeatherMap\Endpoint\Util\LanguageTrait;
use ProgrammatorDev\OpenWeatherMap\Endpoint\Util\UnitSystemTrait;
use ProgrammatorDev\OpenWeatherMap\Entity\Weather\WeatherLocation;
use ProgrammatorDev\OpenWeatherMap\Entity\Weather\WeatherLocationList;
use ProgrammatorDev\OpenWeatherMap\Exception\BadRequestException;
Expand All @@ -17,8 +17,8 @@

class WeatherEndpoint extends AbstractEndpoint
{
use WithUnitSystemTrait;
use WithLanguageTrait;
use UnitSystemTrait;
use LanguageTrait;

private const NUM_RESULTS = 40;

Expand Down
2 changes: 1 addition & 1 deletion tests/WithCacheTtlTest.php → tests/CacheTtlTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace ProgrammatorDev\OpenWeatherMap\Test;

class WithCacheTtlTest extends AbstractTest
class CacheTtlTraitTest extends AbstractTest
{
public function testWithCacheTtl()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/WithLanguageTest.php → tests/LanguageTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use PHPUnit\Framework\Attributes\DataProviderExternal;
use ProgrammatorDev\OpenWeatherMap\Test\DataProvider\InvalidParamDataProvider;

class WithLanguageTest extends AbstractTest
class LanguageTraitTest extends AbstractTest
{
public function testWithLanguage()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use PHPUnit\Framework\Attributes\DataProviderExternal;
use ProgrammatorDev\OpenWeatherMap\Test\DataProvider\InvalidParamDataProvider;

class WithUnitSystemTest extends AbstractTest
class UnitSystemTraitTest extends AbstractTest
{
public function testWithUnitSystem()
{
Expand Down