GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 108f3b...905b81 )
by Telyn
01:45
created

COBUnknownBlock::Compile()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
require_once(dirname(__FILE__).'/COBBlock.php');
3
4
/// @brief Simple class to allow for extra block types.
5
class COBUnknownBlock extends COBBlock {
6
7
    /// @cond INTERNAL_DOCS
8
    
9
    private $contents;
10
11
    /// @endcond
12
13
    /// @brief Creates a new COBUnknown block with the given type and contents
14
    /**
15
     * @param $type The four-character type of the block
16
     * @param $contents The contents of the block
17
     */
18
    public function COBUnknownBlock($type, $contents) {
0 ignored issues
show
Unused Code introduced by
The parameter $contents is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
19
        parent::COBBlock($type);
0 ignored issues
show
Comprehensibility Bug introduced by
It seems like you call parent on a different method (COBBlock() instead of COBUnknownBlock()). Are you sure this is correct? If so, you might want to change this to $this->COBBlock().

This check looks for a call to a parent method whose name is different than the method from which it is called.

Consider the following code:

class Daddy
{
    protected function getFirstName()
    {
        return "Eidur";
    }

    protected function getSurName()
    {
        return "Gudjohnsen";
    }
}

class Son
{
    public function getFirstName()
    {
        return parent::getSurname();
    }
}

The getFirstName() method in the Son calls the wrong method in the parent class.

Loading history...
20
    }
21
22
    /// @brief Returns the raw data back again
23
    /** @return string
24
     */
25
    public function Compile() {
26
        return $this->GetType() . $this->contents;
27
    }
28
29
    /// @brief Gets the block's contents
30
    public function GetContents() {
31
        return $this->contents;
32
    }
33
}
34
?>
0 ignored issues
show
Best Practice introduced by
It is not recommended to use PHP's closing tag ?> in files other than templates.

Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.

A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.

Loading history...
35