@@ -67,19 +67,19 @@ class TOC
6767 */
6868 private static $ _bookmarkId = 0 ;
6969
70- /**
71- * Min title depth to show
72- *
73- * @var int
74- */
75- private $ _minDepth = 1 ;
76-
77- /**
78- * Max title depth to show
79- *
80- * @var int
81- */
82- private $ _maxDepth = 9 ;
70+ /**
71+ * Min title depth to show
72+ *
73+ * @var int
74+ */
75+ private $ _minDepth = 1 ;
76+
77+ /**
78+ * Max title depth to show
79+ *
80+ * @var int
81+ */
82+ private $ _maxDepth = 9 ;
8383
8484 /**
8585 * Create a new Table-of-Contents Element
@@ -114,9 +114,9 @@ public function __construct($styleFont = null, $styleTOC = null, $minDepth = 1,
114114 self ::$ _styleFont = $ styleFont ;
115115 }
116116 }
117-
118- $ this ->_minDepth = $ minDepth ;
119- $ this ->_maxDepth = $ maxDepth ;
117+
118+ $ this ->_minDepth = $ minDepth ;
119+ $ this ->_maxDepth = $ maxDepth ;
120120 }
121121
122122 /**
@@ -150,17 +150,17 @@ public static function addTitle($text, $depth = 0)
150150 public function getTitles ()
151151 {
152152 $ titles = self ::$ _titles ;
153- foreach ($ titles as $ i=> $ title ) {
154- if ($ this ->_minDepth > $ title ['depth ' ]) {
155- unset($ titles [$ i ]);
156- }
157- if (($ this ->_maxDepth != 0 ) && ($ this ->_maxDepth < $ title ['depth ' ])) {
158- unset($ titles [$ i ]);
159- }
160- }
161- $ titles = array_merge (array (), $ titles );
162-
163- return $ titles ;
153+ foreach ($ titles as $ i => $ title ) {
154+ if ($ this ->_minDepth > $ title ['depth ' ]) {
155+ unset($ titles [$ i ]);
156+ }
157+ if (($ this ->_maxDepth != 0 ) && ($ this ->_maxDepth < $ title ['depth ' ])) {
158+ unset($ titles [$ i ]);
159+ }
160+ }
161+ $ titles = array_merge (array (), $ titles );
162+
163+ return $ titles ;
164164 }
165165
166166 /**
@@ -182,22 +182,22 @@ public static function getStyleFont()
182182 {
183183 return self ::$ _styleFont ;
184184 }
185-
186- /**
187- * Get Max Depth
188- *
189- * @return int Max depth of titles
190- */
191- public function getMaxDepth () {
192- return $ this ->_maxDepth ;
193- }
194-
195- /**
196- * Get Min Depth
197- *
198- * @return int Min depth of titles
199- */
200- public function getMinDepth () {
201- return $ this ->_minDepth ;
202- }
185+
186+ /**
187+ * Get Max Depth
188+ *
189+ * @return int Max depth of titles
190+ */
191+ public function getMaxDepth () {
192+ return $ this ->_maxDepth ;
193+ }
194+
195+ /**
196+ * Get Min Depth
197+ *
198+ * @return int Min depth of titles
199+ */
200+ public function getMinDepth () {
201+ return $ this ->_minDepth ;
202+ }
203203}
0 commit comments