Passed
Branch main (ad992b)
by Sammy
02:35
created
Models/Lingvo.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
     public function __toString()
30 30
     {
31
-        return $this->iso_name() . ' (' . $this->get(self::ISO_3) . ')';
31
+        return $this->iso_name().' ('.$this->get(self::ISO_3).')';
32 32
     }
33 33
 
34 34
     public function traceable(): bool
@@ -74,11 +74,11 @@  discard block
 block discarded – undo
74 74
         }
75 75
 
76 76
         if (isset($filter['types'])) {
77
-            $wc = sprintf("AND " . self::ISO_TYPE . " IN ('%s') ", implode('\', \'', array_keys(self::ISO_TYPES)));
77
+            $wc = sprintf("AND ".self::ISO_TYPE." IN ('%s') ", implode('\', \'', array_keys(self::ISO_TYPES)));
78 78
             $Query->and_where($wc);
79 79
         }
80 80
         if (isset($filter['scopes'])) {
81
-            $wc = sprintf("AND " . self::ISO_SCOPE . " IN ('%s') ", implode('\', \'', array_keys(self::ISO_SCOPES)));
81
+            $wc = sprintf("AND ".self::ISO_SCOPE." IN ('%s') ", implode('\', \'', array_keys(self::ISO_SCOPES)));
82 82
             $Query->and_where($wc);
83 83
         }
84 84
 
Please login to merge, or discard this patch.
PSR4Autoloader.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
         $dir_content = FileSystem::preg_scandir($base_dir, '/^[A-Z]{1}[A-Za-z]+(?!\.class.\.php)$/');
43 43
 
