Skip to content

Commit

Permalink
to compatible psalm's methodId
Browse files Browse the repository at this point in the history
  • Loading branch information
sasezaki committed Jul 11, 2021
1 parent eca8448 commit d13ad96
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 38 deletions.
3 changes: 2 additions & 1 deletion build/generate.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
if (false === strpos($resourceFunction, '::')) {
$resourceFunctions[] = $resourceFunction;
} else {
$resourceMethods[] = $resourceFunction;
[$class, $method] = explode('::', $function);
$resourceMethods[] = $class . '::' . strtolower($method);
}
}
}
Expand Down
68 changes: 34 additions & 34 deletions src/ResourceOperations.php
Original file line number Diff line number Diff line change
Expand Up @@ -2267,57 +2267,57 @@ public static function getMethods(): array
'Directory::close',
'Directory::read',
'Directory::rewind',
'DirectoryIterator::openFile',
'EvIo::createStopped',
'DirectoryIterator::openfile',
'EvIo::createstopped',
'EvIo::set',
'EvLoop::io',
'FilesystemIterator::openFile',
'FilesystemIterator::openfile',
'Gmagick::readimagefile',
'HttpResponse::getRequestBodyStream',
'HttpResponse::getStream',
'HttpResponse::setStream',
'Imagick::pingImageFile',
'Imagick::readImageFile',
'Imagick::writeImageFile',
'Imagick::writeImagesFile',
'HttpResponse::getrequestbodystream',
'HttpResponse::getstream',
'HttpResponse::setstream',
'Imagick::pingimagefile',
'Imagick::readimagefile',
'Imagick::writeimagefile',
'Imagick::writeimagesfile',
'MongoGridFSCursor::__construct',
'MongoGridFSFile::getResource',
'MysqlndUhConnection::stmtInit',
'MysqlndUhConnection::storeResult',
'MysqlndUhConnection::useResult',
'MongoGridFSFile::getresource',
'MysqlndUhConnection::stmtinit',
'MysqlndUhConnection::storeresult',
'MysqlndUhConnection::useresult',
'PDFlib::open_memory_image',
'PDO::pgsqlLOBOpen',
'RecursiveDirectoryIterator::openFile',
'SWFMovie::saveToFile',
'SplFileInfo::openFile',
'SplFileObject::openFile',
'SplTempFileObject::openFile',
'V8Js::compileString',
'V8Js::executeScript',
'Vtiful\Kernel\Excel::setColumn',
'Vtiful\Kernel\Excel::setRow',
'PDO::pgsqllobopen',
'RecursiveDirectoryIterator::openfile',
'SWFMovie::savetofile',
'SplFileInfo::openfile',
'SplFileObject::openfile',
'SplTempFileObject::openfile',
'V8Js::compilestring',
'V8Js::executescript',
'Vtiful\Kernel\Excel::setcolumn',
'Vtiful\Kernel\Excel::setrow',
'Vtiful\Kernel\Format::align',
'Vtiful\Kernel\Format::bold',
'Vtiful\Kernel\Format::italic',
'Vtiful\Kernel\Format::underline',
'XMLWriter::openURI',
'Zookeeper::setLogStream',
'XMLWriter::openuri',
'Zookeeper::setlogstream',
'ffmpeg_frame::__construct',
'ffmpeg_frame::toGDImage',
'ffmpeg_frame::togdimage',
'finfo::buffer',
'finfo::file',
'gnupg::init',
'http\Client\Curl\User::socket',
'http\Client\Request::toStream',
'http\Client\Response::toStream',
'http\Env\Request::toStream',
'http\Client\Request::tostream',
'http\Client\Response::tostream',
'http\Env\Request::tostream',
'http\Env\Response::send',
'http\Env\Response::toStream',
'http\Env\Response::tostream',
'http\Header\Parser::stream',
'http\Message::toStream',
'http\Message::tostream',
'http\Message\Body::__construct',
'http\Message\Body::getResource',
'http\Message\Body::toStream',
'http\Message\Body::getresource',
'http\Message\Body::tostream',
'http\Message\Parser::stream',
'maxdb::use_result',
'maxdb_stmt::result_metadata',
Expand Down
6 changes: 3 additions & 3 deletions tests/ResourceOperationsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace SebastianBergmann\ResourceOperations;
namespace Sfp\ResourceOperations;

use PHPUnit\Framework\TestCase;

/**
* @covers \SebastianBergmann\ResourceOperations\ResourceOperations
* @covers \Sfp\ResourceOperations\ResourceOperations
*/
final class ResourceOperationsTest extends TestCase
{
Expand All @@ -29,6 +29,6 @@ public function testGetMethods(): void
$methods = ResourceOperations::getMethods();

$this->assertIsArray($methods);
$this->assertContains('V8Js::compileString', $methods);
$this->assertContains('V8Js::compilestring', $methods);
}
}

0 comments on commit d13ad96

Please sign in to comment.