Total Complexity | 2 |
Total Lines | 26 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
19 | class FilePermission implements \JsonSerializable |
||
20 | { |
||
21 | /** |
||
22 | * @var bool True if entity is readable |
||
23 | */ |
||
24 | protected $isReadable; |
||
25 | |||
26 | /** |
||
27 | * @var bool True if entity is writable |
||
28 | */ |
||
29 | protected $isWritable; |
||
30 | |||
31 | /** |
||
32 | * @param File $file |
||
33 | */ |
||
34 | public function __construct(File $file) |
||
35 | { |
||
36 | $this->isReadable = $file->checkActionPermission('read'); |
||
37 | $this->isWritable = $file->checkActionPermission('write'); |
||
38 | } |
||
39 | |||
40 | public function jsonSerialize() |
||
45 | ]; |
||
46 | } |
||
48 |