Homec4science

Split phlog() out of a class definition file

Authored by epriestley <git@epriestley.com> on May 29 2012, 22:07.

Description

Split phlog() out of a class definition file

Summary: We can't put functions and classes in the same file any longer.

Test Plan:
This warning vanished from the new linter:

>>> Lint for /INSECURE/devtools/libphutil/src/error/PhutilErrorHandler.php:

   Error  (PHL3) One Class Per File
    File 'error/PhutilErrorHandler.php' mixes function (phlog,
    phutil_error_listener_example) and class/interface (PhutilErrorHandler)
    definitions in the same file. A file which declares a class or an
    interface MUST declare nothing else.

             342  * @return void
             343  * @group error
             344  */
             345 function phutil_error_listener_example($event, $value, array $metadata) {
             346   throw new Exception("This is just an example function!");
             347 }

Also ran 'arc' and loaded Phabricator.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1103

Differential Revision: https://secure.phabricator.com/D2596

Details

Committed
epriestley <git@epriestley.com>May 29 2012, 22:15
Pushed
aubortMar 17 2017, 12:03
Parents
rPHUc4f1ad169bf0: WIP
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHU1106f92d338c: Split phlog() out of a class definition file (authored by epriestley <git@epriestley.com>).May 29 2012, 22:15