Showing 19 of 19 total issues
Method init_file_stream_transfer
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function init_file_stream_transfer($name, $size, array $opt = array(), $meth = null)
{
// try to detect the type if not provided
$type = self::REGTYPE;
if (isset($opt['type']))
Method send_http_headers
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function send_http_headers()
{
// grab options
$opt = $this->opt;
Method add_cdr_file
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function add_cdr_file(array $args)
{
list($name, $opt, $meth, $crc, $zlen, $len, $ofs, $genb, $file_attribute) = $args;
// convert the 64 bit ints to 2 32bit ints
Method add_stream_file_header
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function add_stream_file_header($name, $size, array $opt, $meth)
{
// strip leading slashes from file name
// (fixes bug in windows archive viewer)
$name = preg_replace('/^\\/+/', '', $name);
Method add_to_cdr
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
private function add_to_cdr($name, array $opt, $meth, $crc, $zlen, $len, $rec_len, $genb = 0, $fattr = 0x20)
Missing file doc comment Open
namespace Barracuda\ArchiveStream;
- Exclude checks
Missing file doc comment Open
namespace Barracuda\ArchiveStream;
- Exclude checks
Expected 1 newline after closing parenthesis; 0 found Open
if ($output_stream === null) {
- Exclude checks
Missing file doc comment Open
namespace Barracuda\ArchiveStream;
- Exclude checks
Expected 1 newline after closing parenthesis; 0 found Open
if ($output_stream === null) {
- Exclude checks
Function init_file_stream_transfer
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function init_file_stream_transfer($name, $size, array $opt = array(), $meth = null)
{
// try to detect the type if not provided
$type = self::REGTYPE;
if (isset($opt['type']))
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function __construct
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function __construct(
$name = null,
array $opt = array(),
$base_path = null,
$output_stream = null
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function send_http_headers
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function send_http_headers()
{
// grab options
$opt = $this->opt;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Line indented incorrectly; expected 8 spaces, found 16 Open
}
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 16 Open
if ($output_stream === null) {
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 16 Open
}
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 16 Open
if ($output_stream === null) {
- Exclude checks
Whitespace found at end of line Open
{
- Exclude checks
FIXME found Open
// FIXME: Really? We just die here? Can we detect GMP in __constructor() instead maybe?
- Exclude checks