| Total Complexity | 8 | 
| Total Lines | 48 | 
| Duplicated Lines | 0 % | 
| Changes | 2 | ||
| Bugs | 1 | Features | 0 | 
| 1 | <?php | ||
| 5 | trait MaxFileSizeTrait | ||
| 6 | { | ||
| 7 | /** | ||
| 8 | * @var number | ||
| 9 | */ | ||
| 10 | protected $maxFileSize; | ||
| 11 | |||
| 12 | /** | ||
| 13 | * @return number | ||
| 14 | */ | ||
| 15 | public function getMaxFileSize() | ||
| 16 |     { | ||
| 17 |         if (! $this->maxFileSize) { | ||
| 18 |             try { | ||
| 19 |                 $this->maxFileSize = $this->convertMB(ini_get('upload_max_filesize')); | ||
|  | |||
| 20 |             } catch (\Exception $e) { | ||
| 21 | $this->maxFileSize = 5; | ||
| 22 | } | ||
| 23 | } | ||
| 24 | |||
| 25 | return $this->maxFileSize; | ||
| 26 | } | ||
| 27 | |||
| 28 | /** | ||
| 29 | * Конвертирование значения | ||
| 30 | * максимального размера загружаемого файла. | ||
| 31 | */ | ||
| 32 | public function convertMB($value) | ||
| 53 | } | ||
| 54 | } | ||
| 56 | 
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..