mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
Enable remaining rules in "f" (#4888)
This commit is contained in:
parent
0641dd9023
commit
05988508d1
@ -617,7 +617,7 @@ class CURLRequest extends Request
|
||||
// Debug
|
||||
if ($config['debug']) {
|
||||
$curlOptions[CURLOPT_VERBOSE] = 1;
|
||||
$curlOptions[CURLOPT_STDERR] = is_string($config['debug']) ? fopen($config['debug'], 'a+') : fopen('php://stderr', 'w');
|
||||
$curlOptions[CURLOPT_STDERR] = is_string($config['debug']) ? fopen($config['debug'], 'a+b') : fopen('php://stderr', 'wb');
|
||||
}
|
||||
|
||||
// Decode Content
|
||||
|
@ -177,7 +177,7 @@ class UploadedFile extends File implements UploadedFileInterface
|
||||
mkdir($path, 0777, true);
|
||||
//create the index.html file
|
||||
if (! is_file($path . 'index.html')) {
|
||||
$file = fopen($path . 'index.html', 'x+');
|
||||
$file = fopen($path . 'index.html', 'x+b');
|
||||
fclose($file);
|
||||
}
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ final class FileHandlerTest extends CIUnitTestCase
|
||||
vfsStream::newFile($expected)->at(vfsStream::setup('root'))->withContent('This is a test log');
|
||||
$logger->handle('warning', 'This is a test log');
|
||||
|
||||
$fp = fopen($config->handlers['Tests\Support\Log\Handlers\TestHandler']['path'] . $expected, 'r');
|
||||
$fp = fopen($config->handlers['Tests\Support\Log\Handlers\TestHandler']['path'] . $expected, 'rb');
|
||||
$line = fgets($fp);
|
||||
fclose($fp);
|
||||
|
||||
@ -75,7 +75,7 @@ final class FileHandlerTest extends CIUnitTestCase
|
||||
$expected = 'log-' . date('Y-m-d') . '.log';
|
||||
vfsStream::newFile($expected)->at(vfsStream::setup('root'))->withContent('Test message');
|
||||
$logger->handle('debug', 'Test message');
|
||||
$fp = fopen($config->handlers['Tests\Support\Log\Handlers\TestHandler']['path'] . $expected, 'r');
|
||||
$fp = fopen($config->handlers['Tests\Support\Log\Handlers\TestHandler']['path'] . $expected, 'rb');
|
||||
$line = fgets($fp); // and get the second line
|
||||
fclose($fp);
|
||||
|
||||
|
@ -121,6 +121,13 @@ final class CodeIgniter4 extends AbstractRuleset
|
||||
'annotation_include' => ['@internal'],
|
||||
'consider_absent_docblock_as_internal_class' => false,
|
||||
],
|
||||
'final_public_method_for_abstract_class' => false,
|
||||
'fopen_flag_order' => true,
|
||||
'fopen_flags' => ['b_mode' => true],
|
||||
'full_opening_tag' => true,
|
||||
'fully_qualified_strict_types' => true,
|
||||
'function_declaration' => ['closure_function_spacing' => 'one'],
|
||||
'function_typehint_space' => true,
|
||||
'function_to_constant' => true,
|
||||
'heredoc_indentation' => ['indentation' => 'start_plus_one'],
|
||||
'heredoc_to_nowdoc' => true,
|
||||
|
Loading…
x
Reference in New Issue
Block a user