Completed
Push — master ( e9a020...3317db )
by Florian
03:03
created
DataFixtures/AbstractStingerFixture.php 3 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
12 12
 namespace StingerSoft\PlatformBundle\DataFixtures;
13 13
 
14 14
 use Doctrine\Common\DataFixtures\AbstractFixture;
15
-use Doctrine\Common\DataFixtures\DependentFixtureInterface;
16 15
 use Doctrine\Common\Persistence\ObjectManager;
17 16
 use Symfony\Component\DependencyInjection\ContainerAwareTrait;
18 17
 use Psr\Log\LoggerInterface;
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 use Psr\Log\LoggerInterface;
19 19
 use Psr\Log\NullLogger;
20 20
 
21
-abstract class AbstractStingerFixture extends AbstractFixture  {
21
+abstract class AbstractStingerFixture extends AbstractFixture {
22 22
 	
23 23
 	use ContainerAwareTrait;
24 24
 
@@ -34,9 +34,9 @@  discard block
 block discarded – undo
34 34
 	 */
35 35
 	private $logger;
36 36
 
37
-	public final function load(ObjectManager $manager) {
37
+	public final function load(ObjectManager $manager){
38 38
 		$this->manager = $manager;
39
-		if(!$this->skipMe()) {
39
+		if(!$this->skipMe()){
40 40
 			$this->getLogger()->info("Starting import of fixtures ...");
41 41
 			$this->reportMemoryUsage();
42 42
 			// $startTime = microtime(true);
@@ -44,12 +44,12 @@  discard block
 block discarded – undo
44 44
 			// $endTime = microtime(true);
45 45
 			// $this->info("Finished importing fixtures in " . $this->formatTime($startTime, $endTime));
46 46
 			$this->reportMemoryUsage();
47
-		} else {
47
+		} else{
48 48
 			$this->getLogger()->info('Skipping import of fixtures !');
49 49
 		}
50 50
 	}
51 51
 
52
-	protected final function reportMemoryUsage() {
52
+	protected final function reportMemoryUsage(){
53 53
 		//$this->getLogger()->info("Currently using %s of RAM", $this->getMemoryUsage());
54 54
 	}
55 55
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	 *
64 64
 	 * @return bool
65 65
 	 */
66
-	protected function skipMe() {
66
+	protected function skipMe(){
67 67
 		return false;
68 68
 	}
69 69
 
@@ -71,10 +71,10 @@  discard block
 block discarded – undo
71 71
 	 *
72 72
 	 * @return LoggerInterface|null
73 73
 	 */
74
-	protected function getLogger() {
75
-		if(!$this->logger && $this->container && $this->container->has('logger')) {
74
+	protected function getLogger(){
75
+		if(!$this->logger && $this->container && $this->container->has('logger')){
76 76
 			$this->logger = $this->container->get('logger');
77
-		} else {
77
+		} else{
78 78
 			$this->logger = new NullLogger();
79 79
 		}
80 80
 		return $this->logger;
Please login to merge, or discard this patch.
Braces   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 use Psr\Log\LoggerInterface;
19 19
 use Psr\Log\NullLogger;
20 20
 
21
-abstract class AbstractStingerFixture extends AbstractFixture  {
21
+abstract class AbstractStingerFixture extends AbstractFixture {
22 22
 	
23 23
 	use ContainerAwareTrait;
24 24
 
@@ -34,9 +34,9 @@  discard block
 block discarded – undo
34 34
 	 */
35 35
 	private $logger;
36 36
 
37
-	public final function load(ObjectManager $manager) {
37
+	public final function load(ObjectManager $manager){
38 38
 		$this->manager = $manager;
39
-		if(!$this->skipMe()) {
39
+		if(!$this->skipMe()){
40 40
 			$this->getLogger()->info("Starting import of fixtures ...");
41 41
 			$this->reportMemoryUsage();
42 42
 			// $startTime = microtime(true);
@@ -44,12 +44,12 @@  discard block
 block discarded – undo
44 44
 			// $endTime = microtime(true);
45 45
 			// $this->info("Finished importing fixtures in " . $this->formatTime($startTime, $endTime));
46 46
 			$this->reportMemoryUsage();
47
-		} else {
47
+		} else{
48 48
 			$this->getLogger()->info('Skipping import of fixtures !');
49 49
 		}
50 50
 	}
51 51
 
52
-	protected final function reportMemoryUsage() {
52
+	protected final function reportMemoryUsage(){
53 53
 		//$this->getLogger()->info("Currently using %s of RAM", $this->getMemoryUsage());
54 54
 	}
55 55
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	 *
64 64
 	 * @return bool
65 65
 	 */
66
-	protected function skipMe() {
66
+	protected function skipMe(){
67 67
 		return false;
68 68
 	}
69 69
 
@@ -71,10 +71,10 @@  discard block
 block discarded – undo
71 71
 	 *
72 72
 	 * @return LoggerInterface|null
73 73
 	 */
74
-	protected function getLogger() {
75
-		if(!$this->logger && $this->container && $this->container->has('logger')) {
74
+	protected function getLogger(){
75
+		if(!$this->logger && $this->container && $this->container->has('logger')){
76 76
 			$this->logger = $this->container->get('logger');
77
-		} else {
77
+		} else{
78 78
 			$this->logger = new NullLogger();
79 79
 		}
80 80
 		return $this->logger;
Please login to merge, or discard this patch.