Passed
Push — master ( 965595...8aafb9 )
by Aimeos
04:58
created
src/helpers.php 1 patch
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -9,57 +9,57 @@
 block discarded – undo
9 9
 
10 10
 if( !function_exists( 'aiconfig' ) )
11 11
 {
12
-    /**
13
-     * Returns the configuration setting for the given key
14
-     *
15
-     * @param string $key Configuration key
16
-     * @param mixed $default Default value if the configuration key isn't found
17
-     * @return mixed Configuration value
18
-     */
19
-    function aiconfig( $key, $default = null )
20
-    {
21
-        return app( '\Aimeos\Shop\Base\Config' )->get()->get( $key, $default );
22
-    }
12
+	/**
13
+	 * Returns the configuration setting for the given key
14
+	 *
15
+	 * @param string $key Configuration key
16
+	 * @param mixed $default Default value if the configuration key isn't found
17
+	 * @return mixed Configuration value
18
+	 */
19
+	function aiconfig( $key, $default = null )
20
+	{
21
+		return app( '\Aimeos\Shop\Base\Config' )->get()->get( $key, $default );
22
+	}
23 23
 }
24 24
 
25 25
 
26 26
 if( !function_exists( 'aitrans' ) )
27 27
 {
28
-    /**
29
-     * Translates the given message
30
-     *
31
-     * @param string $singular Message to translate
32
-     * @param array $params List of paramters for replacing the placeholders in that order
33
-     * @param string $domain Translation domain
34
-     * @param string $locale ISO language code, maybe combine with ISO currency code, e.g. "en_US"
35
-     * @return string Translated string
36
-     */
37
-    function aitrans( $singular, array $params = array(), $domain = 'client', $locale = null )
38
-    {
39
-        $i18n = app( '\Aimeos\Shop\Base\Context' )->get()->getI18n( $locale );
28
+	/**
29
+	 * Translates the given message
30
+	 *
31
+	 * @param string $singular Message to translate
32
+	 * @param array $params List of paramters for replacing the placeholders in that order
33
+	 * @param string $domain Translation domain
34
+	 * @param string $locale ISO language code, maybe combine with ISO currency code, e.g. "en_US"
35
+	 * @return string Translated string
36
+	 */
37
+	function aitrans( $singular, array $params = array(), $domain = 'client', $locale = null )
38
+	{
39
+		$i18n = app( '\Aimeos\Shop\Base\Context' )->get()->getI18n( $locale );
40 40
 
41
-        return vsprintf( $i18n->dt( $domain, $singular ), $params );
42
-    }
41
+		return vsprintf( $i18n->dt( $domain, $singular ), $params );
42
+	}
43 43
 }
44 44
 
45 45
 
46 46
 if( !function_exists( 'aitransplural' ) )
47 47
 {
48
-    /**
49
-     * Translates the given messages based on the number
50
-     *
51
-     * @param string $singular Message to translate
52
-     * @param string $plural Message for plural translations
53
-     * @param integer $number Count of items to chose the correct plural translation
54
-     * @param array $params List of paramters for replacing the placeholders in that order
55
-     * @param string $domain Translation domain
56
-     * @param string $locale ISO language code, maybe combine with ISO currency code, e.g. "en_US"
57
-     * @return string Translated string
58
-     */
59
-    function aitransplural( $singular, $plural, $number, array $params = array(), $domain = 'client', $locale = null )
60
-    {
61
-        $i18n = app( '\Aimeos\Shop\Base\Context' )->get()->getI18n( $locale );
48
+	/**
49
+	 * Translates the given messages based on the number
50
+	 *
51
+	 * @param string $singular Message to translate
52
+	 * @param string $plural Message for plural translations
53
+	 * @param integer $number Count of items to chose the correct plural translation
54
+	 * @param array $params List of paramters for replacing the placeholders in that order
55
+	 * @param string $domain Translation domain
56
+	 * @param string $locale ISO language code, maybe combine with ISO currency code, e.g. "en_US"
57
+	 * @return string Translated string
58
+	 */
59
+	function aitransplural( $singular, $plural, $number, array $params = array(), $domain = 'client', $locale = null )
60
+	{
61
+		$i18n = app( '\Aimeos\Shop\Base\Context' )->get()->getI18n( $locale );
62 62
 
63
-        return vsprintf( $i18n->dn( $domain, $singular, $plural, $number ), $params );
64
-    }
63
+		return vsprintf( $i18n->dn( $domain, $singular, $plural, $number ), $params );
64
+	}
65 65
 }
