diff --git a/src/Core/Models/Model.php b/src/Core/Models/Model.php index a44d0cde8..e03e5b0d9 100755 --- a/src/Core/Models/Model.php +++ b/src/Core/Models/Model.php @@ -14,6 +14,12 @@ use LogicException; * Adds the ability for custom relations to be added to a model during runtime. * These relations behave in the same way that you would expect; they can be * queried, eager loaded, and accessed as an attribute. + * + * @todo Refactor out validation, either into a trait or into a dependency. + * The following requirements need to be fulfilled: + * - Ability for extensions to alter ruleset. + * - Ability for extensions to add custom rules to the validator instance. + * - Use Flarum's translator with the validator instance. */ abstract class Model extends Eloquent { diff --git a/src/Locale/Translator.php b/src/Locale/Translator.php index 239df50c9..f01764f85 100644 --- a/src/Locale/Translator.php +++ b/src/Locale/Translator.php @@ -2,6 +2,9 @@ use Closure; +/** + * @todo implement Symfony\Component\Translation\TranslatorInterface + */ class Translator { protected $translations; @@ -16,9 +19,7 @@ class Translator public function plural($count) { - $callback = $this->plural; - - return $callback($count); + return {$this->plural}($count); } public function translate($key, array $input = [])