Skip to content

Commit 6698036

Browse files
phoenix-bjoernronak2ram
authored andcommitted
fixed type hints and docs for samples block
1 parent 7d62c64 commit 6698036

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
@@ -30,18 +31,18 @@ public function hasSamples()
3031
/**
3132
* Get downloadable product samples
3233
*
33-
* @return array
34+
* @return SampleCollection
3435
*/
3536
public function getSamples()
3637
{
3738
return $this->getProduct()->getTypeInstance()->getSamples($this->getProduct());
3839
}
3940

4041
/**
41-
* @param Sample $sample
42+
* @param SampleInterface $sample
4243
* @return string
4344
*/
44-
public function getSampleUrl($sample)
45+
public function getSampleUrl(SampleInterface $sample)
4546
{
4647
return $this->getUrl('downloadable/download/sample', ['sample_id' => $sample->getId()]);
4748
}

0 commit comments

Comments
 (0)