11<?php
2+ declare (strict_types=1 );
23
34/**
45 * Copyright (c) Florian Krämer (https://florian-kraemer.net)
1213 * @license https://opensource.org/licenses/MIT MIT License
1314 */
1415
15- declare (strict_types=1 );
16-
1716namespace PhpCollective \Infrastructure \Storage ;
1817
1918use PhpCollective \Infrastructure \Storage \Exception \InvalidStreamResourceException ;
@@ -119,8 +118,8 @@ class File implements FileInterface
119118 * @param string|null $collection Collection name
120119 * @param string|null $model Model name
121120 * @param string|null $modelId Model id
122- * @param array $variants Variants
123121 * @param array $metadata Meta data
122+ * @param array $variants Variants
124123 * @param resource|null $resource
125124 *
126125 * @return self
@@ -199,6 +198,8 @@ public function resource()
199198 *
200199 * @param string $file File
201200 *
201+ * @throws \RuntimeException
202+ *
202203 * @return self
203204 */
204205 public function withFile (string $ file ): FileInterface
@@ -251,9 +252,9 @@ public function withResource($resource): FileInterface
251252 * @param string $model Model
252253 * @param string|int $modelId Model ID, UUID string or integer
253254 *
254- * @return self
255+ * @return $this
255256 */
256- public function belongsToModel (string $ model , $ modelId ): FileInterface
257+ public function belongsToModel (string $ model , $ modelId )
257258 {
258259 $ this ->model = $ model ;
259260 $ this ->modelId = (string )$ modelId ;
@@ -266,9 +267,9 @@ public function belongsToModel(string $model, $modelId): FileInterface
266267 *
267268 * @param string $collection Collection
268269 *
269- * @return self
270+ * @return $this
270271 */
271- public function addToCollection (string $ collection ): FileInterface
272+ public function addToCollection (string $ collection )
272273 {
273274 $ this ->collection = $ collection ;
274275
@@ -562,7 +563,9 @@ public function variantPaths(): array
562563
563564 /**
564565 * @param string $key
565- * @param mixed $data;
566+ * @param mixed $data
567+ *
568+ * @return self
566569 */
567570 public function withMetadataKey (string $ key , $ data ): FileInterface
568571 {
@@ -605,7 +608,7 @@ public function withVariants(array $variants, bool $merge = true): FileInterface
605608 /**
606609 * @inheritDoc
607610 */
608- public function buildUrl (UrlBuilderInterface $ urlBuilder ): FileInterface
611+ public function buildUrl (UrlBuilderInterface $ urlBuilder )
609612 {
610613 $ this ->url = $ urlBuilder ->url ($ this );
611614
0 commit comments