Skip to content

Commit f90ad40

Browse files
authored
Merge pull request #6 from letournel/scrutinizer-fixes
fix: travis CI build and some scrutinzer feedback
2 parents 9397f88 + ea8f7d7 commit f90ad40

File tree

3 files changed

+36
-9
lines changed

3 files changed

+36
-9
lines changed

.travis.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1+
dist: precise
12
language: php
2-
33
php:
44
- 5.3
55
- 5.4
66
- 5.5
77
- 5.6
88
- 7.0
99
- 7.1
10-
1110
before_script:
1211
- composer install --dev
13-
1412
script:
1513
- phpunit

src/Converters/Grid/ASCIISyntax.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,11 @@ public function convertToSyntaxWithPath(NodeGrid $grid, NodePath $path)
9898

9999
public function findAndCreateNode($syntax, $charToFind)
100100
{
101-
for($x = 0; $x < count($syntax); $x++)
101+
$xCount = count($syntax);
102+
for($x = 0; $x < $xCount; $x++)
102103
{
103-
for($y = 0; $y < count($syntax[$x]); $y++)
104+
$yCount = count($syntax[$x]);
105+
for($y = 0; $y < $yCount; $y++)
104106
{
105107
if($syntax[$x][$y] === $charToFind)
106108
{
@@ -113,9 +115,11 @@ public function findAndCreateNode($syntax, $charToFind)
113115
public function findAndCreateNodes($syntax, $charToFind)
114116
{
115117
$nodes = array();
116-
for($x = 0; $x < count($syntax); $x++)
118+
$xCount = count($syntax);
119+
for($x = 0; $x < $xCount; $x++)
117120
{
118-
for($y = 0; $y < count($syntax[$x]); $y++)
121+
$yCount = count($syntax[$x]);
122+
for($y = 0; $y < $yCount; $y++)
119123
{
120124
if($syntax[$x][$y] === $charToFind)
121125
{

src/Converters/Grid/DeclarativeSyntax.php

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,36 @@ class DeclarativeSyntax implements ConverterGrid
99
{
1010
public function convertToGrid($syntax)
1111
{
12-
12+
throw new \RuntimeException('Not implemented');
13+
}
14+
15+
public function convertToMatrix($syntax)
16+
{
17+
throw new \RuntimeException('Not implemented');
1318
}
1419

1520
public function convertToSyntax(NodeGrid $map)
1621
{
17-
22+
throw new \RuntimeException('Not implemented');
23+
}
24+
25+
public function convertToSyntaxWithPath(NodeGrid $grid, NodePath $path)
26+
{
27+
throw new \RuntimeException('Not implemented');
28+
}
29+
30+
public function findAndCreateNode($syntax, $charToFind)
31+
{
32+
throw new \RuntimeException('Not implemented');
33+
}
34+
35+
public function findAndCreateNodes($syntax, $charToFind)
36+
{
37+
throw new \RuntimeException('Not implemented');
38+
}
39+
40+
public function generateNodePath($matrix)
41+
{
42+
throw new \RuntimeException('Not implemented');
1843
}
1944
}

0 commit comments

Comments
 (0)