Passed
Push — master ( ef38a4...07a3b4 )
by Anthony
02:42
created
EventListener/GuidAwareListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 	public function prePersist($entity)
21 21
 	{
22 22
 		if ($entity->getGuid() === null) {
23
-			$entity->setGuid((string)Uuid::uuid4());
23
+			$entity->setGuid((string) Uuid::uuid4());
24 24
 		}
25 25
 	}
26 26
 }
Please login to merge, or discard this patch.
Controller/AccountsController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -75,14 +75,14 @@
 block discarded – undo
75 75
 				$username = $data->getUser()->getFirstName() . " " . $data->getUser()->getLastName();
76 76
 				
77 77
 				if ($guid === null) {
78
-					$this->addFlash("success-flash", "the account of ". $username . " was created");
78
+					$this->addFlash("success-flash", "the account of " . $username . " was created");
79 79
 				} else {
80
-					$this->addFlash("success-flash", "the account of ". $username . " was edited");
80
+					$this->addFlash("success-flash", "the account of " . $username . " was edited");
81 81
 				}
82 82
 				
83 83
 				return $this->redirectToRoute("ribsadmin_accounts");
84 84
 			} else {
85
-				$this->addFlash("error-flash", "An account with username ". $data->getUsername() . " already exist");
85
+				$this->addFlash("error-flash", "An account with username " . $data->getUsername() . " already exist");
86 86
 				return $this->redirectToRoute($request->get("_route"), ["guid" => $guid]);
87 87
 			}
88 88
 		}
Please login to merge, or discard this patch.
Service/Api.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,8 +94,8 @@
 block discarded – undo
94 94
 	{
95 95
 		$string = "abcdefghijklmnopqrstuvwxyzABCDEFGHJKMNPQRSTUVWXYZ23456789";
96 96
 		$token = "";
97
-		srand((double)microtime() * 1000000);
98
-		for ($i = 0 ; $i < $length ; $i++) {
97
+		srand((double) microtime() * 1000000);
98
+		for ($i = 0; $i < $length; $i++) {
99 99
 			$token .= $string[rand() % strlen($string)];
100 100
 		}
101 101
 		
Please login to merge, or discard this patch.
Service/AccessRights.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
 		
80 80
 		$ribs_admin_rights = json_decode(file_get_contents($this->globals->getBaseBundlePath() . "/Resources/json/ribsadmin_rights.json"));
81 81
 		$modules_rights = $this->module->getModuleRights();
82
-		$ribs_admin_rights = (object)array_merge((array)$ribs_admin_rights, (array)$modules_rights);
82
+		$ribs_admin_rights = (object) array_merge((array) $ribs_admin_rights, (array) $modules_rights);
83 83
 		
84 84
 		if ($admin_page == "ribsadmin" && $api !== "api" && strpos($route, "login") === false && strpos($route, "register") === false) {
85 85
 			//redirection if user not connected
Please login to merge, or discard this patch.
Command/ImportModuleCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
         $output->writeln("Start composer require " . $pacakge_name);
51 51
 
52 52
         $process = new Process("composer require " . $pacakge_name);
53
-        $process->run(function ($type, $buffer) {
53
+        $process->run(function($type, $buffer) {
54 54
             echo $buffer;
55 55
         });
56 56
 
Please login to merge, or discard this patch.
DependencyInjection/RibsAdminExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     {
15 15
         $loader = new YamlFileLoader(
16 16
             $container,
17
-            new FileLocator(__DIR__.'/../Resources/config')
17
+            new FileLocator(__DIR__ . '/../Resources/config')
18 18
         );
19 19
         $loader->load('services.yml');
20 20
     }
Please login to merge, or discard this patch.
Command/CreateAdminCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
         $account->setPassword($temp_password);
81 81
         $account->setUser($user);
82 82
         $account->setEmail($email);
83
-        $account->setUsername(substr($firstname, 0, 1).".".$lastname);
83
+        $account->setUsername(substr($firstname, 0, 1) . "." . $lastname);
84 84
         $this->em->persist($account);
85 85
 
86 86
         $this->em->flush();
Please login to merge, or discard this patch.
Controller/ModuleController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
             $data = $form->getData();
56 56
             $em->persist($data);
57 57
             $em->flush();
58
-            $this->addFlash("success-flash", "Module ". $data->getTitleTag() . " was " . $text);
58
+            $this->addFlash("success-flash", "Module " . $data->getTitleTag() . " was " . $text);
59 59
 
60 60
             return $this->redirectToRoute("ribsadmin_modules");
61 61
         }
Please login to merge, or discard this patch.
Service/ModuleService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 		foreach ($modules as $module) {
37 37
 			$modules_data[] = [
38 38
 				"name" => $module->getTitle(),
39
-				"rights" => (array)json_decode(file_get_contents($this->globals->getBaseBundlePath($module->getPackageName(), $module->getDevMode()) . "/Resources/json/ribsadmin_rights.json"))
39
+				"rights" => (array) json_decode(file_get_contents($this->globals->getBaseBundlePath($module->getPackageName(), $module->getDevMode()) . "/Resources/json/ribsadmin_rights.json"))
40 40
 			];
41 41
 		}
42 42
 		
@@ -59,6 +59,6 @@  discard block
 block discarded – undo
59 59
 			$rights[] = json_decode(file_get_contents($this->globals->getBaseBundlePath($module->getPackageName(), $module->getDevMode()) . "/Resources/json/ribsadmin_rights.json"));
60 60
 		}
61 61
 		
62
-		return (object)$rights;
62
+		return (object) $rights;
63 63
 	}
64 64
 }
Please login to merge, or discard this patch.