<?hh // strict

namespace HackPack\HackUnit\Event;

use HackPack\HackUnit\Util\TraceItem;

class Skip
{
    public function __construct(private TraceItem $callSite)
    {
    }

    public function assertionLine() : ?int
    {
        return $this->callSite['line'] === -1 ?
            null :
            $this->callSite['line'];
    }

    public function testMethod() : ?string
    {
        return $this->callSite['function'] === '' ?
            null :
            $this->callSite['function'];
    }

    public function testClass() : ?string
    {
        return $this->callSite['class'] === '' ?
            null :
            $this->callSite['class'];
    }

    public function testFile() : ?string
    {
        return $this->callSite['file'] === '' ?
            null :
            $this->callSite['file'];
    }
}


<?hh // strict

namespace HackPack\HackUnit\Event;

use HackPack\HackUnit\Util\TraceItem;

class Skip
{
    public function __construct(private TraceItem $callSite)
    {
    }

    public function testMethod() : ?string
    {
        return $this->callSite['function'] === '' ?
            null :
            $this->callSite['function'];
    }

    public function testClass() : ?string
    {
        return $this->callSite['class'] === '' ?
            null :
            $this->callSite['class'];
    }

    public function testFile() : ?string
    {
        return $this->callSite['file'] === '' ?
            null :
            $this->callSite['file'];
    }

    public function assertionLine() : ?int
    {
        return $this->callSite['line'] === -1 ?
            null :
            $this->callSite['line'];
    }
}


--- 
+++ 
@@ -8,6 +8,13 @@
 {
     public function __construct(private TraceItem $callSite)
     {
+    }
+
+    public function assertionLine() : ?int
+    {
+        return $this->callSite['line'] === -1 ?
+            null :
+            $this->callSite['line'];
     }
 
     public function testMethod() : ?string
@@ -30,12 +37,5 @@
             null :
             $this->callSite['file'];
     }
-
-    public function assertionLine() : ?int
-    {
-        return $this->callSite['line'] === -1 ?
-            null :
-            $this->callSite['line'];
-    }
 }
 
Order methods line -> function -> class -> file.
