@@ -8,11 +8,6 @@ |
||
| 8 | 8 | |
| 9 | 9 | namespace Magium\Configuration\View; |
| 10 | 10 | |
| 11 | -use Zend\Form\Element; |
|
| 12 | -use Zend\Form\ElementInterface; |
|
| 13 | -use Zend\Form\View\Helper\FormElement; |
|
| 14 | -use Zend\Form\View\Helper\FormInput; |
|
| 15 | -use Zend\Form\View\Helper\FormSelect; |
|
| 16 | 11 | use Zend\View\Helper\AbstractHelper; |
| 17 | 12 | |
| 18 | 13 | class MagiumRecursiveContextRenderer extends AbstractHelper |
@@ -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 |
@@ -9,10 +9,6 @@ |
||
| 9 | 9 | namespace Magium\Configuration\View; |
| 10 | 10 | |
| 11 | 11 | use Zend\Form\Element; |
| 12 | -use Zend\Form\ElementInterface; |
|
| 13 | -use Zend\Form\View\Helper\FormElement; |
|
| 14 | -use Zend\Form\View\Helper\FormInput; |
|
| 15 | -use Zend\Form\View\Helper\FormSelect; |
|
| 16 | 12 | use Zend\View\Helper\AbstractHelper; |
| 17 | 13 | |
| 18 | 14 | class MagiumRenderer extends AbstractHelper |
@@ -27,7 +27,6 @@ discard block |
||
| 27 | 27 | * @param string $layoutFile |
| 28 | 28 | * @param string $viewFile |
| 29 | 29 | * @param boolean $provideWrapperHtml |
| 30 | - * @param boolean $provideJqueryUrl |
|
| 31 | 30 | * @throws InvalidViewConfigurationException |
| 32 | 31 | */ |
| 33 | 32 | public function __construct( |
@@ -62,7 +61,7 @@ discard block |
||
| 62 | 61 | } |
| 63 | 62 | |
| 64 | 63 | /** |
| 65 | - * @param mixed $bootstrapCssUrl |
|
| 64 | + * @param string $bootstrapCssUrl |
|
| 66 | 65 | */ |
| 67 | 66 | public function setBootstrapCssUrl($bootstrapCssUrl) |
| 68 | 67 | { |
@@ -78,7 +77,7 @@ discard block |
||
| 78 | 77 | } |
| 79 | 78 | |
| 80 | 79 | /** |
| 81 | - * @param mixed $bootstrapJsUrl |
|
| 80 | + * @param string $bootstrapJsUrl |
|
| 82 | 81 | */ |
| 83 | 82 | public function setBootstrapJsUrl($bootstrapJsUrl) |
| 84 | 83 | { |
@@ -96,7 +95,7 @@ discard block |
||
| 96 | 95 | } |
| 97 | 96 | |
| 98 | 97 | /** |
| 99 | - * @param mixed $provideWrapperHtml |
|
| 98 | + * @param boolean $provideWrapperHtml |
|
| 100 | 99 | */ |
| 101 | 100 | public function setProvideWrapperHtml($provideWrapperHtml) |
| 102 | 101 | { |
@@ -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 | |
@@ -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] = [ |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | 'message' => sprintf( |
| 38 | 38 | '%d setting%s saved in the context: %s', |
| 39 | 39 | count($json['values']), |
| 40 | - count($json['values'])>1?'s':'', |
|
| 40 | + count($json['values']) > 1 ? 's' : '', |
|
| 41 | 41 | $json['context']) |
| 42 | 42 | ]]); |
| 43 | 43 | } catch (\Exception $e) { |
@@ -59,10 +59,10 @@ discard block |
||
| 59 | 59 | |
| 60 | 60 | public function read(ServerRequestInterface $request) |
| 61 | 61 | { |
| 62 | - if (strpos($request->getHeader('content-type'), 'application/json') === false) { |
|
| 62 | + if (strpos($request->getHeader('content-type'), 'application/json') === false) { |
|
| 63 | 63 | throw new InvalidRequestException('MCM save operation requires an application/json content type'); |
| 64 | 64 | } |
| 65 | - $json = json_decode($request->getBody()->getContents(), true); |
|
| 65 | + $json = json_decode($request->getBody()->getContents(), true); |
|
| 66 | 66 | if ($json === false) { |
| 67 | 67 | throw new InvalidRequestException('Unable to read JSON string'); |
| 68 | 68 | } |