-
Notifications
You must be signed in to change notification settings - Fork 31
PHP7 Fatal Errors fixed #33 #34
base: 2.0
Are you sure you want to change the base?
Conversation
amenk
commented
Feb 8, 2016
- Use Contracts in Parameters
- added the "use" statement to a closure
* Use Contracts in Parameters * added the "use" statement to a closure
@@ -42,7 +43,7 @@ public function findHidden($id) | |||
public function findByAttribute(array $attribute) | |||
{ | |||
$collection = []; | |||
$all = Album::where(function($query) { | |||
$all = Album::where(function($query) use ($attribute) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected 1 space after FUNCTION keyword; 0 found
I think we should refer directly in the module, not using a global facade (which is actually not defined)
@@ -11,7 +13,7 @@ class GalleryController extends Controller | |||
*/ | |||
public function index() | |||
{ | |||
$allAlbums = \Gallery::album()->all(); | |||
$allAlbums = Gallery::album()->all(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spaces must be used to indent lines; tabs are not allowed
I think we should refer directly in the module, not using a global facade (which is actually not defined)
@@ -14,7 +15,7 @@ class PhotosController extends Controller | |||
*/ | |||
public function create() | |||
{ | |||
$albumArray = \Gallery::album()->all()->toArray(); | |||
$albumArray = Gallery::album()->all()->toArray(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spaces must be used to indent lines; tabs are not allowed
@Nitpick-CI you are very annoying :-) |
I think we should refer directly in the module, not using a global facade (which is actually not defined)
@@ -38,7 +39,7 @@ public function store(Request $request) | |||
'order' => 0, | |||
]); | |||
|
|||
\Gallery::album()->add($album); | |||
Gallery::album()->add($album); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spaces must be used to indent lines; tabs are not allowed
Fixes ...
@@ -65,7 +66,7 @@ public function store(Request $request) | |||
*/ | |||
public function show($albumId, $photoId) | |||
{ | |||
$photo = \Gallery::photo()->find($photoId); | |||
$photo = Gallery::photo()->find($photoId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spaces must be used to indent lines; tabs are not allowed