Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #18372 > unrolled thread

phpstorm: implement method final

Started byalex <1j9448a02@lnx159sneakemail.com.invalid>
First post2020-10-08 09:52 +0200
Last post2020-10-09 23:47 +0200
Articles 14 — 4 participants

Back to article view | Back to comp.lang.php


Contents

  phpstorm: implement method final alex <1j9448a02@lnx159sneakemail.com.invalid> - 2020-10-08 09:52 +0200
    Re: phpstorm: implement method final "J.O. Aho" <user@example.net> - 2020-10-08 18:19 +0200
      Re: phpstorm: implement method final alex <1j9448a02@lnx159sneakemail.com.invalid> - 2020-10-09 12:21 +0200
        Re: phpstorm: implement method final Arno Welzel <usenet@arnowelzel.de> - 2020-10-09 13:55 +0200
        Re: phpstorm: implement method final "J.O. Aho" <user@example.net> - 2020-10-09 14:52 +0200
          Re: phpstorm: implement method final Arno Welzel <usenet@arnowelzel.de> - 2020-10-09 23:46 +0200
            Re: phpstorm: implement method final "J.O. Aho" <user@example.net> - 2020-10-10 10:08 +0200
            Re: phpstorm: implement method final alex <1j9448a02@lnx159sneakemail.com.invalid> - 2020-10-10 13:40 +0200
              Re: phpstorm: implement method final "J.O. Aho" <user@example.net> - 2020-10-10 14:33 +0200
                Re: phpstorm: implement method final alex <1j9448a02@lnx159sneakemail.com.invalid> - 2020-10-11 10:09 +0200
    Re: phpstorm: implement method final Jerry Stuckle <jstucklex@attglobal.net> - 2020-10-08 12:22 -0400
      Re: phpstorm: implement method final alex <1j9448a02@lnx159sneakemail.com.invalid> - 2020-10-09 12:21 +0200
        Re: phpstorm: implement method final Jerry Stuckle <jstucklex@attglobal.net> - 2020-10-09 13:42 -0400
    Re: phpstorm: implement method final Arno Welzel <usenet@arnowelzel.de> - 2020-10-09 23:47 +0200

#18372 — phpstorm: implement method final

Fromalex <1j9448a02@lnx159sneakemail.com.invalid>
Date2020-10-08 09:52 +0200
Subjectphpstorm: implement method final
Message-ID<rlmggr$1mjq$1@gioia.aioe.org>
Interface I {
   function sniff();
}

class C implements I {

}

I follow what it says here https://bit.ly/3nubjk0

The result:

class C implements I {
   public function sniff() {
      // TODO: Implement sniff() method.
   }
}

But I would like the methods implemented through phpstorm to be final.

class C implements I {
   final public function sniff() {
      // TODO: Implement sniff() method.
   }
}

You can?

[toc] | [next] | [standalone]


#18373

From"J.O. Aho" <user@example.net>
Date2020-10-08 18:19 +0200
Message-ID<hu8sh1Fe9l5U1@mid.individual.net>
In reply to#18372
On 08/10/2020 09:52, alex wrote:

> But I would like the methods implemented through phpstorm to be final.

If you want to auto prefix a funcion with final, then ask how to do that 
in phpstorm at the jetbrain web forum.

> class C implements I {
>    final public function sniff() {
>       // TODO: Implement sniff() method.
>    }
> }
> 
> You can?

https://www.php.net/manual/en/language.oop5.final.php

-- 

  //Aho

[toc] | [prev] | [next] | [standalone]


#18375

Fromalex <1j9448a02@lnx159sneakemail.com.invalid>
Date2020-10-09 12:21 +0200
Message-ID<rlpdj2$d61$1@gioia.aioe.org>
In reply to#18373
Il 08/10/20 18:19, J.O. Aho ha scritto:
> On 08/10/2020 09:52, alex wrote:
> 
>> But I would like the methods implemented through phpstorm to be final.
> 
> If you want to auto prefix a funcion with final, then ask how to do that 
> in phpstorm at the jetbrain web forum.
> 
>> class C implements I {
>>    final public function sniff() {
>>       // TODO: Implement sniff() method.
>>    }
>> }
>>
>> You can?
> 
> https://www.php.net/manual/en/language.oop5.final.php
> 

????

[toc] | [prev] | [next] | [standalone]


#18377

FromArno Welzel <usenet@arnowelzel.de>
Date2020-10-09 13:55 +0200
Message-ID<hub1ddFrvgaU1@mid.individual.net>
In reply to#18375
alex:

> Il 08/10/20 18:19, J.O. Aho ha scritto:
>> On 08/10/2020 09:52, alex wrote:
>>
>>> But I would like the methods implemented through phpstorm to be final.
>>
>> If you want to auto prefix a funcion with final, then ask how to do that 
>> in phpstorm at the jetbrain web forum.
>>
>>> class C implements I {
>>>    final public function sniff() {
>>>       // TODO: Implement sniff() method.
>>>    }
>>> }
>>>
>>> You can?
>>
>> https://www.php.net/manual/en/language.oop5.final.php
>>
> 
> ????

