File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -15,14 +15,14 @@ class PhpLatex_Node
1515 * @param mixed $type
1616 * @param array $props
1717 */
18- public function __construct ($ type , array $ props = null )
18+ public function __construct ($ type , array $ props = array () )
1919 {
2020 $ this ->_type = $ type ;
2121
2222 // _props and _children properties are lazily-initialized
2323 // on first write
2424
25- if (null !== $ props ) {
25+ if ($ props ) {
2626 $ this ->setProps ($ props );
2727 }
2828 }
@@ -98,7 +98,7 @@ public function setProps(array $props)
9898 */
9999 public function getProps ()
100100 {
101- return ( array ) $ this ->_props ;
101+ return $ this ->_props ;
102102 }
103103
104104 /**
Original file line number Diff line number Diff line change @@ -126,14 +126,14 @@ public function getBuildDir()
126126 return $ this ->_buildDir ;
127127 }
128128
129- public function compile ($ file , array $ files = null )
129+ public function compile ($ file , array $ files = array () )
130130 {
131131 $ this ->_log = null ;
132132
133133 $ cwd = getcwd ();
134134 $ dir = dirname ($ file );
135135
136- foreach (( array ) $ files as $ path ) {
136+ foreach ($ files as $ path ) {
137137 // TODO handle Windows
138138 if (!is_file ($ dir . '/ ' . basename ($ path ))) {
139139 if (!@symlink ($ path , $ dir . '/ ' . basename ($ path ))) {
@@ -183,7 +183,7 @@ public function compile($file, array $files = null)
183183 * @return string Path to compiled PDF document
184184 * @throws Exception
185185 */
186- public function compileString ($ script , array $ files = null )
186+ public function compileString ($ script , array $ files = array () )
187187 {
188188 $ buildDir = $ this ->getBuildDir () . 'pdflatex/ ' . md5 ($ script );
189189 $ output = $ buildDir . '/output.pdf ' ;
You can’t perform that action at this time.
0 commit comments