for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace SetBased\Stratum\MySql\Wrapper;
use SetBased\Stratum\Common\Wrapper\Helper\WrapperContext;
use SetBased\Stratum\MySql\Exception\MySqlDataLayerException;
/**
* Class for generating a wrapper method for a stored procedure 'selecting' rows for logging.
*/
class LogWrapper extends MysqlWrapper
{
//--------------------------------------------------------------------------------------------------------------------
* @inheritdoc
protected function generateMethodBodyWithLobFetchData(WrapperContext $context): void
// Nothing to do.
}
protected function generateMethodBodyWithLobReturnData(WrapperContext $context): void
protected function generateMethodBodyWithoutLob(WrapperContext $context): void
$this->throws(MySqlDataLayerException::class);
$context->codeStore->append(sprintf("return \$this->executeLog('call %s(%s)');",
$context->phpStratumMetadata['routine_name'],
$this->getRoutineArgs($context)));
protected function getDocBlockReturnType(WrapperContext $context): string
return 'int';
protected function getReturnTypeDeclaration(WrapperContext $context): string
return ': int';
//----------------------------------------------------------------------------------------------------------------------