@@ -100,6 +100,9 @@  | 
                                                    ||
| 100 | 100 |          return implode(', ', $this->generator->words); | 
                                                        
| 101 | 101 | }  | 
                                                        
| 102 | 102 | |
| 103 | + /**  | 
                                                        |
| 104 | + * @param integer $pageNum  | 
                                                        |
| 105 | + */  | 
                                                        |
| 103 | 106 | protected function getPageHtml($pageNum)  | 
                                                        
| 104 | 107 |      { | 
                                                        
| 105 | 108 | return $this->generator->randomHtml();  | 
                                                        
@@ -6,7 +6,7 @@ discard block  | 
                                                    ||
| 6 | 6 | |
| 7 | 7 | class PdfFile extends Base  | 
                                                        
| 8 | 8 |  { | 
                                                        
| 9 | - public function pdfFile($dir = null, $pages=5, $title = '', $author = '', $subject = '', $keywords = '')  | 
                                                        |
| 9 | + public function pdfFile($dir = null, $pages = 5, $title = '', $author = '', $subject = '', $keywords = '')  | 
                                                        |
| 10 | 10 |      { | 
                                                        
| 11 | 11 | $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);  | 
                                                        
| 12 | 12 | |
@@ -116,7 +116,7 @@ discard block  | 
                                                    ||
| 116 | 116 | // Generate a random filename. Use the server address so that a file  | 
                                                        
| 117 | 117 | // generated at the same time on a different server won't have a collision.  | 
                                                        
| 118 | 118 | $name = md5(uniqid(empty($_SERVER['SERVER_ADDR']) ? '' : $_SERVER['SERVER_ADDR'], true));  | 
                                                        
| 119 | - $filename = $name .'.pdf';  | 
                                                        |
| 119 | + $filename = $name . '.pdf';  | 
                                                        |
| 120 | 120 | $filepath = $dir . DIRECTORY_SEPARATOR . $filename;  | 
                                                        
| 121 | 121 | |
| 122 | 122 | return $filepath;  | 
                                                        
@@ -45,6 +45,10 @@  | 
                                                    ||
| 45 | 45 | return $out;  | 
                                                        
| 46 | 46 | }  | 
                                                        
| 47 | 47 | |
| 48 | + /**  | 
                                                        |
| 49 | + * @param integer $maxDepth  | 
                                                        |
| 50 | + * @param integer $maxWidth  | 
                                                        |
| 51 | + */  | 
                                                        |
| 48 | 52 | private function addRandomSubTree(\DOMElement $root, $maxDepth, $maxWidth)  | 
                                                        
| 49 | 53 |      { | 
                                                        
| 50 | 54 | $maxDepth--;  | 
                                                        
@@ -68,7 +68,7 @@  | 
                                                    ||
| 68 | 68 | private function addRandomLeaf(\DOMElement $node)  | 
                                                        
| 69 | 69 |      { | 
                                                        
| 70 | 70 | $rand = mt_rand(1, 10);  | 
                                                        
| 71 | -        switch($rand){ | 
                                                        |
| 71 | +        switch ($rand) { | 
                                                        |
| 72 | 72 | case 1:  | 
                                                        
| 73 | 73 | $this->addRandomE($node);  | 
                                                        
| 74 | 74 | break;  | 
                                                        
@@ -31,7 +31,7 @@ discard block  | 
                                                    ||
| 31 | 31 | $this->referenceResolver = $referenceResolver;  | 
                                                        
| 32 | 32 | |
| 33 | 33 | $this->faker = Factory::create($locale);  | 
                                                        
| 34 | -        foreach($extraProviders as $extraProvider) { | 
                                                        |
| 34 | +        foreach ($extraProviders as $extraProvider) { | 
                                                        |
| 35 | 35 | $this->faker->addProvider(new $extraProvider($this->faker));  | 
                                                        
| 36 | 36 | }  | 
                                                        
| 37 | 37 | }  | 
                                                        
@@ -94,12 +94,12 @@ discard block  | 
                                                    ||
| 94 | 94 | |
| 95 | 95 | $expressionLanguage->register(  | 
                                                        
| 96 | 96 | 'resolve',  | 
                                                        
| 97 | -            function ($str) { | 
                                                        |
| 97 | +            function($str) { | 
                                                        |
| 98 | 98 | /// @todo we could implement this via eg a static class var which holds a pointer to $this->referenceResolver  | 
                                                        
| 99 | 99 |                  //return sprintf('(is_string(%1$s) ? FakerResolver::resolveExpressionLanguageReference(%1$s) : %1$s)', $str); | 
                                                        
| 100 | 100 |                  return "throw new \Exception('The \'resolve\' expression language operator can not be compiled, only evaluated'"; | 
                                                        
| 101 | 101 | },  | 
                                                        
| 102 | -            function ($arguments, $str) use ($resolver) { | 
                                                        |
| 102 | +            function($arguments, $str) use ($resolver) { | 
                                                        |
| 103 | 103 |                  if (!is_string($str)) { | 
                                                        
| 104 | 104 | return $str;  | 
                                                        
| 105 | 105 | }  | 
                                                        
@@ -43,7 +43,7 @@  | 
                                                    ||
| 43 | 43 | // Generate a random filename. Use the server address so that a file  | 
                                                        
| 44 | 44 | // generated at the same time on a different server won't have a collision.  | 
                                                        
| 45 | 45 | $name = md5(uniqid(empty($_SERVER['SERVER_ADDR']) ? '' : $_SERVER['SERVER_ADDR'], true));  | 
                                                        
| 46 | - $filename = $name .'.jpg';  | 
                                                        |
| 46 | + $filename = $name . '.jpg';  | 
                                                        |
| 47 | 47 | $filepath = $dir . DIRECTORY_SEPARATOR . $filename;  | 
                                                        
| 48 | 48 | |
| 49 | 49 | $url = $this->pictureUrl($width, $height, $randomize, $word);  |