Coding standard updated

This commit is contained in:
jitendra 2019-01-15 17:32:43 +05:30
parent aae6593469
commit 575373cd75
18 changed files with 28 additions and 28 deletions

View File

@ -58,7 +58,7 @@ class CategoryDataGrid extends DataGrid
'sortable' => true,
'searchable' => true,
'width' => '100px',
'wrapper' => function($value){
'wrapper' => function($value) {
if ($value == 1)
return 'Active';
else

View File

@ -67,7 +67,7 @@ class InventorySourcesDataGrid extends DataGrid
'searchable' => true,
'sortable' => true,
'width' => '100px',
'wrapper' => function($value){
'wrapper' => function($value) {
if ($value == 1)
return 'Active';
else

View File

@ -40,7 +40,7 @@ class NewsLetterDataGrid extends DataGrid
'searchable' => true,
'sortable' => true,
'width' => '100px',
'wrapper' => function($value){
'wrapper' => function($value) {
if ($value == 1)
return 'True';
else

View File

@ -35,7 +35,7 @@ class Handler extends ExceptionHandler
}
// else if ($exception instanceof ErrorException) {
// if (strpos($_SERVER['REQUEST_URI'], 'admin') !== false){
// if (strpos($_SERVER['REQUEST_URI'], 'admin') !== false) {
// return response()->view('admin::errors.500', [], 500);
// }else {
// return response()->view('shop::errors.500', [], 500);

View File

@ -429,7 +429,7 @@ class ProductRepository extends Repository
$params = request()->input();
return $this->scopeQuery(function($query){
return $this->scopeQuery(function($query) {
return $query->distinct()->addSelect('products.*');
})->paginate(isset($params['limit']) ? $params['limit'] : 9, ['products.id']);
}

View File

@ -37,7 +37,7 @@ class SearchRepository extends Repository
return 'Webkul\Product\Models\Product';
}
public function searchAttributes(){
public function searchAttributes() {
// $this->pushCriteria(app(searchByAttributeCriteria::class));
}

File diff suppressed because one or more lines are too long

View File

@ -67,7 +67,7 @@ class SubscriptionController extends Controller
$alreadySubscribed = $this->subscription->findWhere(['email' => $email]);
$unique = function() use($alreadySubscribed){
$unique = function() use($alreadySubscribed) {
if ($alreadySubscribed->count() > 0 ) {
return 0;
} else {

View File

@ -2144,7 +2144,7 @@ section.cart {
}
// cart pages responsive css start
@media only screen and (max-width: 770px){
@media only screen and (max-width: 770px) {
section.cart {
.cart-content {
display: block;
@ -2169,7 +2169,7 @@ section.cart {
}
}
@media only screen and (max-width: 560px){
@media only screen and (max-width: 560px) {
section.cart {
.cart-content {
.left-side {
@ -2204,7 +2204,7 @@ section.cart {
}
}
@media only screen and (max-width: 386px){
@media only screen and (max-width: 386px) {
section.cart {
.cart-content {
.left-side {

View File

@ -133,7 +133,7 @@
@push('scripts')
<script>
function removeLink(message){
function removeLink(message) {
if (!confirm(message))
event.preventDefault();
}

View File

@ -82,7 +82,7 @@
@push('scripts')
<script>
function deleteAddress(message){
function deleteAddress(message) {
if (!confirm(message))
event.preventDefault();
}

View File

@ -30,12 +30,12 @@
@push('scripts')
<script>
$(document).ready(function(){
$(document).ready(function() {
var sideMenuTitle = document.getElementById("responsive-side-menu");
var downIcon = document.getElementById("down-icon");
var accountSideMenu = document.getElementsByClassName("account-side-menu");
sideMenuTitle.addEventListener("click", function(){
sideMenuTitle.addEventListener("click", function() {
if (downIcon.className == 'icon icon-arrow-down right') {
for(let i=0 ; i < accountSideMenu.length ; i++) {
accountSideMenu[i].style.display="block";

View File

@ -142,7 +142,7 @@
var galleryTemplate = document.getElementById('product-gallery-template');
var addTOButton = document.getElementsByClassName('add-to-buttons')[0];
if (galleryTemplate){
if (galleryTemplate) {
if (state != 'interactive') {
document.getElementById('loader').style.display="none";
addTOButton.style.display="flex";
@ -155,7 +155,7 @@
var thumbFrame = document.getElementsByClassName('thumb-frame');
var productHeroImage = document.getElementsByClassName('product-hero-image')[0];
if (thumbList && productHeroImage){
if (thumbList && productHeroImage) {
for(let i=0; i < thumbFrame.length ; i++) {
thumbFrame[i].style.height = (productHeroImage.offsetHeight/4) + "px";
@ -168,7 +168,7 @@
}
window.onresize = function() {
if (thumbList && productHeroImage){
if (thumbList && productHeroImage) {
for(let i=0; i < thumbFrame.length; i++) {
thumbFrame[i].style.height = (productHeroImage.offsetHeight/4) + "px";

File diff suppressed because one or more lines are too long

View File

@ -21,9 +21,9 @@ abstract class AbstractFillable
$error = false;
$this->setFillable();
foreach ($args as $key => $value){
foreach ($args as $key => $value) {
$this->{$key} = $value;
// switch($value){
// switch($value) {
// case (in_array(gettype($value), ["array", "object", "function"])):
// $error = $this->fieldValidate(
// $key,
@ -39,8 +39,8 @@ abstract class AbstractFillable
// }
// if ($error) throw new \Exception($error);
}
// foreach ($this->fillable as $fill){
// if (isset($args[$fill])){
// foreach ($this->fillable as $fill) {
// if (isset($args[$fill])) {
// $this->{$fill} = [$args[$fill]];
// }
// }
@ -55,7 +55,7 @@ abstract class AbstractFillable
return gettype($value) === "string";
}
)
){
) {
if (in_array(gettype($value), $allowed)) {
// if ($merge) {
// if (! $this->{$key}) $this->{$key} = [];

View File

@ -41,7 +41,7 @@ class Column extends AbstractFillable
* 'data-attr' => 'whatever you want',
* 'onlclick' => "window.alert('alert from datagrid column')"
* ],
* wrapper => function($value){
* wrapper => function($value) {
* return '<a href="'.$value.'">Nikhil</a>';
* },
* ]

View File

@ -19,11 +19,11 @@ class Css extends AbstractFillable
protected $tbody = 'tbody';
protected $tbody_td = 'tbody_td';
public function __construct($args){
public function __construct($args) {
parent::__construct($args);
}
protected function setFillable(){
protected function setFillable() {
$this->fillable = [
'datagrid',
'table',

View File

@ -25,7 +25,7 @@ class Pagination extends Paginator
int $limit = null,
int $offset = null,
int $view = null
){
) {
$this->limit = $limit ?: self::LIMIT;
$this->offset = $offset ?: self::OFFSET;
$this->view = $view ?: self::VIEW;