Git Komut Rehberi & Terminal Asistanı
Sıfırdan Yeni Bir Depo Başlatın:
Mevcut Bir Git Deposu veya Klasörü Gönderin:
Hataları Geri Alma, İptal & Temizlik:
Son commit'i geri al (yapılan değişiklikleri korur):
git reset --soft HEAD~1
Yapılan yerel değişiklikleri iptal et (çalışma ağacını temizler):
git restore .
Takip edilmeyen gereksiz dosyaları sil:
git clean -fd
Değişiklikleri geçici sakla ve geri getir (stash):
git stash git stash pop
Dal (Branch) ve Sürüm Etiketleri:
Yeni dal aç ve geçiş yap:
git checkout -b yeni-ozellik git push -u origin yeni-ozellik
Sürüm etiketi (tag) oluştur ve gönder:
git tag -a v1.0.0 -m "Sürüm 1.0.0" git push origin --tags
fix: resolve string/int type mismatches in HtmlDashboardReporter
- preg_replace() return value guarded with '?? ''' to eliminate string|null type - location line number explicitly cast to (string) before concatenation - PHPStan level 9 confirms zero errors after fix
This commit is contained in:
@@ -96,7 +96,7 @@ class HtmlDashboardReporter
|
|||||||
preg_match('/EXPLANATION:(.*)FIX:(.*)/s', $aiSuggestion, $matches);
|
preg_match('/EXPLANATION:(.*)FIX:(.*)/s', $aiSuggestion, $matches);
|
||||||
$explanation = trim($matches[1] ?? '');
|
$explanation = trim($matches[1] ?? '');
|
||||||
$fixedCode = trim($matches[2] ?? '');
|
$fixedCode = trim($matches[2] ?? '');
|
||||||
$fixedCode = preg_replace('/^```html\s*|\s*```$/i', '', $fixedCode);
|
$fixedCode = preg_replace('/^```html\s*|\s*```$/i', '', $fixedCode) ?? '';
|
||||||
} else {
|
} else {
|
||||||
$fixedCode = $aiSuggestion;
|
$fixedCode = $aiSuggestion;
|
||||||
}
|
}
|
||||||
@@ -104,7 +104,7 @@ class HtmlDashboardReporter
|
|||||||
$escapedSnippet = htmlspecialchars($v->htmlSnippet, ENT_QUOTES, 'UTF-8');
|
$escapedSnippet = htmlspecialchars($v->htmlSnippet, ENT_QUOTES, 'UTF-8');
|
||||||
$escapedFixed = $fixedCode ? htmlspecialchars($fixedCode, ENT_QUOTES, 'UTF-8') : '';
|
$escapedFixed = $fixedCode ? htmlspecialchars($fixedCode, ENT_QUOTES, 'UTF-8') : '';
|
||||||
$escapedExplanation = $explanation ? htmlspecialchars($explanation, ENT_QUOTES, 'UTF-8') : '';
|
$escapedExplanation = $explanation ? htmlspecialchars($explanation, ENT_QUOTES, 'UTF-8') : '';
|
||||||
$locationStr = $v->location ? htmlspecialchars($v->location['file'] . ':' . $v->location['line'], ENT_QUOTES, 'UTF-8') : 'N/A';
|
$locationStr = $v->location ? htmlspecialchars($v->location['file'] . ':' . (string)$v->location['line'], ENT_QUOTES, 'UTF-8') : 'N/A';
|
||||||
$escapedRuleId = htmlspecialchars($v->ruleId, ENT_QUOTES, 'UTF-8');
|
$escapedRuleId = htmlspecialchars($v->ruleId, ENT_QUOTES, 'UTF-8');
|
||||||
$escapedMessage = htmlspecialchars($v->message, ENT_QUOTES, 'UTF-8');
|
$escapedMessage = htmlspecialchars($v->message, ENT_QUOTES, 'UTF-8');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user