Skip to content

Commit

Permalink
psr2 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nadar committed Dec 19, 2016
1 parent a459a81 commit ca3d4e2
Show file tree
Hide file tree
Showing 40 changed files with 128 additions and 128 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ public function safeUp()

public function safeDown()
{
$this->dropTable('account_user');
$this->dropTable('account_user');
}
}
2 changes: 1 addition & 1 deletion modules/account/src/frontend/views/register/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<?php echo $form->field($model, 'city') ?>
<?php echo $form->field($model, 'country') ?>
<?php echo $form->field($model, 'subscription_newsletter')->checkbox(); ?>
<?php echo $form->field($model, 'subscription_medianews')->checkbox(); ?>
<?php echo $form->field($model, 'subscription_medianews')->checkbox(); ?>
<button type="submit">Submit</button>
<?php echo $form->errorSummary($model); ?>
<?php \yii\widgets\ActiveForm::end(); ?>
Expand Down
14 changes: 7 additions & 7 deletions modules/admin/src/aws/InfoActiveWindow.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

/**
* Diplay Detail from ActiveRecord.
*
*
* This ActiveWindow uses the {{yii\widgets\DetailView}} Widget in order to display the data.
*
*
* Thefore you can customize all attributes to display and how to convert them:
*
*
* ```php
* $config->aw->load([
* 'class' => 'luya\admin\aws\InfoActiveWindow',
* 'class' => 'luya\admin\aws\InfoActiveWindow',
* 'attributes' => [
* 'title', // nothing define will use `text`
* 'description:html', // renders html tags
Expand All @@ -22,9 +22,9 @@
* ],
* ]);
* ```
*
*
* Available Formatters:
*
*
* + relativeTime
* + datetime
* + time
Expand All @@ -37,7 +37,7 @@
* + paragraphs
* + size
* + shortSize
*
*
* See [Formatting Guide](http://www.yiiframework.com/doc-2.0/guide-output-formatting.html)
*/
class InfoActiveWindow extends ActiveWindow
Expand Down
17 changes: 9 additions & 8 deletions modules/admin/src/aws/TagActiveWindow.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@
* ```php
* $config->aw->load(['class' => '\luya\admin\aws\TagActiveWindow']);
* ```
*
*
* If you want to define a specific table name instead of the table name where the active window is attached to use:
*
*
* ```php
* $config->aw->load(['class' => '\luya\admin\aws\TagActiveWindow', 'tableName' => 'virtualTableName']);
* ```
*
*
* If you have assigned the {{luya\admin\aws\TagActiveWindow}} aws to an ngrest model you can use the {{luya\admin\traits\TagsTrait}} to access the data.
*
*
* For example when the {{luya\admin\traits\TagsTrait}} is used you can get the data for an active record:
*
*
* ```php
* $tags = Model::findOne(1)->tags;
* ```
*
*
* or you can also get all tags assigned for this table:
*
*
* ```php
* $allTags = Model::findTags();
* ```
Expand Down Expand Up @@ -62,7 +62,8 @@ class TagActiveWindow extends ActiveWindow
public function getTableName()
{
if ($this->_tableName === null) {
$this->_tableName = $this->model->tableName();;
$this->_tableName = $this->model->tableName();
;
}

return $this->_tableName;
Expand Down
2 changes: 1 addition & 1 deletion modules/admin/src/base/Property.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Abstract Page Property Class.
*
* Each property must implement this class.
*
*
* Reade more in the Guide [[app-cmsproperties.md]].
*
* @author Basil Suter <basil.suter@nadar.io>
Expand Down
2 changes: 1 addition & 1 deletion modules/admin/src/components/AdminMenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/**
* Admin Menu Data.
*
*
* Collect informations from the menu data based on the admin modules in order to generate the different admin menu levels and containers.
*
* @author Basil Suter <basil@nadar.io>
Expand Down
14 changes: 7 additions & 7 deletions modules/admin/src/components/AdminUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@

/**
* AdminUser Component.
*
*
* The administration user Identity extends from {{yii\web\User}} in order to configure customized behaviors.
*
*
* @author Basil Suter <basil@nadar.io>
*/
class AdminUser extends User
{
/**
* @inheritdoc
*/
/**
* @inheritdoc
*/
public $identityClass = '\luya\admin\models\User';

/**
Expand Down Expand Up @@ -68,7 +68,7 @@ public function onBeforeLogout()

/**
* Perform a can api match request for the logged in user if user is logged in, returns false otherwhise.
*
*
* See the {{luya\admin\components\Auth::matchApi}} for details.
*
* @param string $apiEndpoint
Expand All @@ -85,7 +85,7 @@ public function canApi($apiEndpoint, $typeVerification = false)
*
* See the {{luya\admin\components\Auth::matchRoute}} for details.
*
* @param string $route
* @param string $route
* @return booelan Whether the current user can request the provided route.
*/
public function canRoute($route)
Expand Down
22 changes: 11 additions & 11 deletions modules/admin/src/components/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@

/**
* Auth components gives informations about permissions, who can do what.
*
*
* In order to understand the permission weights read the [[app-admin-module-permission.md]] section.
*
* @author Basil Suter <basil@nadar.io>
*/
class Auth extends \yii\base\Component
{
/**
* @var integer Can create new records
*/
/**
* @var integer Can create new records
*/
const CAN_CREATE = 1;

/**
Expand Down Expand Up @@ -70,7 +70,7 @@ public function getApiTable($userId, $apiEndpoint)

/**
* Get the data for a given route and user.
*
*
* @param integer $userId The user id the find the data from.
* @param string $route The route to find from the permission system.
* @return array
Expand All @@ -88,7 +88,7 @@ public function getRouteTable($userId, $route)

/**
* Calculate the weight from whether the user can create, udpate and/or delete.
*
*
* @param integer $create Whether the user can create new records
* @param integer $update Whether the user can update records.
* @param integer $delete Whether the user can delete records.
Expand All @@ -105,9 +105,9 @@ public function permissionWeight($create, $update, $delete)

/**
* Verify a permission type against its calculated `weight`.
*
*
* In order to calculate the permissions weight see {{\luya\admin\components\Auth::permissionWeight}}.
*
*
* @param string $type The type of permission (1,2,3 see constants)
* @param integer $permissionWeight A weight of the permssions which is value between 1 - 9, see [[app-admin-module-permission.md]].
* @return boolean
Expand Down Expand Up @@ -158,7 +158,7 @@ public function matchApi($userId, $apiEndpoint, $typeVerification = false)

/**
* See if the user has permitted the provided route.
*
*
* @param integer $userId The user id from admin users
* @param string $route The route to test.
* @return boolean
Expand All @@ -176,7 +176,7 @@ public function matchRoute($userId, $route)

/**
* Add a new route to the permission system (admin_auth)
*
*
* @param string $moduleName The name of the module where the route is located.
* @param string $route The route which is an identifier.
* @param string $name A readable name for the route to display in the permissions system.
Expand Down Expand Up @@ -206,7 +206,7 @@ public function addRoute($moduleName, $route, $name)

/**
* Add a new api route to the permission system (admin_auth)
*
*
* @param string $moduleName The name of the module where the route is located.
* @param string $apiEndpoint An API endpoint name like `admin-user-group` which is an identifier.
* @param string $name A readable name for the api to display in the permission system.
Expand Down
6 changes: 3 additions & 3 deletions modules/admin/src/components/UrlRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
*/
class UrlRule extends \yii\rest\UrlRule
{
/**
* @inheritdoc
*/
/**
* @inheritdoc
*/
public function init()
{
$map = Yii::$app->getModule('admin')->controllerMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ public function safeDown()
{
$this->dropTable('admin_storage_effect');
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public function safeUp()
$this->createTable('admin_config', [
'name' => $this->string(80),
'value' => $this->string(255)->notNull(),
'PRIMARY KEY(name)',
'PRIMARY KEY(name)',
]);
}

Expand Down
2 changes: 1 addition & 1 deletion modules/admin/src/migrations/m150924_120914_admin_prop.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ public function safeUp()

public function safeDown()
{
$this->dropTable('admin_property');
$this->dropTable('admin_property');
}
}
4 changes: 2 additions & 2 deletions modules/admin/src/migrations/m151026_161841_admin_tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function safeUp()

public function safeDown()
{
$this->dropTable('admin_tag');
$this->dropTable('admin_tag_relation');
$this->dropTable('admin_tag');
$this->dropTable('admin_tag_relation');
}
}
2 changes: 1 addition & 1 deletion modules/admin/src/models/Lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function init()
}
});

