@@ -2,8 +2,8 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Thinktomorrow\Squanto\Domain; |
| 4 | 4 | |
| 5 | -use Illuminate\Database\Eloquent\Model; |
|
| 6 | 5 | use Dimsav\Translatable\Translatable as BaseTranslatable; |
| 6 | +use Illuminate\Database\Eloquent\Model; |
|
| 7 | 7 | |
| 8 | 8 | class Line extends Model |
| 9 | 9 | { |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | * Save a single attribute |
| 45 | 45 | * |
| 46 | 46 | * @param $locale |
| 47 | - * @param $attribute |
|
| 47 | + * @param string $attribute |
|
| 48 | 48 | * @param $value |
| 49 | 49 | */ |
| 50 | 50 | public function saveTranslation($locale, $attribute, $value) |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | /** |
| 58 | - * @param $attribute |
|
| 58 | + * @param string $attribute |
|
| 59 | 59 | * @param null $locale |
| 60 | 60 | * @param bool $fallback | if locale not present, use fallback locale instead |
| 61 | 61 | * @return string null |
@@ -90,7 +90,7 @@ |
||
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | /** |
| 93 | - * @param $action |
|
| 93 | + * @param string $action |
|
| 94 | 94 | * @param $locale |
| 95 | 95 | * @param $key |
| 96 | 96 | * @param $new_value |
@@ -175,6 +175,9 @@ |
||
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | |
| 178 | + /** |
|
| 179 | + * @param string $action |
|
| 180 | + */ |
|
| 178 | 181 | private function displayDetails($action) |
| 179 | 182 | { |
| 180 | 183 | $stats = $this->importer->getStats(); |
@@ -40,6 +40,9 @@ |
||
| 40 | 40 | return $this->push($key,$value,true); |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | + /** |
|
| 44 | + * @param string $key |
|
| 45 | + */ |
|
| 43 | 46 | private function push($action,$value,$single = false,$key = null) |
| 44 | 47 | { |
| 45 | 48 | if($single) |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | protected $defer = true; |
| 17 | 17 | |
| 18 | 18 | /** |
| 19 | - * @return array |
|
| 19 | + * @return string[] |
|
| 20 | 20 | */ |
| 21 | 21 | public function provides() |
| 22 | 22 | { |
@@ -2,12 +2,12 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Thinktomorrow\Squanto; |
| 4 | 4 | |
| 5 | +use Illuminate\Translation\TranslationServiceProvider as BaseServiceProvider; |
|
| 6 | +use League\Flysystem\Adapter\Local; |
|
| 5 | 7 | use League\Flysystem\Filesystem; |
| 6 | -use Thinktomorrow\Squanto\Import\ImportTranslationsCommand; |
|
| 7 | 8 | use Thinktomorrow\Squanto\Handlers\ClearCacheTranslations; |
| 8 | 9 | use Thinktomorrow\Squanto\Handlers\WriteTranslationLineToDisk; |
| 9 | -use Illuminate\Translation\TranslationServiceProvider as BaseServiceProvider; |
|
| 10 | -use League\Flysystem\Adapter\Local; |
|
| 10 | +use Thinktomorrow\Squanto\Import\ImportTranslationsCommand; |
|
| 11 | 11 | use Thinktomorrow\Squanto\Services\LaravelTranslationsReader; |
| 12 | 12 | use Thinktomorrow\Squanto\Translators\SquantoTranslator; |
| 13 | 13 | |
@@ -48,9 +48,9 @@ discard block |
||
| 48 | 48 | /** |
| 49 | 49 | * Retrieve the translation from the squanto cache. |
| 50 | 50 | * |
| 51 | - * @param $key |
|
| 51 | + * @param string $key |
|
| 52 | 52 | * @param array $replace |
| 53 | - * @param null $locale |
|
| 53 | + * @param string $locale |
|
| 54 | 54 | * @return mixed|null |
| 55 | 55 | */ |
| 56 | 56 | private function getFromCache($key, array $replace = array(), $locale = null, $fallback = true) |
@@ -64,6 +64,10 @@ discard block |
||
| 64 | 64 | return ($result !== $key) ? $result : null; |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | + /** |
|
| 68 | + * @param string $key |
|
| 69 | + * @param string $locale |
|
| 70 | + */ |
|
| 67 | 71 | private function getFromDatabase($key, array $replace = array(), $locale = null, $fallback = true) |
| 68 | 72 | { |
| 69 | 73 | if(!isset($this->databaseTranslator)) |
@@ -40,6 +40,9 @@ |
||
| 40 | 40 | return $this->push($key,$value,true); |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | + /** |
|
| 44 | + * @param string $key |
|
| 45 | + */ |
|
| 43 | 46 | private function push($action,$value,$single = false,$key = null) |
| 44 | 47 | { |
| 45 | 48 | if($single) |