public function findValidToken(Query $query, array $options)
    {
        $options += [
            'token' => null,
            'expires >' => new DateTimeImmutable(),
            'status' => false
        ];

        return $query->where($options);
    }
public function findValidToken(Query $query, array $options)
    {
        $options += [
            'token' => null,
            'expires >' => new DateTimeImmutable(),
            'status' => false
        ];

        return $query->where($options);
    }
public function findValidToken ( Query $ query , array $ options ) { $ options += [ 'token' => null , 'expires >' => new DateTimeImmutable ( ) , 'status' => false ] ; return $ query -> where ( $ options ) ; }
Custom finder "validToken".

@param \Cake\ORM\Query $query Query
@param array $options Options
@return \Cake\ORM\Query
Custom finder validToken .