View on GitHub

RefactoringPHP

A PHP version of the refactors from Refactoring: Improving the Design of Existing Code (Second Edition) by Martin Fowler

Rename Field (244)

Old Code

<?php
class Organization
{
    protected $name;
    public function getName()
    {
        return $this->name;
    }
}

New Code

<?php
class Organization
{
    protected $title;
    public function getTitle()
    {
        return $this->title;
    }
}