Skip to content

Commit

Permalink
fixed type hints and docs for samples block
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenix-bjoern authored and ronak2ram committed Jul 15, 2018
1 parent 7d62c64 commit 6698036
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

namespace Magento\Downloadable\Block\Catalog\Product;

use Magento\Downloadable\Model\ResourceModel\Sample;
use Magento\Downloadable\Model\ResourceModel\Sample\Collection as SampleCollection;
use Magento\Downloadable\Api\Data\SampleInterface;

/**
* Downloadable Product Samples part block
Expand All @@ -30,18 +31,18 @@ public function hasSamples()
/**
* Get downloadable product samples
*
* @return array
* @return SampleCollection
*/
public function getSamples()
{
return $this->getProduct()->getTypeInstance()->getSamples($this->getProduct());
}

/**
* @param Sample $sample
* @param SampleInterface $sample
* @return string
*/
public function getSampleUrl($sample)
public function getSampleUrl(SampleInterface $sample)
{
return $this->getUrl('downloadable/download/sample', ['sample_id' => $sample->getId()]);
}
Expand Down

0 comments on commit 6698036

Please sign in to comment.