Passed
Push — master ( b24d1f...919982 )
by Anthony
03:12
created
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.
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.
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.
EventListener/GuidAwareListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     public function prePersist($entity)
25 25
     {
26 26
         if ($entity->getGuid() === null) {
27
-            $entity->setGuid((string)Uuid::uuid4());
27
+            $entity->setGuid((string) Uuid::uuid4());
28 28
         }
29 29
     }
30 30
 }
Please login to merge, or discard this patch.
Controller/NavigationBuilderController.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,8 +44,7 @@
 block discarded – undo
44 44
         ]);
45 45
 
46 46
         foreach ($modules as $module) {
47
-            $navigation = json_decode(file_get_contents($this->get("ribs_admin.globals")->getBaseBundlePath
48
-                ($module->getPackageName(), $module->getDevMode()) . "/Resources/json/navigation.json"), true);
47
+            $navigation = json_decode(file_get_contents($this->get("ribs_admin.globals")->getBaseBundlePath($module->getPackageName(), $module->getDevMode()) . "/Resources/json/navigation.json"), true);
49 48
 
50 49
             foreach ($navigation["items"] as $item) {
51 50
                 if ($this->get("ribs_admin.acess_rights")->testRight($item["right"]) && (!isset($item["position"]) || $item["position"] === "left")) {
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
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
 		
97 97
 		$ribs_admin_rights = json_decode(file_get_contents($this->globals->getBaseBundlePath() . "/Resources/json/ribsadmin_rights.json"));
98 98
 		$modules_rights = $this->module->getModuleRights();
99
-		$ribs_admin_rights = (object)array_merge((array)$ribs_admin_rights, (array)$modules_rights);
99
+		$ribs_admin_rights = (object) array_merge((array) $ribs_admin_rights, (array) $modules_rights);
100 100
 		
101 101
 		if ($admin_page == "ribsadmin" && !$api && strpos($route, "login") === false && strpos($route, "register") === false) {
102 102
 			//redirection if user not connected
Please login to merge, or discard this patch.
Service/Api.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
             "userAgent" => $this->request->server->get("HTTP_USER_AGENT"),
85 85
             "ip" => $this->request->server->get("REMOTE_ADDR")
86 86
         ];
87
-        if (preg_match('/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i',$this->request->server->get("HTTP_USER_AGENT"))||preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i',substr($this->request->server->get("HTTP_USER_AGENT"),0,4))) {
87
+        if (preg_match('/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i', $this->request->server->get("HTTP_USER_AGENT")) || preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i', substr($this->request->server->get("HTTP_USER_AGENT"), 0, 4))) {
88 88
             $account_token_search = [
89 89
                 "token" => $token,
90 90
                 "userAgent" => $this->request->server->get("HTTP_USER_AGENT"),
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
     {
154 154
         $token = $this->generateToken();
155 155
         $now = new \DateTime();
156
-        $end_token = $now->add(new \DateInterval("PT".$this->container->getParameter("ribs_admin.api_token_duration")."M"));
156
+        $end_token = $now->add(new \DateInterval("PT" . $this->container->getParameter("ribs_admin.api_token_duration") . "M"));
157 157
 
158 158
         if (!$account_token) {
159 159
             $account_token = new AccountToken();
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
     {
184 184
         $string = "abcdefghijklmnopqrstuvwxyzABCDEFGHJKMNPQRSTUVWXYZ23456789";
185 185
         $token = "";
186
-        srand((double)microtime() * 1000000);
186
+        srand((double) microtime() * 1000000);
187 187
         for ($i = 0; $i < $length; $i++) {
188 188
             $token .= $string[rand() % strlen($string)];
189 189
         }
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
         $serializer = new Serializer([new DateTimeNormalizer(), new ObjectNormalizer($classMetadataFactory)], [new XmlEncoder(), new JsonEncoder()]);
206 206
 
207 207
         return $serializer->normalize($object, $type, [
208
-            'circular_reference_handler' => function ($object) {
208
+            'circular_reference_handler' => function($object) {
209 209
                 return $object->getId();
210 210
             },
211 211
             'groups' => 'main'
Please login to merge, or discard this patch.
Service/Globals.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,10 +48,10 @@
 block discarded – undo
48 48
 	{
49 49
 		$path = $this->container->get('kernel')->getProjectDir();
50 50
 
51
-        $dev_mode = $package === "piou-piou/ribs-admin-bundle" ? $this->container->getParameter("ribs_admin.dev_mode"): $dev_mode;
51
+        $dev_mode = $package === "piou-piou/ribs-admin-bundle" ? $this->container->getParameter("ribs_admin.dev_mode") : $dev_mode;
52 52
 
53 53
 		if ($dev_mode === true) {
54
-			$package = "/lib/".$this->getPackageDevName($package);
54
+			$package = "/lib/" . $this->getPackageDevName($package);
55 55
 		} else {
56 56
             $package = "/vendor/" . $package;
57 57
         }
Please login to merge, or discard this patch.
Controller/AccountsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
             $old_password = $account->getPassword();
54 54
         }
55 55
 
56
-        $form = $this->createForm("PiouPiou\RibsAdminBundle\Form\Account", $account,  ["disabled" => $disabled_form]);
56
+        $form = $this->createForm("PiouPiou\RibsAdminBundle\Form\Account", $account, ["disabled" => $disabled_form]);
57 57
 
58 58
         $form->handleRequest($request);
59 59
 
Please login to merge, or discard this patch.