diff --git a/README.md b/README.md index b26afcf..0ccf340 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,12 @@ Cast your Eloquent model attributes to value objects with ease! +### Requirements + +This package requires PHP >= 5.4. Using the latest version of PHP is highly recommended. Laravel 4.x and 5.x are supported. + +> **Note:** Running tests for this package requires PHP >=5.6. + ### Install Require this package with composer using the following command: diff --git a/composer.json b/composer.json index 743604b..0657090 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "redcrystal/cast", - "description": "Cast your model attributes to value objects!", + "description": "Laravel Value Objects: Cast your Eloquent model attributes to value objects with ease!", "license": "MIT", "authors": [ { diff --git a/src/CastsValueObjects.php b/src/CastsValueObjects.php index 31c7339..56a2252 100644 --- a/src/CastsValueObjects.php +++ b/src/CastsValueObjects.php @@ -12,7 +12,7 @@ trait CastsValueObjects protected $cachedObjects = []; /** - * @param $key + * @param string $key * * @return mixed */ @@ -44,8 +44,8 @@ public function getAttribute($key) } /** - * @param $key - * @param $value + * @param string $key + * @param mixed $value */ public function setAttribute($key, $value) { @@ -78,7 +78,7 @@ public function setAttribute($key, $value) } /** - * @param $key + * @param string $key * * @return mixed */ @@ -90,7 +90,7 @@ private function createValueObject($key, $value) } /** - * @param $key + * @param string $key * @param ValueObject $object */ private function cacheValueObject($key, ValueObject $object) @@ -99,7 +99,7 @@ private function cacheValueObject($key, ValueObject $object) } /** - * @param $key + * @param string $key */ private function invalidateValueObjectCache($key) { @@ -107,7 +107,7 @@ private function invalidateValueObjectCache($key) } /** - * @param $key + * @param string $key * * @return bool */ @@ -117,7 +117,7 @@ private function isValueObjectCached($key) } /** - * @param $key + * @param string $key * * @return ValueObject */