@@ -47,8 +47,8 @@ discard block  | 
                                                    ||
| 47 | 47 | public function index(): HtmlResponse  | 
                                                        
| 48 | 48 |      { | 
                                                        
| 49 | 49 | $params = $this->request->getQueryParams();  | 
                                                        
| 50 | - $page = isset($params['page']) ? $params['page'] : 1;  | 
                                                        |
| 51 | - $limit = isset($params['limit']) ? $params['limit'] : 15;  | 
                                                        |
| 50 | + $page = isset($params[ 'page' ]) ? $params[ 'page' ] : 1;  | 
                                                        |
| 51 | + $limit = isset($params[ 'limit' ]) ? $params[ 'limit' ] : 15;  | 
                                                        |
| 52 | 52 | $pagination = $this->pageService->getPagination($page, $limit);  | 
                                                        
| 53 | 53 | |
| 54 | 54 | return new HtmlResponse(  | 
                                                        
@@ -61,14 +61,14 @@ discard block  | 
                                                    ||
| 61 | 61 | );  | 
                                                        
| 62 | 62 | }  | 
                                                        
| 63 | 63 | |
| 64 | - public function edit($errors = []): HtmlResponse  | 
                                                        |
| 64 | + public function edit($errors = [ ]): HtmlResponse  | 
                                                        |
