@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | * |
| 24 | 24 | * @return string |
| 25 | 25 | */ |
| 26 | - protected function getDefaultLocale() { |
|
| 26 | + protected function getDefaultLocale(){ |
|
| 27 | 27 | return 'en'; |
| 28 | 28 | } |
| 29 | 29 | |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | * |
| 34 | 34 | * @return string[] |
| 35 | 35 | */ |
| 36 | - protected function getLocales() { |
|
| 36 | + protected function getLocales(){ |
|
| 37 | 37 | return array( |
| 38 | 38 | 'en' |
| 39 | 39 | ); |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | * @param string $locale |
| 52 | 52 | * @return string |
| 53 | 53 | */ |
| 54 | - protected function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null) { |
|
| 54 | + protected function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null){ |
|
| 55 | 55 | /** |
| 56 | 56 | * |
| 57 | 57 | * @var TranslatorInterface $translator |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | * @param string $locale |
| 72 | 72 | * @return string |
| 73 | 73 | */ |
| 74 | - protected function trans($id, array $parameters = array(), $domain = null, $locale = null) { |
|
| 74 | + protected function trans($id, array $parameters = array(), $domain = null, $locale = null){ |
|
| 75 | 75 | /** |
| 76 | 76 | * |
| 77 | 77 | * @var TranslatorInterface $translator |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | * |
| 86 | 86 | * @return TranslatorInterface |
| 87 | 87 | */ |
| 88 | - protected function getTranslator() { |
|
| 88 | + protected function getTranslator(){ |
|
| 89 | 89 | return $this->get('translator'); |
| 90 | 90 | } |
| 91 | 91 | |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | * |
| 95 | 95 | * @return \Knp\Component\Pager\PaginatorInterface |
| 96 | 96 | */ |
| 97 | - protected function getPaginator() { |
|
| 97 | + protected function getPaginator(){ |
|
| 98 | 98 | return $this->get('knp_paginator'); |
| 99 | 99 | } |
| 100 | 100 | |
@@ -103,8 +103,8 @@ discard block |
||
| 103 | 103 | * |
| 104 | 104 | * @return Stopwatch|NULL |
| 105 | 105 | */ |
| 106 | - protected function getStopWatch() { |
|
| 107 | - if($this->has('debug.stopwatch')) { |
|
| 106 | + protected function getStopWatch(){ |
|
| 107 | + if($this->has('debug.stopwatch')){ |
|
| 108 | 108 | return $this->get('debug.stopwatch'); |
| 109 | 109 | } |
| 110 | 110 | return null; |
@@ -117,8 +117,8 @@ discard block |
||
| 117 | 117 | * @throws \LogicException |
| 118 | 118 | * @return boolean |
| 119 | 119 | */ |
| 120 | - protected function hasRole($role) { |
|
| 121 | - if(!$this->container->has('security.authorization_checker')) { |
|
| 120 | + protected function hasRole($role){ |
|
| 121 | + if(!$this->container->has('security.authorization_checker')){ |
|
| 122 | 122 | throw new \LogicException('The SecurityBundle is not registered in your application.'); |
| 123 | 123 | } |
| 124 | 124 | return false !== $this->get('security.authorization_checker')->isGranted($role); |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | * @param string $class |
| 131 | 131 | * @return ObjectRepository |
| 132 | 132 | */ |
| 133 | - protected function getRepository($class) { |
|
| 133 | + protected function getRepository($class){ |
|
| 134 | 134 | return $this->getDoctrine()->getManagerForClass($class)->getRepository($class); |
| 135 | 135 | } |
| 136 | 136 | } |
| 137 | 137 | \ No newline at end of file |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | * |
| 24 | 24 | * @return string |
| 25 | 25 | */ |
| 26 | - protected function getDefaultLocale() { |
|
| 26 | + protected function getDefaultLocale(){ |
|
| 27 | 27 | return 'en'; |
| 28 | 28 | } |
| 29 | 29 | |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | * |
| 34 | 34 | * @return string[] |
| 35 | 35 | */ |
| 36 | - protected function getLocales() { |
|
| 36 | + protected function getLocales(){ |
|
| 37 | 37 | return array( |
| 38 | 38 | 'en' |
| 39 | 39 | ); |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | * @param string $locale |
| 52 | 52 | * @return string |
| 53 | 53 | */ |
| 54 | - protected function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null) { |
|
| 54 | + protected function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null){ |
|
| 55 | 55 | /** |
| 56 | 56 | * |
| 57 | 57 | * @var TranslatorInterface $translator |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | * @param string $locale |
| 72 | 72 | * @return string |
| 73 | 73 | */ |
| 74 | - protected function trans($id, array $parameters = array(), $domain = null, $locale = null) { |
|
| 74 | + protected function trans($id, array $parameters = array(), $domain = null, $locale = null){ |
|
| 75 | 75 | /** |
| 76 | 76 | * |
| 77 | 77 | * @var TranslatorInterface $translator |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | * |
| 86 | 86 | * @return TranslatorInterface |
| 87 | 87 | */ |
| 88 | - protected function getTranslator() { |
|
| 88 | + protected function getTranslator(){ |
|
| 89 | 89 | return $this->get('translator'); |
| 90 | 90 | } |
| 91 | 91 | |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | * |
| 95 | 95 | * @return \Knp\Component\Pager\PaginatorInterface |
| 96 | 96 | */ |
| 97 | - protected function getPaginator() { |
|
| 97 | + protected function getPaginator(){ |
|
| 98 | 98 | return $this->get('knp_paginator'); |
| 99 | 99 | } |
| 100 | 100 | |
@@ -103,8 +103,8 @@ discard block |
||
| 103 | 103 | * |
| 104 | 104 | * @return Stopwatch|NULL |
| 105 | 105 | */ |
| 106 | - protected function getStopWatch() { |
|
| 107 | - if($this->has('debug.stopwatch')) { |
|
| 106 | + protected function getStopWatch(){ |
|
| 107 | + if($this->has('debug.stopwatch')){ |
|
| 108 | 108 | return $this->get('debug.stopwatch'); |
| 109 | 109 | } |
| 110 | 110 | return null; |
@@ -117,8 +117,8 @@ discard block |
||
| 117 | 117 | * @throws \LogicException |
| 118 | 118 | * @return boolean |
| 119 | 119 | */ |
| 120 | - protected function hasRole($role) { |
|
| 121 | - if(!$this->container->has('security.authorization_checker')) { |
|
| 120 | + protected function hasRole($role){ |
|
| 121 | + if(!$this->container->has('security.authorization_checker')){ |
|
| 122 | 122 | throw new \LogicException('The SecurityBundle is not registered in your application.'); |
| 123 | 123 | } |
| 124 | 124 | return false !== $this->get('security.authorization_checker')->isGranted($role); |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | * @param string $class |
| 131 | 131 | * @return ObjectRepository |
| 132 | 132 | */ |
| 133 | - protected function getRepository($class) { |
|
| 133 | + protected function getRepository($class){ |
|
| 134 | 134 | return $this->getDoctrine()->getManagerForClass($class)->getRepository($class); |
| 135 | 135 | } |
| 136 | 136 | } |
| 137 | 137 | \ No newline at end of file |
@@ -33,9 +33,9 @@ discard block |
||
| 33 | 33 | */ |
| 34 | 34 | private $logger; |
| 35 | 35 | |
| 36 | - public final function load(ObjectManager $manager) { |
|
| 36 | + public final function load(ObjectManager $manager){ |
|
| 37 | 37 | $this->manager = $manager; |
| 38 | - if(!$this->skipMe()) { |
|
| 38 | + if(!$this->skipMe()){ |
|
| 39 | 39 | $this->getLogger()->info("Starting import of fixtures ..."); |
| 40 | 40 | $this->reportMemoryUsage(); |
| 41 | 41 | // $startTime = microtime(true); |
@@ -43,12 +43,12 @@ discard block |
||
| 43 | 43 | // $endTime = microtime(true); |
| 44 | 44 | // $this->info("Finished importing fixtures in " . $this->formatTime($startTime, $endTime)); |
| 45 | 45 | $this->reportMemoryUsage(); |
| 46 | - } else { |
|
| 46 | + } else{ |
|
| 47 | 47 | $this->getLogger()->info('Skipping import of fixtures !'); |
| 48 | 48 | } |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | - protected final function reportMemoryUsage() { |
|
| 51 | + protected final function reportMemoryUsage(){ |
|
| 52 | 52 | // $this->getLogger()->info("Currently using %s of RAM", $this->getMemoryUsage()); |
| 53 | 53 | } |
| 54 | 54 | |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | * |
| 63 | 63 | * @return bool |
| 64 | 64 | */ |
| 65 | - protected function skipMe() { |
|
| 65 | + protected function skipMe(){ |
|
| 66 | 66 | return false; |
| 67 | 67 | } |
| 68 | 68 | |
@@ -70,10 +70,10 @@ discard block |
||
| 70 | 70 | * |
| 71 | 71 | * @return LoggerInterface|null |
| 72 | 72 | */ |
| 73 | - protected function getLogger() { |
|
| 74 | - if(!$this->logger && $this->container && $this->container->has('logger')) { |
|
| 73 | + protected function getLogger(){ |
|
| 74 | + if(!$this->logger && $this->container && $this->container->has('logger')){ |
|
| 75 | 75 | $this->logger = $this->container->get('logger'); |
| 76 | - } else { |
|
| 76 | + } else{ |
|
| 77 | 77 | $this->logger = new NullLogger(); |
| 78 | 78 | } |
| 79 | 79 | return $this->logger; |
@@ -33,9 +33,9 @@ discard block |
||
| 33 | 33 | */ |
| 34 | 34 | private $logger; |
| 35 | 35 | |
| 36 | - public final function load(ObjectManager $manager) { |
|
| 36 | + public final function load(ObjectManager $manager){ |
|
| 37 | 37 | $this->manager = $manager; |
| 38 | - if(!$this->skipMe()) { |
|
| 38 | + if(!$this->skipMe()){ |
|
| 39 | 39 | $this->getLogger()->info("Starting import of fixtures ..."); |
| 40 | 40 | $this->reportMemoryUsage(); |
| 41 | 41 | // $startTime = microtime(true); |
@@ -43,12 +43,12 @@ discard block |
||
| 43 | 43 | // $endTime = microtime(true); |
| 44 | 44 | // $this->info("Finished importing fixtures in " . $this->formatTime($startTime, $endTime)); |
| 45 | 45 | $this->reportMemoryUsage(); |
| 46 | - } else { |
|
| 46 | + } else{ |
|
| 47 | 47 | $this->getLogger()->info('Skipping import of fixtures !'); |
| 48 | 48 | } |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | - protected final function reportMemoryUsage() { |
|
| 51 | + protected final function reportMemoryUsage(){ |
|
| 52 | 52 | // $this->getLogger()->info("Currently using %s of RAM", $this->getMemoryUsage()); |
| 53 | 53 | } |
| 54 | 54 | |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | * |
| 63 | 63 | * @return bool |
| 64 | 64 | */ |
| 65 | - protected function skipMe() { |
|
| 65 | + protected function skipMe(){ |
|
| 66 | 66 | return false; |
| 67 | 67 | } |
| 68 | 68 | |
@@ -70,10 +70,10 @@ discard block |
||
| 70 | 70 | * |
| 71 | 71 | * @return LoggerInterface|null |
| 72 | 72 | */ |
| 73 | - protected function getLogger() { |
|
| 74 | - if(!$this->logger && $this->container && $this->container->has('logger')) { |
|
| 73 | + protected function getLogger(){ |
|
| 74 | + if(!$this->logger && $this->container && $this->container->has('logger')){ |
|
| 75 | 75 | $this->logger = $this->container->get('logger'); |
| 76 | - } else { |
|
| 76 | + } else{ |
|
| 77 | 77 | $this->logger = new NullLogger(); |
| 78 | 78 | } |
| 79 | 79 | return $this->logger; |