Remove all @throws PHPDoc, it's almost useless for SPC anymore

This commit is contained in:
crazywhalecc
2025-08-06 20:17:26 +08:00
committed by Jerry Ma
parent fa10142f13
commit 0c9a30256e
120 changed files with 169 additions and 1203 deletions

View File

@@ -30,9 +30,6 @@ class FileSystemTest extends TestCase
}
}
/**
* @throws FileSystemException
*/
public function testReplaceFileRegex()
{
$file = WORKING_DIR . '/.txt1';
@@ -54,9 +51,6 @@ class FileSystemTest extends TestCase
}
}
/**
* @throws FileSystemException
*/
public function testReadFile()
{
$file = WORKING_DIR . '/.testread';
@@ -66,9 +60,6 @@ class FileSystemTest extends TestCase
@unlink($file);
}
/**
* @throws FileSystemException
*/
public function testReplaceFileUser()
{
$file = WORKING_DIR . '/.txt1';
@@ -88,10 +79,6 @@ class FileSystemTest extends TestCase
$this->assertEquals('', FileSystem::extname('/tmp/asd.'));
}
/**
* @throws \ReflectionException
* @throws FileSystemException
*/
public function testGetClassesPsr4()
{
$classes = FileSystem::getClassesPsr4(ROOT_DIR . '/src/SPC/builder/extension', 'SPC\builder\extension');
@@ -109,9 +96,6 @@ class FileSystemTest extends TestCase
}
}
/**
* @throws FileSystemException
*/
public function testCreateDir()
{
FileSystem::createDir(WORKING_DIR . '/.testdir');
@@ -119,9 +103,6 @@ class FileSystemTest extends TestCase
rmdir(WORKING_DIR . '/.testdir');
}
/**
* @throws FileSystemException
*/
public function testReplaceFileStr()
{
$file = WORKING_DIR . '/.txt1';
@@ -133,9 +114,6 @@ class FileSystemTest extends TestCase
unlink($file);
}
/**
* @throws FileSystemException
*/
public function testResetDir()
{
// prepare fake git dir to test
@@ -146,10 +124,6 @@ class FileSystemTest extends TestCase
FileSystem::removeDir(WORKING_DIR . '/.fake_down_test');
}
/**
* @throws FileSystemException
* @throws RuntimeException
*/
public function testCopyDir()
{
// prepare fake git dir to test
@@ -162,9 +136,6 @@ class FileSystemTest extends TestCase
FileSystem::removeDir(WORKING_DIR . '/.fake_down_test2');
}
/**
* @throws FileSystemException
*/
public function testRemoveDir()
{
FileSystem::createDir(WORKING_DIR . '/.fake_down_test');
@@ -173,9 +144,6 @@ class FileSystemTest extends TestCase
$this->assertDirectoryDoesNotExist(WORKING_DIR . '/.fake_down_test');
}
/**
* @throws FileSystemException
*/
public function testLoadConfigArray()
{
$arr = FileSystem::loadConfigArray('lib');
@@ -200,9 +168,6 @@ class FileSystemTest extends TestCase
$this->assertContains('lib.json', $files);
}
/**
* @throws FileSystemException
*/
public function testWriteFile()
{
FileSystem::writeFile(WORKING_DIR . '/.txt', 'txt');