1 | <?php |
||
40 | class Lock extends Entity implements ILock { |
||
41 | |||
42 | /** @var int BIGINT - foreign key to oc_filecache.fileid */ |
||
43 | protected $fileId; |
||
44 | /** @var string - plain text field as transmitted by clients */ |
||
45 | protected $owner; |
||
46 | /** @var int - seconds of lock life time */ |
||
47 | protected $timeout; |
||
48 | /** @var int - unix timestamp when lock was created */ |
||
49 | protected $createdAt; |
||
50 | /** @var string - uuid in WebDAV */ |
||
51 | protected $token; |
||
52 | /** @var string - md5 of token */ |
||
53 | protected $tokenHash; |
||
54 | /** @var int - LOCK_SCOPE_EXCLUSIVE or LOCK_SCOPE_SHARED */ |
||
55 | protected $scope; |
||
56 | /** @var int: 0, 1 or infinite */ |
||
57 | protected $depth; |
||
58 | /** @var int - foreign key zu oc_account.id */ |
||
59 | protected $ownerAccountId; |
||
60 | |||
61 | /** @var string - joined with oc_filecache */ |
||
62 | protected $path; |
||
63 | /** @var string - computed value */ |
||
64 | protected $davUserId; |
||
65 | /** @var string - computed value */ |
||
66 | protected $absoluteDavPath; |
||
67 | |||
68 | public function __construct() { |
||
76 | |||
77 | /** |
||
78 | * @param $token |
||
79 | */ |
||
80 | public function setToken($token) { |
||
84 | |||
85 | /** |
||
86 | * Return the owner of the lock - plain text field as transmitted by clients |
||
87 | * |
||
88 | * @return string |
||
89 | * @since 11.0.0 |
||
90 | */ |
||
91 | public function getOwner(): ?string { |
||
94 | |||
95 | /** |
||
96 | * Foreign key to oc_filecache.fileid |
||
97 | * |
||
98 | * @return int |
||
99 | * @since 11.0.0 |
||
100 | */ |
||
101 | public function getFileId(): int { |
||
104 | |||
105 | /** |
||
106 | * Seconds of lock life time |
||
107 | * |
||
108 | * @return int |
||
109 | * @since 11.0.0 |
||
110 | */ |
||
111 | public function getTimeout(): int { |
||
114 | |||
115 | /** |
||
116 | * Unix timestamp when lock was created |
||
117 | * |
||
118 | * @return mixed |
||
119 | * @since 11.0.0 |
||
120 | */ |
||
121 | public function getCreatedAt(): int { |
||
124 | |||
125 | /** |
||
126 | * Token to identify the lock - uuid usually |
||
127 | * |
||
128 | * @return string |
||
129 | * @since 11.0.0 |
||
130 | */ |
||
131 | public function getToken(): string { |
||
134 | |||
135 | /** |
||
136 | * Either shared lock or exclusive lock |
||
137 | * |
||
138 | * @return int |
||
139 | * @since 11.0.0 |
||
140 | */ |
||
141 | public function getScope(): int { |
||
144 | |||
145 | /** |
||
146 | * Depth as used in WebDAV: 0, 1 or infinite |
||
147 | * |
||
148 | * @return int |
||
149 | * @since 11.0.0 |
||
150 | */ |
||
151 | public function getDepth(): int { |
||
154 | |||
155 | /** |
||
156 | * Absolute path to the file/folder on webdav |
||
157 | * |
||
158 | * @return string |
||
159 | * @since 11.0.0 |
||
160 | */ |
||
161 | public function getAbsoluteDavPath(): string { |
||
164 | |||
165 | /** |
||
166 | * User id on webdav URI |
||
167 | * |
||
168 | * @return string |
||
169 | * @since 11.0.0 |
||
170 | */ |
||
171 | public function getDavUserId(): string { |
||
174 | |||
175 | /** |
||
176 | * Set the owner |
||
177 | * |
||
178 | * @param string $owner |
||
179 | * @return mixed |
||
180 | * @since 11.0.0 |
||
181 | */ |
||
182 | public function setOwner(?string $owner) : void { |
||
185 | } |
||
186 |
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.