@@ -36,6 +36,9 @@ discard block |
||
36 | 36 | $this->config = $processor->processConfiguration($definition, $profiles); |
37 | 37 | } |
38 | 38 | |
39 | + /** |
|
40 | + * @param string $profileDir |
|
41 | + */ |
|
39 | 42 | private function readProfiles(YamlLoader $loader, $profileDir) { |
40 | 43 | $profiles = []; |
41 | 44 | foreach (new \DirectoryIterator($profileDir) as $file) { |
@@ -51,18 +54,27 @@ discard block |
||
51 | 54 | return $this->config; |
52 | 55 | } |
53 | 56 | |
57 | + /** |
|
58 | + * @param string $key |
|
59 | + */ |
|
54 | 60 | public function getIndentation($key) { |
55 | 61 | if (isset($this->config['indentation'][$key])) { |
56 | 62 | return $this->config['indentation'][$key]; |
57 | 63 | } |
58 | 64 | } |
59 | 65 | |
66 | + /** |
|
67 | + * @param string $key |
|
68 | + */ |
|
60 | 69 | public function getBraces($key) { |
61 | 70 | if (isset($this->config['braces'][$key])) { |
62 | 71 | return $this->config['braces'][$key]; |
63 | 72 | } |
64 | 73 | } |
65 | 74 | |
75 | + /** |
|
76 | + * @param string $key |
|
77 | + */ |
|
66 | 78 | public function getWhitespace($key, $context = 'default') { |
67 | 79 | if (isset($this->config['whitespace'][$context][$key])) { |
68 | 80 | $val = $this->config['whitespace'][$context][$key]; |
@@ -77,6 +89,9 @@ discard block |
||
77 | 89 | return false; |
78 | 90 | } |
79 | 91 | |
92 | + /** |
|
93 | + * @param string $key |
|
94 | + */ |
|
80 | 95 | public function getBlanks($key) { |
81 | 96 | if (isset($this->config['blanks'][$key])) { |
82 | 97 | return $this->config['blanks'][$key]; |
@@ -84,6 +99,9 @@ discard block |
||
84 | 99 | return 0; |
85 | 100 | } |
86 | 101 | |
102 | + /** |
|
103 | + * @param string $key |
|
104 | + */ |
|
87 | 105 | public function getNewline($key) { |
88 | 106 | if (isset($this->config['newlines'][$key])) { |
89 | 107 | return $this->config['newlines'][$key]; |
@@ -2,5 +2,9 @@ |
||
2 | 2 | namespace gossi\formatter\token; |
3 | 3 | |
4 | 4 | interface TokenVisitorInterface { |
5 | + |
|
6 | + /** |
|
7 | + * @return void |
|
8 | + */ |
|
5 | 9 | public function visitToken(Token $token); |
6 | 10 | } |
7 | 11 | \ No newline at end of file |