| Total Complexity | 7 |
| Total Lines | 55 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class LockerManager |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var \Composer\IO\IOInterface |
||
| 12 | */ |
||
| 13 | private $appIO; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @param \Composer\IO\IOInterface $appIO |
||
| 17 | */ |
||
| 18 | public function __construct( |
||
| 19 | \Composer\IO\IOInterface $appIO |
||
| 20 | ) { |
||
| 21 | $this->appIO = $appIO; |
||
| 22 | } |
||
| 23 | |||
| 24 | public function readLockData() |
||
| 25 | { |
||
| 26 | $lockFile = $this->getLockFile(); |
||
| 27 | |||
| 28 | if (!$lockFile->exists()) { |
||
| 29 | return null; |
||
| 30 | } |
||
| 31 | |||
| 32 | return $lockFile->read(); |
||
| 33 | } |
||
| 34 | |||
| 35 | public function writeLockData(array $lock) |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @SuppressWarnings(PHPMD.StaticAccess) |
||
| 48 | * |
||
| 49 | * @return \Composer\Json\JsonFile |
||
| 50 | */ |
||
| 51 | private function getLockFile() |
||
| 65 |