@@ -78,37 +78,37 @@ public function lateCollect()
78
78
$ templateFinder ($ this ->profile );
79
79
}
80
80
81
- public function getTime ()
81
+ public function getTime (): int
82
82
{
83
83
return $ this ->getProfile ()->getDuration () * 1000 ;
84
84
}
85
85
86
- public function getTemplateCount ()
86
+ public function getTemplateCount (): int
87
87
{
88
88
return $ this ->getComputedData ('template_count ' );
89
89
}
90
90
91
- public function getTemplatePaths ()
91
+ public function getTemplatePaths (): array
92
92
{
93
93
return $ this ->data ['template_paths ' ];
94
94
}
95
95
96
- public function getTemplates ()
96
+ public function getTemplates (): array
97
97
{
98
98
return $ this ->getComputedData ('templates ' );
99
99
}
100
100
101
- public function getBlockCount ()
101
+ public function getBlockCount (): int
102
102
{
103
103
return $ this ->getComputedData ('block_count ' );
104
104
}
105
105
106
- public function getMacroCount ()
106
+ public function getMacroCount (): int
107
107
{
108
108
return $ this ->getComputedData ('macro_count ' );
109
109
}
110
110
111
- public function getHtmlCallGraph ()
111
+ public function getHtmlCallGraph (): Markup
112
112
{
113
113
$ dumper = new HtmlDumper ();
114
114
$ dump = $ dumper ->dump ($ this ->getProfile ());
@@ -129,7 +129,7 @@ public function getHtmlCallGraph()
129
129
return new Markup ($ dump , 'UTF-8 ' );
130
130
}
131
131
132
- public function getProfile ()
132
+ public function getProfile (): Profile
133
133
{
134
134
return $ this ->profile ??= unserialize ($ this ->data ['profile ' ], ['allowed_classes ' => ['Twig_Profiler_Profile ' , Profile::class]]);
135
135
}
@@ -141,7 +141,7 @@ private function getComputedData(string $index)
141
141
return $ this ->computed [$ index ];
142
142
}
143
143
144
- private function computeData (Profile $ profile )
144
+ private function computeData (Profile $ profile ): array
145
145
{
146
146
$ data = [
147
147
'template_count ' => 0 ,
0 commit comments