Skip to content

Instantly share code, notes, and snippets.

@harunyasar
Created October 22, 2015 07:00
Show Gist options
  • Save harunyasar/cdf24416a56e2c00bedb to your computer and use it in GitHub Desktop.
Save harunyasar/cdf24416a56e2c00bedb to your computer and use it in GitHub Desktop.
Personel sınıfı için Low Cohesion örneği
<?php
class Personel {
private $db;
public function __construct(DatabaseConnection $db)
{
$this->db = $db;
}
public function validateEmail($email)
{
// E-Posta doğrulama işlemi
}
public function sendEmail($email, $subject, $message)
{
// E-Posta gönderme işlemi
}
public function findUserById($id)
{
return $this->db->execute('SELECT * FROM users WHERE id = ?', array($id));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment