Place the flour into a large bowl along with the cubed butter and salt. Toss together to combine then use your fingertips to rub the butter into the flour until no large lumps of butter remain. The mixture should have a coarse, mealy texture (it should look a bit like ground almonds).
200 g (1 ⅔ cups) plain white flour or pastry flour, 100 g (7 tbsp) unsalted butter, cold, cubed, 1/2 tsp fine table salt
To check if the butter is fully incorporated, shake the bowl back and forth a few times which will force any larger clumps come to the surface which you can then rub in.
If using the egg, add it to the bowl without any water. If you're using an egg yolk add it along with 1 tbsp of water to the bowl. If not using any egg, add 2 tbsp of water to the bowl.
1 egg OR 1 egg yolk, 1 to 3 tbsp ice cold water
Use a butter knife to 'cut' the wet ingredients into the dry - this helps to distribute the moisture around the bowl a bit.
Test if it's wet enough: the mixture should clump together when a handful is squeezed together. If it seems too dry to clump together properly, drizzle in an extra 1 tbsp of cold water, 'cut' it through with a knife.
Tip everything out onto a work surface and gently bring together by hand, squeezing it into a disk shape. You may have to knead it a couple of times to achieve this (try to mix as little as possible as overworking the mixture can lead to tough pastry). You should now have a smooth disk of dough.