44 44
         foreach ($dir_content as $res) {
45
-            if (is_dir($fullpath = $base_dir . '/' . $res)) {
46
-                $this->addNamespace('HexMakina\kadro\\' . $res, $fullpath, $prepend);
45
+            if (is_dir($fullpath = $base_dir.'/'.$res)) {
46
+                $this->addNamespace('HexMakina\kadro\\'.$res, $fullpath, $prepend);
47 47
                 $this->addNamespaceTree($fullpath);
48 48
             }
49 49
         }
@@ -53,10 +53,10 @@  discard block
 block discarded – undo
53 53
     {
54 54
 
55 55
       // normalize namespace prefix
56
-        $prefix = trim($prefix, '\\') . '\\';
56
+        $prefix = trim($prefix, '\\').'\\';
57 57
 
58 58
       // normalize the base directory with a trailing separator
59
-        $base_dir = rtrim($base_dir, DIRECTORY_SEPARATOR) . '/';
59
+        $base_dir = rtrim($base_dir, DIRECTORY_SEPARATOR).'/';
60 60
 
61 61
       // initialize the namespace prefix array
62 62
         if (isset($this->prefixes[$prefix]) === false) {
@@ -88,10 +88,10 @@  discard block
 block discarded – undo
88 88
       // class name to find a mapped file name
89 89
         while (false !== $pos = strrpos($prefix, '\\')) {
90 90
           // retain the trailing namespace separator in the prefix
91
-            $prefix = substr($class, 0, $pos + 1);
91
+            $prefix = substr($class, 0, $pos+1);
92 92
           // var_dump("prefix: $prefix");
93 93
           // the rest is the relative class name
94
-            $relative_class = substr($class, $pos + 1);
94
+            $relative_class = substr($class, $pos+1);
95 95
           // try to load a mapped file for the prefix and relative class
96 96
 
97 97
             $mapped_file = $this->loadMappedFile($prefix, $relative_class);
Please login to merge, or discard this patch.
Controllers/OperatorController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 namespace HexMakina\kadro\Controllers;
14 14
 
15 15
 use HexMakina\Crudites\Crudites;
16
-use HexMakina\kadro\Auth\{Operator,OperatorInterface,ACL,AccessRefusedException};
16
+use HexMakina\kadro\Auth\{Operator, OperatorInterface, ACL, AccessRefusedException};
17 17
 
18 18
 class OperatorController extends \HexMakina\kadro\Controllers\ORMController
19 19
 {
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     public function dashboard()
60 60
     {
61 61
         $real_operator_class = get_class($this->operator());
62
-        $this->viewport('users', $real_operator_class::filter([], ['order_by' => [null,'username', 'ASC']]));
62
+        $this->viewport('users', $real_operator_class::filter([], ['order_by' => [null, 'username', 'ASC']]));
63 63
     }
64 64
 
65 65
     public function destroy()
Please login to merge, or discard this patch.
Controllers/KadroController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,15 +58,15 @@
 block discarded – undo
58 58
 
59 59
     private function trim_request_data()
60 60
     {
61
-        array_walk_recursive($_GET, function (&$value) {
61
+        array_walk_recursive($_GET, function(&$value) {
62 62
             $value = trim($value);
63 63
         });
64
-        array_walk_recursive($_REQUEST, function (&$value) {
64
+        array_walk_recursive($_REQUEST, function(&$value) {
65 65
             $value = trim($value);
66 66
         });
67 67
 
68 68
         if ($this->router()->submits()) {
69
-            array_walk_recursive($_POST, function (&$value) {
69
+            array_walk_recursive($_POST, function(&$value) {
70 70
                 $value = trim($value);
71 71
             });
72 72
         }
Please login to merge, or discard this patch.
Controllers/BaseController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 namespace HexMakina\kadro\Controllers;
4 4
 
5
-use Psr\Container\{ContainerInterface,ContainerExceptionInterface,NotFoundExceptionInterface};
5
+use Psr\Container\{ContainerInterface, ContainerExceptionInterface, NotFoundExceptionInterface};
6 6
 use HexMakina\kadro\Auth\{OperatorInterface, AccessRefusedException};
7 7
 use HexMakina\Hopper\RouterInterface;
8 8
 use HexMakina\LogLaddy\LoggerInterface;
Please login to merge, or discard this patch.
TableToForm.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 namespace HexMakina\kadro;
4 4
 
5 5
 use HexMakina\TightORM\Interfaces\ModelInterface;
6
-use HexMakina\Marker\{Form,Element};
6
+use HexMakina\Marker\{Form, Element};
7 7
 
8 8
 class TableToForm
9 9
 {
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
                     $form_field = new Element('div', $form_field, ['class' => $group_class]);
138 138
                 }
139 139
             }
140
-            $ret .= PHP_EOL . $form_field;
140
+            $ret .= PHP_EOL.$form_field;
141 141
         }
142 142
 
143 143
         return $ret;
Please login to merge, or discard this patch.
Auth/Operator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 namespace HexMakina\kadro\Auth;
4 4
 
5 5
 use HexMakina\Crudites\Interfaces\SelectInterface;
6
-use HexMakina\TightORM\{TightModel,RelationManyToMany};
6
+use HexMakina\TightORM\{TightModel, RelationManyToMany};
7 7
 
8 8
 class Operator extends TightModel implements OperatorInterface
9 9
 {
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         }
82 82
 
83 83
         if (isset($filters['model']) && !empty($filters['model'])) {
84
-            $Query->join([static::otm('t'), static::otm('a')], [[static::otm('a'),static::otm('k'), 't_from','id']], 'INNER');
84
+            $Query->join([static::otm('t'), static::otm('a')], [[static::otm('a'), static::otm('k'), 't_from', 'id']], 'INNER');
85 85
             $Query->aw_fields_eq(['model_id' => $filters['model']->get_id(), 'model_type' => get_class($filters['model'])::model_type()], static::otm('a'));
86 86
         }
87 87
 
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
     public function has_permission($p): bool
137 137
     {
138 138
       // new instances or inactive operators, none shall pass
139
-        if ($this->is_new() === true || $this->is_active()  === false) {
139
+        if ($this->is_new() === true || $this->is_active() === false) {
140 140
             return false;
141 141
         }
142 142
 
Please login to merge, or discard this patch.
Models/Abilities/Event.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 
23 23
     public function event_label()
24 24
     {
25
-        return '' . $this;
25
+        return ''.$this;
26 26
     }
27 27
 
28 28
     public static function today($format = Dato::FORMAT)
Please login to merge, or discard this patch.
Auth/Operatorability.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,12 +49,12 @@
 block discarded – undo
49 49
 
50 50
     public static function enhance_query_retrieve($Query, $filters, $options)
51 51
     {
52
-        $Query->auto_join([ACL::table(),'ACL'], null, 'LEFT OUTER');
52
+        $Query->auto_join([ACL::table(), 'ACL'], null, 'LEFT OUTER');
53 53
         $permission_alias = $Query->auto_join([Permission::table(), 'permission'], null, 'LEFT OUTER');
54 54
 
55 55
         $permission_ids_and_names = [];
56
-        $permission_ids_and_names [] = sprintf('GROUP_CONCAT(DISTINCT %s.%s) as %s', $permission_alias, 'id', $permission_alias . '_ids');
57
-        $permission_ids_and_names [] = sprintf('GROUP_CONCAT(DISTINCT %s.%s) as %s', $permission_alias, 'name', $permission_alias . '_names');
56
+        $permission_ids_and_names [] = sprintf('GROUP_CONCAT(DISTINCT %s.%s) as %s', $permission_alias, 'id', $permission_alias.'_ids');
57
+        $permission_ids_and_names [] = sprintf('GROUP_CONCAT(DISTINCT %s.%s) as %s', $permission_alias, 'name', $permission_alias.'_names');
58 58
         $Query->select_also($permission_ids_and_names);
59 59
 
60 60
         $Query->select_also(['operator.name as operator_name', 'operator.active as operator_active']);
Please login to merge, or discard this patch.