@@ -118,16 +118,16 @@ |
||
| 118 | 118 | |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | - /** |
|
| 122 | - * @return array |
|
| 123 | - */ |
|
| 124 | - function make_args() { |
|
| 121 | + /** |
|
| 122 | + * @return array |
|
| 123 | + */ |
|
| 124 | + function make_args() { |
|
| 125 | 125 | |
| 126 | - return array( |
|
| 127 | - 'center' => $this->center(), |
|
| 128 | - 'zoom' => (int)$this->zoom() |
|
| 129 | - ); |
|
| 126 | + return array( |
|
| 127 | + 'center' => $this->center(), |
|
| 128 | + 'zoom' => (int)$this->zoom() |
|
| 129 | + ); |
|
| 130 | 130 | |
| 131 | - } |
|
| 131 | + } |
|
| 132 | 132 | |
| 133 | 133 | } |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | */ |
| 84 | 84 | function html_id() { |
| 85 | 85 | |
| 86 | - if ( ! isset( $this->_html_id ) ) { |
|
| 86 | + if ( !isset($this->_html_id) ) { |
|
| 87 | 87 | $this->_html_id = sprintf( 'map-%1$s', md5( serialize( array( $this->center(), $this->markers() ) ) ) ); |
| 88 | 88 | } |
| 89 | 89 | |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | |
| 126 | 126 | return array( |
| 127 | 127 | 'center' => $this->center(), |
| 128 | - 'zoom' => (int)$this->zoom() |
|
| 128 | + 'zoom' => ( int ) $this->zoom() |
|
| 129 | 129 | ); |
| 130 | 130 | |
| 131 | 131 | } |
@@ -81,22 +81,22 @@ |
||
| 81 | 81 | $this->assertEquals(12, $this->_model->zoom()); |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | - /** |
|
| 85 | - * @covers ::make_args |
|
| 86 | - */ |
|
| 84 | + /** |
|
| 85 | + * @covers ::make_args |
|
| 86 | + */ |
|
| 87 | 87 | public function testMakeArgs() { |
| 88 | 88 | |
| 89 | - $args = $this->_model->make_args(); |
|
| 90 | - |
|
| 91 | - $this->assertInternalType('array', $args); |
|
| 92 | - $this->assertArrayHasKey('center', $args); |
|
| 93 | - $this->assertArrayHasKey('zoom', $args); |
|
| 94 | - $this->assertInternalType('array', $args['center']); |
|
| 95 | - $this->assertInternalType('integer', $args['zoom']); |
|
| 96 | - $this->assertArrayHasKey('lat', $args['center']); |
|
| 97 | - $this->assertArrayHasKey('lat', $args['center']); |
|
| 98 | - $this->assertInternalType('float', $args['center']['lat']); |
|
| 99 | - $this->assertInternalType('float', $args['center']['lng']); |
|
| 89 | + $args = $this->_model->make_args(); |
|
| 90 | + |
|
| 91 | + $this->assertInternalType('array', $args); |
|
| 92 | + $this->assertArrayHasKey('center', $args); |
|
| 93 | + $this->assertArrayHasKey('zoom', $args); |
|
| 94 | + $this->assertInternalType('array', $args['center']); |
|
| 95 | + $this->assertInternalType('integer', $args['zoom']); |
|
| 96 | + $this->assertArrayHasKey('lat', $args['center']); |
|
| 97 | + $this->assertArrayHasKey('lat', $args['center']); |
|
| 98 | + $this->assertInternalType('float', $args['center']['lat']); |
|
| 99 | + $this->assertInternalType('float', $args['center']['lng']); |
|
| 100 | 100 | |
| 101 | 101 | } |
| 102 | 102 | } |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | |
| 26 | 26 | public function setUp() { |
| 27 | 27 | |
| 28 | - $this->_model = new Map_Model(array('center' => $this->_center, 'markers' => array('foo', 'bar', 'baz'), 'zoom' => 12)); |
|
| 28 | + $this->_model = new Map_Model( array( 'center' => $this->_center, 'markers' => array( 'foo', 'bar', 'baz' ), 'zoom' => 12 ) ); |
|
| 29 | 29 | |
| 30 | 30 | } |
| 31 | 31 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | */ |
| 35 | 35 | public function testCenter() { |
| 36 | 36 | |
| 37 | - $this->assertEquals($this->_center, $this->_model->center()); |
|
| 37 | + $this->assertEquals( $this->_center, $this->_model->center() ); |
|
| 38 | 38 | |
| 39 | 39 | } |
| 40 | 40 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | */ |
| 44 | 44 | public function testMarkers() { |
| 45 | 45 | |
| 46 | - $this->assertEquals(array('foo','bar','baz'), $this->_model->markers()); |
|
| 46 | + $this->assertEquals( array( 'foo', 'bar', 'baz' ), $this->_model->markers() ); |
|
| 47 | 47 | |
| 48 | 48 | } |
| 49 | 49 | |
@@ -53,9 +53,9 @@ discard block |
||
| 53 | 53 | */ |
| 54 | 54 | function testAddMarker() { |
| 55 | 55 | |
| 56 | - $this->_model->add_marker('foobar'); |
|
| 56 | + $this->_model->add_marker( 'foobar' ); |
|
| 57 | 57 | |
| 58 | - $this->assertContains('foobar', $this->_model->markers()); |
|
| 58 | + $this->assertContains( 'foobar', $this->_model->markers() ); |
|
| 59 | 59 | |
| 60 | 60 | } |
| 61 | 61 | |
@@ -65,12 +65,12 @@ discard block |
||
| 65 | 65 | */ |
| 66 | 66 | function testAddMarkers() { |
| 67 | 67 | |
| 68 | - $this->_model->add_markers(array('foobar', 'barbaz')); |
|
| 68 | + $this->_model->add_markers( array( 'foobar', 'barbaz' ) ); |
|
| 69 | 69 | |
| 70 | 70 | $markers = $this->_model->markers(); |
| 71 | 71 | |
| 72 | - $this->assertContains('foobar', $markers); |
|
| 73 | - $this->assertContains('barbaz', $markers); |
|
| 72 | + $this->assertContains( 'foobar', $markers ); |
|
| 73 | + $this->assertContains( 'barbaz', $markers ); |
|
| 74 | 74 | |
| 75 | 75 | } |
| 76 | 76 | |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | * @covers ::zoom |
| 79 | 79 | */ |
| 80 | 80 | public function testZoom() { |
| 81 | - $this->assertEquals(12, $this->_model->zoom()); |
|
| 81 | + $this->assertEquals( 12, $this->_model->zoom() ); |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | /** |
@@ -88,15 +88,15 @@ discard block |
||
| 88 | 88 | |
| 89 | 89 | $args = $this->_model->make_args(); |
| 90 | 90 | |
| 91 | - $this->assertInternalType('array', $args); |
|
| 92 | - $this->assertArrayHasKey('center', $args); |
|
| 93 | - $this->assertArrayHasKey('zoom', $args); |
|
| 94 | - $this->assertInternalType('array', $args['center']); |
|
| 95 | - $this->assertInternalType('integer', $args['zoom']); |
|
| 96 | - $this->assertArrayHasKey('lat', $args['center']); |
|
| 97 | - $this->assertArrayHasKey('lat', $args['center']); |
|
| 98 | - $this->assertInternalType('float', $args['center']['lat']); |
|
| 99 | - $this->assertInternalType('float', $args['center']['lng']); |
|
| 91 | + $this->assertInternalType( 'array', $args ); |
|
| 92 | + $this->assertArrayHasKey( 'center', $args ); |
|
| 93 | + $this->assertArrayHasKey( 'zoom', $args ); |
|
| 94 | + $this->assertInternalType( 'array', $args['center'] ); |
|
| 95 | + $this->assertInternalType( 'integer', $args['zoom'] ); |
|
| 96 | + $this->assertArrayHasKey( 'lat', $args['center'] ); |
|
| 97 | + $this->assertArrayHasKey( 'lat', $args['center'] ); |
|
| 98 | + $this->assertInternalType( 'float', $args['center']['lat'] ); |
|
| 99 | + $this->assertInternalType( 'float', $args['center']['lng'] ); |
|
| 100 | 100 | |
| 101 | 101 | } |
| 102 | 102 | } |