@@ -220,13 +220,9 @@ public function setAuthenticator(IAuthenticator $handler): static
220220 /**
221221 * Returns authentication handler.
222222 */
223- final public function getAuthenticator (): ? IAuthenticator
223+ final public function getAuthenticator (): IAuthenticator
224224 {
225- if (func_num_args ()) {
226- trigger_error (__METHOD__ . '() parameter $throw is deprecated, use getAuthenticatorIfExists() ' , E_USER_DEPRECATED );
227- $ throw = func_get_arg (0 );
228- }
229- if (($ throw ?? true ) && !$ this ->authenticator ) {
225+ if (!$ this ->authenticator ) {
230226 throw new Nette \InvalidStateException ('Authenticator has not been set. ' );
231227 }
232228 return $ this ->authenticator ;
@@ -254,11 +250,6 @@ final public function hasAuthenticator(): bool
254250 */
255251 public function setExpiration (?string $ expire , bool |int $ clearIdentity = null )
256252 {
257- if (func_num_args () > 2 ) {
258- $ clearIdentity = $ clearIdentity || func_get_arg (2 );
259- trigger_error (__METHOD__ . '() third parameter is deprecated, use second one: setExpiration($time, true|false) ' , E_USER_DEPRECATED );
260- }
261-
262253 $ arg = $ this ->storage instanceof UserStorage
263254 ? (bool ) $ clearIdentity
264255 : ($ clearIdentity ? IUserStorage::CLEAR_IDENTITY : 0 );
@@ -336,13 +327,9 @@ public function setAuthorizator(Authorizator $handler): static
336327 /**
337328 * Returns current authorization handler.
338329 */
339- final public function getAuthorizator (): ? Authorizator
330+ final public function getAuthorizator (): Authorizator
340331 {
341- if (func_num_args ()) {
342- trigger_error (__METHOD__ . '() parameter $throw is deprecated, use getAuthorizatorIfExists() ' , E_USER_DEPRECATED );
343- $ throw = func_get_arg (0 );
344- }
345- if (($ throw ?? true ) && !$ this ->authorizator ) {
332+ if (!$ this ->authorizator ) {
346333 throw new Nette \InvalidStateException ('Authorizator has not been set. ' );
347334 }
348335 return $ this ->authorizator ;
0 commit comments