Skip to content

Commit cdb17cd

Browse files
phoenix-bjoernronak2ram
authored andcommitted
fixed type hints and docs for samples block
1 parent ce5eacd commit cdb17cd

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
@@ -6,7 +6,8 @@
66

77
namespace Magento\Downloadable\Block\Catalog\Product;
88

9-
use Magento\Downloadable\Model\ResourceModel\Sample;
9+
use Magento\Downloadable\Model\ResourceModel\Sample\Collection as SampleCollection;
10+
use Magento\Downloadable\Api\Data\SampleInterface;
1011

1112
/**
1213
* Downloadable Product Samples part block
@@ -29,18 +30,18 @@ public function hasSamples()
2930
/**
3031
* Get downloadable product samples
3132
*
32-
* @return array
33+
* @return SampleCollection
3334
*/
3435
public function getSamples()
3536
{
3637
return $this->getProduct()->getTypeInstance()->getSamples($this->getProduct());
3738
}
3839

3940
/**
40-
* @param Sample $sample
41+
* @param SampleInterface $sample
4142
* @return string
4243
*/
43-
public function getSampleUrl($sample)
44+
public function getSampleUrl(SampleInterface $sample)
4445
{
4546
return $this->getUrl('downloadable/download/sample', ['sample_id' => $sample->getId()]);
4647
}

0 commit comments

Comments
 (0)