1 | <?php |
||
17 | class Repository |
||
18 | { |
||
19 | |||
20 | /** |
||
21 | * The instance of the config. |
||
22 | * |
||
23 | * @var \Longman\LaravelMultiLang\Config |
||
24 | */ |
||
25 | protected $config; |
||
26 | |||
27 | |||
28 | /** |
||
29 | * The instance of the cache. |
||
30 | * |
||
31 | * @var \Illuminate\Cache\CacheManager |
||
32 | */ |
||
33 | protected $cache; |
||
34 | |||
35 | /** |
||
36 | * The instance of the database. |
||
37 | * |
||
38 | * @var \Illuminate\Database\DatabaseManager |
||
39 | */ |
||
40 | protected $db; |
||
41 | |||
42 | /** |
||
43 | * Create a new MultiLang instance. |
||
44 | * |
||
45 | * @param string $environment |
||
|
|||
46 | * @param array $config |
||
47 | * @param \Illuminate\Cache\CacheManager $cache |
||
48 | * @param \Illuminate\Database\DatabaseManager $db |
||
49 | */ |
||
50 | 27 | public function __construct(Config $config, Cache $cache, Database $db) |
|
56 | |||
57 | 5 | public function getCacheName($lang) |
|
61 | |||
62 | 18 | public function loadFromDatabase($lang) |
|
74 | |||
75 | 2 | public function loadFromCache($lang) |
|
81 | |||
82 | 4 | public function storeInCache($lang, array $texts) |
|
87 | |||
88 | /** |
||
89 | * Check if we must load texts from cache |
||
90 | * |
||
91 | * @return bool |
||
92 | */ |
||
93 | 4 | public function existsInCache($lang) |
|
97 | |||
98 | /** |
||
99 | * Get a database connection instance. |
||
100 | * |
||
101 | * @return \Illuminate\Database\Connection |
||
102 | */ |
||
103 | 18 | protected function getDb() |
|
111 | |||
112 | /** |
||
113 | * Get a cache driver instance. |
||
114 | * |
||
115 | * @return \Illuminate\Contracts\Cache\Repository |
||
116 | */ |
||
117 | 4 | protected function getCache() |
|
125 | |||
126 | 4 | public function save($texts) |
|
155 | |||
156 | 19 | public function getTableName() |
|
161 | } |
||
162 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.