for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Htsl\Parser\Node;
use Htsl\Htsl;
use Htsl\ReadingBuffer\Line;
use Htsl\Parser\Node\Contracts\ANode;
use Htsl\Parser\Section;
////////////////////////////////////////////////////////////////
class SectionNode extends ANode
{
/**
* The name of the section.
*
* @access protected
* @var string
*/
protected $name;
* Real constructor.
* @return \Htsl\Parser\Node\Contracts\ANode
SectionNode
This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.
array
protected function construct():parent
$this->name= $this->line->pregGet('/(?<=\( ).*(?= \))/');
This check looks for improperly formatted assignments.
Every assignment must have exactly one space before and one space after the equals operator.
To illustrate:
$a = "a"; $ab = "ab"; $abc = "abc";
will have no issues, while
will report issues in lines 1 and 2.
return $this;
}
* Opening this node, and returning node opener.
* @access public
* @return string
public function open():string
$this->document->setSection(new Section($this->name));
return '';
* Close this node, and returning node closer.
* @param \Htsl\ReadingBuffer\Line $closerLine The line when node closed.
public function close( Line$closerLine ):string
$this->document->setSection(null);
This check marks files that end in a newline character, i.e. an empy line.
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.