[CS][library] Remove @copyright & @license

for fl in $(find . -name "*.php"); do mv $fl $fl.old;       sed '/@copyright/d' $fl.old > $fl;       rm -f $fl.old; done;
for fl in $(find . -name "*.php"); do mv $fl $fl.old;       sed '/@license/d' $fl.old > $fl;       rm -f $fl.old; done;
[CS][Library] Set File Header

http://framework.zend.com/wiki/display/ZFDEV2/Coding+Standards#CodingStandards-Files

The following script replaces the content between PHP open tag and namespace declaration.

for COMPONENT in $(ls -d *)
do
    for FILE in $(find $COMPONENT -name "*.php")
    do
        BLOCK="\/\*\*\n \* Zend Framework \(http:\/\/framework\.zend\.com\/\)\n \*\n \* \@link      http:\/\/github\.com\/zendframework\/zf2 for the canonical source repository\n \* \@copyright Copyright \(c\) 2005-2012 Zend Technologies USA Inc\. \(http:\/\/www\.zend\.com\)\n \* \@license   http:\/\/framework\.zend\.com\/license\/new-bsd New BSD License\n \* \@package   Zend_$COMPONENT\n \*\/"
        perl -0777 -i -pe "s/(<\?php(\s*.*)*\nn)/<?php\n$BLOCK\n\nn/" $FILE
    done
done
[CS][Library] Set File Header

http://framework.zend.com/wiki/display/ZFDEV2/Coding+Standards#CodingStandards-Files

The following script replaces the content of the first comment in the file (useful for files without namespace declaration)

for COMPONENT in $(ls -d *)
do
    for FILE in $(find $COMPONENT -name "*.php")
    do
        BLOCK="\/\*\*\n \* Zend Framework \(http:\/\/framework\.zend\.com\/\)\n \*\n \* \@link      http:\/\/github\.com\/zendframework\/zf2 for the canonical source repository\n \* \@copyright Copyright \(c\) 2005-2012 Zend Technologies USA Inc\. \(http:\/\/www\.zend\.com\)\n \* \@license   http:\/\/framework\.zend\.com\/license\/new-bsd New BSD License\n \* \@package   Zend_$COMPONENT\n \*\/"
        perl -0777 -i -pe "s/(\/\*\*(\s*\*.*)*\/)/$BLOCK/" $FILE
    done
done
[CS][test] Remove @copyright & @license

for fl in $(find . -name "*.php"); do mv $fl $fl.old;       sed '/@copyright/d' $fl.old > $fl;       rm -f $fl.old; done;
for fl in $(find . -name "*.php"); do mv $fl $fl.old;       sed '/@license/d' $fl.old > $fl;       rm -f $fl.old; done;
[CS][Tests] Set File Header

http://framework.zend.com/wiki/display/ZFDEV2/Coding+Standards#CodingStandards-Files

The following script replaces the content between PHP open tag and namespace declaration.

for COMPONENT in $(ls -d *)
do
    for FILE in $(find $COMPONENT -name "*.php")
    do
        BLOCK="\/\*\*\n \* Zend Framework \(http:\/\/framework\.zend\.com\/\)\n \*\n \* \@link      http:\/\/github\.com\/zendframework\/zf2 for the canonical source repository\n \* \@copyright Copyright \(c\) 2005-2012 Zend Technologies USA Inc\. \(http:\/\/www\.zend\.com\)\n \* \@license   http:\/\/framework\.zend\.com\/license\/new-bsd New BSD License\n \* \@package   Zend_$COMPONENT\n \*\/"
        perl -0777 -i -pe "s/(<\?php(\s*.*)*\nn)/<?php\n$BLOCK\n\nn/" $FILE
    done
done

3 files was manually fixed
[CS][Tests] Set File Header

http://framework.zend.com/wiki/display/ZFDEV2/Coding+Standards#CodingStandards-Files

The following script replaces the content of the first comment in the file (useful for files without namespace declaration)

for COMPONENT in $(ls -d *)
do
    for FILE in $(find $COMPONENT -name "*.php")
    do
        BLOCK="\/\*\*\n \* Zend Framework \(http:\/\/framework\.zend\.com\/\)\n \*\n \* \@link      http:\/\/github\.com\/zendframework\/zf2 for the canonical source repository\n \* \@copyright Copyright \(c\) 2005-2012 Zend Technologies USA Inc\. \(http:\/\/www\.zend\.com\)\n \* \@license   http:\/\/framework\.zend\.com\/license\/new-bsd New BSD License\n \* \@package   Zend_$COMPONENT\n \*\/"
        perl -0777 -i -pe "s/(\/\*\*(\s*\*.*)*\/)/$BLOCK/" $FILE
    done
done
[CS][Tests] Rest of files
[CS][Library] Rest of files
Merge branch 'file-headers' of https://github.com/Maks3w/zf2 into feature/docblock-cleanup
Fix use statements in Zend\Serializer
Fix use statements in Zend\Rest
Fix use statements in Zend\Queue
Fix use statements in Zend\ProgressBar
Fix use statements in Zend\Navigation
Fix use statements in Zend\OpenId
Fix use statements in Zend\Pdf
Fix use statements in Zend\Memory
Fix use statements in Zend\Markup
Fix use statements in Zend\Mail
Fix use statements in Zend\Json