Skip to content

Commit 0f002a7

Browse files
author
Martin Brecht-Precht
committed
Increased code climate.
Disabled some checks and excluded some issues.
1 parent 4c8634d commit 0f002a7

File tree

3 files changed

+21
-17
lines changed

3 files changed

+21
-17
lines changed

.codeclimate.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ engines:
1616
enabled: false
1717
Design/TooManyPublicMethods:
1818
enabled: false
19+
UnusedFormalParameter:
20+
enabled: false
21+
Naming/BooleanGetMethodName:
22+
enabled: false
1923
ratings:
2024
paths:
2125
- "**.inc"

src/Handler/CommonmarkHandler.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,12 @@ public function getEscapeLineStartCharacters()
155155
}
156156

157157
/**
158-
* @param string $escapeLineStartCharacters
158+
* @param string $escapeCharacters
159159
* @return $this
160160
*/
161-
public function setEscapeLineStartCharacters($escapeLineStartCharacters)
161+
public function setEscapeLineStartCharacters($escapeCharacters)
162162
{
163-
$this->escapeLineStartCharacters = $escapeLineStartCharacters;
163+
$this->escapeLineStartCharacters = $escapeCharacters;
164164
return $this;
165165
}
166166

@@ -202,8 +202,8 @@ public function onBlockBegin($type)
202202
*/
203203
public function onCodeBlock($code, $hint = null)
204204
{
205-
$longestBacktickSequence = max(3, $this->longestBackticksSequence($code) + 1);
206-
$backtickString = str_repeat('`', $longestBacktickSequence);
205+
$backticksSequence = max(3, $this->longestBackticksSequence($code) + 1);
206+
$backtickString = str_repeat('`', $backticksSequence);
207207
$this
208208
->startLine()
209209
->append($backtickString)
@@ -487,11 +487,11 @@ public function onCodeContent($code)
487487
if (empty($code)) {
488488
$this->append(' ');
489489
} else {
490-
$longestBacktickSequence = $this->longestBackticksSequence($code);
491-
if ($longestBacktickSequence === 0) {
490+
$backticksSequence = $this->longestBackticksSequence($code);
491+
if ($backticksSequence === 0) {
492492
$this->append($code);
493493
} else {
494-
$this->appendCode($code, $longestBacktickSequence);
494+
$this->appendCode($code, $backticksSequence);
495495
}
496496
}
497497
$this->append('`');
@@ -737,12 +737,12 @@ private function longestBackticksSequence($code)
737737

738738
/**
739739
* @param string $code
740-
* @param int $longestBacktickSequence
740+
* @param int $backticksSequence
741741
* @return $this
742742
*/
743-
private function appendCode($code, $longestBacktickSequence)
743+
private function appendCode($code, $backticksSequence)
744744
{
745-
$backtickString = str_repeat('`', $longestBacktickSequence);
745+
$backtickString = str_repeat('`', $backticksSequence);
746746
$this->append($backtickString);
747747
if (mb_substr($code, 0, 1) === '`') {
748748
$this->append(' ');

src/Handler/XmlHandler.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ public function onDocumentBegin()
9494
$this->document->formatOutput = true;
9595
}
9696
$documentNode = $this->document->createElement(KeyNameTranslator::TYPE_DOCUMENT);
97-
$documentVersionAttribute = $this->document->createAttribute('version');
98-
$documentVersionAttribute->appendChild($this->document->createTextNode('1.0'));
99-
$documentNode->appendChild($documentVersionAttribute);
100-
$documentNamepsaceAttribute = $this->document->createAttribute('xmlns');
101-
$documentNamepsaceAttribute->appendChild($this->document->createTextNode('http://schema.markenwerk.net/markdom-1.0.xsd'));
102-
$documentNode->appendChild($documentNamepsaceAttribute);
97+
$versionAttribute = $this->document->createAttribute('version');
98+
$versionAttribute->appendChild($this->document->createTextNode('1.0'));
99+
$documentNode->appendChild($versionAttribute);
100+
$namepsaceAttribute = $this->document->createAttribute('xmlns');
101+
$namepsaceAttribute->appendChild($this->document->createTextNode('http://schema.markenwerk.net/markdom-1.0.xsd'));
102+
$documentNode->appendChild($namepsaceAttribute);
103103
$this->document->appendChild($documentNode);
104104
$this->blockParents->push($documentNode);
105105
}

0 commit comments

Comments
 (0)