php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #68400 [DE] Traits: Change visibility of trait methods isn't valid
Submitted: 2014-11-11 12:59 UTC Modified: 2014-11-22 18:58 UTC
From: a dot daeubler at selv-soft dot de Assigned: salathe (profile)
Status: Closed Package: Translation problem
PHP Version: 5.6.2 OS:
Private report: No CVE-ID: None
 [2014-11-11 12:59 UTC] a dot daeubler at selv-soft dot de
Description:
------------
There's a little syntax error in the german traits documentation:
http://php.net/manual/de/language.oop5.traits.php

// Ändern der Sichtbarkeit von sayHello
class MyClass1 {
    use HelloWorld { sayHello as protected }
}

// Alias der Methode mit geänderter Sichtbarkeit
// Die Sichtbarkeit von sayHello bleibt unverändert
class MyClass2 {
    use HelloWorld { doHelloWorld as private sayHello }
}

There are the ; missing after the "as protected" and "as private sayHello" statements.

Expected result:
----------------
Correct is:

// Ändern der Sichtbarkeit von sayHello
class MyClass1 {
    use HelloWorld { sayHello as protected; }
}

// Alias der Methode mit geänderter Sichtbarkeit
// Die Sichtbarkeit von sayHello bleibt unverändert
class MyClass2 {
    use HelloWorld { doHelloWorld as private sayHello; }
}


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-11-12 20:20 UTC] sobak@php.net
-Summary: German-Documentation: Traits: Change visibility of trait methods isn't valid +Summary: [DE] Traits: Change visibility of trait methods isn't valid
 [2014-11-22 18:58 UTC] salathe@php.net
Automatic comment from SVN on behalf of salathe
Revision: http://svn.php.net/viewvc/?view=revision&revision=335208
Log: add missing semicolons in example (doc bug #68400)
 [2014-11-22 18:58 UTC] salathe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: salathe
 [2014-11-22 18:58 UTC] salathe@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 14 20:01:31 2024 UTC