devices[] = [ 'name' => $matches[3], 'text' => $text, 'type' => $df[1], 'blocks' => $blocks, 'size' => (int) $df[2] * 1024, 'used' => (int) $df[3] * 1024, 'available' => (int) $df[4] * 1024, 'percent' => (int) $df[5], 'filesystem' => $df[6] ]; } } } public function getDevices() : array { return $this->devices; } } class PhysicalDrives { public static function get() : ?PhysicalDrivesFactory { return PhysicalDrivesFactory::getInstance(); } public static function getDevices() : array { return PhysicalDrivesFactory::getInstance()->getDevices(); } } ?>