diff --git a/components/using_components.rst b/components/using_components.rst index 4103b956afc..e9c7ce56c27 100644 --- a/components/using_components.rst +++ b/components/using_components.rst @@ -36,12 +36,6 @@ whatever component you want. file in your directory. In that case, no worries! Just run ``php composer.phar require symfony/finder``. -If you know you need a specific version of the library, add that to the command: - -.. code-block:: bash - - $ composer require symfony/finder - **3.** Write your code! Once Composer has downloaded the component(s), all you need to do is include @@ -51,7 +45,8 @@ immediately:: // File example: src/script.php - // update this to the path to the "vendor/" directory, relative to this file + // update this to the path to the "vendor/" + // directory, relative to this file require_once __DIR__.'/../vendor/autoload.php'; use Symfony\Component\Finder\Finder; diff --git a/cookbook/testing/database.rst b/cookbook/testing/database.rst index 5a8709ac3db..cccf13136e5 100644 --- a/cookbook/testing/database.rst +++ b/cookbook/testing/database.rst @@ -48,7 +48,8 @@ Suppose the class you want to test looks like this:: public function calculateTotalSalary($id) { - $employeeRepository = $this->entityManager->getRepository('AppBundle::Employee'); + $employeeRepository = $this->entityManager + ->getRepository('AppBundle::Employee'); $employee = $employeeRepository->find($id); return $employee->getSalary() + $employee->getBonus(); @@ -74,7 +75,8 @@ it's easy to pass a mock object within a test:: ->will($this->returnValue(1100)); // Now, mock the repository so it returns the mock of the employee - $employeeRepository = $this->getMockBuilder('\Doctrine\ORM\EntityRepository') + $employeeRepository = $this + ->getMockBuilder('\Doctrine\ORM\EntityRepository') ->disableOriginalConstructor() ->getMock(); $employeeRepository->expects($this->once()) @@ -82,7 +84,8 @@ it's easy to pass a mock object within a test:: ->will($this->returnValue($employee)); // Last, mock the EntityManager to return the mock of the repository - $entityManager = $this->getMockBuilder('\Doctrine\Common\Persistence\ObjectManager') + $entityManager = $this + ->getMockBuilder('\Doctrine\Common\Persistence\ObjectManager') ->disableOriginalConstructor() ->getMock(); $entityManager->expects($this->once()) diff --git a/cookbook/testing/profiling.rst b/cookbook/testing/profiling.rst index deb242498f2..0f822cc2079 100644 --- a/cookbook/testing/profiling.rst +++ b/cookbook/testing/profiling.rst @@ -21,7 +21,8 @@ the ``test`` environment):: { $client = static::createClient(); - // Enable the profiler for the next request (it does nothing if the profiler is not available) + // Enable the profiler for the next request + // (it does nothing if the profiler is not available) $client->enableProfiler(); $crawler = $client->request('GET', '/hello/Fabien');