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 PHPStan level 9 errors and bump version to v3.1.3
This commit is contained in:
@@ -24,7 +24,12 @@ class BaselineManager
|
||||
}
|
||||
|
||||
foreach ($data['violations'] as $item) {
|
||||
if (isset($item['file'], $item['ruleId'], $item['htmlSnippet'])) {
|
||||
if (!is_array($item)) {
|
||||
continue;
|
||||
}
|
||||
if (isset($item['file'], $item['ruleId'], $item['htmlSnippet'])
|
||||
&& is_string($item['file']) && is_string($item['ruleId']) && is_string($item['htmlSnippet'])
|
||||
) {
|
||||
$key = $this->calculateKey($item['file'], $item['ruleId'], $item['htmlSnippet']);
|
||||
$this->ignoredKeys[$key] = true;
|
||||
}
|
||||
|
||||
+7
-5
@@ -35,6 +35,7 @@ class Config
|
||||
try {
|
||||
$content = \Symfony\Component\Yaml\Yaml::parseFile($path);
|
||||
if (is_array($content)) {
|
||||
/** @var array<string, mixed> $content */
|
||||
return new self($content);
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
@@ -56,7 +57,7 @@ class Config
|
||||
{
|
||||
$paths = $this->get('paths');
|
||||
if (is_array($paths)) {
|
||||
return $paths;
|
||||
return array_values(array_filter($paths, 'is_string'));
|
||||
}
|
||||
if (is_string($paths)) {
|
||||
return [$paths];
|
||||
@@ -71,7 +72,7 @@ class Config
|
||||
{
|
||||
$exclude = $this->get('exclude_paths');
|
||||
if (is_array($exclude)) {
|
||||
return $exclude;
|
||||
return array_values(array_filter($exclude, 'is_string'));
|
||||
}
|
||||
if (is_string($exclude)) {
|
||||
return [$exclude];
|
||||
@@ -108,10 +109,10 @@ class Config
|
||||
|
||||
if (is_array($rules)) {
|
||||
if (isset($rules['include']) && is_array($rules['include'])) {
|
||||
$include = $rules['include'];
|
||||
$include = array_values(array_filter($rules['include'], 'is_string'));
|
||||
}
|
||||
if (isset($rules['exclude']) && is_array($rules['exclude'])) {
|
||||
$exclude = $rules['exclude'];
|
||||
$exclude = array_values(array_filter($rules['exclude'], 'is_string'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,6 +124,7 @@ class Config
|
||||
|
||||
public function getGeminiApiKey(): ?string
|
||||
{
|
||||
return $this->get('gemini_api_key') ?? $_ENV['GEMINI_API_KEY'] ?? getenv('GEMINI_API_KEY') ?: null;
|
||||
$key = $this->get('gemini_api_key') ?? $_ENV['GEMINI_API_KEY'] ?? getenv('GEMINI_API_KEY') ?: null;
|
||||
return is_string($key) ? $key : null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user