@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | * |
| 10 | 10 | * @param float $grams |
| 11 | 11 | * |
| 12 | - * @return Jne\Contracts\Foudation\Weight |
|
| 12 | + * @return \Jne\Weight |
|
| 13 | 13 | */ |
| 14 | 14 | public static function fromGrams($grams); |
| 15 | 15 | |
@@ -18,16 +18,16 @@ discard block |
||
| 18 | 18 | * |
| 19 | 19 | * @param float $kilograms |
| 20 | 20 | * |
| 21 | - * @return Jne\Contracts\Foudation\Weight |
|
| 21 | + * @return \Jne\Weight |
|
| 22 | 22 | */ |
| 23 | 23 | public static function fromKilograms($kilograms); |
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | 26 | * Create weight from punds. |
| 27 | 27 | * |
| 28 | - * @param float $punds |
|
| 28 | + * @param float $pounds |
|
| 29 | 29 | * |
| 30 | - * @return Jne\Contracts\Foudation\Weight |
|
| 30 | + * @return \Jne\Weight |
|
| 31 | 31 | */ |
| 32 | 32 | public static function fromPounds($pounds); |
| 33 | 33 | |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | * |
| 58 | 58 | * @param string $query |
| 59 | 59 | * |
| 60 | - * @return Jne\Contracts\Collections\LocationCollection |
|
| 60 | + * @return LocationCollection |
|
| 61 | 61 | */ |
| 62 | 62 | public function searchOrigin($query) |
| 63 | 63 | { |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | * |
| 74 | 74 | * @param string $query |
| 75 | 75 | * |
| 76 | - * @return Jne\Contracts\Collections\LocationCollection |
|
| 76 | + * @return LocationCollection |
|
| 77 | 77 | */ |
| 78 | 78 | public function searchDestination($query) |
| 79 | 79 | { |
@@ -87,9 +87,9 @@ discard block |
||
| 87 | 87 | /** |
| 88 | 88 | * Get delivery options. |
| 89 | 89 | * |
| 90 | - * @param Jne\Contracts\Foundation\Package $package |
|
| 90 | + * @param PackageInterface $package |
|
| 91 | 91 | * |
| 92 | - * @return Jne\Contracts\Collections\DeliveryOptionCollection |
|
| 92 | + * @return DeliveryOptionCollection |
|
| 93 | 93 | */ |
| 94 | 94 | public function deliveryOptions(PackageInterface $package) |
| 95 | 95 | { |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | /** |
| 102 | 102 | * Get delivery options parameters. |
| 103 | 103 | * |
| 104 | - * @param Jne\Contracts\Foundation\Package $package |
|
| 104 | + * @param PackageInterface $package |
|
| 105 | 105 | * |
| 106 | 106 | * @return array |
| 107 | 107 | */ |
@@ -2,12 +2,12 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Jne; |
| 4 | 4 | |
| 5 | -use Jne\Contracts\CourierSystem; |
|
| 5 | +use Jne\Collections\DeliveryOptionCollection; |
|
| 6 | 6 | use Jne\Collections\LocationCollection; |
| 7 | +use Jne\Contracts\CourierSystem; |
|
| 8 | +use Jne\Contracts\Foundation\Package as PackageInterface; |
|
| 7 | 9 | use Jne\Mappers\ArrayMappers\LocationMapper; |
| 8 | -use Jne\Collections\DeliveryOptionCollection; |
|
| 9 | 10 | use Jne\Mappers\HtmlMappers\DeliveryOptionHtmlMapper; |
| 10 | -use Jne\Contracts\Foundation\Package as PackageInterface; |
|
| 11 | 11 | |
| 12 | 12 | class Jne implements CourierSystem |
| 13 | 13 | { |
@@ -32,9 +32,9 @@ |
||
| 32 | 32 | /** |
| 33 | 33 | * Create a new instance of Package. |
| 34 | 34 | * |
| 35 | - * @param Jne\Contracts\Foundation\Location $origin |
|
| 36 | - * @param Jne\Contracts\Foundation\Location $destination |
|
| 37 | - * @param Jne\Contracts\Foundation\Weight $weight |
|
| 35 | + * @param LocationInterface $origin |
|
| 36 | + * @param LocationInterface $destination |
|
| 37 | + * @param WeightInterface $weight |
|
| 38 | 38 | */ |
| 39 | 39 | public function __construct(LocationInterface $origin, LocationInterface $destination, WeightInterface $weight) |
| 40 | 40 | { |
@@ -2,9 +2,9 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Jne; |
| 4 | 4 | |
| 5 | -use Jne\Contracts\Foundation\Weight as WeightInterface; |
|
| 6 | -use Jne\Contracts\Foundation\Package as PackageInterface; |
|
| 7 | 5 | use Jne\Contracts\Foundation\Location as LocationInterface; |
| 6 | +use Jne\Contracts\Foundation\Package as PackageInterface; |
|
| 7 | +use Jne\Contracts\Foundation\Weight as WeightInterface; |
|
| 8 | 8 | |
| 9 | 9 | class Package implements PackageInterface |
| 10 | 10 | { |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | * |
| 39 | 39 | * @param float $grams |
| 40 | 40 | * |
| 41 | - * @return Jne\Contracts\Foudation\Weight |
|
| 41 | + * @return Weight |
|
| 42 | 42 | */ |
| 43 | 43 | public static function fromGrams($grams) |
| 44 | 44 | { |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | * |
| 51 | 51 | * @param float $kilograms |
| 52 | 52 | * |
| 53 | - * @return Jne\Contracts\Foudation\Weight |
|
| 53 | + * @return Weight |
|
| 54 | 54 | */ |
| 55 | 55 | public static function fromKilograms($kilograms) |
| 56 | 56 | { |
@@ -60,9 +60,9 @@ discard block |
||
| 60 | 60 | /** |
| 61 | 61 | * Create weight from punds. |
| 62 | 62 | * |
| 63 | - * @param float $punds |
|
| 63 | + * @param float $pounds |
|
| 64 | 64 | * |
| 65 | - * @return Jne\Contracts\Foudation\Weight |
|
| 65 | + * @return Weight |
|
| 66 | 66 | */ |
| 67 | 67 | public static function fromPounds($pounds) |
| 68 | 68 | { |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | { |
| 20 | 20 | $table = $node->filter('table')->eq(1); |
| 21 | 21 | |
| 22 | - return $table->filter('tbody > tr')->each(function (Crawler $row) { |
|
| 22 | + return $table->filter('tbody > tr')->each(function(Crawler $row) { |
|
| 23 | 23 | $cols = $row->children(); |
| 24 | 24 | |
| 25 | 25 | return new DeliveryOption( |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | public function map(array $data) |
| 18 | 18 | { |
| 19 | - return array_map(function ($location) { |
|
| 19 | + return array_map(function($location) { |
|
| 20 | 20 | return new Location($location['label'], $location['code']); |
| 21 | 21 | }, $data); |
| 22 | 22 | } |