Skip to content

Commit 7fbd927

Browse files
committed
Censor Fixes
1 parent f1f89cf commit 7fbd927

3 files changed

Lines changed: 13 additions & 25 deletions

File tree

src/Model/Base/BuildError.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,6 @@ public function setMessage(string $value): bool
115115
return $this->setData('message', $value);
116116
}
117117

118-
public function getCreateDate(): ?DateTime
119-
{
120-
return $this->getData('create_date');
121-
}
122-
123118
public function getHash(): ?string
124119
{
125120
return $this->getData('hash');

src/Model/Build.php

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -350,22 +350,15 @@ protected function getZeroConfigPlugins()
350350

351351
/**
352352
* Allows specific build types (e.g. Github) to report violations back to their respective services.
353-
*
354-
* @param string $plugin
355-
* @param string $message
356-
* @param int $severity
357-
* @param string $file
358-
* @param int $lineStart
359-
* @param int $lineEnd
360353
*/
361354
public function reportError(
362355
Builder $builder,
363-
$plugin,
364-
$message,
365-
$severity = BuildError::SEVERITY_NORMAL,
366-
$file = null,
367-
$lineStart = null,
368-
$lineEnd = null
356+
string $plugin,
357+
string $message,
358+
int $severity = BuildError::SEVERITY_NORMAL,
359+
?string $file = null,
360+
?int $lineStart = null,
361+
?int $lineEnd = null
369362
) {
370363
$writer = $builder->getBuildErrorWriter();
371364
$writer->write(

src/Store/BuildErrorWriter.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,18 +73,18 @@ public function write(
7373
$hash = BuildError::generateHash($plugin, $file, $lineStart, $lineEnd, $severity, $message);
7474

7575
$this->errors[] = [
76-
'plugin' => (string)$plugin,
77-
'message' => (string)$message,
78-
'severity' => (int)$severity,
79-
'file' => !\is_null($file) ? (string)$file : null,
80-
'line_start' => !\is_null($lineStart) ? (int)$lineStart : null,
81-
'line_end' => !\is_null($lineEnd) ? (int)$lineEnd : null,
76+
'plugin' => $plugin,
77+
'message' => $message,
78+
'severity' => $severity,
79+
'file' => $file,
80+
'line_start' => $lineStart,
81+
'line_end' => $lineEnd,
8282
'create_date' => $createdDate->format('Y-m-d H:i:s'),
8383
'hash' => $hash,
8484
'is_new' => $errorStore->getIsNewError($this->projectId, $hash) ? 1 : 0,
8585
];
8686

87-
if (\count($this->errors) >= $this->bufferSize) {
87+
if (count($this->errors) >= $this->bufferSize) {
8888
$this->flush();
8989
}
9090
}

0 commit comments

Comments
 (0)