Permalink
Browse files

建立 BlackCat 實現 LogisticsInterface

  • Loading branch information...
1 parent 24aa08e commit c25e20315b873a9fe139e2ef9114516f20b09f9e Sam.IO.Hsiao committed Nov 18, 2016
Showing with 18 additions and 0 deletions.
  1. +18 −0 app/Services/BlackCat.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types = 1);
+
+namespace App\Services;
+
+class BlackCat implements LogisticsInterface
+{
+ /**
+ * 計算運費
+ * @param int $weight
+ * @return int
+ */
+ public function calculateFee(int $weight) : int
+ {
+ return 100 * $weight + 10;
+ }
+}

0 comments on commit c25e203

Please sign in to comment.