Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/bluzphp/module-phones int…
Browse files Browse the repository at this point in the history
…o develop

� Conflicts:
�	.scrutinizer.yml
�	.travis.yml
�	LICENSE.md
�	README.md
�	application/modules/phones/views/grid.phtml
�	composer.json
  • Loading branch information
Anton Shevchuk committed Sep 1, 2021
2 parents 17dd1a2 + 7ac218c commit 3232489
Show file tree
Hide file tree
Showing 18 changed files with 72 additions and 39 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
.DS_Store
.idea
vendor
composer.lock
composer.phar
37 changes: 26 additions & 11 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,44 @@
checks:
php:
code_rating: true
deprecated_code_usage: true
duplication: true
no_short_open_tag: true
build:
cache:
directories:
- "vendor"
- "~/.composer"
nodes:
analysis:
tests:
override:
- php-scrutinizer-run
checks:
php:
psr2_switch_declaration: true
psr2_class_declaration: true
no_short_open_tag: true
deprecated_code_usage: true
code_rating: true
dependencies:
override:
- COMPOSER_ROOT_VERSION=dev-master
filter:
excluded_paths: [bin, docs, docker, data, tests, vendor]
excluded_paths:
- "bin/"
- "data/"
- "docs/"
- "docker/"
- "public/"
- "tests/"
dependency_paths:
- "vendor/"
tools:
external_code_coverage: false
php_analyzer: true
php_code_sniffer:
config:
standard: PSR2
standard: PSR12
php_cpd:
enabled: true
excluded_dirs: [bin, docs, docker, data, tests, vendor]
excluded_dirs: [bin, data, docs, docker, public, tests, vendor]
php_loc:
enabled: true
excluded_dirs: [bin, docs, docker, data, tests, vendor]
excluded_dirs: [bin, data, docs, docker, public, tests, vendor]
php_mess_detector: true
php_pdepend: true
sensiolabs_security_checker: true
18 changes: 12 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
language: php
php:
- 7.1
- 7.2
- 7.3
- master
- 7.4
- 8.0
matrix:
allow_failures:
- php: master
- php: 8.0
env:
- BLUZ_MODULE=phones
before_install:
Expand All @@ -26,13 +25,20 @@ before_script:
- php vendor/bin/bluzman db:seed:run
script:
# Check code style
- php vendor/bin/phpcs ./application --standard=PSR1,PSR2 --encoding=utf-8 --ignore=./application/_loader.php
- php vendor/bin/phpcs ./application --standard=PSR12 --encoding=utf-8 --ignore=./application/_loader.php
# Run built-in web-server
- php vendor/bin/bluzman server:start --host 127.0.0.1 -b -e testing
- php vendor/bin/bluzman server:start --host 127.0.0.1 -b
# Run CodeCeption tests
- php vendor/bin/bluzman test module-$BLUZ_MODULE
notifications:
email: false
webhooks:
urls:
- https://webhooks.gitter.im/e/b84e6a583d6eea87d0eb
- https://webhooks.gitter.im/e/c4fa557829c5bd992271
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: false # default: false
branches:
only:
- master
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2012-2019 by Bluz PHP Team
Copyright (c) by Bluz PHP Team

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# Module Users Profile for Bluz Skeleton

## Achievements

