src/danog/MadelineProto/AnnotationsBuilder.php
private function setProperties()
    {
        \danog\MadelineProto\Logger::log('Generating properties...', \danog\MadelineProto\Logger::NOTICE);
        $fixture = DocBlockFactory::createInstance();
        $class = new \ReflectionClass(APIFactory::class);
        $content = file_get_contents($filename = $class->getFileName());
        foreach ($class->getProperties() as $property) {
            if ($raw_docblock = $property->getDocComment()) {
                $docblock = $fixture->create($raw_docblock);
                if ($docblock->hasTag('internal')) {
                    $content = str_replace("\n    ".$raw_docblock."\n    public \$".$property->getName().';', '', $content);
                }
            }
        }
        foreach ($this->get_method_namespaces() as $namespace) {
            $content = preg_replace('/(class( \\w+[,]?){0,}\\n{\\n)/', '${1}'."    /**\n"."     * @internal this is a internal property generated by build_docs.php, don't change manually\n"."     *\n"."     * @var {$namespace}\n"."     */\n"."    public \${$namespace};\n", $content);
        }
        file_put_contents($filename, $content);
    }
private function setProperties()
    {
        \danog\MadelineProto\Logger::log('Generating properties...', \danog\MadelineProto\Logger::NOTICE);
        $fixture = DocBlockFactory::createInstance();
        $class = new \ReflectionClass(APIFactory::class);
        $content = file_get_contents($filename = $class->getFileName());
        foreach ($class->getProperties() as $property) {
            if ($raw_docblock = $property->getDocComment()) {
                $docblock = $fixture->create($raw_docblock);
                if ($docblock->hasTag('internal')) {
                    $content = str_replace("\n    ".$raw_docblock."\n    public \$".$property->getName().';', '', $content);
                }
            }
        }
        foreach ($this->get_method_namespaces() as $namespace) {
            $content = preg_replace('/(class( \\w+[,]?){0,}\\n{\\n)/', '${1}'."    /**\n"."     * @internal this is a internal property generated by build_docs.php, don't change manually\n"."     *\n"."     * @var {$namespace}\n"."     */\n"."    public \${$namespace};\n", $content);
        }
        file_put_contents($filename, $content);
    }
private function setProperties ( ) { \ danog \ MadelineProto \ Logger :: log ( 'Generating properties...' , \ danog \ MadelineProto \ Logger :: NOTICE ) ; $ fixture = DocBlockFactory :: createInstance ( ) ; $ class = new \ ReflectionClass ( APIFactory :: class ) ; $ content = file_get_contents ( $ filename = $ class -> getFileName ( ) ) ; foreach ( $ class -> getProperties ( ) as $ property ) { if ( $ raw_docblock = $ property -> getDocComment ( ) ) { $ docblock = $ fixture -> create ( $ raw_docblock ) ; if ( $ docblock -> hasTag ( 'internal' ) ) { $ content = str_replace ( "\n    " . $ raw_docblock . "\n    public \$" . $ property -> getName ( ) . ';' , '' , $ content ) ; } } } foreach ( $ this -> get_method_namespaces ( ) as $ namespace ) { $ content = preg_replace ( '/(class( \\w+[,]?){0,}\\n{\\n)/' , '${1}' . "    /**\n" . "     * @internal this is a internal property generated by build_docs.php, don't change manually\n" . "     *\n" . "     * @var {$namespace}\n" . "     */\n" . "    public \${$namespace};\n" , $ content ) ; } file_put_contents ( $ filename , $ content ) ; }
Open file of class APIFactory
Insert properties
save the file with new content.
Open file of class APIFactory Insert properties save the file with new content .