I think J.O. Aho wanted to point out, that "final" is available since
PHP 5 and you can just use it. However you're question was how get
PHPStorm to add this prefix automatically - sorry, I don't know an
answer to that either.


-- 
Arno Welzel
https://arnowelzel.de

[toc] | [prev] | [next] | [standalone]


#18378

From"J.O. Aho" <user@example.net>
Date2020-10-09 14:52 +0200
Message-ID<hub4onFsm4hU1@mid.individual.net>
In reply to#18375
On 09/10/2020 12:21, alex wrote:
> Il 08/10/20 18:19, J.O. Aho ha scritto:
>> On 08/10/2020 09:52, alex wrote:
>>
>>> But I would like the methods implemented through phpstorm to be final.
>>
>> If you want to auto prefix a funcion with final, then ask how to do 
>> that in phpstorm at the jetbrain web forum.
>>
>>> class C implements I {
>>>    final public function sniff() {
>>>       // TODO: Implement sniff() method.
>>>    }
>>> }
>>>
>>> You can?
>>
>> https://www.php.net/manual/en/language.oop5.final.php
>>
> 
> ????

That is the documentation about final in PHP, something that been 
supported since 2004. I do recommend you take a look at it and maybe 
read the comments too, so you know how it works in php.


-- 

  //Aho

[toc] | [prev] | [next] | [standalone]


#18380

FromArno Welzel <usenet@arnowelzel.de>
Date2020-10-09 23:46 +0200
Message-ID<huc40vF4jgoU2@mid.individual.net>
In reply to#18378
J.O. Aho:

> On 09/10/2020 12:21, alex wrote:
>> Il 08/10/20 18:19, J.O. Aho ha scritto:
>>> On 08/10/2020 09:52, alex wrote:
>>>
>>>> But I would like the methods implemented through phpstorm to be final.
>>>
>>> If you want to auto prefix a funcion with final, then ask how to do 
>>> that in phpstorm at the jetbrain web forum.
>>>
>>>> class C implements I {
>>>>    final public function sniff() {
>>>>       // TODO: Implement sniff() method.
>>>>    }
>>>> }
>>>>
>>>> You can?
>>>
>>> https://www.php.net/manual/en/language.oop5.final.php
>>>
>>
>> ????
> 
> That is the documentation about final in PHP, something that been 
> supported since 2004. I do recommend you take a look at it and maybe 
> read the comments too, so you know how it works in php.

I believe the question was not wether one can use "final" but how to get
PHPStorm to automatically add this when asking to create the code using
the "Implement methods" command in the "Code" menu of PHPStorm.


-- 
Arno Welzel
https://arnowelzel.de

[toc] | [prev] | [next] | [standalone]


#18382

From"J.O. Aho" <user@example.net>
Date2020-10-10 10:08 +0200
Message-ID<hud8f8Fbis6U1@mid.individual.net>
In reply to#18380
On 09/10/2020 23:46, Arno Welzel wrote:
> J.O. Aho:
> 
>> On 09/10/2020 12:21, alex wrote:
>>> Il 08/10/20 18:19, J.O. Aho ha scritto:
>>>> On 08/10/2020 09:52, alex wrote:
>>>>
>>>>> But I would like the methods implemented through phpstorm to be final.
>>>>
>>>> If you want to auto prefix a funcion with final, then ask how to do
>>>> that in phpstorm at the jetbrain web forum.
>>>>
>>>>> class C implements I {
>>>>>     final public function sniff() {
>>>>>        // TODO: Implement sniff() method.
>>>>>     }
>>>>> }
>>>>>
>>>>> You can?
>>>>
>>>> https://www.php.net/manual/en/language.oop5.final.php
>>>>
>>>
>>> ????
>>
>> That is the documentation about final in PHP, something that been
>> supported since 2004. I do recommend you take a look at it and maybe
>> read the comments too, so you know how it works in php.
> 
> I believe the question was not wether one can use "final" but how to get
> PHPStorm to automatically add this when asking to create the code using
> the "Implement methods" command in the "Code" menu of PHPStorm.

Did already answer that in an earlier post to as at jetbrains.

-- 

  //Aho

[toc] | [prev] | [next] | [standalone]


#18383

Fromalex <1j9448a02@lnx159sneakemail.com.invalid>
Date2020-10-10 13:40 +0200
Message-ID<rls6im$97n$1@gioia.aioe.org>
In reply to#18380
Il 09/10/20 23:46, Arno Welzel ha scritto:
> J.O. Aho:
> 
>> On 09/10/2020 12:21, alex wrote:
>>> Il 08/10/20 18:19, J.O. Aho ha scritto:
>>>> On 08/10/2020 09:52, alex wrote:
>>>>
>>>>> But I would like the methods implemented through phpstorm to be final.
>>>>
>>>> If you want to auto prefix a funcion with final, then ask how to do
>>>> that in phpstorm at the jetbrain web forum.
>>>>
>>>>> class C implements I {
>>>>>     final public function sniff() {
>>>>>        // TODO: Implement sniff() method.
>>>>>     }
>>>>> }
>>>>>
>>>>> You can?
>>>>
>>>> https://www.php.net/manual/en/language.oop5.final.php
>>>>
>>>
>>> ????
>>
>> That is the documentation about final in PHP, something that been
>> supported since 2004. I do recommend you take a look at it and maybe
>> read the comments too, so you know how it works in php.
> 
> I believe the question was not wether one can use "final" but how to get
> PHPStorm to automatically add this when asking to create the code using
> the "Implement methods" command in the "Code" menu of PHPStorm.
> 
> 

