1 | <?php |
||
42 | class Lock extends Entity implements ILock { |
||
43 | |||
44 | /** @var int BIGINT - foreign key to oc_filecache.fileid */ |
||
45 | protected $fileId; |
||
46 | /** @var string - plain text field as transmitted by clients */ |
||
47 | protected $owner; |
||
48 | /** @var int - seconds of lock life time */ |
||
49 | protected $timeout; |
||
50 | /** @var int - unix timestamp when lock was created */ |
||
51 | protected $createdAt; |
||
52 | /** @var string - uuid in WebDAV */ |
||
53 | protected $token; |
||
54 | /** @var string - md5 of token */ |
||
55 | protected $tokenHash; |
||
56 | /** @var int - LOCK_SCOPE_EXCLUSIVE or LOCK_SCOPE_SHARED */ |
||
57 | protected $scope; |
||
58 | /** @var int: 0, 1 or infinite */ |
||
59 | protected $depth; |
||
60 | /** @var int - foreign key zu oc_account.id */ |
||
61 | protected $ownerAccountId; |
||
62 | |||
63 | /** @var string - joined with oc_filecache */ |
||
64 | protected $path; |
||
65 | /** @var string - computed value */ |
||
66 | protected $globalUserId; |
||
67 | /** @var string - computed value */ |
||
68 | protected $globalFileName; |
||
69 | |||
70 | public function __construct() { |
||
78 | |||
79 | /** |
||
80 | * @param $token |
||
81 | */ |
||
82 | public function setToken($token) { |
||
86 | |||
87 | /** |
||
88 | * Return the owner of the lock - plain text field as transmitted by clients |
||
89 | * |
||
90 | * @return string |
||
91 | * @since 11.0.0 |
||
92 | */ |
||
93 | public function getOwner(): ?string { |
||
96 | |||
97 | /** |
||
98 | * Foreign key to oc_filecache.fileid |
||
99 | * |
||
100 | * @return int |
||
101 | * @since 11.0.0 |
||
102 | */ |
||
103 | public function getFileId(): int { |
||
106 | |||
107 | /** |
||
108 | * Seconds of lock life time |
||
109 | * |
||
110 | * @return int |
||
111 | * @since 11.0.0 |
||
112 | */ |
||
113 | public function getTimeout(): int { |
||
116 | |||
117 | /** |
||
118 | * Unix timestamp when lock was created |
||
119 | * |
||
120 | * @return mixed |
||
121 | * @since 11.0.0 |
||
122 | */ |
||
123 | public function getCreatedAt(): int { |
||
126 | |||
127 | /** |
||
128 | * Token to identify the lock - uuid usually |
||
129 | * |
||
130 | * @return string |
||
131 | * @since 11.0.0 |
||
132 | */ |
||
133 | public function getToken(): string { |
||
136 | |||
137 | /** |
||
138 | * Either shared lock or exclusive lock |
||
139 | * |
||
140 | * @return int |
||
141 | * @since 11.0.0 |
||
142 | */ |
||
143 | public function getScope(): int { |
||
146 | |||
147 | /** |
||
148 | * Depth as used in WebDAV: 0, 1 or infinite |
||
149 | * |
||
150 | * @return int |
||
151 | * @since 11.0.0 |
||
152 | */ |
||
153 | public function getDepth(): int { |
||
156 | } |
||
157 |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()
method in theSon
calls the wrong method in the parent class.