Please login to merge, or discard this patch.
src/Aimeos/Shop/Base/View.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -100,8 +100,7 @@  discard block
 block discarded – undo
100 100
 			|| ( ( $user = \Illuminate\Support\Facades\Auth::user() ) !== null && $user->superuser )
101 101
 		) {
102 102
 			$helper = new \Aimeos\MW\View\Helper\Access\All( $view );
103
-		}
104
-		else
103
+		} else
105 104
 		{
106 105
 			$support = $this->support;
107 106
 
@@ -245,8 +244,7 @@  discard block
 block discarded – undo
245 244
 		{
246 245
 			$i18n = $this->i18n->get( array( $locale ) );
247 246
 			$translation = $i18n[$locale];
248
-		}
249
-		else
247
+		} else
250 248
 		{
251 249
 			$translation = new \Aimeos\MW\Translation\None( 'en' );
252 250
 		}
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -283,7 +283,7 @@
 block discarded – undo
283 283
 			}
284 284
 		}
285 285
 
286
-		$helper = new \Aimeos\MW\View\Helper\Url\Laravel5( $view, app('url'), $fixed );
286
+		$helper = new \Aimeos\MW\View\Helper\Url\Laravel5( $view, app( 'url' ), $fixed );
287 287
 		$view->addHelper( 'url', $helper );
288 288
 
289 289
 		return $view;
Please login to merge, or discard this patch.
src/Aimeos/Shop/Facades/Shop.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -18,13 +18,13 @@
 block discarded – undo
18 18
  */
19 19
 class Shop extends \Illuminate\Support\Facades\Facade
20 20
 {
21
-    /**
22
-     * Get the registered name of the component.
23
-     *
24
-     * @return string
25
-     */
26
-    protected static function getFacadeAccessor()
27
-    {
28
-        return 'aimeos.shop';
29
-    }
21
+	/**
22
+	 * Get the registered name of the component.
23
+	 *
24
+	 * @return string
25
+	 */
26
+	protected static function getFacadeAccessor()
27
+	{
28
+		return 'aimeos.shop';
29
+	}
30 30
 }