I meant just that

[toc] | [prev] | [next] | [standalone]


#18384

From"J.O. Aho" <user@example.net>
Date2020-10-10 14:33 +0200
Message-ID<hudo0qFeq2eU1@mid.individual.net>
In reply to#18383
On 10/10/2020 13:40, alex wrote:
> Il 09/10/20 23:46, Arno Welzel ha scritto:
>> J.O. Aho:
>>
>>> On 09/10/2020 12:21, alex wrote:
>>>> Il 08/10/20 18:19, J.O. Aho ha scritto:
>>>>> On 08/10/2020 09:52, alex wrote:
>>>>>
>>>>>> But I would like the methods implemented through phpstorm to be 
>>>>>> final.
>>>>>
>>>>> If you want to auto prefix a funcion with final, then ask how to do
>>>>> that in phpstorm at the jetbrain web forum.
>>>>>
>>>>>> class C implements I {
>>>>>>     final public function sniff() {
>>>>>>        // TODO: Implement sniff() method.
>>>>>>     }
>>>>>> }
>>>>>>
>>>>>> You can?
>>>>>
>>>>> https://www.php.net/manual/en/language.oop5.final.php
>>>>>
>>>>
>>>> ????
>>>
>>> That is the documentation about final in PHP, something that been
>>> supported since 2004. I do recommend you take a look at it and maybe
>>> read the comments too, so you know how it works in php.
>>
>> I believe the question was not wether one can use "final" but how to get
>> PHPStorm to automatically add this when asking to create the code using
>> the "Implement methods" command in the "Code" menu of PHPStorm.
>>
>>
> 
> I meant just that

So what did jetbrains say?

-- 

  //Aho

[toc] | [prev] | [next] | [standalone]


#18385

Fromalex <1j9448a02@lnx159sneakemail.com.invalid>
Date2020-10-11 10:09 +0200
Message-ID<rluejq$j56$1@gioia.aioe.org>
In reply to#18384
Il 10/10/20 14:33, J.O. Aho ha scritto:
> 
> So what did jetbrains say?

I haven't asked yet :)
I will do it as soon as possible.

[toc] | [prev] | [next] | [standalone]


#18374

FromJerry Stuckle <jstucklex@attglobal.net>
Date2020-10-08 12:22 -0400
Message-ID<rlnebs$e2s$1@jstuckle.eternal-september.org>
In reply to#18372
On 10/8/2020 3:52 AM, alex wrote:
> Interface I {
>    function sniff();
> }
> 
> class C implements I {
> 
> }
> 
> I follow what it says here https://bit.ly/3nubjk0
> 
> The result:
> 
> class C implements I {
>    public function sniff() {
>       // TODO: Implement sniff() method.
>    }
> }
> 
> But I would like the methods implemented through phpstorm to be final.
> 
> class C implements I {
>    final public function sniff() {
>       // TODO: Implement sniff() method.
>    }
> }
> 
> You can?

Did you try it?  As long as your on PHP 5 or later it should work.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#18376

Fromalex <1j9448a02@lnx159sneakemail.com.invalid>
Date2020-10-09 12:21 +0200
Message-ID<rlpdj8$d61$2@gioia.aioe.org>
In reply to#18374
Il 08/10/20 18:22, Jerry Stuckle ha scritto:
> Did you try it?  As long as your on PHP 5 or later it should work.

Tried what?

[toc] | [prev] | [next] | [standalone]


#18379

FromJerry Stuckle <jstucklex@attglobal.net>
Date2020-10-09 13:42 -0400
Message-ID<rlq7do$t9o$1@jstuckle.eternal-september.org>
In reply to#18376
On 10/9/2020 6:21 AM, alex wrote:
> Il 08/10/20 18:22, Jerry Stuckle ha scritto:
>> Did you try it?  As long as your on PHP 5 or later it should work.
> 
> Tried what?

Did you try adding final to your code?  It's all there and you can 
modify it.

Otherwise you should be asking the phpstorm support people like J.O. 
suggested.  Few (if any) people here use it an I don't think anyone here 
is on the development side.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#18381

FromArno Welzel <usenet@arnowelzel.de>
Date2020-10-09 23:47 +0200
Message-ID<huc42tF4jgoU3@mid.individual.net>
In reply to#18372
alex:

[...]
> I follow what it says here https://bit.ly/3nubjk0
[...]
> But I would like the methods implemented through phpstorm to be final.
> 
> class C implements I {
>    final public function sniff() {
>       // TODO: Implement sniff() method.
>    }
> }

PHPStorm is paid product. Ask the PHPStorm support team.


-- 
Arno Welzel
https://arnowelzel.de

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.php


csiph-web