[![Latest Stable Version](https://img.shields.io/packagist/v/bluzphp/module-media.svg?label=version&style=flat)](https://packagist.org/packages/bluzphp/module-media)
[![Latest Stable Version](https://img.shields.io/packagist/v/bluzphp/module-phones.svg?label=version&style=flat)](https://packagist.org/packages/bluzphp/module-phones)

[![Build Status](https://img.shields.io/travis/bluzphp/module-phones/master.svg?style=flat)](https://travis-ci.com/bluzphp/module-phones)

[![Build Status](https://img.shields.io/travis/bluzphp/module-media/master.svg?style=flat)](https://travis-ci.org/bluzphp/module-media)
[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/bluzphp/module-phones.svg?style=flat)](https://scrutinizer-ci.com/g/bluzphp/module-phones/)

[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/bluzphp/module-media.svg?style=flat)](https://scrutinizer-ci.com/g/bluzphp/module-media/)
[![Total Downloads](https://img.shields.io/packagist/dt/bluzphp/module-phones.svg?style=flat)](https://packagist.org/packages/bluzphp/module-phones)

[![Total Downloads](https://img.shields.io/packagist/dt/bluzphp/module-media.svg?style=flat)](https://packagist.org/packages/bluzphp/module-media)
[![License](https://img.shields.io/packagist/l/bluzphp/module-phones.svg?style=flat)](https://packagist.org/packages/bluzphp/module-phones)

[![License](https://img.shields.io/packagist/l/bluzphp/module-media.svg?style=flat)](https://packagist.org/packages/bluzphp/module-media)

## Usage
### Install module
Expand Down
2 changes: 2 additions & 0 deletions application/models/UsersPhones/Crud.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?php

/**
* @namespace
*/

namespace Application\UsersPhones;

/**
Expand Down
4 changes: 3 additions & 1 deletion application/models/UsersPhones/Grid.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?php

/**
* @namespace
*/

namespace Application\UsersPhones;

use Bluz\Grid\Source\SelectSource;
Expand All @@ -25,7 +27,7 @@ class Grid extends \Bluz\Grid\Grid
* @return void
* @throws \Bluz\Grid\GridException
*/
public function init() : void
public function init(): void
{
// Current table as source of grid
$adapter = new SelectSource();
Expand Down
4 changes: 3 additions & 1 deletion application/models/UsersPhones/Row.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?php

/**
* @namespace
*/

namespace Application\UsersPhones;

use Bluz\Validator\Traits\Validator;
Expand All @@ -28,7 +30,7 @@ class Row extends \Bluz\Db\Row
/**
* @return void
*/
protected function afterRead() : void
protected function afterRead(): void
{
$this->addValidator('userId')
->numeric()
Expand Down
4 changes: 3 additions & 1 deletion application/models/UsersPhones/Table.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?php

/**
* @namespace
*/

namespace Application\UsersPhones;

/**
Expand Down Expand Up @@ -52,7 +54,7 @@ class Table extends \Bluz\Db\Table
*
* @return void
*/
public function init() : void
public function init(): void
{
$this->linkTo('userId', 'Users', 'id');
}
Expand Down
Empty file.
1 change: 1 addition & 0 deletions application/modules/phones/controllers/crud.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* CRUD controller for UsersPhones model
*
Expand Down
1 change: 1 addition & 0 deletions application/modules/phones/controllers/crud/post.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* CRUD controller for POST method
*
Expand Down
3 changes: 2 additions & 1 deletion application/modules/phones/controllers/grid.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Grid controller for UsersPhones model
*
Expand Down Expand Up @@ -27,7 +28,7 @@
Layout::breadCrumbs(
[
Layout::ahref('Dashboard', ['dashboard', 'index']),
__('Pages')
__('Phones')
]
);
$grid = new UsersPhones\Grid();
Expand Down
Empty file.
8 changes: 3 additions & 5 deletions application/modules/phones/views/crud.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ $url = $this->url('phones', 'crud');
<input type="hidden" id="id" name="id" value="<?= $row['id'] ?>"/>
<div class="modal-header">
<h4 class="modal-title"><?=__('Phone number')?></h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<button type="button" class="btn-close" aria-label="Close" data-bs-dismiss="modal"></button>
</div>
<div class="modal-body">
<div class="form-group row">
Expand Down Expand Up @@ -53,8 +51,8 @@ $url = $this->url('phones', 'crud');
<!-- Place additional form fields here -->
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary">Save</button>
<a href="#" class="btn btn-default" data-dismiss="modal">Close</a>
<button type="submit" class="btn btn-primary"><?=__('Save')?></button>
<button type="button" class="btn btn-light" data-bs-dismiss="modal"><?= __('Close') ?></button>
</div>
</form>
<?php
Expand Down
4 changes: 2 additions & 2 deletions application/modules/phones/views/grid.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ $uid = $grid->getUid();
<td class="controls d-flex justify-content-around">
<a href="<?= $this->url('phones', 'crud', ['id' => $row['id']]) ?>" class="btn btn-primary"
data-ajax-dialog data-ajax-method="get" data-modal-style="modal-lg">
<i class="fas fa-pencil-alt"></i>
<i class="bi bi-pencil"></i>
</a>
<a href="<?= $this->url('phones', 'crud', ['id' => $row['id']]) ?>" class="btn btn-danger"
data-confirm data-ajax data-ajax-method="delete">
<i class="fa fa-trash"></i>
<i class="bi bi-trash"></i>
</a>
</td>
</tr>
Expand Down
7 changes: 3 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"name": "bluzphp/module-phones",
"name": "bluzphp/module-profile",
"type": "bluz-module",
"license": "MIT",
"description": "bluz phones module",
"description": "bluz profile module",
"require": {
"bluzphp/framework": "~7.11",
"bluzphp/composer-plugin": "~2.1"
"bluzphp/composer-plugin": "~2.4"
}
}
1 change: 0 additions & 1 deletion data/migrations/20171116155216_users_phones.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,5 @@ public function change()
'update' => 'CASCADE'
])
->create();

}
}

0 comments on commit 3232489

Please sign in to comment.