src/ArunCore/Core/CodeBuilders/DomainManipulator.php
public function getLastCurlBracketPositionFromClass($domainClass)
    {
        $matches = [];

        $lastClassCurlBracketPattern = "/\}[ \r\n]*[^{}]\$/";
        preg_match($lastClassCurlBracketPattern, $domainClass . " ", $matches, PREG_OFFSET_CAPTURE);
        $lastClassBracketIdx = $matches[0][1];

        if ($lastClassBracketIdx == 0) {
            throw new \Exception("Can't append function");
        }

        return $lastClassBracketIdx;
    }
public function getLastCurlBracketPositionFromClass($domainClass)
    {
        $matches = [];

        $lastClassCurlBracketPattern = "/\}[ \r\n]*[^{}]\$/";
        preg_match($lastClassCurlBracketPattern, $domainClass . " ", $matches, PREG_OFFSET_CAPTURE);
        $lastClassBracketIdx = $matches[0][1];

        if ($lastClassBracketIdx == 0) {
            throw new \Exception("Can't append function");
        }

        return $lastClassBracketIdx;
    }
public function getLastCurlBracketPositionFromClass ( $ domainClass ) { $ matches = [ ] ; $ lastClassCurlBracketPattern = "/\}[ \r\n]*[^{}]\$/" ; preg_match ( $ lastClassCurlBracketPattern , $ domainClass . " " , $ matches , PREG_OFFSET_CAPTURE ) ; $ lastClassBracketIdx = $ matches [ 0 ] [ 1 ] ; if ( $ lastClassBracketIdx == 0 ) { throw new \ Exception ( "Can't append function" ) ; } return $ lastClassBracketIdx ; }
Get the Last Curl Bracket of a class

@param $domainClass
@param $matches
@return mixed

@throws
Get the Last Curl Bracket of a class