getShippingMethods() public method

Returns all valid shipping methods
public getShippingMethods ( ) : Doctrine\Common\Collections\Collection
return Doctrine\Common\Collections\Collection
 public function getCosts(ShippingSubjectInterface $subject) : Collection
 {
     $methods = $this->repository->getShippingMethods();
     $collection = new ArrayCollection();
     $methods->map(function (ShippingMethodInterface $shippingMethod) use($subject, $collection) {
         $costs = $this->getShippingMethodCosts($shippingMethod, $subject);
         $costs->map(function (ShippingMethodCostInterface $cost) use($collection) {
             $collection->add($cost);
         });
     });
     return $collection;
 }
 private function getShippingMethods(ShippingSubjectInterface $subject) : Collection
 {
     $methods = $this->repository->getShippingMethods();
     $country = $subject->getCountry();
     if (strlen($country)) {
         return $methods->filter(function (ShippingMethodInterface $method) use($country) {
             if (count($method->getCountries()) && !in_array($country, $method->getCountries())) {
                 return false;
             }
             return true;
         });
     }
     return $methods;
 }