Skip to content

Commit

Permalink
Travis: added nette/code-checker
Browse files Browse the repository at this point in the history
  • Loading branch information
janpecha committed Feb 16, 2017
1 parent b385411 commit b8f1e19
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 42 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ php:

script:
- vendor/bin/tester tests -j 1 -s -p php -c tests/php-unix.ini
- php temp/code-checker/src/code-checker.php

after_failure:
# Print *.actual content
- for i in $(find tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done

before_script:
- travis_retry composer install --no-interaction
- travis_retry composer create-project nette/code-checker temp/code-checker ~2.5.0

sudo: false

Expand Down
2 changes: 1 addition & 1 deletion license.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
OTHER DEALINGS IN THE SOFTWARE.
8 changes: 4 additions & 4 deletions src/LeanMapper/DefaultEntityFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
class DefaultEntityFactory implements IEntityFactory
{

/*
* @inheritdoc
/**
* {@inheritdoc}
*/
public function createEntity($entityClass, $arg = null)
{
Expand All @@ -29,8 +29,8 @@ public function createEntity($entityClass, $arg = null)



/*
* @inheritdoc
/**
* {@inheritdoc}
*/
public function createCollection(array $entities)
{
Expand Down
36 changes: 18 additions & 18 deletions src/LeanMapper/DefaultMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class DefaultMapper implements IMapper



/*
* @inheritdoc
/**
* {@inheritdoc}
*/
public function getPrimaryKey($table)
{
Expand All @@ -39,8 +39,8 @@ public function getPrimaryKey($table)



/*
* @inheritdoc
/**
* {@inheritdoc}
*/
public function getTable($entityClass)
{
Expand All @@ -49,8 +49,8 @@ public function getTable($entityClass)



/*
* @inheritdoc
/**
* {@inheritdoc}
*/
public function getEntityClass($table, Row $row = null)
{
Expand All @@ -59,8 +59,8 @@ public function getEntityClass($table, Row $row = null)



/*
* @inheritdoc
/**
* {@inheritdoc}
*/
public function getColumn($entityClass, $field)
{
Expand All @@ -69,8 +69,8 @@ public function getColumn($entityClass, $field)



/*
* @inheritdoc
/**
* {@inheritdoc}
*/
public function getEntityField($table, $column)
{
Expand All @@ -79,8 +79,8 @@ public function getEntityField($table, $column)



/*
* @inheritdoc
/**
* {@inheritdoc}
*/
public function getRelationshipTable($sourceTable, $targetTable)
{
Expand All @@ -89,8 +89,8 @@ public function getRelationshipTable($sourceTable, $targetTable)



/*
* @inheritdoc
/**
* {@inheritdoc}
*/
public function getRelationshipColumn($sourceTable, $targetTable)
{
Expand All @@ -99,8 +99,8 @@ public function getRelationshipColumn($sourceTable, $targetTable)



/*
* @inheritdoc
/**
* {@inheritdoc}
*/
public function getTableByRepositoryClass($repositoryClass)
{
Expand All @@ -113,8 +113,8 @@ public function getTableByRepositoryClass($repositoryClass)



/*
* @inheritdoc
/**
* {@inheritdoc}
*/
public function getImplicitFilters($entityClass, Caller $caller = null)
{
Expand Down
38 changes: 19 additions & 19 deletions src/LeanMapper/Reflection/PropertyFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,19 @@ public static function createFromAnnotation($annotationType, $annotation, Entity
$matches = [];
$matched = preg_match(
'~
^(null\|)?
((?:\\\\?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)+)
(\[\])?
(\|null)?\s+
(\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)
(?:\s+=\s*(?:
"((?:\\\\"|[^"])+)" | # double quoted string
\'((?:\\\\\'|[^\'])+)\' | # single quoted string
([^ ]*)) # unquoted value
)?
(?:\s*\(([^)]+)\))?
(?:\s+(.*)\s*)?
~xi',
^(null\|)?
((?:\\\\?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)+)
(\[\])?
(\|null)?\s+
(\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)
(?:\s+=\s*(?:
"((?:\\\\"|[^"])+)" | # double quoted string
\'((?:\\\\\'|[^\'])+)\' | # single quoted string
([^ ]*)) # unquoted value
)?
(?:\s*\(([^)]+)\))?
(?:\s+(.*)\s*)?
~xi',
$annotation,
$matches
);
Expand Down Expand Up @@ -212,12 +212,12 @@ public static function createFromAnnotation($annotationType, $annotation, Entity
}
$matched = preg_match(
'~
^\s*(?:
"((?:\\\\"|[^"])+)" | # double quoted string
\'((?:\\\\\'|[^\'])+)\' | # single quoted string
([^ ]*) # unquoted value
)
~xi',
^\s*(?:
"((?:\\\\"|[^"])+)" | # double quoted string
\'((?:\\\\\'|[^\'])+)\' | # single quoted string
([^ ]*) # unquoted value
)
~xi',
$flagArgument,
$matches
);
Expand Down

0 comments on commit b8f1e19

Please sign in to comment.