$this->on(self::EVENT_BEFORE_DELETE, function($event) {
$this->on(self::EVENT_BEFORE_DELETE, function ($event) {
if ($this->is_default == 1) {
$this->addError('is_default', Module::t('model_lang_delete_error_is_default'));
$event->isValid = false;
Expand Down
10 changes: 5 additions & 5 deletions modules/admin/src/models/LoginForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

/**
* Admin Login Form Model.
*
*
* @property \luya\admin\models\User $user The user model.
* @author Basil Suter <basil@nadar.io>
*/
Expand Down Expand Up @@ -46,7 +46,7 @@ public function attributeLabels()

/**
* Inline validator.
*
*
* @param string $attribute Attribute value
*/
public function validatePassword($attribute)
Expand All @@ -61,7 +61,7 @@ public function validatePassword($attribute)

/**
* Send the secure token by mail.
*
*
* @return boolean
*/
public function sendSecureLogin()
Expand All @@ -78,7 +78,7 @@ public function sendSecureLogin()

/**
* Validate the secure token.
*
*
* @param string $token
* @param integer $userId
* @return boolean|\luya\admin\models\User
Expand All @@ -100,7 +100,7 @@ public function validateSecureToken($token, $userId)

/**
* Login the current user if valid.
*
*
* @return boolean|\luya\admin\models\User|boolean
*/
public function login()
Expand Down
2 changes: 1 addition & 1 deletion modules/admin/src/models/StorageFolder.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/**
* Storage Folder Model.
*
*
* @author Basil Suter <basil@nadar.io>
*/
final class StorageFolder extends ActiveRecord
Expand Down
2 changes: 1 addition & 1 deletion modules/admin/src/models/StorageImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

/**
* StorageImage Model.
*
*
* @author Basil Suter <basil@nadar.io>
*/
final class StorageImage extends ActiveRecord
Expand Down
4 changes: 2 additions & 2 deletions modules/admin/src/models/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function ngRestConfig($config)

/**
* Get all primary key assigned tags for a table name.
*
*
* @param string $tableName
* @param integer $pkId
* @return \yii\db\ActiveRecord
Expand All @@ -92,7 +92,7 @@ public static function findRelations($tableName, $pkId)

/**
* Get all assigned tags for table name.
*
*
* @param string $tableName
* @return \yii\db\ActiveRecord
*/
Expand Down
Loading

0 comments on commit ca3d4e2

Please sign in to comment.