I am trying to download the PHPOffice/PHPWord GitHub repository from :
https://github.com/PHPOffice/PHPWord/tree/master
In the downloaded zip archive I only get the /src/ directory.
How do I download the other directories? I need the samples/ directory files.
Instead of downloading You should try
git clone https://github.com/PHPOffice/PHPWord.git
Run above command on command line/terminal in wherever folder you want. You will get all the folders you are looking for.