From define('WT_TYPE', 2);
to public const WT_TYPE = 2;
search: define\('([\w]*)', ([\w]*)\);
replace: public const $1 = $2;
From this 'return $this->attributes['example'];' to 'return $this->getAttribute('example');'
search: return \$this->attributes\['([\w]*)'\];
replace: return \$this->getAttribute\('$1'\);
From this '$this->attributes['example'] = $example;' to '$this->setAttribute('example', $example);'
search: \$this->attributes\['([\w]*)'\] = (\$[\w]*);
replace: \$this->setAttribute\('$1'\,$2);
From
'test',
to
* Attribute: test
*/
private const ATTRIBUTE_TEST = 'test';
search: '([\w]*)',
replace:
/**
* Attribute: $1
*/
private const ATTRIBUTE_\U$1 = '\L$1';
From
'test'
to
self::ATTRIBUTE_TEST
search: '([\w]*)',
replace: self::ATTRIBUTE_\U$1