\apex\devkitphp_formatter

Class that handles the formatting and syntax checking of PHP classes to ensure proper line spacing, comment / doc-blocks, and so on.

Summary

Methods
Properties
Constants
format_file()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
reformat_file()
format_comment()
comment_wordwrap()
$filename
$comment_num
$pending_comment
$namespace
$use
$class_name
$class_comment
$properties
$functions
N/A

Properties

$filename

$filename : 

Type

$comment_num

$comment_num : 

Type

$pending_comment

$pending_comment : 

Type

$namespace

$namespace : 

Type

$use

$use : 

Type

$class_name

$class_name : 

Type

$class_comment

$class_comment : 

Type

$properties

$properties : 

Type

$functions

$functions : 

Type

Methods

format_file()

format_file(string  $filename) 

Format a file as necessary.

Goes through the file line-by-bline, formats it with proper line spacing, comment blocks with correct line lengith, etc. Returns the results of the formatted file, plus any available warnings.

Parameters

string $filename

Full path to the file to format.

reformat_file()

reformat_file() 

Reformat file

format_comment()

format_comment(array  $lines, boolean  $check_length = true, boolean  $add_indent = false) 

Format comment

Parameters

array $lines

The lines of the comment

boolean $check_length

WHether or not to check line length for summary too long.

boolean $add_indent

For properties only, and adds extra indent.

comment_wordwrap()

comment_wordwrap(string  $text, boolean  $add_indent = false) 

Comment wordwrap

Parameters

string $text

The text of the content.

boolean $add_indent

Whether or not to add additional indentation.