File tree Expand file tree Collapse file tree 9 files changed +16
-16
lines changed
Expand file tree Collapse file tree 9 files changed +16
-16
lines changed Original file line number Diff line number Diff line change 66use Http \Client \Common \Plugin \LoggerPlugin ;
77use Http \Client \Exception ;
88use ProgrammatorDev \OpenWeatherMap \Config ;
9- use ProgrammatorDev \OpenWeatherMap \Endpoint \Util \WithCacheTtlTrait ;
9+ use ProgrammatorDev \OpenWeatherMap \Endpoint \Util \CacheTtlTrait ;
1010use ProgrammatorDev \OpenWeatherMap \Entity \Error ;
1111use ProgrammatorDev \OpenWeatherMap \Exception \BadRequestException ;
1212use ProgrammatorDev \OpenWeatherMap \Exception \NotFoundException ;
2424
2525class AbstractEndpoint
2626{
27- use WithCacheTtlTrait ;
27+ use CacheTtlTrait ;
2828
2929 private Config $ config ;
3030
Original file line number Diff line number Diff line change 33namespace ProgrammatorDev \OpenWeatherMap \Endpoint ;
44
55use Http \Client \Exception ;
6- use ProgrammatorDev \OpenWeatherMap \Endpoint \Util \WithLanguageTrait ;
7- use ProgrammatorDev \OpenWeatherMap \Endpoint \Util \WithUnitSystemTrait ;
6+ use ProgrammatorDev \OpenWeatherMap \Endpoint \Util \LanguageTrait ;
7+ use ProgrammatorDev \OpenWeatherMap \Endpoint \Util \UnitSystemTrait ;
88use ProgrammatorDev \OpenWeatherMap \Entity \OneCall \WeatherAggregate ;
99use ProgrammatorDev \OpenWeatherMap \Entity \OneCall \WeatherLocation ;
1010use ProgrammatorDev \OpenWeatherMap \Entity \OneCall \OneCall ;
1818
1919class OneCallEndpoint extends AbstractEndpoint
2020{
21- use WithUnitSystemTrait ;
22- use WithLanguageTrait ;
21+ use UnitSystemTrait ;
22+ use LanguageTrait ;
2323
2424 /**
2525 * @throws Exception
Original file line number Diff line number Diff line change 22
33namespace ProgrammatorDev \OpenWeatherMap \Endpoint \Util ;
44
5- trait WithCacheTtlTrait
5+ trait CacheTtlTrait
66{
77 public function withCacheTtl (int $ seconds ): static
88 {
Original file line number Diff line number Diff line change 66use ProgrammatorDev \YetAnotherPhpValidator \Exception \ValidationException ;
77use ProgrammatorDev \YetAnotherPhpValidator \Validator ;
88
9- trait WithLanguageTrait
9+ trait LanguageTrait
1010{
1111 /**
1212 * @throws ValidationException
Original file line number Diff line number Diff line change 66use ProgrammatorDev \YetAnotherPhpValidator \Exception \ValidationException ;
77use ProgrammatorDev \YetAnotherPhpValidator \Validator ;
88
9- trait WithUnitSystemTrait
9+ trait UnitSystemTrait
1010{
1111 /**
1212 * @throws ValidationException
Original file line number Diff line number Diff line change 33namespace ProgrammatorDev \OpenWeatherMap \Endpoint ;
44
55use Http \Client \Exception ;
6- use ProgrammatorDev \OpenWeatherMap \Endpoint \Util \WithLanguageTrait ;
7- use ProgrammatorDev \OpenWeatherMap \Endpoint \Util \WithUnitSystemTrait ;
6+ use ProgrammatorDev \OpenWeatherMap \Endpoint \Util \LanguageTrait ;
7+ use ProgrammatorDev \OpenWeatherMap \Endpoint \Util \UnitSystemTrait ;
88use ProgrammatorDev \OpenWeatherMap \Entity \Weather \WeatherLocation ;
99use ProgrammatorDev \OpenWeatherMap \Entity \Weather \WeatherLocationList ;
1010use ProgrammatorDev \OpenWeatherMap \Exception \BadRequestException ;
1717
1818class WeatherEndpoint extends AbstractEndpoint
1919{
20- use WithUnitSystemTrait ;
21- use WithLanguageTrait ;
20+ use UnitSystemTrait ;
21+ use LanguageTrait ;
2222
2323 private const NUM_RESULTS = 40 ;
2424
Original file line number Diff line number Diff line change 22
33namespace ProgrammatorDev \OpenWeatherMap \Test ;
44
5- class WithCacheTtlTest extends AbstractTest
5+ class CacheTtlTraitTest extends AbstractTest
66{
77 public function testWithCacheTtl ()
88 {
Original file line number Diff line number Diff line change 55use PHPUnit \Framework \Attributes \DataProviderExternal ;
66use ProgrammatorDev \OpenWeatherMap \Test \DataProvider \InvalidParamDataProvider ;
77
8- class WithLanguageTest extends AbstractTest
8+ class LanguageTraitTest extends AbstractTest
99{
1010 public function testWithLanguage ()
1111 {
Original file line number Diff line number Diff line change 55use PHPUnit \Framework \Attributes \DataProviderExternal ;
66use ProgrammatorDev \OpenWeatherMap \Test \DataProvider \InvalidParamDataProvider ;
77
8- class WithUnitSystemTest extends AbstractTest
8+ class UnitSystemTraitTest extends AbstractTest
99{
1010 public function testWithUnitSystem ()
1111 {
You can’t perform that action at this time.
0 commit comments