@@ -25,7 +25,6 @@ discard block |
||
| 25 | 25 | * Create a new GetPreference instance. |
| 26 | 26 | * |
| 27 | 27 | * @param $key |
| 28 | - * @param null $default |
|
| 29 | 28 | */ |
| 30 | 29 | public function __construct($key) |
| 31 | 30 | { |
@@ -36,7 +35,7 @@ discard block |
||
| 36 | 35 | * Handle the command. |
| 37 | 36 | * |
| 38 | 37 | * @param PreferenceRepositoryInterface $preferences |
| 39 | - * @return mixed |
|
| 38 | + * @return null|\Anomaly\PreferencesModule\Preference\Contract\PreferenceInterface |
|
| 40 | 39 | */ |
| 41 | 40 | public function handle(PreferenceRepositoryInterface $preferences) |
| 42 | 41 | { |
@@ -28,13 +28,13 @@ |
||
| 28 | 28 | return [ |
| 29 | 29 | new \Twig_SimpleFunction( |
| 30 | 30 | 'preference_value', |
| 31 | - function ($key) { |
|
| 31 | + function($key) { |
|
| 32 | 32 | return $this->dispatch(new GetPreferenceValue($key)); |
| 33 | 33 | } |
| 34 | 34 | ), |
| 35 | 35 | new \Twig_SimpleFunction( |
| 36 | 36 | 'preference', |
| 37 | - function ($key) { |
|
| 37 | + function($key) { |
|
| 38 | 38 | |
| 39 | 39 | /* @var PreferenceInterface $preference */ |
| 40 | 40 | if (!$preference = $this->dispatch(new GetPreference($key))) { |