Test Setup Failed
Pull Request — master (#557)
by Tom
359:00 queued 356:19
created
src/Translatable/Translatable.php 1 patch
Doc Comments   +13 added lines patch added patch discarded remove patch
@@ -28,6 +28,9 @@  discard block
 block discarded – undo
28 28
 
29 29
     protected $defaultLocale;
30 30
 
31
+    /**
32
+     * @param string $locale
33
+     */
31 34
     public function translate(?string $locale = null, bool $withFallback = false): ?Model
32 35
     {
33 36
         return $this->getTranslation($locale, $withFallback);
@@ -148,6 +151,9 @@  discard block
 block discarded – undo
148 151
         return null;
149 152
     }
150 153
 
154
+    /**
155
+     * @param string $key
156
+     */
151 157
     public function getAttribute($key)
152 158
     {
153 159
         list($attribute, $locale) = $this->getAttributeAndLocale($key);
@@ -172,6 +178,10 @@  discard block
 block discarded – undo
172 178
         return parent::getAttribute($key);
173 179
     }
174 180
 
181
+    /**
182
+     * @param string $key
183
+     * @param string $value
184
+     */
175 185
     public function setAttribute($key, $value)
176 186
     {
177 187
         list($attribute, $locale) = $this->getAttributeAndLocale($key);
@@ -542,6 +552,9 @@  discard block
 block discarded – undo
542 552
             ?: app()->make('translator')->getLocale();
543 553
     }
544 554
 
555
+    /**
556
+     * @param string|null $locale
557
+     */
545 558
     public function setDefaultLocale(?string $locale)
546 559
     {
547 560
         $this->defaultLocale = $locale;
Please login to merge, or discard this patch.