@@ -68,7 +68,7 @@ |
||
68 | 68 | public static function propertyDeclarationLine(array $lines, string $name): int |
69 | 69 | { |
70 | 70 | $pattern = sprintf('/^.*@property(-read)? (.+) (%s) (.*)$/', |
71 | - preg_quote($name)); |
|
71 | + preg_quote($name)); |
|
72 | 72 | $line = self::searchPattern($lines, $pattern); |
73 | 73 | |
74 | 74 | if ($line===null) |
@@ -25,8 +25,8 @@ |
||
25 | 25 | foreach ($list as $item) |
26 | 26 | { |
27 | 27 | $properties[] = ['type' => $xpath->query('type', $item)[0]->nodeValue ?? null, |
28 | - 'name' => $xpath->query('name', $item)[0]->nodeValue ?? null, |
|
29 | - 'description' => $xpath->query('description', $item)[0]->nodeValue ?? null]; |
|
28 | + 'name' => $xpath->query('name', $item)[0]->nodeValue ?? null, |
|
29 | + 'description' => $xpath->query('description', $item)[0]->nodeValue ?? null]; |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | return $properties; |
@@ -24,7 +24,7 @@ |
||
24 | 24 | protected function configure() |
25 | 25 | { |
26 | 26 | $this->setName('plaisio:kernel-properties') |
27 | - ->setDescription('Adds properties to the kernel'); |
|
27 | + ->setDescription('Adds properties to the kernel'); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | //-------------------------------------------------------------------------------------------------------------------- |
@@ -132,7 +132,8 @@ |
||
132 | 132 | $properties = array_merge($properties, $config->queryKernelProperties()); |
133 | 133 | } |
134 | 134 | |
135 | - usort($properties, function ($a, $b) { |
|
135 | + usort($properties, function ($a, $b) |
|
136 | + { |
|
136 | 137 | return $a['name']<=>$b['name']; |
137 | 138 | }); |
138 | 139 |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | { |
81 | 81 | $key = ClassHelper::classDeclarationLine($lines, 'PlaisioKernel'); |
82 | 82 | |
83 | - if ($key<=2 || ($lines[$key - 1]!==' */' && $lines[$key - 1]!=='#[\AllowDynamicProperties]')) |
|
83 | + if ($key <= 2 || ($lines[$key - 1]!==' */' && $lines[$key - 1]!=='#[\AllowDynamicProperties]')) |
|
84 | 84 | { |
85 | 85 | throw new ConfigException('Unable to add property'); |
86 | 86 | } |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | $properties = array_merge($properties, $config->queryKernelProperties()); |
134 | 134 | } |
135 | 135 | |
136 | - usort($properties, function ($a, $b) { |
|
136 | + usort($properties, function($a, $b) { |
|
137 | 137 | return $a['name']<=>$b['name']; |
138 | 138 | }); |
139 | 139 |
@@ -23,8 +23,8 @@ |
||
23 | 23 | protected function configure() |
24 | 24 | { |
25 | 25 | $this->setName('plaisio:kernel-property-read-write') |
26 | - ->setDescription('Makes a property of the kernel read/write') |
|
27 | - ->addArgument('name', InputArgument::REQUIRED, 'The name of the property'); |
|
26 | + ->setDescription('Makes a property of the kernel read/write') |
|
27 | + ->addArgument('name', InputArgument::REQUIRED, 'The name of the property'); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | //-------------------------------------------------------------------------------------------------------------------- |
@@ -32,8 +32,8 @@ |
||
32 | 32 | protected function configure() |
33 | 33 | { |
34 | 34 | $this->setName('plaisio:kernel-data-layer-type') |
35 | - ->setDescription(sprintf('Sets the type of the DataLayer in %s', PlaisioKernel::class)) |
|
36 | - ->addArgument('class', InputArgument::OPTIONAL, 'The class of the DataLayer'); |
|
35 | + ->setDescription(sprintf('Sets the type of the DataLayer in %s', PlaisioKernel::class)) |
|
36 | + ->addArgument('class', InputArgument::OPTIONAL, 'The class of the DataLayer'); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | //-------------------------------------------------------------------------------------------------------------------- |