Conditions | 1 |
Paths | 1 |
Total Lines | 73 |
Code Lines | 67 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
1 | <?php |
||
105 | public function testInlineLevel() |
||
106 | { |
||
107 | $expected = <<<'EOF' |
||
108 | { '': bar, foo: '#bar', 'foo''bar': { }, bar: [1, foo], foobar: { foo: bar, bar: [1, foo], foobar: { foo: bar, bar: [1, foo] } } } |
||
109 | EOF; |
||
110 | $this->assertEquals($expected, $this->dumper->dump($this->array, -10), '->dump() takes an inline level argument'); |
||
111 | $this->assertEquals($expected, $this->dumper->dump($this->array, 0), '->dump() takes an inline level argument'); |
||
112 | |||
113 | $expected = <<<'EOF' |
||
114 | '': bar |
||
115 | foo: '#bar' |
||
116 | 'foo''bar': { } |
||
117 | bar: [1, foo] |
||
118 | foobar: { foo: bar, bar: [1, foo], foobar: { foo: bar, bar: [1, foo] } } |
||
119 | |||
120 | EOF; |
||
121 | $this->assertEquals($expected, $this->dumper->dump($this->array, 1), '->dump() takes an inline level argument'); |
||
122 | |||
123 | $expected = <<<'EOF' |
||
124 | '': bar |
||
125 | foo: '#bar' |
||
126 | 'foo''bar': { } |
||
127 | bar: |
||
128 | - 1 |
||
129 | - foo |
||
130 | foobar: |
||
131 | foo: bar |
||
132 | bar: [1, foo] |
||
133 | foobar: { foo: bar, bar: [1, foo] } |
||
134 | |||
135 | EOF; |
||
136 | $this->assertEquals($expected, $this->dumper->dump($this->array, 2), '->dump() takes an inline level argument'); |
||
137 | |||
138 | $expected = <<<'EOF' |
||
139 | '': bar |
||
140 | foo: '#bar' |
||
141 | 'foo''bar': { } |
||
142 | bar: |
||
143 | - 1 |
||
144 | - foo |
||
145 | foobar: |
||
146 | foo: bar |
||
147 | bar: |
||
148 | - 1 |
||
149 | - foo |
||
150 | foobar: |
||
151 | foo: bar |
||
152 | bar: [1, foo] |
||
153 | |||
154 | EOF; |
||
155 | $this->assertEquals($expected, $this->dumper->dump($this->array, 3), '->dump() takes an inline level argument'); |
||
156 | |||
157 | $expected = <<<'EOF' |
||
158 | '': bar |
||
159 | foo: '#bar' |
||
160 | 'foo''bar': { } |
||
161 | bar: |
||
162 | - 1 |
||
163 | - foo |
||
164 | foobar: |
||
165 | foo: bar |
||
166 | bar: |
||
167 | - 1 |
||
168 | - foo |
||
169 | foobar: |
||
170 | foo: bar |
||
171 | bar: |
||
172 | - 1 |
||
173 | - foo |
||
174 | |||
175 | EOF; |
||
176 | $this->assertEquals($expected, $this->dumper->dump($this->array, 4), '->dump() takes an inline level argument'); |
||
177 | $this->assertEquals($expected, $this->dumper->dump($this->array, 10), '->dump() takes an inline level argument'); |
||
178 | } |
||
258 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths