Skip to content

Commit

Permalink
Merge pull request #34 from phalcon/4.x
Browse files Browse the repository at this point in the history
4.x Merge
  • Loading branch information
ruudboon authored Dec 21, 2019
2 parents c8c1637 + 09a3f2e commit bcd70d4
Show file tree
Hide file tree
Showing 846 changed files with 57,134 additions and 42,166 deletions.
30 changes: 30 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
language: php

php:
- '7.3'

dist: bionic

cache:
timeout: 604800
directories:
- "$HOME/.composer/cache"
- "$HOME/assets"

before_install:
- git config --global advice.detachedHead false
- if [ -n "$GITHUB_TOKEN" ]; then composer config github-oauth.github.com "$GITHUB_TOKEN"; fi

install:
- pecl install --force psr

before_script:
- travis_retry composer install --no-interaction --no-ansi --no-progress --no-suggest

script:
- vendor/bin/psalm
- phpenv config-rm xdebug.ini || true
- vendor/bin/phpcs

notifications:
email: false
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Phalcon IDE Stubs
# Phalcon IDE Stubs v4

This repo provide the most complete Phalcon Framework stubs which enables autocompletion in modern IDEs.

Expand Down
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
"forum": "https://forum.phalconphp.com/"
},
"require": {
"php": ">=5.3.0"
"php": ">=7.2.0"
},
"require-dev": {
"squizlabs/php_codesniffer": "3.*",
"vimeo/psalm": "^3.4"
}
}
13 changes: 13 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0"?>
<ruleset name="Phalcon">
<description>Phalcon Coding Standards</description>
<arg value="-colors"/>
<arg value="s"/>
<rule ref="PSR2">
<exclude name="PSR2.Methods.MethodDeclaration.Underscore"/>
<exclude name="Generic.Files.LineLength.TooLong"/>
<exclude name="PSR1.Files.SideEffects.FoundWithSymbols"/>
<exclude name="PSR2.Classes.PropertyDeclaration.Underscore"/>
</rule>
<file>src</file>
</ruleset>
37 changes: 37 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0"?>
<psalm
totallyTyped="false"
resolveFromConfigFile="true"
allowStringToStandInForClass="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
autoloader="vendor/autoload.php"
>
<projectFiles>
<directory name="src" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>

<issueHandlers>
<MissingReturnType errorLevel="suppress" />
<InvalidReturnType errorLevel="suppress" />
<MissingPropertyType errorLevel="suppress" />
<ImplementedParamTypeMismatch errorLevel="info" />
<MismatchingDocblockParamType errorLevel="info" />
<UndefinedDocblockClass errorLevel="info" />
<PropertyNotSetInConstructor errorLevel="info" />
<UndefinedClass errorLevel="info" />
<OverriddenPropertyAccess errorLevel="info" />
<InvalidPropertyAssignmentValue errorLevel="info" />
<InvalidDocblock errorLevel="info" />
<InvalidClass errorLevel="info" />
<MoreSpecificImplementedParamType errorLevel="info" />
<LessSpecificImplementedReturnType errorLevel="info" />
<MismatchingDocblockReturnType errorLevel="info" />
<ReservedWord errorLevel="info" />
<MissingConstructor errorLevel="info" />
</issueHandlers>
</psalm>
60 changes: 0 additions & 60 deletions src/Phalcon/Acl.php

This file was deleted.

130 changes: 130 additions & 0 deletions src/Phalcon/Acl/Adapter/AbstractAdapter.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
<?php

/* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/
namespace Phalcon\Acl\Adapter;

use Phalcon\Events\ManagerInterface;
use Phalcon\Events\EventsAwareInterface;

/**
* Adapter for Phalcon\Acl adapters
*/
abstract class AbstractAdapter implements AdapterInterface, EventsAwareInterface
{
/**
* Active access which the list is checking if some role can access it
*
* @var string
*/
protected $activeAccess;

/**
* Access Granted
*
* @var bool
*/
protected $accessGranted = false;

/**
* Role which the list is checking if it's allowed to certain
* component/access
*
* @var string
*/
protected $activeRole;

/**
* Component which the list is checking if some role can access it
*
* @var string
*/
protected $activeComponent;

/**
* Default access
*
* @var bool
*/
protected $defaultAccess = false;

/**
* Events manager
*
* @var mixed
*/
protected $eventsManager;


/**
* Active access which the list is checking if some role can access it
*
* @return string
*/
public function getActiveAccess(): string
{
}

/**
* Role which the list is checking if it's allowed to certain
*
* component/access
*
* @return string
*/
public function getActiveRole(): string
{
}

/**
* Component which the list is checking if some role can access it
*
* @return string
*/
public function getActiveComponent(): string
{
}

/**
* Returns the default ACL access level
*
* @return int
*/
public function getDefaultAction(): int
{
}

/**
* Returns the internal event manager
*
* @return ManagerInterface
*/
public function getEventsManager(): ManagerInterface
{
}

/**
* Sets the default access level (Phalcon\Acl::ALLOW or Phalcon\Acl::DENY)
*
* @param int $defaultAccess
* @return void
*/
public function setDefaultAction(int $defaultAccess)
{
}

/**
* Sets the events manager
*
* @param ManagerInterface $eventsManager
* @return void
*/
public function setEventsManager(ManagerInterface $eventsManager)
{
}
}
Loading

0 comments on commit bcd70d4

Please sign in to comment.