Skip to content

Commit 4fda97e

Browse files
authored
Merge pull request LaravelCollective#590 from ranabd36/dev-5.8
Pull request for Larvel 5.8
2 parents 777b6d3 + d1999f8 commit 4fda97e

File tree

4 files changed

+14
-16
lines changed

4 files changed

+14
-16
lines changed

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
],
2020
"require": {
2121
"php": ">=7.1.3",
22-
"illuminate/http": "5.7.*",
23-
"illuminate/routing": "5.7.*",
24-
"illuminate/session": "5.7.*",
25-
"illuminate/support": "5.7.*",
26-
"illuminate/view": "5.7.*"
22+
"illuminate/http": "5.8.*",
23+
"illuminate/routing": "5.8.*",
24+
"illuminate/session": "5.8.*",
25+
"illuminate/support": "5.8.*",
26+
"illuminate/view": "5.8.*"
2727
},
2828
"require-dev": {
29-
"illuminate/database": "5.7.*",
29+
"illuminate/database": "5.8.*",
3030
"mockery/mockery": "~1.0",
3131
"phpunit/phpunit": "~7.1"
3232
},

src/Componentable.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Collective\Html;
44

55
use BadMethodCallException;
6+
use Illuminate\Support\Arr;
67
use Illuminate\Support\HtmlString;
78

89
trait Componentable
@@ -81,7 +82,7 @@ protected function getComponentData(array $signature, array $arguments)
8182
$default = null;
8283
}
8384

84-
$data[$variable] = array_get($arguments, $i, $default);
85+
$data[$variable] = Arr::get($arguments, $i, $default);
8586

8687
$i++;
8788
}

src/Eloquent/FormAccessible.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,7 @@ public function getFormValue($key)
6969
*/
7070
public function isNestedModel($key)
7171
{
72-
if (in_array($key, array_keys($this->getRelations()))) {
73-
return true;
74-
}
75-
76-
return false;
72+
return in_array($key, array_keys($this->getRelations()));
7773
}
7874

7975
/**

src/FormBuilder.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Illuminate\Contracts\View\Factory;
1010
use Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull;
1111
use Illuminate\Http\Request;
12+
use Illuminate\Support\Arr;
1213
use Illuminate\Support\Collection;
1314
use Illuminate\Support\Facades\App;
1415
use Illuminate\Support\HtmlString;
@@ -134,7 +135,7 @@ public function __construct(HtmlBuilder $html, UrlGenerator $url, Factory $view,
134135
*/
135136
public function open(array $options = [])
136137
{
137-
$method = array_get($options, 'method', 'post');
138+
$method = Arr::get($options, 'method', 'post');
138139

139140
// We need to extract the proper method from the attributes. If the method is
140141
// something other than GET or POST we'll use POST since we will spoof the
@@ -159,7 +160,7 @@ public function open(array $options = [])
159160
// is used to spoof requests for this PUT, PATCH, etc. methods on forms.
160161
$attributes = array_merge(
161162

162-
$attributes, array_except($options, $this->reserved)
163+
$attributes, Arr::except($options, $this->reserved)
163164

164165
);
165166

@@ -589,9 +590,9 @@ protected function setTextAreaSize($options)
589590
// If the "size" attribute was not specified, we will just look for the regular
590591
// columns and rows attributes, using sane defaults if these do not exist on
591592
// the attributes array. We'll then return this entire options array back.
592-
$cols = array_get($options, 'cols', 50);
593+
$cols = Arr::get($options, 'cols', 50);
593594

594-
$rows = array_get($options, 'rows', 10);
595+
$rows = Arr::get($options, 'rows', 10);
595596

596597
return array_merge($options, compact('cols', 'rows'));
597598
}

0 commit comments

Comments
 (0)