| 65 | 65 |      { | 
                                                        
| 66 | 66 |          $id   = $this->request->getAttribute('id'); | 
                                                        
| 67 | 67 | $page = $this->pageService->getPage($id);  | 
                                                        
| 68 | 68 | |
| 69 | -        if($this->request->getParsedBody()) { | 
                                                        |
| 69 | +        if ($this->request->getParsedBody()) { | 
                                                        |
| 70 | 70 | $page = new \Page\Entity\Page();  | 
                                                        
| 71 | - $page->exchangeArray($this->request->getParsedBody() + (array)$page);  | 
                                                        |
| 71 | + $page->exchangeArray($this->request->getParsedBody() + (array) $page);  | 
                                                        |
| 72 | 72 | }  | 
                                                        
| 73 | 73 | |
| 74 | 74 | return new HtmlResponse(  | 
                                                        
@@ -98,7 +98,7 @@ discard block  | 
                                                    ||
| 98 | 98 |              return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin.pages')); | 
                                                        
| 99 | 99 |          } catch (FilterException $fe) { | 
                                                        
| 100 | 100 | return $this->edit($fe->getArrayMessages());  | 
                                                        
| 101 | -        } catch(\Exception $e) { | 
                                                        |
| 101 | +        } catch (\Exception $e) { | 
                                                        |
| 102 | 102 | throw $e;  | 
                                                        
| 103 | 103 | }  | 
                                                        
| 104 | 104 | }  | 
                                                        
@@ -7,7 +7,7 @@ discard block  | 
                                                    ||
| 7 | 7 | public function testIndexMethodShouldReturnHtmlResponse()  | 
                                                        
| 8 | 8 |      { | 
                                                        
| 9 | 9 | $template = $this->getMockBuilder(\Zend\Expressive\Template\TemplateRendererInterface::class)  | 
                                                        
| 10 | - ->setMethods(['render'])  | 
                                                        |
| 10 | + ->setMethods([ 'render' ])  | 
                                                        |
| 11 | 11 | ->getMockForAbstractClass();  | 
                                                        
| 12 | 12 | $template->expects(static::once())  | 
                                                        
| 13 | 13 |              ->method('render') | 
                                                        
@@ -31,7 +31,7 @@ discard block  | 
                                                    ||
| 31 | 31 | public function testEditMethodShouldReturnHtmlResponse()  | 
                                                        
| 32 | 32 |      { | 
                                                        
| 33 | 33 | $template = $this->getMockBuilder(\Zend\Expressive\Template\TemplateRendererInterface::class)  | 
                                                        
| 34 | - ->setMethods(['render'])  | 
                                                        |
| 34 | + ->setMethods([ 'render' ])  | 
                                                        |
| 35 | 35 | ->getMockForAbstractClass();  | 
                                                        
| 36 | 36 | $template->expects(static::once())  | 
                                                        
| 37 | 37 |              ->method('render') | 
                                                        
@@ -44,7 +44,7 @@ discard block  | 
                                                    ||
| 44 | 44 | $request = new \Zend\Diactoros\ServerRequest();  | 
                                                        
| 45 | 45 |          $request = $request->withAttribute('action', 'edit'); | 
                                                        
| 46 | 46 |          $request = $request->withAttribute('id', 1); | 
                                                        
| 47 | - $request = $request->withParsedBody(['page' => 'test']);  | 
                                                        |
| 47 | + $request = $request->withParsedBody([ 'page' => 'test' ]);  | 
                                                        |
| 48 | 48 | $response = new \Zend\Diactoros\Response();  | 
                                                        
| 49 | 49 | $pageController = new \Page\Controller\PageController(  | 
                                                        
| 50 | 50 | $template,  | 
                                                        
@@ -68,7 +68,7 @@ discard block  | 
                                                    ||
| 68 | 68 |              ->will(static::returnValue('http://unfinished.dev/admin')); | 
                                                        
| 69 | 69 | $request = new \Zend\Diactoros\ServerRequest();  | 
                                                        
| 70 | 70 |          $request = $request->withAttribute('action', 'save'); | 
                                                        
| 71 | - $request = $request->withParsedBody(['user' => 'test']);  | 
                                                        |
| 71 | + $request = $request->withParsedBody([ 'user' => 'test' ]);  | 
                                                        |
| 72 | 72 | $response = new \Zend\Diactoros\Response();  | 
                                                        
| 73 | 73 | $pageController = new \Page\Controller\PageController(  | 
                                                        
| 74 | 74 | $template,  | 
                                                        
@@ -94,7 +94,7 @@ discard block  | 
                                                    ||
| 94 | 94 | $request = new \Zend\Diactoros\ServerRequest();  | 
                                                        
| 95 | 95 |          $request = $request->withAttribute('action', 'save'); | 
                                                        
| 96 | 96 |          $request = $request->withAttribute('id', 2); | 
                                                        
| 97 | - $request = $request->withParsedBody(['user' => 'test']);  | 
                                                        |
| 97 | + $request = $request->withParsedBody([ 'user' => 'test' ]);  | 
                                                        |
| 98 | 98 | $response = new \Zend\Diactoros\Response();  | 
                                                        
| 99 | 99 | $pageController = new \Page\Controller\PageController(  | 
                                                        
| 100 | 100 | $template,  | 
                                                        
@@ -117,13 +117,13 @@ discard block  | 
                                                    ||
| 117 | 117 | ->getMock();  | 
                                                        
| 118 | 118 | $pageService->expects(static::once())  | 
                                                        
| 119 | 119 |              ->method('updatePage') | 
                                                        
| 120 | - ->willThrowException(new \Std\FilterException(['test error']));  | 
                                                        |
| 120 | + ->willThrowException(new \Std\FilterException([ 'test error' ]));  | 
                                                        |
| 121 | 121 | $router = $this->getMockBuilder(\Zend\Expressive\Router\RouterInterface::class)  | 
                                                        
| 122 | 122 | ->getMockForAbstractClass();  | 
                                                        
| 123 | 123 | $request = new \Zend\Diactoros\ServerRequest();  | 
                                                        
| 124 | 124 |          $request = $request->withAttribute('action', 'save'); | 
                                                        
| 125 | 125 |          $request = $request->withAttribute('id', 2); | 
                                                        
| 126 | - $request = $request->withParsedBody(['user' => 'test']);  | 
                                                        |
| 126 | + $request = $request->withParsedBody([ 'user' => 'test' ]);  | 
                                                        |
| 127 | 127 | $response = new \Zend\Diactoros\Response();  | 
                                                        
| 128 | 128 | $pageController = new \Page\Controller\PageController(  | 
                                                        
| 129 | 129 | $template,  | 
                                                        
@@ -163,7 +163,7 @@ discard block  | 
                                                    ||
| 163 | 163 | $request = new \Zend\Diactoros\ServerRequest();  | 
                                                        
| 164 | 164 |          $request = $request->withAttribute('action', 'save'); | 
                                                        
| 165 | 165 |          $request = $request->withAttribute('id', 2); | 
                                                        
| 166 | - $request = $request->withParsedBody(['user' => 'test']);  | 
                                                        |
| 166 | + $request = $request->withParsedBody([ 'user' => 'test' ]);  | 
                                                        |
| 167 | 167 | $response = new \Zend\Diactoros\Response();  | 
                                                        
| 168 | 168 | $pageController = new \Page\Controller\PageController(  | 
                                                        
| 169 | 169 | $template,  | 
                                                        
@@ -10,7 +10,7 @@  | 
                                                    ||
| 10 | 10 | ->disableOriginalConstructor()  | 
                                                        
| 11 | 11 | ->getMockForAbstractClass();  | 
                                                        
| 12 | 12 | $container = $this->getMockBuilder(\Interop\Container\ContainerInterface::class)  | 
                                                        
| 13 | - ->setMethods(['get'])  | 
                                                        |
| 13 | + ->setMethods([ 'get' ])  | 
                                                        |
| 14 | 14 | ->getMockForAbstractClass();  | 
                                                        
| 15 | 15 | $container->expects(static::at(0))  | 
                                                        
| 16 | 16 |              ->method('get') | 
                                                        
@@ -13,7 +13,7 @@ discard block  | 
                                                    ||
| 13 | 13 | ->disableOriginalConstructor()  | 
                                                        
| 14 | 14 | ->getMockForAbstractClass();  | 
                                                        
| 15 | 15 | $pageMapper = $this->getMockBuilder(\Page\Mapper\PageMapper::class)  | 
                                                        
| 16 | - ->setMethods(['getPaginationSelect', 'getAdapter'])  | 
                                                        |
| 16 | + ->setMethods([ 'getPaginationSelect', 'getAdapter' ])  | 
                                                        |
| 17 | 17 | ->disableOriginalConstructor()  | 
                                                        
| 18 | 18 | ->getMockForAbstractClass();  | 
                                                        
| 19 | 19 | $pageMapper->expects(static::once())  | 
                                                        
@@ -27,11 +27,11 @@ discard block  | 
                                                    ||
| 27 | 27 | $pageFilter = $this->getMockBuilder(\Page\Filter\PageFilter::class)  | 
                                                        
| 28 | 28 | ->getMockForAbstractClass();  | 
                                                        
| 29 | 29 | $container = $this->getMockBuilder(\Interop\Container\ContainerInterface::class)  | 
                                                        
| 30 | - ->setMethods(['get'])  | 
                                                        |
| 30 | + ->setMethods([ 'get' ])  | 
                                                        |
| 31 | 31 | ->getMockForAbstractClass();  | 
                                                        
| 32 | 32 | $container->expects(static::at(0))  | 
                                                        
| 33 | 33 |              ->method('get') | 
                                                        
| 34 | - ->will(static::returnValue(['upload' => ['public_path' => 'test', 'non_public_path' => 'test']]));  | 
                                                        |
| 34 | + ->will(static::returnValue([ 'upload' => [ 'public_path' => 'test', 'non_public_path' => 'test' ] ]));  | 
                                                        |
| 35 | 35 | $container->expects(static::at(1))  | 
                                                        
| 36 | 36 |              ->method('get') | 
                                                        
| 37 | 37 | ->will(static::returnValue($pageMapper));  | 
                                                        
@@ -29,7 +29,7 @@ discard block  | 
                                                    ||
| 29 | 29 | ->disableOriginalConstructor()  | 
                                                        
| 30 | 30 | ->getMock();  | 
                                                        
| 31 | 31 | $pageMapper = $this->getMockBuilder(\Page\Mapper\PageMapper::class)  | 
                                                        
| 32 | - ->setMethods(['select', 'current'])  | 
                                                        |
| 32 | + ->setMethods([ 'select', 'current' ])  | 
                                                        |
| 33 | 33 | ->disableOriginalConstructor()  | 
                                                        
| 34 | 34 | ->getMock();  | 
                                                        
| 35 | 35 | $pageMapper->expects(static::once())  | 
                                                        
@@ -55,7 +55,7 @@ discard block  | 
                                                    ||
| 55 | 55 | ->disableOriginalConstructor()  | 
                                                        
| 56 | 56 | ->getMock();  | 
                                                        
| 57 | 57 | $pageMapper = $this->getMockBuilder(\Page\Mapper\PageMapper::class)  | 
                                                        
| 58 | - ->setMethods(['getActivePage', 'current'])  | 
                                                        |
| 58 | + ->setMethods([ 'getActivePage', 'current' ])  | 
                                                        |
| 59 | 59 | ->disableOriginalConstructor()  | 
                                                        
| 60 | 60 | ->getMock();  | 
                                                        
| 61 | 61 | $pageMapper->expects(static::once())  | 
                                                        
@@ -81,7 +81,7 @@ discard block  | 
                                                    ||
| 81 | 81 | ->disableOriginalConstructor()  | 
                                                        
| 82 | 82 | ->getMock();  | 
                                                        
| 83 | 83 | $pageMapper = $this->getMockBuilder(\Page\Mapper\PageMapper::class)  | 
                                                        
| 84 | - ->setMethods(['select', 'current'])  | 
                                                        |
| 84 | + ->setMethods([ 'select', 'current' ])  | 
                                                        |
| 85 | 85 | ->disableOriginalConstructor()  | 
                                                        
| 86 | 86 | ->getMock();  | 
                                                        
| 87 | 87 | $pageMapper->expects(static::once())  | 
                                                        
@@ -107,7 +107,7 @@ discard block  | 
                                                    ||
| 107 | 107 | 'is_homepage' => 1  | 
                                                        
| 108 | 108 | ];  | 
                                                        
| 109 | 109 | $pageFilter = $this->getMockBuilder(\Page\Filter\PageFilter::class)  | 
                                                        
| 110 | - ->setMethods(['getInputFilter', 'setData', 'isValid', 'getValues'])  | 
                                                        |
| 110 | + ->setMethods([ 'getInputFilter', 'setData', 'isValid', 'getValues' ])  | 
                                                        |
| 111 | 111 | ->disableOriginalConstructor()  | 
                                                        
| 112 | 112 | ->getMock();  | 
                                                        
| 113 | 113 | $pageFilter->expects(static::once())  | 
                                                        
@@ -123,7 +123,7 @@ discard block  | 
                                                    ||
| 123 | 123 |              ->method('setData') | 
                                                        
| 124 | 124 | ->willReturnSelf();  | 
                                                        
| 125 | 125 | $pageMapper = $this->getMockBuilder(\Page\Mapper\PageMapper::class)  | 
                                                        
| 126 | - ->setMethods(['update', 'insert'])  | 
                                                        |
| 126 | + ->setMethods([ 'update', 'insert' ])  | 
                                                        |
| 127 | 127 | ->disableOriginalConstructor()  | 
                                                        
| 128 | 128 | ->getMock();  | 
                                                        
| 129 | 129 | $pageMapper->expects(static::once())  | 
                                                        
@@ -151,7 +151,7 @@ discard block  | 
                                                    ||
| 151 | 151 | ];  | 
                                                        
| 152 | 152 | |
| 153 | 153 | $pageFilter = $this->getMockBuilder(\Page\Filter\PageFilter::class)  | 
                                                        
| 154 | - ->setMethods(['getInputFilter', 'setData', 'isValid', 'getMessages'])  | 
                                                        |
| 154 | + ->setMethods([ 'getInputFilter', 'setData', 'isValid', 'getMessages' ])  | 
                                                        |
| 155 | 155 | ->disableOriginalConstructor()  | 
                                                        
| 156 | 156 | ->getMock();  | 
                                                        
| 157 | 157 | $pageFilter->expects(static::once())  | 
                                                        
@@ -162,12 +162,12 @@ discard block  | 
                                                    ||
| 162 | 162 | ->willReturn(false);  | 
                                                        
| 163 | 163 | $pageFilter->expects(static::once())  | 
                                                        
| 164 | 164 |              ->method('getMessages') | 
                                                        
| 165 | - ->willReturn(['test error']);  | 
                                                        |
| 165 | + ->willReturn([ 'test error' ]);  | 
                                                        |
| 166 | 166 | $pageFilter->expects(static::once())  | 
                                                        
| 167 | 167 |              ->method('setData') | 
                                                        
| 168 | 168 | ->willReturnSelf();  | 
                                                        
| 169 | 169 | $pageMapper = $this->getMockBuilder(\Page\Mapper\PageMapper::class)  | 
                                                        
| 170 | - ->setMethods(['update', 'insert'])  | 
                                                        |
| 170 | + ->setMethods([ 'update', 'insert' ])  | 
                                                        |
| 171 | 171 | ->disableOriginalConstructor()  | 
                                                        
| 172 | 172 | ->getMock();  | 
                                                        
| 173 | 173 | $paginator = $this->getMockBuilder(\Zend\Paginator\Paginator::class)  | 
                                                        
@@ -191,11 +191,11 @@ discard block  | 
                                                    ||
| 191 | 191 | 'is_homepage' => 1  | 
                                                        
| 192 | 192 | ];  | 
                                                        
| 193 | 193 | $pageFilter = $this->getMockBuilder(\Page\Filter\PageFilter::class)  | 
                                                        
| 194 | - ->setMethods(['select'])  | 
                                                        |
| 194 | + ->setMethods([ 'select' ])  | 
                                                        |
| 195 | 195 | ->disableOriginalConstructor()  | 
                                                        
| 196 | 196 | ->getMock();  | 
                                                        
| 197 | 197 | $pageMapper = $this->getMockBuilder(\Page\Mapper\PageMapper::class)  | 
                                                        
| 198 | - ->setMethods(['select', 'current'])  | 
                                                        |
| 198 | + ->setMethods([ 'select', 'current' ])  | 
                                                        |
| 199 | 199 | ->disableOriginalConstructor()  | 
                                                        
| 200 | 200 | ->getMock();  | 
                                                        
| 201 | 201 | $pageMapper->expects(static::once())  | 
                                                        
@@ -225,7 +225,7 @@ discard block  | 
                                                    ||
| 225 | 225 | 'is_homepage' => 1  | 
                                                        
| 226 | 226 | ];  | 
                                                        
| 227 | 227 | $pageFilter = $this->getMockBuilder(\Page\Filter\PageFilter::class)  | 
                                                        
| 228 | - ->setMethods(['getInputFilter', 'setData', 'isValid', 'getMessages'])  | 
                                                        |
| 228 | + ->setMethods([ 'getInputFilter', 'setData', 'isValid', 'getMessages' ])  | 
                                                        |
| 229 | 229 | ->disableOriginalConstructor()  | 
                                                        
| 230 | 230 | ->getMock();  | 
                                                        
| 231 | 231 | $pageFilter->expects(static::once())  | 
                                                        
@@ -239,9 +239,9 @@ discard block  | 
                                                    ||
| 239 | 239 | ->willReturn(false);  | 
                                                        
| 240 | 240 | $pageFilter->expects(static::once())  | 
                                                        
| 241 | 241 |              ->method('getMessages') | 
                                                        
| 242 | - ->willReturn(['test error']);  | 
                                                        |
| 242 | + ->willReturn([ 'test error' ]);  | 
                                                        |
| 243 | 243 | $pageMapper = $this->getMockBuilder(\Page\Mapper\PageMapper::class)  | 
                                                        
| 244 | - ->setMethods(['select', 'current'])  | 
                                                        |
| 244 | + ->setMethods([ 'select', 'current' ])  | 
                                                        |
| 245 | 245 | ->disableOriginalConstructor()  | 
                                                        
| 246 | 246 | ->getMock();  | 
                                                        
| 247 | 247 | $pageMapper->expects(static::once())  | 
                                                        
@@ -267,7 +267,7 @@ discard block  | 
                                                    ||
| 267 | 267 | 'is_homepage' => 1  | 
                                                        
| 268 | 268 | ];  | 
                                                        
| 269 | 269 | $pageFilter = $this->getMockBuilder(\Page\Filter\PageFilter::class)  | 
                                                        
| 270 | - ->setMethods(['getInputFilter', 'setData', 'isValid', 'getValues', 'select'])  | 
                                                        |
| 270 | + ->setMethods([ 'getInputFilter', 'setData', 'isValid', 'getValues', 'select' ])  | 
                                                        |
| 271 | 271 | ->disableOriginalConstructor()  | 
                                                        
| 272 | 272 | ->getMock();  | 
                                                        
| 273 | 273 | $pageFilter->expects(static::once())  | 
                                                        
@@ -283,7 +283,7 @@ discard block  | 
                                                    ||
| 283 | 283 |              ->method('setData') | 
                                                        
| 284 | 284 | ->willReturnSelf();  | 
                                                        
| 285 | 285 | $pageMapper = $this->getMockBuilder(\Page\Mapper\PageMapper::class)  | 
                                                        
| 286 | - ->setMethods(['update', 'select', 'current'])  | 
                                                        |
| 286 | + ->setMethods([ 'update', 'select', 'current' ])  | 
                                                        |
| 287 | 287 | ->disableOriginalConstructor()  | 
                                                        
| 288 | 288 | ->getMock();  | 
                                                        
| 289 | 289 | $pageMapper->expects(static::exactly(2))  | 
                                                        
@@ -313,7 +313,7 @@ discard block  | 
                                                    ||
| 313 | 313 | 'main_img' => 'test_path'  | 
                                                        
| 314 | 314 | ];  | 
                                                        
| 315 | 315 | $pageFilter = $this->getMockBuilder(\Page\Filter\PageFilter::class)  | 
                                                        
| 316 | - ->setMethods(['getInputFilter', 'setData', 'isValid', 'getValues', 'select'])  | 
                                                        |
| 316 | + ->setMethods([ 'getInputFilter', 'setData', 'isValid', 'getValues', 'select' ])  | 
                                                        |
| 317 | 317 | ->disableOriginalConstructor()  | 
                                                        
| 318 | 318 | ->getMock();  | 
                                                        
| 319 | 319 | $pageFilter->expects(static::once())  | 
                                                        
@@ -329,7 +329,7 @@ discard block  | 
                                                    ||
| 329 | 329 |              ->method('setData') | 
                                                        
| 330 | 330 | ->willReturnSelf();  | 
                                                        
| 331 | 331 | $pageMapper = $this->getMockBuilder(\Page\Mapper\PageMapper::class)  | 
                                                        
| 332 | - ->setMethods(['update', 'select', 'current'])  | 
                                                        |
| 332 | + ->setMethods([ 'update', 'select', 'current' ])  | 
                                                        |
| 333 | 333 | ->disableOriginalConstructor()  | 
                                                        
| 334 | 334 | ->getMock();  | 
                                                        
| 335 | 335 | $pageMapper->expects(static::exactly(2))  | 
                                                        
@@ -358,7 +358,7 @@ discard block  | 
                                                    ||
| 358 | 358 | ->disableOriginalConstructor()  | 
                                                        
| 359 | 359 | ->getMock();  | 
                                                        
| 360 | 360 | $pageMapper = $this->getMockBuilder(\Page\Mapper\PageMapper::class)  | 
                                                        
| 361 | - ->setMethods(['select', 'current', 'delete'])  | 
                                                        |
| 361 | + ->setMethods([ 'select', 'current', 'delete' ])  | 
                                                        |
| 362 | 362 | ->disableOriginalConstructor()  | 
                                                        
| 363 | 363 | ->getMock();  | 
                                                        
| 364 | 364 | $pageMapper->expects(static::once())  | 
                                                        
@@ -391,7 +391,7 @@ discard block  | 
                                                    ||
| 391 | 391 | ->disableOriginalConstructor()  | 
                                                        
| 392 | 392 | ->getMock();  | 
                                                        
| 393 | 393 | $pageMapper = $this->getMockBuilder(\Page\Mapper\PageMapper::class)  | 
                                                        
| 394 | - ->setMethods(['select', 'current'])  | 
                                                        |
| 394 | + ->setMethods([ 'select', 'current' ])  | 
                                                        |
| 395 | 395 | ->disableOriginalConstructor()  | 
                                                        
| 396 | 396 | ->getMock();  | 
                                                        
| 397 | 397 | $pageMapper->expects(static::once())  | 
                                                        
@@ -30,7 +30,7 @@ discard block  | 
                                                    ||
| 30 | 30 | }  | 
                                                        
| 31 | 31 | |
| 32 | 32 | /**  | 
                                                        
| 33 | - * @param mixed $is_wysiwyg_editor  | 
                                                        |
| 33 | + * @param integer $is_wysiwyg_editor  | 
                                                        |
| 34 | 34 | */  | 
                                                        
| 35 | 35 | public function setIsWysiwygEditor($is_wysiwyg_editor)  | 
                                                        
| 36 | 36 |      { | 
                                                        
@@ -46,7 +46,7 @@ discard block  | 
                                                    ||
| 46 | 46 | }  | 
                                                        
| 47 | 47 | |
| 48 | 48 | /**  | 
                                                        
| 49 | - * @param mixed $slug  | 
                                                        |
| 49 | + * @param string $slug  | 
                                                        |
| 50 | 50 | */  | 
                                                        
| 51 | 51 | public function setSlug($slug)  | 
                                                        
| 52 | 52 |      { | 
                                                        
@@ -69,7 +69,7 @@ discard block  | 
                                                    ||
| 69 | 69 | }  | 
                                                        
| 70 | 70 | |
| 71 | 71 | /**  | 
                                                        
| 72 | - * @param mixed $is_active  | 
                                                        |
| 72 | + * @param integer $is_active  | 
                                                        |
| 73 | 73 | */  | 
                                                        
| 74 | 74 | public function setIsActive($is_active)  | 
                                                        
| 75 | 75 |      { | 
                                                        
@@ -85,7 +85,7 @@ discard block  | 
                                                    ||
| 85 | 85 | }  | 
                                                        
| 86 | 86 | |
| 87 | 87 | /**  | 
                                                        
| 88 | - * @param $page_uuid  | 
                                                        |
| 88 | + * @param string $page_uuid  | 
                                                        |
| 89 | 89 | */  | 
                                                        
| 90 | 90 | public function setPageUuid($page_uuid)  | 
                                                        
| 91 | 91 |      { | 
                                                        
@@ -101,7 +101,7 @@ discard block  | 
                                                    ||
| 101 | 101 | }  | 
                                                        
| 102 | 102 | |
| 103 | 103 | /**  | 
                                                        
| 104 | - * @param $page_id  | 
                                                        |
| 104 | + * @param integer $page_id  | 
                                                        |
| 105 | 105 | */  | 
                                                        
| 106 | 106 | public function setPageId($page_id)  | 
                                                        
| 107 | 107 |      { | 
                                                        
@@ -117,7 +117,7 @@ discard block  | 
                                                    ||
| 117 | 117 | }  | 
                                                        
| 118 | 118 | |
| 119 | 119 | /**  | 
                                                        
| 120 | - * @param mixed $title  | 
                                                        |
| 120 | + * @param string $title  | 
                                                        |
| 121 | 121 | */  | 
                                                        
| 122 | 122 | public function setTitle($title)  | 
                                                        
| 123 | 123 |      { | 
                                                        
@@ -133,7 +133,7 @@ discard block  | 
                                                    ||
| 133 | 133 | }  | 
                                                        
| 134 | 134 | |
| 135 | 135 | /**  | 
                                                        
| 136 | - * @param mixed $body  | 
                                                        |
| 136 | + * @param string $body  | 
                                                        |
| 137 | 137 | */  | 
                                                        
| 138 | 138 | public function setBody($body)  | 
                                                        
| 139 | 139 |      { | 
                                                        
@@ -155,7 +155,7 @@ discard block  | 
                                                    ||
| 155 | 155 | }  | 
                                                        
| 156 | 156 | |
| 157 | 157 | /**  | 
                                                        
| 158 | - * @param mixed $description  | 
                                                        |
| 158 | + * @param string $description  | 
                                                        |
| 159 | 159 | */  | 
                                                        
| 160 | 160 | public function setDescription($description)  | 
                                                        
| 161 | 161 |      { | 
                                                        
@@ -171,7 +171,7 @@ discard block  | 
                                                    ||
| 171 | 171 | }  | 
                                                        
| 172 | 172 | |
| 173 | 173 | /**  | 
                                                        
| 174 | - * @param mixed $main_img  | 
                                                        |
| 174 | + * @param string $main_img  | 
                                                        |
| 175 | 175 | */  | 
                                                        
| 176 | 176 | public function setMainImg($main_img)  | 
                                                        
| 177 | 177 |      { | 
                                                        
@@ -201,7 +201,7 @@ discard block  | 
                                                    ||
| 201 | 201 | }  | 
                                                        
| 202 | 202 | |
| 203 | 203 | /**  | 
                                                        
| 204 | - * @param mixed $is_homepage  | 
                                                        |
| 204 | + * @param integer $is_homepage  | 
                                                        |
| 205 | 205 | */  | 
                                                        
| 206 | 206 | public function setIsHomepage($is_homepage)  | 
                                                        
| 207 | 207 |      { | 
                                                        
@@ -235,10 +235,10 @@ discard block  | 
                                                    ||
| 235 | 235 | *  | 
                                                        
| 236 | 236 | * @param array $data  | 
                                                        
| 237 | 237 | */  | 
                                                        
| 238 | - public function exchangeArray($data = [])  | 
                                                        |
| 238 | + public function exchangeArray($data = [ ])  | 
                                                        |
| 239 | 239 |      { | 
                                                        
| 240 | 240 |          foreach (array_keys(get_object_vars($this)) as $property) { | 
                                                        
| 241 | -            $this->{$property} = isset($data[$property]) ? $data[$property] | 
                                                        |
| 241 | +            $this->{$property} = isset($data[ $property ]) ? $data[ $property ] | 
                                                        |
| 242 | 242 | : null;  | 
                                                        
| 243 | 243 | }  | 
                                                        
| 244 | 244 | }  | 
                                                        
@@ -249,18 +249,18 @@ discard block  | 
                                                    ||
| 249 | 249 | public function getArrayCopy()  | 
                                                        
| 250 | 250 |      { | 
                                                        
| 251 | 251 | return [  | 
                                                        
| 252 | - 'page_uuid' => (binary)$this->page_uuid,  | 
                                                        |
| 253 | - 'page_id' => (string)$this->page_id,  | 
                                                        |
| 254 | - 'title' => (string)$this->title,  | 
                                                        |
| 255 | - 'body' => (string)$this->body,  | 
                                                        |
| 256 | - 'description' => (string)$this->description,  | 
                                                        |
| 257 | - 'main_img' => (string)$this->main_img,  | 
                                                        |
| 258 | - 'has_layout' => (boolean)$this->has_layout,  | 
                                                        |
| 259 | - 'is_homepage' => (boolean)$this->is_homepage,  | 
                                                        |
| 260 | - 'is_active' => (boolean)$this->is_active,  | 
                                                        |
| 261 | - 'is_wysiwyg_editor' => (boolean)$this->is_wysiwyg_editor,  | 
                                                        |
| 262 | - 'created_at' => (string)$this->created_at,  | 
                                                        |
| 263 | - 'slug' => (string)$this->slug  | 
                                                        |
| 252 | + 'page_uuid' => (binary) $this->page_uuid,  | 
                                                        |
| 253 | + 'page_id' => (string) $this->page_id,  | 
                                                        |
| 254 | + 'title' => (string) $this->title,  | 
                                                        |
| 255 | + 'body' => (string) $this->body,  | 
                                                        |
| 256 | + 'description' => (string) $this->description,  | 
                                                        |
| 257 | + 'main_img' => (string) $this->main_img,  | 
                                                        |
| 258 | + 'has_layout' => (boolean) $this->has_layout,  | 
                                                        |
| 259 | + 'is_homepage' => (boolean) $this->is_homepage,  | 
                                                        |
| 260 | + 'is_active' => (boolean) $this->is_active,  | 
                                                        |
| 261 | + 'is_wysiwyg_editor' => (boolean) $this->is_wysiwyg_editor,  | 
                                                        |
| 262 | + 'created_at' => (string) $this->created_at,  | 
                                                        |
| 263 | + 'slug' => (string) $this->slug  | 
                                                        |
| 264 | 264 | ];  | 
                                                        
| 265 | 265 | }  | 
                                                        
| 266 | 266 | }  | 
                                                        
@@ -21,7 +21,7 @@ discard block  | 
                                                    ||
| 21 | 21 | public function testRegisterNewShouldReturnTrue()  | 
                                                        
| 22 | 22 |      { | 
                                                        
| 23 | 23 | $newsletterMapper = $this->getMockBuilder(\Newsletter\Mapper\NewsletterMapper::class)  | 
                                                        
| 24 | - ->setMethods(['insert', 'select', 'current'])  | 
                                                        |
| 24 | + ->setMethods([ 'insert', 'select', 'current' ])  | 
                                                        |
| 25 | 25 | ->disableOriginalConstructor()  | 
                                                        
| 26 | 26 | ->getMock();  | 
                                                        
| 27 | 27 | $newsletterMapper->expects(static::once())  | 
                                                        
@@ -41,7 +41,7 @@ discard block  | 
                                                    ||
| 41 | 41 | public function testRegisterNewWithExistingEmailShouldDoNothingAndReturnNull()  | 
                                                        
| 42 | 42 |      { | 
                                                        
| 43 | 43 | $newsletterMapper = $this->getMockBuilder(\Newsletter\Mapper\NewsletterMapper::class)  | 
                                                        
| 44 | - ->setMethods(['select', 'current'])  | 
                                                        |
| 44 | + ->setMethods([ 'select', 'current' ])  | 
                                                        |
| 45 | 45 | ->disableOriginalConstructor()  | 
                                                        
| 46 | 46 | ->getMock();  | 
                                                        
| 47 | 47 | $newsletterMapper->expects(static::once())  | 
                                                        
@@ -10,7 +10,7 @@  | 
                                                    ||
| 10 | 10 | ->disableOriginalConstructor()  | 
                                                        
| 11 | 11 | ->getMockForAbstractClass();  | 
                                                        
| 12 | 12 | $container = $this->getMockBuilder(\Interop\Container\ContainerInterface::class)  | 
                                                        
| 13 | - ->setMethods(['get'])  | 
                                                        |
| 13 | + ->setMethods([ 'get' ])  | 
                                                        |
| 14 | 14 | ->getMockForAbstractClass();  | 
                                                        
| 15 | 15 | $container->expects(static::at(0))  | 
                                                        
| 16 | 16 |              ->method('get') | 
                                                        
@@ -10,7 +10,7 @@  | 
                                                    ||
| 10 | 10 | ->disableOriginalConstructor()  | 
                                                        
| 11 | 11 | ->getMockForAbstractClass();  | 
                                                        
| 12 | 12 | $container = $this->getMockBuilder(\Interop\Container\ContainerInterface::class)  | 
                                                        
| 13 | - ->setMethods(['get'])  | 
                                                        |
| 13 | + ->setMethods([ 'get' ])  | 
                                                        |
| 14 | 14 | ->getMockForAbstractClass();  | 
                                                        
| 15 | 15 | $container->expects(static::at(0))  | 
                                                        
| 16 | 16 |              ->method('get') |