Passed
Push — master ( a6b111...37c75f )
by F
03:14
created
src/Middleware/Locale.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      *
24 24
      * @return mixed
25 25
      */
26
-    public function handle(Request $request, Closure $next)
26
+    public function handle (Request $request, Closure $next)
27 27
     {
28 28
         $session = $request->getSession();
29 29
 
Please login to merge, or discard this patch.
src/Exceptions/AddressDoesNotExist.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      *
24 24
      * @return static
25 25
      */
26
-    public static function create(string $addressName)
26
+    public static function create (string $addressName)
27 27
     {
28 28
         return new static("There is no address named `{$addressName}`.");
29 29
     }
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      *
36 36
      * @return static
37 37
      */
38
-    public static function withId(int $addressId)
38
+    public static function withId (int $addressId)
39 39
     {
40 40
         return new static("There is no [address] with id `{$addressId}`.");
41 41
     }
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      *
48 48
      * @return static
49 49
      */
50
-    public static function withType(string $addressType)
50
+    public static function withType (string $addressType)
51 51
     {
52 52
         return new static("There is no [address] with type `{$addressType}`.");
53 53
     }
Please login to merge, or discard this patch.
src/Controllers/AddressController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
      *
14 14
      * @return \Illuminate\Contracts\Support\Renderable
15 15
      */
16
-    public function index()
16
+    public function index ()
17 17
     {
18 18
     }
19 19
 
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      *
23 23
      * @return \Illuminate\Contracts\Support\Renderable
24 24
      */
25
-    public function create()
25
+    public function create ()
26 26
     {
27 27
         $types = Type::all();
28 28
         $countries = Country::all();
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      *
36 36
      * @return \Illuminate\Contracts\Support\Renderable
37 37
      */
38
-    public function store()
38
+    public function store ()
39 39
     {
40 40
     }
41 41
 }
Please login to merge, or discard this patch.
src/Models/Currency.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
      *
32 32
      * @param array $attributes additional attributes for model initialisation
33 33
      */
34
-    public function __construct(array $attributes = [])
34
+    public function __construct (array $attributes = [])
35 35
     {
36 36
         parent::__construct($attributes);
37 37
 
Please login to merge, or discard this patch.
src/Models/Address.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      *
39 39
      * @return void
40 40
      */
41
-    public function __construct(array $attributes = [])
41
+    public function __construct (array $attributes = [])
42 42
     {
43 43
         parent::__construct($attributes);
44 44
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      *
51 51
      * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
52 52
      */
53
-    public function type(): BelongsTo
53
+    public function type (): BelongsTo
54 54
     {
55 55
         return $this->belongsTo(Address\Type::class);
56 56
     }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      *
61 61
      * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
62 62
      */
63
-    public function country(): BelongsTo
63
+    public function country (): BelongsTo
64 64
     {
65 65
         return $this->belongsTo(Country::class);
66 66
     }
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      *
75 75
      * @return \PWWEB\Localisation\Contracts\Address
76 76
      */
77
-    public static function findById(int $id): AddressContract
77
+    public static function findById (int $id): AddressContract
78 78
     {
79 79
         $address = static::getAddresses(['id' => $id])->first();
80 80
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      *
95 95
      * @return \PWWEB\Localisation\Contracts\Address
96 96
      */
97
-    public static function findByType(string $type): AddressContract
97
+    public static function findByType (string $type): AddressContract
98 98
     {
99 99
         $address = static::getAddresses(['type' => $type])->first();
100 100
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
      *
113 113
      * @return Collection collection of addresses
114 114
      */
115
-    protected static function getAddresses(array $params = []): Collection
115
+    protected static function getAddresses (array $params = []): Collection
116 116
     {
117 117
         return app(LocalisationRegistrar::class)
118 118
             ->setAddressClass(static::class)
Please login to merge, or discard this patch.
src/Models/Language.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      *
29 29
      * @return void
30 30
      */
31
-    public function __construct(array $attributes = [])
31
+    public function __construct (array $attributes = [])
32 32
     {
33 33
         parent::__construct($attributes);
34 34
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      *
41 41
      * @return BelongsToMany countries the language belongs to
42 42
      */
43
-    public function countries(): BelongsToMany
43
+    public function countries (): BelongsToMany
44 44
     {
45 45
         return $this->belongsToMany(
46 46
             config('pwweb.localisation.models.countries'),
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      *
60 60
      * @return \PWWEB\Localisation\Contracts\Language
61 61
      */
62
-    public static function findByName(string $name): LanguageContract
62
+    public static function findByName (string $name): LanguageContract
63 63
     {
64 64
         $language = static::getLanguages(['name' => $name])->first();
65 65
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
      *
80 80
      * @return \PWWEB\Localisation\Contracts\Language
81 81
      */
82
-    public static function findById(int $id): LanguageContract
82
+    public static function findById (int $id): LanguageContract
83 83
     {
84 84
         $language = static::getLanguages(['id' => $id])->first();
85 85
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      *
100 100
      * @return \PWWEB\Localisation\Contracts\Language
101 101
      */
102
-    public static function findByLocale(string $locale): LanguageContract
102
+    public static function findByLocale (string $locale): LanguageContract
103 103
     {
104 104
         $language = static::getLanguages(['locale' => $locale])->first();
105 105
 
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      *
118 118
      * @return Collection collection of languages
119 119
      */
120
-    protected static function getLanguages(array $params = []): Collection
120
+    protected static function getLanguages (array $params = []): Collection
121 121
     {
122 122
         return app(LocalisationRegistrar::class)
123 123
             ->setLanguageClass(static::class)
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
      *
132 132
      * @return array
133 133
      */
134
-    protected static function getLocales(array $params = []): array
134
+    protected static function getLocales (array $params = []): array
135 135
     {
136 136
         $locales = [];
137 137
         $languages = self::getLanguages($params);
Please login to merge, or discard this patch.
src/Models/Address/Type.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      *
32 32
      * @param array $attributes additional attributes for model initialisation
33 33
      */
34
-    public function __construct(array $attributes = [])
34
+    public function __construct (array $attributes = [])
35 35
     {
36 36
         parent::__construct($attributes);
37 37
 
@@ -45,12 +45,12 @@  discard block
 block discarded – undo
45 45
      *
46 46
      * @return string
47 47
      */
48
-    public function getNameAttribute($value)
48
+    public function getNameAttribute ($value)
49 49
     {
50 50
         if (null === $value || '' === $value) {
51 51
             return '';
52 52
         }
53 53
 
54
-        return __('pwweb::localization.' . $value);
54
+        return __('pwweb::localization.'.$value);
55 55
     }
56 56
 }
Please login to merge, or discard this patch.
src/Controllers/LanguageController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
      *
16 16
      * @return \Illuminate\Http\RedirectResponse
17 17
      */
18
-    public function switch($locale)
18
+    public function switch ($locale)
19 19
     {
20 20
         $locales = (array) Language::getLocales();
21 21
 
Please login to merge, or discard this patch.
src/Traits/HasAddresses.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      *
31 31
      * @return string
32 32
      */
33
-    public function getAddressClass(): string
33
+    public function getAddressClass (): string
34 34
     {
35 35
         if (false === isset($this->addressClass)) {
36 36
             $this->addressClass = app(LocalisationRegistrar::class)->getAddressClass();
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      *
45 45
      * @return \Illuminate\Database\Eloquent\Relations\MorphToMany
46 46
      */
47
-    public function addresses(): MorphToMany
47
+    public function addresses (): MorphToMany
48 48
     {
49 49
         return $this->morphToMany(
50 50
             config('pwweb.localisation.models.address'),
@@ -62,12 +62,12 @@  discard block
 block discarded – undo
62 62
      *
63 63
      * @return mixed
64 64
      */
65
-    public function assignAddress(...$addresses)
65
+    public function assignAddress (...$addresses)
66 66
     {
67 67
         $addresses = collect($addresses)
68 68
             ->flatten()
69 69
             ->map(
70
-                function ($address) {
70
+                function($address) {
71 71
                     if (true === empty($address)) {
72 72
                         return false;
73 73
                     }
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
                 }
77 77
             )
78 78
             ->filter(
79
-                function ($address) {
79
+                function($address) {
80 80
                     return $address instanceof Address;
81 81
                 }
82 82
             )
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
             $class = \get_class($model);
93 93
 
94 94
             $class::saved(
95
-                function ($object) use ($addresses, $model) {
95
+                function($object) use ($addresses, $model) {
96 96
                     static $modelLastFiredOn;
97 97
                     if (null !== $modelLastFiredOn && $modelLastFiredOn === $model) {
98 98
                         return;
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      *
117 117
      * @return \PWWEB\Localisation\Contracts\Address
118 118
      */
119
-    protected function getStoredAddress($address): Address
119
+    protected function getStoredAddress ($address): Address
120 120
     {
121 121
         $addressClass = $this->getAddressClass();
122 122
 
Please login to merge, or discard this patch.