Please login to merge, or discard this patch.
tests/Controller/AdminControllerTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 {
5 5
 	public function testIndexAction()
6 6
 	{
7
-		$response = $this->action('GET', '\Aimeos\Shop\Controller\AdminController@indexAction');
7
+		$response = $this->action( 'GET', '\Aimeos\Shop\Controller\AdminController@indexAction' );
8 8
 
9 9
 		$this->assertEquals( '302', $response->getStatusCode() );
10 10
 	}
Please login to merge, or discard this patch.
tests/Base/ConfigTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -4,15 +4,15 @@
 block discarded – undo
4 4
 {
5 5
 	public function testGet()
6 6
 	{
7
-		$aimeos = $this->app->make('\Aimeos\Shop\Base\Aimeos');
7
+		$aimeos = $this->app->make( '\Aimeos\Shop\Base\Aimeos' );
8 8
 
9
-		$configMock = $this->getMockBuilder('\Illuminate\Config\Repository')
10
-			->setMethods( array('get') )->getMock();
9
+		$configMock = $this->getMockBuilder( '\Illuminate\Config\Repository' )
10
+			->setMethods( array( 'get' ) )->getMock();
11 11
 
12
-		$configMock->expects( $this->exactly(4) )->method('get')
12
+		$configMock->expects( $this->exactly( 4 ) )->method( 'get' )
13 13
 			->will( $this->onConsecutiveCalls( true, 'laravel:', array(), array() ) );
14 14
 
15
-		$object = new \Aimeos\Shop\Base\Config($configMock, $aimeos);
15
+		$object = new \Aimeos\Shop\Base\Config( $configMock, $aimeos );
16 16
 
17 17
 		$this->assertInstanceOf( '\Aimeos\MW\Config\Iface', $object->get() );
18 18
 	}
Please login to merge, or discard this patch.
tests/Base/ViewTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 {
6 6
 	public function testCreateNoLocale()
7 7
 	{
8
-		$config = $this->getMockBuilder('\Illuminate\Config\Repository')->getMock();
8
+		$config = $this->getMockBuilder( '\Illuminate\Config\Repository' )->getMock();
9 9
 
10 10
 		$i18n = $this->getMockBuilder( '\Aimeos\Shop\Base\I18n' )
11 11
 			->disableOriginalConstructor()
Please login to merge, or discard this patch.
tests/Base/ContextTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 {
5 5
 	public function testGetNoLocale()
6 6
 	{
7
-		$session = $this->getMockBuilder('\Illuminate\Session\Store')->disableOriginalConstructor()->getMock();
7
+		$session = $this->getMockBuilder( '\Illuminate\Session\Store' )->disableOriginalConstructor()->getMock();
8 8
 		$config = $this->app->make( '\Aimeos\Shop\Base\Config' );
9 9
 		$locale = $this->app->make( '\Aimeos\Shop\Base\Locale' );
10 10
 		$i18n = $this->app->make( '\Aimeos\Shop\Base\I18n' );
Please login to merge, or discard this patch.
tests/Base/LocaleTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 {
5 5
 	public function testGetBackend()
6 6
 	{
7
-		$mock = $this->getMockBuilder('\Illuminate\Config\Repository')->getMock();
7
+		$mock = $this->getMockBuilder( '\Illuminate\Config\Repository' )->getMock();
8 8
 		$context = $this->app->make( '\Aimeos\Shop\Base\Context' )->get( false, 'backend' );
9 9
 
10 10
 		$object = new \Aimeos\Shop\Base\Locale( $mock );
Please login to merge, or discard this patch.
tests/Base/I18nTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -4,19 +4,19 @@
 block discarded – undo
4 4
 {
5 5
 	public function testGet()
6 6
 	{
7
-		$aimeos = $this->app->make('\Aimeos\Shop\Base\Aimeos');
7
+		$aimeos = $this->app->make( '\Aimeos\Shop\Base\Aimeos' );
8 8
 
9
-		$configMock = $this->getMockBuilder('\Illuminate\Config\Repository')
10
-			->setMethods( array('get', 'has') )->getMock();
9
+		$configMock = $this->getMockBuilder( '\Illuminate\Config\Repository' )
10
+			->setMethods( array( 'get', 'has' ) )->getMock();
11 11
 
12
-		$configMock->expects( $this->once() )->method('has')
13
-			->will( $this->returnValue(true) );
12
+		$configMock->expects( $this->once() )->method( 'has' )
13
+			->will( $this->returnValue( true ) );
14 14
 
15
-		$configMock->expects( $this->exactly(3) )->method('get')
15
+		$configMock->expects( $this->exactly( 3 ) )->method( 'get' )
16 16
 			->will( $this->onConsecutiveCalls( true, 'laravel:', array() ) );
17 17
 
18
-		$object = new \Aimeos\Shop\Base\I18n($configMock, $aimeos);
19
-		$list = $object->get( array('en') );
18
+		$object = new \Aimeos\Shop\Base\I18n( $configMock, $aimeos );
19
+		$list = $object->get( array( 'en' ) );
20 20
 
21 21
 		$this->assertInstanceOf( '\Aimeos\MW\Translation\Iface', $list['en'] );
22 22
 	}
Please login to merge, or discard this patch.