File tree Expand file tree Collapse file tree 3 files changed +9
-11
lines changed
Bundle/WebProfilerBundle/Resources/views/Profiler Expand file tree Collapse file tree 3 files changed +9
-11
lines changed Original file line number Diff line number Diff line change 113
113
<ul id =" menu-profiler" >
114
114
{% for name , template in templates %}
115
115
{% set menu -%}
116
- {% if block (' menu' , template ) is defined %}
116
+ {%- if block (' menu' , template ) is defined - %}
117
117
{% with { collector : profile.getcollector (name ), profiler_markup_version : profiler_markup_version } %}
118
118
{{- block (' menu' , template ) -}}
119
119
{% endwith %}
120
- {% endif %}
120
+ {%- endif - %}
121
121
{%- endset %}
122
122
{% if menu is not empty %}
123
123
<li class =" {{ name }} {{ name == panel ? ' selected' : ' ' }}" >
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ protected function parseNodes(array $nodes)
107
107
*
108
108
* @param string $path The path of the YAML file
109
109
*
110
- * @return array|null The class descriptions or null, if the file was empty
110
10000
td>+ * @return array The class descriptions
111
111
*
112
112
* @throws \InvalidArgumentException If the file could not be loaded or did
113
113
* not contain a YAML array
@@ -122,7 +122,7 @@ private function parseFile($path)
122
122
123
123
// empty file
124
124
if (null === $ classes ) {
125
- return ;
125
+ return array () ;
126
126
}
127
127
128
128
// not an array
@@ -139,13 +139,7 @@ private function loadClassesFromYaml()
139
139
$ this ->yamlParser = new YamlParser ();
140
140
}
141
141
142
- // This method may throw an exception. Do not modify the class'
143
- // state before it completes
144
- if (false === ($ classes = $ this ->parseFile ($ this ->file ))) {
145
- return ;
146
- }
147
-
148
- $ this ->classes = $ classes ;
142
+ $ this ->classes = $ this ->parseFile ($ this ->file );
149
143
150
144
if (isset ($ this ->classes ['namespaces ' ])) {
151
145
foreach ($ this ->classes ['namespaces ' ] as $ alias => $ namespace ) {
Original file line number Diff line number Diff line change @@ -31,6 +31,10 @@ public function testLoadClassMetadataReturnsFalseIfEmpty()
31
31
$ metadata = new ClassMetadata ('Symfony\Component\Validator\Tests\Fixtures\Entity ' );
32
32
33
33
$ this ->assertFalse ($ loader ->loadClassMetadata ($ metadata ));
34
+
35
+ $ r = new \ReflectionProperty ($ loader , 'classes ' );
36
+ $ r ->setAccessible (true );
37
+ $ this ->assertSame (array (), $ r ->getValue ($ loader ));
34
38
}
35
39
36
40
/**
You can’t perform that action at this time.
0 commit comments