@@ -20,22 +20,17 @@ class Collector
2020 private static $ collector ;
2121
2222
23- /**
24- * @return bool
25- */
26- public static function isStarted ()
23+ public static function isStarted (): bool
2724 {
2825 return self ::$ file !== null ;
2926 }
3027
3128
3229 /**
3330 * Starts gathering the information for code coverage.
34- * @param string
35- * @return void
3631 * @throws \LogicException
3732 */
38- public static function start ($ file )
33+ public static function start (string $ file ): void
3934 {
4035 if (self ::isStarted ()) {
4136 throw new \LogicException ('Code coverage collector has been already started. ' );
@@ -63,7 +58,7 @@ public static function start($file)
6358 /**
6459 * Flushes all gathered information. Effective only with PHPDBG collector.
6560 */
66- public static function flush ()
61+ public static function flush (): void
6762 {
6863 if (self ::isStarted () && self ::$ collector === 'collectPhpDbg ' ) {
6964 self ::save ();
@@ -73,10 +68,9 @@ public static function flush()
7368
7469 /**
7570 * Saves information about code coverage. Can be called repeatedly to free memory.
76- * @return void
7771 * @throws \LogicException
7872 */
79- public static function save ()
73+ public static function save (): void
8074 {
8175 if (!self ::isStarted ()) {
8276 throw new \LogicException ('Code coverage collector has not been started. ' );
@@ -99,9 +93,8 @@ public static function save()
9993
10094 /**
10195 * Collects information about code coverage.
102- * @return array
10396 */
104- private static function collectXdebug ()
97+ private static function collectXdebug (): array
10598 {
10699 $ positive = $ negative = [];
107100
@@ -125,9 +118,8 @@ private static function collectXdebug()
125118
126119 /**
127120 * Collects information about code coverage.
128- * @return array
129121 */
130- private static function collectPhpDbg ()
122+ private static function collectPhpDbg (): array
131123 {
132124 $ positive = phpdbg_end_oplog ();
133125 $ negative = phpdbg_get_executable ();
0 commit comments