src/CodeGeneration/Filesystem/File/FindReplace.php
public function findReplaceName(
        string $singularFindName,
        string $singularReplaceName
    ): self {
        $singularFindName    = Inflector::classify($singularFindName);
        $singularReplaceName = Inflector::classify($singularReplaceName);
        $this->findReplace($singularFindName, $singularReplaceName);
        $this->findReplace(\lcfirst($singularFindName), \lcfirst($singularReplaceName));
        $this->findReplace(\strtoupper($singularFindName), \strtoupper($singularReplaceName));
        $this->findReplace(
            \strtoupper(Inflector::tableize($singularFindName)),
            \strtoupper(Inflector::tableize($singularReplaceName))
        );

        $pluralFindName    = $this->getPlural($singularFindName);
        $pluralReplaceName = $this->getPlural($singularReplaceName);
        $this->findReplace($pluralFindName, $pluralReplaceName);
        $this->findReplace(\lcfirst($pluralFindName), \lcfirst($pluralReplaceName));
        $this->findReplace(\strtoupper($pluralFindName), \strtoupper($pluralReplaceName));
        $this->findReplace(
            \strtoupper(Inflector::tableize($pluralFindName)),
            \strtoupper(Inflector::tableize($pluralReplaceName))
        );

        return $this;
    }
public function findReplaceName(
        string $singularFindName,
        string $singularReplaceName
    ): self {
        $singularFindName    = Inflector::classify($singularFindName);
        $singularReplaceName = Inflector::classify($singularReplaceName);
        $this->findReplace($singularFindName, $singularReplaceName);
        $this->findReplace(\lcfirst($singularFindName), \lcfirst($singularReplaceName));
        $this->findReplace(\strtoupper($singularFindName), \strtoupper($singularReplaceName));
        $this->findReplace(
            \strtoupper(Inflector::tableize($singularFindName)),
            \strtoupper(Inflector::tableize($singularReplaceName))
        );

        $pluralFindName    = $this->getPlural($singularFindName);
        $pluralReplaceName = $this->getPlural($singularReplaceName);
        $this->findReplace($pluralFindName, $pluralReplaceName);
        $this->findReplace(\lcfirst($pluralFindName), \lcfirst($pluralReplaceName));
        $this->findReplace(\strtoupper($pluralFindName), \strtoupper($pluralReplaceName));
        $this->findReplace(
            \strtoupper(Inflector::tableize($pluralFindName)),
            \strtoupper(Inflector::tableize($pluralReplaceName))
        );

        return $this;
    }
public function findReplaceName ( string $ singularFindName , string $ singularReplaceName ) : self { $ singularFindName = Inflector :: classify ( $ singularFindName ) ; $ singularReplaceName = Inflector :: classify ( $ singularReplaceName ) ; $ this -> findReplace ( $ singularFindName , $ singularReplaceName ) ; $ this -> findReplace ( \ lcfirst ( $ singularFindName ) , \ lcfirst ( $ singularReplaceName ) ) ; $ this -> findReplace ( \ strtoupper ( $ singularFindName ) , \ strtoupper ( $ singularReplaceName ) ) ; $ this -> findReplace ( \ strtoupper ( Inflector :: tableize ( $ singularFindName ) ) , \ strtoupper ( Inflector :: tableize ( $ singularReplaceName ) ) ) ; $ pluralFindName = $ this -> getPlural ( $ singularFindName ) ; $ pluralReplaceName = $ this -> getPlural ( $ singularReplaceName ) ; $ this -> findReplace ( $ pluralFindName , $ pluralReplaceName ) ; $ this -> findReplace ( \ lcfirst ( $ pluralFindName ) , \ lcfirst ( $ pluralReplaceName ) ) ; $ this -> findReplace ( \ strtoupper ( $ pluralFindName ) , \ strtoupper ( $ pluralReplaceName ) ) ; $ this -> findReplace ( \ strtoupper ( Inflector :: tableize ( $ pluralFindName ) ) , \ strtoupper ( Inflector :: tableize ( $ pluralReplaceName ) ) ) ; return $ this ; }
Find all instances of a name in the various code styles

Handles replacing both singular and plural replacements

@param string $singularFindName
@param string $singularReplaceName

@return FindReplace
Find all instances of a name in the various code styles