@@ -128,7 +128,7 @@ |
||
| 128 | 128 | $table->addColumn(new Text('value')); |
| 129 | 129 | $table->addColumn(new Varchar('context', 255)); |
| 130 | 130 | $table->addConstraint( |
| 131 | - new UniqueKey(['path','context'], 'configuration_uniqueness_index') |
|
| 131 | + new UniqueKey(['path', 'context'], 'configuration_uniqueness_index') |
|
| 132 | 132 | ); |
| 133 | 133 | |
| 134 | 134 | $sql = new Sql($this->adapter); |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | public function __construct( |
| 32 | 32 | ServerRequestInterface $request, |
| 33 | 33 | MessageInterface $response, |
| 34 | - $viewDirectory = __DIR__ . '/views' , |
|
| 34 | + $viewDirectory = __DIR__ . '/views', |
|
| 35 | 35 | $layoutFile = 'layout.phtml', |
| 36 | 36 | $viewFile = 'view.phtml', |
| 37 | 37 | $provideWrapperHtml = true, |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | $possibleLocations[] = $file; |
| 47 | 47 | } |
| 48 | 48 | } |
| 49 | - $possibleLocations = array_unique($possibleLocations); // just in case... |
|
| 49 | + $possibleLocations = array_unique($possibleLocations); // just in case... |
|
| 50 | 50 | return $possibleLocations; |
| 51 | 51 | } |
| 52 | 52 | |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | |
| 8 | 8 | const CONTEXT_DEFAULT = 'default'; |
| 9 | 9 | |
| 10 | - const ALLOWED_TRUES = [ |
|
| 10 | + const ALLOWED_TRUES = [ |
|
| 11 | 11 | true, 'true', 1, '1', 'on', 'yes' |
| 12 | 12 | ]; |
| 13 | 13 | |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | { |
| 20 | 20 | function __invoke(array $contexts, $padding = 0) |
| 21 | 21 | { |
| 22 | - $output = sprintf('<ul class="nav nav-pills nav-stacked"%s>', $padding==0?' id="magium-contexts"':''); |
|
| 22 | + $output = sprintf('<ul class="nav nav-pills nav-stacked"%s>', $padding == 0 ? ' id="magium-contexts"' : ''); |
|
| 23 | 23 | foreach ($contexts as $context) { |
| 24 | 24 | $output .= sprintf( |
| 25 | 25 | '<li |
@@ -78,7 +78,7 @@ |
||
| 78 | 78 | continue; |
| 79 | 79 | } |
| 80 | 80 | $sectionId = $sectionName = (string)$section['identifier']; |
| 81 | - if (isset($section['label'])) { |
|
| 81 | + if (isset($section['label'])) { |
|
| 82 | 82 | $sectionName = (string)$section['label']; |
| 83 | 83 | } |
| 84 | 84 | $returnSections[$sectionId] = [ |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | 'message' => sprintf( |
| 33 | 33 | '%d setting%s saved in the context: %s', |
| 34 | 34 | count($json['values']), |
| 35 | - count($json['values'])>1?'s':'', |
|
| 35 | + count($json['values']) > 1 ? 's' : '', |
|
| 36 | 36 | $json['context']) |
| 37 | 37 | ]]); |
| 38 | 38 | } catch (\Exception $e) { |
@@ -58,12 +58,12 @@ discard block |
||
| 58 | 58 | if (is_array($header)) { |
| 59 | 59 | $header = array_shift($header); |
| 60 | 60 | } |
| 61 | - if (strpos($header, 'application/json') === false) { |
|
| 61 | + if (strpos($header, 'application/json') === false) { |
|
| 62 | 62 | throw new InvalidRequestException('MCM save operation requires an application/json content type'); |
| 63 | 63 | } |
| 64 | 64 | $body = $request->getBody(); |
| 65 | 65 | $body->rewind(); |
| 66 | - $json = json_decode($body->getContents(), true); |
|
| 66 | + $json = json_decode($body->getContents(), true); |
|
| 67 | 67 | if ($json === false) { |
| 68 | 68 | throw new InvalidRequestException('Unable to read JSON string'); |
| 69 | 69 | } |