Skip to content

Commit 1a3ff06

Browse files
fixed type hints and docs for samples block
1 parent 0a52f88 commit 1a3ff06

File tree

1 file changed

+5
-4
lines changed
  • app/code/Magento/Downloadable/Block/Catalog/Product

1 file changed

+5
-4
lines changed

app/code/Magento/Downloadable/Block/Catalog/Product/Samples.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88

99
namespace Magento\Downloadable\Block\Catalog\Product;
1010

11-
use Magento\Downloadable\Model\ResourceModel\Sample;
11+
use Magento\Downloadable\Model\ResourceModel\Sample\Collection as SampleCollection;
12+
use Magento\Downloadable\Api\Data\SampleInterface;
1213

1314
/**
1415
* Downloadable Product Samples part block
@@ -31,18 +32,18 @@ public function hasSamples()
3132
/**
3233
* Get downloadable product samples
3334
*
34-
* @return array
35+
* @return SampleCollection
3536
*/
3637
public function getSamples()
3738
{
3839
return $this->getProduct()->getTypeInstance()->getSamples($this->getProduct());
3940
}
4041

4142
/**
42-
* @param Sample $sample
43+
* @param SampleInterface $sample
4344
* @return string
4445
*/
45-
public function getSampleUrl($sample)
46+
public function getSampleUrl(SampleInterface $sample)
4647
{
4748
return $this->getUrl('downloadable/download/sample', ['sample_id' => $sample->getId()]);
4849
}

0 commit comments

Comments
 (0)