Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function generate()
- {
- $files = $this->getContentFrom($this->directoryInput, true);
- foreach($files as & $file)
- {
- if(in_array($file['extension'], $this->extensions))
- {
- $lines = file($file['path']);
- $file['lines'] = [];
- foreach($lines as $j => & $line)
- {
- $file['lines'][$j] = 0;
- for($i = 0; $i < 40; $i++)
- {
- if(isset($line[$i]) && $line[$i] == ' ')
- {
- $file['lines'][$j]++;
- }
- else
- {
- break;
- }
- }
- $a = floor($file['lines'][$j] / $this->spacesInput);
- if($a >= 1)
- {
- @$line = str_repeat(' ', $this->spacesOutput * $a).str_repeat(' ', $file['lines'][$j] - ($this->spacesInput * $a)).ltrim($line);
- }
- }
- var_dump($lines);
- }
- }
- var_dump($files);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement