PHP code example of invenso / rector

1. Go to this page and download the library: Download invenso/rector library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

invenso / rector example snippets


/**
 * @ApiResource 
 */
class BookEntity 
{
}

#[ApiResource] 
class BookEntity 
{
}

$rectorConfig->sets([
    ApiPlatformSetList::ANNOTATIONS_TO_ATTRIBUTES,
]);

$rectorConfig->sets([
    DoctrineSetList::ANNOTATIONS_TO_ATTRIBUTES,
    DoctrineSetList::GEDMO_ANNOTATIONS_TO_ATTRIBUTES,
    ApiPlatformSetList::ANNOTATIONS_TO_ATTRIBUTES,
    SymfonySetList::ANNOTATIONS_TO_ATTRIBUTES,
    SensiolabsSetList::ANNOTATIONS_TO_ATTRIBUTES,
]);