@@ -17,7 +17,7 @@ |
||
17 | 17 | */ |
18 | 18 | public function __construct(string $name) |
19 | 19 | { |
20 | - if(empty($name)) { |
|
20 | + if (empty($name)) { |
|
21 | 21 | throw new EmptyValueException('Package name can\'t be empty'); |
22 | 22 | } |
23 | 23 |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | public function getDownloadsLastDay() |
47 | 47 | { |
48 | 48 | $resource = $this->repository->getResourceByPath( |
49 | - '/downloads/point/last-day/' . $this->package |
|
49 | + '/downloads/point/last-day/'.$this->package |
|
50 | 50 | ); |
51 | 51 | |
52 | 52 | return DownloadStatistics::fromJson($this->package, $resource); |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | public function getDownloadsLastWeek() |
59 | 59 | { |
60 | 60 | $resource = $this->repository->getResourceByPath( |
61 | - '/downloads/point/last-week/' . $this->package |
|
61 | + '/downloads/point/last-week/'.$this->package |
|
62 | 62 | ); |
63 | 63 | |
64 | 64 | return DownloadStatistics::fromJson($this->package, $resource); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | public function getDownloadsLastMonth() |
71 | 71 | { |
72 | 72 | $resource = $this->repository->getResourceByPath( |
73 | - '/downloads/point/last-month/' . $this->package |
|
73 | + '/downloads/point/last-month/'.$this->package |
|
74 | 74 | ); |
75 | 75 | |
76 | 76 | return DownloadStatistics::fromJson($this->package, $resource); |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | public function getDownloadsLastYear() |
83 | 83 | { |
84 | 84 | $resource = $this->repository->getResourceByPath( |
85 | - '/downloads/point/last-year/' . $this->package |
|
85 | + '/downloads/point/last-year/'.$this->package |
|
86 | 86 | ); |
87 | 87 | |
88 | 88 | return DownloadStatistics::fromJson($this->package, $resource); |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | DateChecker::validateDateRange($start, $now); |
100 | 100 | |
101 | 101 | $resource = $this->repository->getResourceByPath( |
102 | - '/downloads/point/' . $start->format('Y-m-d') . ':' . $now->format('Y-m-d') . '/' . $this->package |
|
102 | + '/downloads/point/'.$start->format('Y-m-d').':'.$now->format('Y-m-d').'/'.$this->package |
|
103 | 103 | ); |
104 | 104 | |
105 | 105 | return DownloadStatistics::fromJson($this->package, $resource); |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | DateChecker::validateDateRange($start, $end); |
117 | 117 | |
118 | 118 | $resource = $this->repository->getResourceByPath( |
119 | - '/downloads/point/' . $start->format('Y-m-d') . ':' . $end->format('Y-m-d') . '/' . $this->package |
|
119 | + '/downloads/point/'.$start->format('Y-m-d').':'.$end->format('Y-m-d').'/'.$this->package |
|
120 | 120 | ); |
121 | 121 | |
122 | 122 | return DownloadStatistics::fromJson($this->package, $resource); |